impure subroutine newton_complex_step_rel_T1(this, F, x0, x_sol)
interface
impure function Fun4(x) result(res)
import rk
complex(rk), dimension(:), intent(in) :: x
complex(rk), dimension(:), allocatable :: res
end function Fun4
end interface
procedure(Fun4) :: F
class(nlsolver), intent(inout) :: this
complex(rk), dimension(:), intent(in) :: x0
complex(rk), dimension(size(x0)), intent(out) :: x_sol
integer :: i
if (this%verbosity == 1) then
print '(a)', '-----------------------------------------------'
print '(a)', 'maxit tol'
print '(g0, 10x, f12.8, e12.4)', this%maxit, this%TolFun
print '(a)', '-----------------------------------------------'
print '(a)', 'start newton'
print '(a)', '-----------------------------------------------'
print '(a)', 'it ||F||'
end if
select case (this%nl_method)
case ('newton-quasi-cs')
call quasi_cs_newton_method_T1(this, F, x0, x_sol)
case ('newton-quasi-cs-modified')
call modified_quasi_cs_newton_method_T1(this, F, x0, x_sol)
end select
if (this%verbosity == 1) then
print '(a)', '-----------------------------------------------'
print '(a)', 'end newton'
print '(a)', '-----------------------------------------------'
do i = 1,size(x_sol)
print '(a, g0)', 'x_sol = ', real(x_sol(i), kind=rk)
end do
! print '(a, g0)', 'x_sol = ', x_sol
end if
end subroutine newton_complex_step_rel_T1