test_solver12 Program

Uses

  • program~~test_solver12~~UsesGraph program~test_solver12 test_solver12 forunittest forunittest program~test_solver12->forunittest module~forsolver forsolver program~test_solver12->module~forsolver module~my_function12 my_function12 program~test_solver12->module~my_function12 fordiff fordiff module~forsolver->fordiff kinds kinds module~forsolver->kinds module~my_function12->kinds

Calls

program~~test_solver12~~CallsGraph program~test_solver12 test_solver12 check check program~test_solver12->check none~solve forsolver::nlsolver%solve program~test_solver12->none~solve proc~set_options forsolver::nlsolver%set_options program~test_solver12->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
real(kind=rk), dimension(2) :: x
real(kind=rk), dimension(2) :: expected_x
type(unit_test) :: ut

Source Code

program test_solver12

   use forsolver
   use my_function12
   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-quasi-fd-modified',&
      fdm_method  = 'central',&
      fdm_tol     = 1e-7_rk,&
      nmp         = 1,&
      maxit       = 1000,&
      TolFun      = 1e-2_rk,&
      verbosity   = 0)

   call nls%solve(F=F3, 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-1_rk, 'test_solver12' )

end program test_solver12