55 "ConvergenceStatus must be ordered by severity.");
464#if MOCHI_LANGUAGE_CPP20
LinearToleranceStrategy
Strategies to select the relative tolerance of the linear solver (aka forcing term).
@ EisenstatWalker2
Eisenstat-Walker strategy no.
@ EisenstatWalker1
Eisenstat-Walker strategy no.
@ Default
Default linear tolerance strategy.
@ EisenstatWalker3
Custom Eisenstat-Walker strategy: eta = max(min(1/(2+k), sqrt(|r|)), eta_0), where k is the non-linea...
@ Constant
Constant relative tolerance.
VerbosityLevel
Verbosity levels for solvers and optimizers.
@ Warning
Errors and warnings.
ConvergenceStatus
Convergence status of the non-linear solver.
@ Diverged
Solver diverged.
@ None
Convergence status has not been set.
@ Stopped
Solver met at least one stopping criterion without converging to the requested tolerance.
@ Converged
Solver converged to the requested tolerance.
@ Count
Number of convergence status enum values.
NonLinearSolverType
Non-linear solver types.
@ BFGS
Broyden-Fletcher-Goldfarb-Shanno (BFGS) method.
@ SR1
Symmetric Rank-One (SR1) method.
@ Default
Default non-linear solver type.
LineSearchType
Line search methods for the non-linear solver.
@ ArmijoOrResidualNorm
Line search that accepts either the Armijo or the residual norm condition.
@ Simple
Simple line search.
@ WolfeStrong
Line search with strong Wolfe conditions.
@ ResidualNorm
Line search with residual norm condition.
@ Default
Default line search type.
@ Armijo
Line search with Armijo condition.
@ WolfeWeak
Line search with weak Wolfe conditions.
PsdProjectionMode
Positive Semi-Definite (PSD) projection modes for the dresidual matrix.
@ IfFailAlways
If one non-linear iteration fails, retry the iteration projecting to PSD and continue projecting in a...
@ Always
Always project to PSD.
@ Never
Never project to PSD.
@ IfFailRetry
If one non-linear iteration fails, retry the iteration projecting to PSD.
@ Default
Default PSD projection mode.
constexpr real kDefaultRelStepTol
Default tolerance for the L2 norm of the non-linear solver's raw linear-solve increment.
@ None
Invalid actor type.
@ Count
Number of actor type enum values.
NonLinearSolverConvergenceMode
Convergence monitoring mode for the non-linear solver residual.
@ PerActorWeighted
Use per-actor weighted residual norms for convergence checks.
@ Global
Use global, unweighted residual norm for convergence checks within each simulation island.
@ Default
Default convergence monitoring mode.
#define MOCHI_ENUM_COUNT(name)
#define MOCHI_STRUCT_END()
#define MOCHI_ENUM_BEGIN(name)
#define MOCHI_FIELD(name)
#define MOCHI_STRUCT_BEGIN(name)
#define MOCHI_ENUM_ITEM(name)
Parameters for the non-linear solver.
real lineSearchMaxRelIncrease
Maximum relative increase in the objective to accept the step.
real lineSearchWolfe1
Wolfe condition parameter c1 (sufficient decrease).
bool operator==(NonLinearSolverParams const &) const =default
bool explosionControl
Enable heuristic explosion prevention.
real relDivTol
Relative divergence tolerance, relative to the initial residual.
double maxElapsedTimeSeconds
Maximum elapsed time [s].
real lineSearchWolfe2
Wolfe condition parameter c2 (curvature).
VerbosityLevel verbosity
Verbosity level for logging output.
PsdProjectionMode psdProjMode
Positive Semi-Definite (PSD) projection mode for the dresidual matrix.
real relTol
Relative residual norm tolerance for convergence, relative to the initial residual.
real absTol
Absolute residual norm tolerance for convergence.
NonLinearSolverType solverType
Non-linear solver type.
bool stopIfNoImprovement
Stop the solve if the line search figure of merit does not improve from the previous iteration.
real relStepTol
Relative tolerance on the L2 norm of the raw linear-solve increment before line search scaling.
real absDivTol
Absolute divergence tolerance.
NonLinearSolverConvergenceMode convergenceMode
Convergence monitoring mode.
real lineSearchAlpha
Step length reduction factor for line search.
bool gradientDescentFallback
Fall back to gradient descent direction if the solver search direction fails.
LinearToleranceStrategy linearToleranceStrategy
Strategy for adaptive linear solver tolerance (forcing term).
LineSearchType lineSearchType
Line search type.
int maxIter
Maximum number of non-linear iterations.
int lineSearchMaxIter
Maximum number of line search iterations.
int dResidualAssemblyPeriod
Every how many non-linear iterations to assemble the dresidual matrix.