pack_result Subroutine

private subroutine pack_result(res, res_out, s, hist_buf, its, f_norm, dx_norm, lambda, cond_est)

pack_result

Description

Populate result diagnostics and, when requested, copy residual history.

Arguments

Type IntentOptional Attributes Name
type(newton_result), intent(inout) :: res

Result object updated in place.

type(newton_result), intent(out), optional :: res_out

Optional copy of the result returned to the caller.

type(newton_settings), intent(in) :: s

Newton solver settings.

real(kind=pr), intent(in), optional :: hist_buf(:)

Residual-norm history buffer, hist_buf(1:its+1) copied when s%save_history.

integer, intent(in) :: its

Iterations done

real(kind=pr), intent(in) :: f_norm

||F||_inf at exit

real(kind=pr), intent(in) :: dx_norm

||dX||_inf at exit

real(kind=pr), intent(in) :: lambda

LM lambda at exit

real(kind=pr), intent(in) :: cond_est

cond(J) at exit


Called by

proc~~pack_result~~CalledByGraph proc~pack_result pack_result proc~newton newton proc~newton->proc~pack_result