test_solver10 Program

Uses

  • program~~test_solver10~~UsesGraph program~test_solver10 test_solver10 forunittest forunittest program~test_solver10->forunittest module~forsolver forsolver program~test_solver10->module~forsolver module~my_function10 my_function10 program~test_solver10->module~my_function10 fordiff fordiff module~forsolver->fordiff kinds kinds module~forsolver->kinds module~my_function10->kinds

Calls

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