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, std::vector< double > &&damping_alpha, bool daming_alpha_switch, const MathLib::VecNormType norm_type) | |
bool | hasDeltaXCheck () const override |
bool | hasResidualCheck () const override |
bool | hasNonNegativeDamping () 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. | |
double | getDampingFactor (GlobalVector const &minus_delta_x, GlobalVector const &x, double damping_orig) override |
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. | |
![]() | |
ConvergenceCriterionPerComponent (const MathLib::VecNormType norm_type) | |
![]() | |
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 |
const std::vector< double > | _damping_alpha |
bool | _damping_alpha_switch |
Additional Inherited Members | |
![]() | |
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, | ||
std::vector< double > && | damping_alpha, | ||
bool | daming_alpha_switch, | ||
const MathLib::VecNormType | norm_type ) |
Definition at line 21 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 48 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 74 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.
|
overridevirtual |
Implements NumLib::ConvergenceCriterion.
Definition at line 117 of file ConvergenceCriterionPerComponentResidual.cpp.
References _damping_alpha, _dof_table, _mesh, DBUG(), MathLib::EigenVector::get(), NumLib::LocalToGlobalIndexMap::getGlobalIndex(), MeshLib::Mesh::getID(), NumLib::LocalToGlobalIndexMap::getMeshSubset(), MeshLib::views::ids, MeshLib::Node, OGS_FATAL, and MathLib::LinAlg::setLocalAccessibleVector().
|
inlineoverridevirtual |
Tells if the change of the solution between iterations is checked.
Implements NumLib::ConvergenceCriterion.
Definition at line 39 of file ConvergenceCriterionPerComponentResidual.h.
|
inlineoverridevirtual |
Implements NumLib::ConvergenceCriterion.
Definition at line 41 of file ConvergenceCriterionPerComponentResidual.h.
References _damping_alpha_switch.
|
inlineoverridevirtual |
Tells if the residual is checked.
Implements NumLib::ConvergenceCriterion.
Definition at line 40 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 153 of file ConvergenceCriterionPerComponentResidual.cpp.
References _abstols, _dof_table, _mesh, NumLib::LocalToGlobalIndexMap::getNumberOfGlobalComponents(), and OGS_FATAL.
|
private |
Definition at line 59 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by ConvergenceCriterionPerComponentResidual(), checkDeltaX(), checkResidual(), and setDOFTable().
|
private |
Definition at line 64 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by getDampingFactor().
|
private |
Definition at line 65 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by hasNonNegativeDamping().
|
private |
Definition at line 61 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by checkDeltaX(), checkResidual(), getDampingFactor(), and setDOFTable().
|
private |
Definition at line 62 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by checkDeltaX(), checkResidual(), getDampingFactor(), and setDOFTable().
|
private |
Definition at line 60 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by ConvergenceCriterionPerComponentResidual(), and checkResidual().
|
private |
Definition at line 63 of file ConvergenceCriterionPerComponentResidual.h.
Referenced by checkResidual().