OGS
ConvergenceCriterionPerComponentDeltaX.h
Go to the documentation of this file.
1
11#pragma once
12
15
16namespace NumLib
17{
18class LocalToGlobalIndexMap;
19
28{
29public:
31 std::vector<double>&& absolute_tolerances,
32 std::vector<double>&& relative_tolerances,
33 const MathLib::VecNormType norm_type);
34
35 bool hasDeltaXCheck() const override { return true; }
36 bool hasResidualCheck() const override { return false; }
37
38 void checkDeltaX(const GlobalVector& minus_delta_x,
39 GlobalVector const& x) override;
40 void checkResidual(const GlobalVector& /*residual*/) override {}
41
42 void reset() override { this->_satisfied = true; }
43
44 void setDOFTable(const LocalToGlobalIndexMap& dof_table,
45 MeshLib::Mesh const& mesh) override;
46
47private:
48 const std::vector<double> _abstols;
49 const std::vector<double> _reltols;
51 MeshLib::Mesh const* _mesh = nullptr;
52};
53
54std::unique_ptr<ConvergenceCriterionPerComponentDeltaX>
56
57} // namespace NumLib
Global vector based on Eigen vector.
Definition EigenVector.h:25
void checkResidual(const GlobalVector &) override
Check if the residual satisfies the convergence criterion.
void checkDeltaX(const GlobalVector &minus_delta_x, GlobalVector const &x) 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.
ConvergenceCriterionPerComponentDeltaX(std::vector< double > &&absolute_tolerances, std::vector< double > &&relative_tolerances, const MathLib::VecNormType norm_type)
VecNormType
Norm type. Not declared as class type in order to use the members as integers.
Definition LinAlgEnums.h:22
std::unique_ptr< ConvergenceCriterionPerComponentDeltaX > createConvergenceCriterionPerComponentDeltaX(const BaseLib::ConfigTree &config)