![]() |
OGS
|
|
Newton step strategy that applies a fixed base damping factor and relaxes it linearly toward 1.0 as iterations proceed.
The effective damping at iteration \( k \) is
\[ \alpha_k = \alpha + (1 - \alpha)\,\mathrm{clamp}(k / r,\, 0,\, 1), \]
where \( \alpha \) is the base damping factor and \( r \) is the reduction parameter. The accepted step is \( x_{\rm new} = x - \alpha_k \cdot \Delta x \).
Definition at line 21 of file DampingReductionStrategy.h.
#include <DampingReductionStrategy.h>
Public Member Functions | |
| DampingReductionStrategy (double damping, double damping_reduction) | |
| 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 |
| double | _damping_reduction |
Additional Inherited Members | |
| Protected Attributes inherited from NumLib::NewtonStepStrategy | |
| DampingPolicy const * | _damping_policy = nullptr |
| NumLib::DampingReductionStrategy::DampingReductionStrategy | ( | double | damping, |
| double | damping_reduction ) |
Definition at line 13 of file DampingReductionStrategy.cpp.
References _damping, and _damping_reduction.
|
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 19 of file DampingReductionStrategy.cpp.
References _damping, NumLib::NewtonStepStrategy::_damping_policy, _damping_reduction, and MathLib::LinAlg::axpy().
|
private |
Definition at line 35 of file DampingReductionStrategy.h.
Referenced by DampingReductionStrategy(), and applyStep().
|
private |
Definition at line 36 of file DampingReductionStrategy.h.
Referenced by DampingReductionStrategy(), and applyStep().