Option objects for the nlsolve argument of implicit methods, with the
defaults of OrdinaryDiffEqNonlinearSolve. NLNewton() is the quasi
Newton iteration with the matrix W = M / (gamma dt) - J, kept across
steps while the step size changes by less than new_W_dt_cutoff;
NLFunctional() the fixed point iteration z = g(z) without Jacobian;
NLAnderson() the fixed point iteration with Anderson acceleration over
the last max_history iterates from iteration aa_start; and
NonlinearSolveAlg(alg) hands the stage equations to the nonlinear
solver alg (for example NewtonRaphson()), with the Jacobian W of the
integrator as its Jacobian unless precondition changes the residual; and
HomotopyNonlinearSolveAlg(alg) solves each stage by continuation in the
step size, from lambda = 0 (where the stage solution is known) to
lambda = 1, with the continuation algorithm alg (for example
HomotopySweep() or ArcLengthContinuation()); it does not take DAEs.
Each iteration stops when the
scaled increment, multiplied by eta = theta / (1 - theta), is below
kappa, and fails after max_iter iterations; a rate theta below
fast_convergence_cutoff counts as fast convergence.
Usage
NLFunctional(
kappa = 1/100,
max_iter = 10L,
fast_convergence_cutoff = 1/5,
predictor = NULL
)
NLAnderson(
kappa = 1/100,
max_iter = 10L,
max_history = 5L,
aa_start = 1L,
droptol = NULL,
fast_convergence_cutoff = 1/5,
predictor = NULL
)
NLNewton(
kappa = 1/100,
max_iter = 10L,
fast_convergence_cutoff = 1/5,
new_W_dt_cutoff = 1/5,
always_new = FALSE,
check_div = TRUE,
relax = NULL,
predictor = NULL
)
NonlinearSolveAlg(
alg = NewtonRaphson(autodiff = AutoFiniteDiff()),
kappa = 1/100,
max_iter = 10L,
fast_convergence_cutoff = 1/5,
new_W_dt_cutoff = 1/5,
always_new = FALSE,
check_div = TRUE,
precondition = NULL,
postcondition = NULL,
predictor = NULL
)
HomotopyNonlinearSolveAlg(
alg = HomotopySweep(inner = NewtonRaphson(autodiff = AutoFiniteDiff())),
kappa = 1/100,
max_iter = 10L,
fast_convergence_cutoff = 1/5,
abstol = NULL,
reltol = NULL
)Arguments
- kappa
The relative tolerance on the increment (
κupstream).- max_iter
The largest number of iterations per solve.
- fast_convergence_cutoff
The convergence rate threshold.
- predictor
A function
predictor(uprev, p, t, dt)giving the start of each stage solve, orNULL.- max_history, aa_start, droptol
The Anderson acceleration memory, first accelerated iteration and drop tolerance.
- new_W_dt_cutoff
The relative change of
gamma dtabove whichWis formed again.- always_new
Form
Wat every solve.- check_div
Stop early when the iteration diverges.
- relax
A relaxation in
[0, 1)damping the Newton update, a line searchfunction(phi, dphi, phidphi, alpha0, phi0, dphi0)whose first value is the step length along the Newton update, orNULL.- alg
A nonlinear solver algorithm, or a continuation algorithm for
HomotopyNonlinearSolveAlg().- precondition
A left preconditioner
precondition(fu, u_stage, p)of the stage residualfu, orNULL.- postcondition
An iterate corrector
postcondition(u_stage, u_stage_prev, p, cache)in terms of the stage state, orNULL.- abstol, reltol
Tolerances of the continuation solve;
abstol = NULLiskappatimes the absolute tolerance of the integrator.