OGS
|
Convergence criterion applying absolute or relative tolerances individually to each component of the whole residual vector.
A check of the solution increment is not done. If both an absolute and a relative tolerances are specified, at least one of them has to be satisfied.
Definition at line 28 of file ConvergenceCriterionPerComponentResidual.h.
#include <ConvergenceCriterionPerComponentResidual.h>
Public Member Functions | |
ConvergenceCriterionPerComponentResidual (std::vector< double > &&absolute_tolerances, std::vector< double > &&relative_tolerances, 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. | |
void | setDOFTable (const LocalToGlobalIndexMap &dof_table, MeshLib::Mesh const &mesh) override |
Sets the d.o.f. table used to extract data for a specific component. | |
Public Member Functions inherited from NumLib::ConvergenceCriterionPerComponent | |
ConvergenceCriterionPerComponent (const MathLib::VecNormType norm_type) | |
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::vector< double > | _abstols |
const std::vector< double > | _reltols |
LocalToGlobalIndexMap const * | _dof_table = nullptr |
MeshLib::Mesh const * | _mesh = nullptr |
std::vector< double > | _residual_norms_0 |
Additional Inherited Members | |
Protected Attributes inherited from NumLib::ConvergenceCriterion | |
bool | _satisfied = true |
bool | _is_first_iteration = true |
const MathLib::VecNormType | _norm_type |
NumLib::ConvergenceCriterionPerComponentResidual::ConvergenceCriterionPerComponentResidual | ( | std::vector< double > && | absolute_tolerances, |
std::vector< double > && | relative_tolerances, | ||
const MathLib::VecNormType | norm_type ) |
Definition at line 20 of file ConvergenceCriterionPerComponentResidual.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 43 of file ConvergenceCriterionPerComponentResidual.cpp.
References _abstols, _dof_table, _mesh, NumLib::ConvergenceCriterion::_norm_type, INFO(), NumLib::norm(), and OGS_FATAL.
|
overridevirtual |
Check if the residual satisfies the convergence criterion.
Implements NumLib::ConvergenceCriterion.
Definition at line 69 of file ConvergenceCriterionPerComponentResidual.cpp.
References _abstols, _dof_table, NumLib::ConvergenceCriterion::_is_first_iteration, _mesh, NumLib::ConvergenceCriterion::_norm_type, _reltols, _residual_norms_0, NumLib::ConvergenceCriterion::_satisfied, NumLib::checkRelativeTolerance(), INFO(), NumLib::norm(), and OGS_FATAL.
|
inlineoverridevirtual |
Tells if the change of the solution between iterations is checked.
Implements NumLib::ConvergenceCriterion.
Definition at line 37 of file ConvergenceCriterionPerComponentResidual.h.
|
inlineoverridevirtual |
Tells if the residual is checked.
Implements NumLib::ConvergenceCriterion.
Definition at line 38 of file ConvergenceCriterionPerComponentResidual.h.
|
overridevirtual |
Sets the d.o.f. table used to extract data for a specific component.
Implements NumLib::ConvergenceCriterionPerComponent.
Definition at line 112 of file ConvergenceCriterionPerComponentResidual.cpp.
References _abstols, _dof_table, _mesh, NumLib::LocalToGlobalIndexMap::getNumberOfGlobalComponents(), and OGS_FATAL.
|
private |
Definition at line 50 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by ConvergenceCriterionPerComponentResidual(), checkDeltaX(), checkResidual(), and setDOFTable().
|
private |
Definition at line 52 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by checkDeltaX(), checkResidual(), and setDOFTable().
|
private |
Definition at line 53 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by checkDeltaX(), checkResidual(), and setDOFTable().
|
private |
Definition at line 51 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by ConvergenceCriterionPerComponentResidual(), and checkResidual().
|
private |
Definition at line 54 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by checkResidual().