impure subroutine set_options(this,&
nl_method, lin_method, maxit, TolFun, alpha0, c1, c2, nmp, fdm_method, fdm_tol, cs_tol, stepsize, verbosity)
class(nlsolver), intent(inout) :: this
character(*), intent(in), optional :: nl_method
character(*), intent(in), optional :: lin_method
character(*), intent(in), optional :: stepsize
character(*), intent(in), optional :: fdm_method
real(rk), intent(in), optional :: TolFun
real(rk), intent(in), optional :: fdm_tol
real(rk), intent(in), optional :: cs_tol
integer, intent(in), optional :: maxit
real(rk), intent(in), optional :: alpha0
real(rk), intent(in), optional :: c1
real(rk), intent(in), optional :: c2
integer, intent(in), optional :: nmp
integer, intent(in), optional :: verbosity
if (present(nl_method)) then
this%nl_method = nl_method
else
this%nl_method = 'newton'
end if
if (present(lin_method)) then
this%lin_method = lin_method
else
this%lin_method = 'gels'
end if
if (present(fdm_method)) then
this%fdm_method = fdm_method
else
this%fdm_method = 'forward'
end if
if (present(maxit)) then
this%maxit = maxit
else
this%maxit = 100
end if
if (present(TolFun)) then
this%TolFun = TolFun
else
this%TolFun = 1e-4_rk
end if
if (present(fdm_tol)) then
this%fdm_tol = fdm_tol
else
this%fdm_tol = 1e-4_rk
end if
if (present(cs_tol)) then
this%cs_tol = cs_tol
else
this%cs_tol = 1e-100_rk
end if
if (present(nmp)) then
this%nmp = nmp
else
this%nmp = 2
end if
if (present(verbosity)) then
this%verbosity = verbosity
else
this%verbosity = 1
end if
! if (present(stepsize)) this%stepsize = stepsize
! if (present(alpha0)) this%alpha0 = alpha0
! if (present(c1)) this%c1 = c1
! if (present(c2)) this%c2 = c2
end subroutine set_options