test_solver11 Program

Uses

  • program~~test_solver11~~UsesGraph program~test_solver11 test_solver11 forunittest forunittest program~test_solver11->forunittest module~forsolver forsolver program~test_solver11->module~forsolver module~my_function11 my_function11 program~test_solver11->module~my_function11 fordiff fordiff module~forsolver->fordiff kinds kinds module~forsolver->kinds module~my_function11->kinds

Calls

program~~test_solver11~~CallsGraph program~test_solver11 test_solver11 check check program~test_solver11->check none~solve forsolver::nlsolver%solve program~test_solver11->none~solve proc~set_options forsolver::nlsolver%set_options program~test_solver11->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_solver11

   use forsolver
   use my_function11
   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',&
      fdm_method  = 'central',&
      fdm_tol     = 1e-7_rk,&
      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_solver11' )

end program test_solver11