OGS
|
Convergence criterion applying a single absolute or relative tolerance to the whole residual vector.
A check of the solution increment is not done. If both an absolute and a relative tolerance are specified, at least one of them has to be satisfied.
Definition at line 26 of file ConvergenceCriterionResidual.h.
#include <ConvergenceCriterionResidual.h>
Public Member Functions | |
ConvergenceCriterionResidual (std::optional< double > &&absolute_tolerance, std::optional< double > &&relative_tolerance, const MathLib::VecNormType norm_type) | |
bool | hasDeltaXCheck () const override |
bool | hasResidualCheck () const override |
void | checkDeltaX (const GlobalVector &minus_delta_x, GlobalVector const &x) override |
void | checkResidual (const GlobalVector &residual) override |
Check if the residual satisfies the convergence criterion. | |
Public Member Functions inherited from NumLib::ConvergenceCriterion | |
ConvergenceCriterion (const MathLib::VecNormType norm_type) | |
virtual void | preFirstIteration () |
virtual void | setNoFirstIteration () |
virtual void | reset () |
virtual bool | isSatisfied () const |
Tell if the convergence criterion is satisfied. | |
MathLib::VecNormType | getVectorNormType () const |
virtual | ~ConvergenceCriterion ()=default |
Private Attributes | |
const std::optional< double > | _abstol |
const std::optional< double > | _reltol |
double | _residual_norm_0 |
Additional Inherited Members | |
Protected Attributes inherited from NumLib::ConvergenceCriterion | |
bool | _satisfied = true |
bool | _is_first_iteration = true |
const MathLib::VecNormType | _norm_type |
NumLib::ConvergenceCriterionResidual::ConvergenceCriterionResidual | ( | std::optional< double > && | absolute_tolerance, |
std::optional< double > && | relative_tolerance, | ||
const MathLib::VecNormType | norm_type ) |
Definition at line 19 of file ConvergenceCriterionResidual.cpp.
|
overridevirtual |
The function will only do diagnostic output and no actual check of the solution increment is made
Implements NumLib::ConvergenceCriterion.
Definition at line 35 of file ConvergenceCriterionResidual.cpp.
References NumLib::ConvergenceCriterion::_norm_type, INFO(), and MathLib::LinAlg::norm().
|
overridevirtual |
Check if the residual satisfies the convergence criterion.
Implements NumLib::ConvergenceCriterion.
Definition at line 47 of file ConvergenceCriterionResidual.cpp.
References _abstol, NumLib::ConvergenceCriterion::_is_first_iteration, NumLib::ConvergenceCriterion::_norm_type, _reltol, _residual_norm_0, NumLib::ConvergenceCriterion::_satisfied, NumLib::checkRelativeTolerance(), INFO(), and MathLib::LinAlg::norm().
|
inlineoverridevirtual |
Tells if the change of the solution between iterations is checked.
Implements NumLib::ConvergenceCriterion.
Definition at line 33 of file ConvergenceCriterionResidual.h.
|
inlineoverridevirtual |
Tells if the residual is checked.
Implements NumLib::ConvergenceCriterion.
Definition at line 34 of file ConvergenceCriterionResidual.h.
|
private |
Definition at line 43 of file ConvergenceCriterionResidual.h.
Referenced by ConvergenceCriterionResidual(), and checkResidual().
|
private |
Definition at line 44 of file ConvergenceCriterionResidual.h.
Referenced by ConvergenceCriterionResidual(), and checkResidual().
|
private |
Definition at line 45 of file ConvergenceCriterionResidual.h.
Referenced by checkResidual().