impure subroutine newton_complex_step_rel_T0(this, F, x0, x_sol)
interface
impure function Fun3(x) result(res)
import rk
complex(rk), intent(in) :: x
complex(rk) :: res
end function Fun3
end interface
procedure(Fun3) :: F
class(nlsolver), intent(inout) :: this
complex(rk), intent(in) :: x0
complex(rk), intent(out) :: x_sol
if (this%verbosity == 1) then
print '(a)', '-----------------------------------------------'
print '(a)', 'maxit x0 tol'
print '(g0, 10x, f12.8, 10x, e12.4)', this%maxit, real(x0, kind=rk), this%TolFun
print '(a)', '-----------------------------------------------'
print '(a)', 'start newton'
print '(a)', '-----------------------------------------------'
print '(a)', 'it xn F(xn) dF(xn)/dxn'
end if
select case (this%nl_method)
case ('newton-quasi-cs')
call quasi_cs_newton_method_T0(this, F, x0, x_sol)
case ('newton-quasi-cs-modified')
call modified_quasi_cs_newton_method_T0(this, F, x0, x_sol)
end select
if (this%verbosity == 1) then
print '(a)', '-----------------------------------------------'
print '(a)', 'end newton'
print '(a)', '-----------------------------------------------'
print '(a, g0)', 'x_sol = ', x_sol
end if
end subroutine newton_complex_step_rel_T0