![]() |
OGS
|
|
Newton step strategy that applies a fixed damping factor to every update.
The accepted step is \( x_{\rm new} = x - \alpha \cdot \Delta x \), where \( \alpha \) is the damping factor (1.0 = full Newton step, no damping).
Definition at line 15 of file FixedDampingStrategy.h.
#include <FixedDampingStrategy.h>
Public Member Functions | |
| FixedDampingStrategy (double damping) | |
| StepResult | applyStep (GlobalVector const &x, GlobalVector const &minus_delta_x, GlobalVector const &res, GlobalMatrix const &J, GlobalVector &x_new, NewtonStepContext &ctx, int iteration) override |
| Public Member Functions inherited from NumLib::NewtonStepStrategy | |
| virtual void | initialize (GlobalVector const &) |
| void | setDampingPolicy (DampingPolicy const *policy) |
| virtual | ~NewtonStepStrategy ()=default |
Private Attributes | |
| double | _damping |
Additional Inherited Members | |
| Protected Attributes inherited from NumLib::NewtonStepStrategy | |
| DampingPolicy const * | _damping_policy = nullptr |
|
explicit |
Definition at line 11 of file FixedDampingStrategy.cpp.
References _damping.
|
overridevirtual |
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 |
Implements NumLib::NewtonStepStrategy.
Definition at line 15 of file FixedDampingStrategy.cpp.
References _damping, NumLib::NewtonStepStrategy::_damping_policy, and MathLib::LinAlg::axpy().
|
private |
Definition at line 29 of file FixedDampingStrategy.h.
Referenced by FixedDampingStrategy(), and applyStep().