![]() |
OGS
|
|
Abstract globalization and step-acceptance strategy for Newton-Raphson iterations.
Concrete implementations (e.g. FixedDampingStrategy) decide how to scale the raw Newton direction \( -\Delta x \) before it is applied to the current solution. The NonlinearSolver<Newton> owns one strategy instance and calls applyStep() once per iteration.
Definition at line 57 of file NewtonStepStrategy.h.
#include <NewtonStepStrategy.h>
Public Member Functions | |
| virtual void | initialize (GlobalVector const &) |
| virtual StepResult | applyStep (GlobalVector const &x, GlobalVector const &minus_delta_x, GlobalVector const &res, GlobalMatrix const &J, GlobalVector &x_new, NewtonStepContext &ctx, int iteration)=0 |
| void | setDampingPolicy (DampingPolicy const *policy) |
| virtual | ~NewtonStepStrategy ()=default |
Protected Attributes | |
| DampingPolicy const * | _damping_policy = nullptr |
|
virtualdefault |
|
pure virtual |
Given the current solution x, the Newton direction minus_delta_x, the residual res, and the Jacobian J, compute and apply a step to x_new. The strategy is free to re-evaluate F(x) internally.
| [in] | x | current solution |
| [in] | minus_delta_x | full Newton step (J^{-1} r) |
| [in] | res | residual at x |
| [in] | J | Jacobian at x (may be used for curvature) |
| [out] | x_new | accepted new solution |
| [in] | ctx | equation system context for re-evaluation |
| [in] | iteration | current outer iteration number |
Implemented in NumLib::DampingReductionStrategy, and NumLib::FixedDampingStrategy.
|
inlinevirtual |
Called once before the outer Newton loop starts. The default implementation is a no-op; override if the strategy needs to cache the initial solution (e.g. for trust-region radius initialisation).
Definition at line 64 of file NewtonStepStrategy.h.
|
inline |
Inject the damping policy from the convergence criterion. Called by NonlinearSolver::setEquationSystem() before the first solve. A null pointer means the criterion imposes no step-length constraint.
Definition at line 87 of file NewtonStepStrategy.h.
References _damping_policy.
|
protected |
Definition at line 95 of file NewtonStepStrategy.h.
Referenced by NumLib::DampingReductionStrategy::applyStep(), NumLib::FixedDampingStrategy::applyStep(), and setDampingPolicy().