newton_settings Derived Type

type, public :: newton_settings


Components

Type Visibility Attributes Name Initial
real(kind=pr), public :: armijo_c = 1.0e-4_pr

Sufficient decrease constant (Wolfe c1 condition). Smaller values accept more steps but give weaker convergence guarantees. Must satisfy 0 < armijo_c < 0.5. Dimensionless. Default: 1e-4.

integer, public :: armijo_max_its = 50

Maximum number of backtracking halvings per Newton step. If reached without satisfying Armijo, ls_failed is set .true. Default: 50.

real(kind=pr), public :: armijo_tau = 0.5_pr

Step-length reduction factor applied each backtracking iteration. t_new = armijo_tau * t_old until Armijo or t < t_min. Must satisfy 0 < armijo_tau < 1. Dimensionless. Default: 0.5.

real(kind=pr), public :: atol = 1.0e-9_pr

Absolute residual tolerance. Converged when max_i |F_i(x)| < atol. Units: same as F. Default: 1e-8.

real(kind=pr), public :: cond_max = 1.0e10_pr

Condition number threshold above which LM regularization is activated (or strengthened) to stabilise the linear solve. Estimated via LAPACK dgecon. Dimensionless. Default: 1e10.

real(kind=pr), public :: lambda0 = 0.0_pr

Initial value of the LM damping parameter. 0.0 = start as pure Newton; the solver activates LM automatically if conditioning is poor. Set > 0 to force LM from the first iteration. Units: [J]^2 (scales with the Jacobian entries squared). Default: 0.

real(kind=pr), public :: lambda_down = 5.0_pr

Factor by which lambda is divided after a successful step with t > 0.1. Drives the solver back toward pure Newton as the iterate improves. Dimensionless. Default: 5.

real(kind=pr), public :: lambda_max = 1.0e8_pr

Maximum lambda, expressed as a multiplier of jacobian_scale. If lambda exceeds this ceiling the solver returns NEWTON_LINE_SEARCH_FAIL. Dimensionless multiplier. Default: 1e8.

real(kind=pr), public :: lambda_min = 1.0e-6_pr

Minimum non-zero lambda, expressed as a multiplier of jacobian_scale. Effective floor = lambda_min * ||J||_F^2/n. Prevents lambda from decaying to numerical zero after a good step. Dimensionless multiplier. Default: 1e-6.

real(kind=pr), public :: lambda_up = 10.0_pr

Factor by which lambda is multiplied on a line-search failure. Larger values recover faster from bad Jacobians but may overshoot. Dimensionless. Default: 10.

integer, public :: max_its = 100

Maximum number of Newton iterations before returning NEWTON_MAX_ITS. Default: 100.

real(kind=pr), public :: rtol = 1.0e-9_pr

Relative step tolerance. Converged when max_i |dX_i| < rtol * (max_i |x_i| + atol). Catches the case where the step becomes negligible compared to x. Dimensionless. Default: 1e-6.

logical, public :: save_history = .false.

If .true., allocate result%f_history(0:iterations) and store ||F||_inf at each iteration. Slightly increases memory use. Default: .false.

integer, public :: stagnation_nits = 5

Number of consecutive iterations with negligible change in ||dX|| before the solver exits with NEWTON_STAGNATION. Default: 5.

real(kind=pr), public :: stagnation_tol = 1.0e-12_pr

Relative threshold for stagnation: iteration is counted as stagnant when |||dX||_prev - ||dX||_curr| < stagnation_tol * (||dX|| + 1). Dimensionless. Default: 1e-12.

real(kind=pr), public :: t_min = 1.0e-8_pr

Minimum accepted step length. If t < t_min the line search declares failure instead of accepting a micro-step that satisfies Armijo trivially (m changes by ~machine eps). Dimensionless (fraction of the full Newton step). Default: 1e-8.

integer, public :: verbosity = 0

Controls stdout output. 0 – silent 1 – print header + one-line summary at exit 2 – also print one line per accepted iteration Default: 0.