Skip to content

Commit

Permalink
Added rnorm output in NewtonKrylov bypass.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simkern committed Dec 11, 2024
1 parent 3e2039d commit d4a742b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/NewtonKrylov.f90
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ subroutine newton_rsp(sys, X, solver, info, rtol, atol, options, linear_solver_o

! Check for lucky convergence.
if (rnorm < target_tol) then
write(msg,'(2(A,E9.2))') 'nrorm= ', rnorm, ', target= ', target_tol
call logger%log_warning(msg, module=this_module, procedure='newton_rsp')
write(msg,'(A)') 'Initial guess is a fixed point to tolerance!'
call logger%log_warning(msg, module=this_module, procedure='newton_rsp')
newton_meta%converged = .true.
Expand Down Expand Up @@ -352,6 +354,8 @@ subroutine newton_rdp(sys, X, solver, info, rtol, atol, options, linear_solver_o

! Check for lucky convergence.
if (rnorm < target_tol) then
write(msg,'(2(A,E9.2))') 'nrorm= ', rnorm, ', target= ', target_tol
call logger%log_warning(msg, module=this_module, procedure='newton_rdp')
write(msg,'(A)') 'Initial guess is a fixed point to tolerance!'
call logger%log_warning(msg, module=this_module, procedure='newton_rdp')
newton_meta%converged = .true.
Expand Down Expand Up @@ -515,6 +519,8 @@ subroutine newton_csp(sys, X, solver, info, rtol, atol, options, linear_solver_o

! Check for lucky convergence.
if (rnorm < target_tol) then
write(msg,'(2(A,E9.2))') 'nrorm= ', rnorm, ', target= ', target_tol
call logger%log_warning(msg, module=this_module, procedure='newton_csp')
write(msg,'(A)') 'Initial guess is a fixed point to tolerance!'
call logger%log_warning(msg, module=this_module, procedure='newton_csp')
newton_meta%converged = .true.
Expand Down Expand Up @@ -678,6 +684,8 @@ subroutine newton_cdp(sys, X, solver, info, rtol, atol, options, linear_solver_o

! Check for lucky convergence.
if (rnorm < target_tol) then
write(msg,'(2(A,E9.2))') 'nrorm= ', rnorm, ', target= ', target_tol
call logger%log_warning(msg, module=this_module, procedure='newton_cdp')
write(msg,'(A)') 'Initial guess is a fixed point to tolerance!'
call logger%log_warning(msg, module=this_module, procedure='newton_cdp')
newton_meta%converged = .true.
Expand Down
2 changes: 2 additions & 0 deletions src/NewtonKrylov.fypp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ contains

! Check for lucky convergence.
if (rnorm < target_tol) then
write(msg,'(2(A,E9.2))') 'nrorm= ', rnorm, ', target= ', target_tol
call logger%log_warning(msg, module=this_module, procedure='newton_${type[0]}$${kind}$')
write(msg,'(A)') 'Initial guess is a fixed point to tolerance!'
call logger%log_warning(msg, module=this_module, procedure='newton_${type[0]}$${kind}$')
newton_meta%converged = .true.
Expand Down

0 comments on commit d4a742b

Please sign in to comment.