test_solver8 Program

Uses

  • program~~test_solver8~~UsesGraph program~test_solver8 test_solver8 forunittest forunittest program~test_solver8->forunittest module~forsolver forsolver program~test_solver8->module~forsolver module~my_function8 my_function8 program~test_solver8->module~my_function8 fordiff fordiff module~forsolver->fordiff kinds kinds module~forsolver->kinds module~my_function8->kinds

Calls

program~~test_solver8~~CallsGraph program~test_solver8 test_solver8 check check program~test_solver8->check none~solve forsolver::nlsolver%solve program~test_solver8->none~solve proc~set_options forsolver::nlsolver%set_options program~test_solver8->proc~set_options proc~newton_complex_step_rel_t0 forsolver::nlsolver%newton_complex_step_rel_T0 none~solve->proc~newton_complex_step_rel_t0 proc~newton_complex_step_rel_t1 forsolver::nlsolver%newton_complex_step_rel_T1 none~solve->proc~newton_complex_step_rel_t1 proc~newton_rel_t0 forsolver::nlsolver%newton_rel_T0 none~solve->proc~newton_rel_t0 proc~newton_rel_t1 forsolver::nlsolver%newton_rel_T1 none~solve->proc~newton_rel_t1 proc~modified_quasi_cs_newton_method_t0 forsolver::modified_quasi_cs_newton_method_T0 proc~newton_complex_step_rel_t0->proc~modified_quasi_cs_newton_method_t0 proc~quasi_cs_newton_method_t0 forsolver::quasi_cs_newton_method_T0 proc~newton_complex_step_rel_t0->proc~quasi_cs_newton_method_t0 proc~modified_quasi_cs_newton_method_t1 forsolver::modified_quasi_cs_newton_method_T1 proc~newton_complex_step_rel_t1->proc~modified_quasi_cs_newton_method_t1 proc~quasi_cs_newton_method_t1 forsolver::quasi_cs_newton_method_T1 proc~newton_complex_step_rel_t1->proc~quasi_cs_newton_method_t1 proc~modified_newton_method_t0 forsolver::modified_newton_method_T0 proc~newton_rel_t0->proc~modified_newton_method_t0 proc~modified_quasi_fd_newton_method_t0 forsolver::modified_quasi_fd_newton_method_T0 proc~newton_rel_t0->proc~modified_quasi_fd_newton_method_t0 proc~newton_method_t0 forsolver::newton_method_T0 proc~newton_rel_t0->proc~newton_method_t0 proc~quasi_fd_newton_method_t0 forsolver::quasi_fd_newton_method_T0 proc~newton_rel_t0->proc~quasi_fd_newton_method_t0 proc~modified_newton_method_t1 forsolver::modified_newton_method_T1 proc~newton_rel_t1->proc~modified_newton_method_t1 proc~modified_quasi_fd_newton_method_t1 forsolver::modified_quasi_fd_newton_method_T1 proc~newton_rel_t1->proc~modified_quasi_fd_newton_method_t1 proc~newton_method_t1 forsolver::newton_method_T1 proc~newton_rel_t1->proc~newton_method_t1 proc~quasi_fd_newton_method_t1 forsolver::quasi_fd_newton_method_T1 proc~newton_rel_t1->proc~quasi_fd_newton_method_t1 interface~solve forsolver::solve proc~modified_newton_method_t1->interface~solve derivative derivative proc~modified_quasi_cs_newton_method_t0->derivative proc~modified_quasi_cs_newton_method_t1->derivative proc~modified_quasi_cs_newton_method_t1->interface~solve proc~modified_quasi_fd_newton_method_t0->derivative proc~modified_quasi_fd_newton_method_t1->derivative proc~modified_quasi_fd_newton_method_t1->interface~solve proc~newton_method_t1->interface~solve proc~quasi_cs_newton_method_t0->derivative proc~quasi_cs_newton_method_t1->derivative proc~quasi_cs_newton_method_t1->interface~solve proc~quasi_fd_newton_method_t0->derivative proc~quasi_fd_newton_method_t1->derivative proc~quasi_fd_newton_method_t1->interface~solve proc~solver_lin forsolver::solver_lin interface~solve->proc~solver_lin proc~gels_rel forsolver::gels_rel proc~solver_lin->proc~gels_rel proc~gesv_rel forsolver::gesv_rel proc~solver_lin->proc~gesv_rel interface~gels external_interfaces_solver::gels proc~gels_rel->interface~gels interface~gesv external_interfaces_solver::gesv proc~gesv_rel->interface~gesv

Variables

Type Attributes Name Initial
type(nlsolver) :: nls
complex(kind=rk) :: x
real(kind=rk) :: expected_x
type(unit_test) :: ut

Source Code

program test_solver8

   use forsolver
   use my_function8
   use forunittest

   implicit none

   type(nlsolver) :: nls
   complex(rk)    :: x
   real(rk)       :: expected_x
   type(unit_test) :: ut

   call nls%set_options(&
      nl_method   = 'newton-quasi-cs-modified',&
      cs_tol      = tiny(0.0_rk),&
      nmp         = 2,&
      maxit       = 100,&
      TolFun      = 1e-6_rk,&
      verbosity   = 0)

   call nls%solve(F=F2, x0=(0.95_rk, 0.0_rk), x_sol=x)

   ! check if solution is close to ~=0.53128
   expected_x = 0.53128_rk
   call ut%check(x%re, 0.53128_rk, 1.0e-4_rk, 'test_solver8' )

end program test_solver8