![]() |
OGS
|
|
Convergence criterion applying absolute or relative tolerances individually to each component of the whole solution increment vector.
A residual check 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 20 of file ConvergenceCriterionPerComponentDeltaX.h.
#include <ConvergenceCriterionPerComponentDeltaX.h>
Public Member Functions | |
| ConvergenceCriterionPerComponentDeltaX (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 |
| DampingPolicy const * | dampingPolicy () const override |
| void | checkDeltaX (const GlobalVector &minus_delta_x, GlobalVector const &x) override |
| void | checkResidual (const GlobalVector &) override |
| Check if the residual satisfies the convergence criterion. | |
| double | apply (GlobalVector const &minus_delta_x, GlobalVector const &x, double const base_damping) const override |
| void | reset () 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. | |
| 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 bool | isSatisfied () const |
| Tell if the convergence criterion is satisfied. | |
| MathLib::VecNormType | getVectorNormType () const |
| virtual | ~ConvergenceCriterion ()=default |
| Public Member Functions inherited from NumLib::DampingPolicy | |
| virtual | ~DampingPolicy ()=default |
Private Attributes | |
| const std::vector< double > | _abstols |
| const std::vector< double > | _reltols |
| const std::vector< double > | _damping_alpha |
| bool | _damping_alpha_switch |
| LocalToGlobalIndexMap const * | _dof_table = nullptr |
| MeshLib::Mesh const * | _mesh = nullptr |
Additional Inherited Members | |
| Protected Attributes inherited from NumLib::ConvergenceCriterion | |
| bool | _satisfied = true |
| bool | _is_first_iteration = true |
| const MathLib::VecNormType | _norm_type |
| NumLib::ConvergenceCriterionPerComponentDeltaX::ConvergenceCriterionPerComponentDeltaX | ( | 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 17 of file ConvergenceCriterionPerComponentDeltaX.cpp.
References NumLib::ConvergenceCriterionPerComponent::ConvergenceCriterionPerComponent(), _abstols, _damping_alpha, _damping_alpha_switch, and _reltols.
|
overridevirtual |
Implements NumLib::DampingPolicy.
Definition at line 73 of file ConvergenceCriterionPerComponentDeltaX.cpp.
References _damping_alpha, _dof_table, _mesh, DBUG(), MathLib::EigenVector::get(), MeshLib::views::meshLocations(), MeshLib::Node, OGS_FATAL, and MathLib::LinAlg::setLocalAccessibleVector().
|
overridevirtual |
Check if the change of the solution between iterations satisfies the convergence criterion.
| minus_delta_x | the current solution update |
| x | the new solution from the current iteration |
minus_delta_x. x is needed for relative tolerances. Implements NumLib::ConvergenceCriterion.
Definition at line 42 of file ConvergenceCriterionPerComponentDeltaX.cpp.
References _abstols, _dof_table, NumLib::ConvergenceCriterion::_norm_type, _reltols, NumLib::ConvergenceCriterion::_satisfied, NumLib::checkRelativeTolerance(), INFO(), NumLib::norm(), and OGS_FATAL.
|
inlineoverridevirtual |
Check if the residual satisfies the convergence criterion.
Implements NumLib::ConvergenceCriterion.
Definition at line 41 of file ConvergenceCriterionPerComponentDeltaX.h.
|
inlineoverridevirtual |
Returns the DampingPolicy implemented by this criterion, or nullptr if this criterion does not constrain the step length.
Reimplemented from NumLib::ConvergenceCriterion.
Definition at line 34 of file ConvergenceCriterionPerComponentDeltaX.h.
References _damping_alpha_switch.
|
inlineoverridevirtual |
Tells if the change of the solution between iterations is checked.
Implements NumLib::ConvergenceCriterion.
Definition at line 32 of file ConvergenceCriterionPerComponentDeltaX.h.
|
inlineoverridevirtual |
Tells if the residual is checked.
Implements NumLib::ConvergenceCriterion.
Definition at line 33 of file ConvergenceCriterionPerComponentDeltaX.h.
|
inlineoverridevirtual |
Indicate that a new iteration now starts.
A concrete implementation of ConvergenceCriterion might want to check both delta x and the residual. I.e., in a new iteration both checks have to be done anew. This method will make the ConvergenceCriterion forget the result of all checks already done, s.t. all necessary checks will have to be repeated in order to satisfy the ConvergenceCriterion.
Reimplemented from NumLib::ConvergenceCriterion.
Definition at line 46 of file ConvergenceCriterionPerComponentDeltaX.h.
References NumLib::ConvergenceCriterion::_satisfied.
|
overridevirtual |
Sets the d.o.f. table used to extract data for a specific component.
Implements NumLib::ConvergenceCriterionPerComponent.
Definition at line 108 of file ConvergenceCriterionPerComponentDeltaX.cpp.
References _abstols, _dof_table, _mesh, and OGS_FATAL.
|
private |
Definition at line 52 of file ConvergenceCriterionPerComponentDeltaX.h.
Referenced by ConvergenceCriterionPerComponentDeltaX(), checkDeltaX(), and setDOFTable().
|
private |
Definition at line 54 of file ConvergenceCriterionPerComponentDeltaX.h.
Referenced by ConvergenceCriterionPerComponentDeltaX(), and apply().
|
private |
Definition at line 55 of file ConvergenceCriterionPerComponentDeltaX.h.
Referenced by ConvergenceCriterionPerComponentDeltaX(), and dampingPolicy().
|
private |
Definition at line 56 of file ConvergenceCriterionPerComponentDeltaX.h.
Referenced by apply(), checkDeltaX(), and setDOFTable().
|
private |
Definition at line 57 of file ConvergenceCriterionPerComponentDeltaX.h.
Referenced by apply(), and setDOFTable().
|
private |
Definition at line 53 of file ConvergenceCriterionPerComponentDeltaX.h.
Referenced by ConvergenceCriterionPerComponentDeltaX(), and checkDeltaX().