Type | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|
type(nlsolver) | :: | nls | ||||
real(kind=rk), | dimension(2) | :: | x | |||
real(kind=rk), | dimension(2) | :: | expected_x | |||
type(unit_test) | :: | ut |
program test_solver10 use forsolver use my_function10 use forunittest implicit none type(nlsolver) :: nls real(rk), dimension(2) :: x, expected_x type(unit_test) :: ut call nls%set_options(& nl_method = 'newton-modified',& nmp = 1,& maxit = 100,& TolFun = 1e-15_rk,& verbosity = 0) call nls%solve(F=F3, dFdx=dF3dx, x0=[0.95_rk,0.95_rk], x_sol=x) ! check if solution is close to [1,1] expected_x = [1.0_rk,1.0_rk] call ut%check(x, expected_x, 1.0e-5_rk, 'test_solver10' ) end program test_solver10