OGS
ConvergenceCriterionResidual.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <optional>
14
17
18namespace NumLib
19{
27{
28public:
29 ConvergenceCriterionResidual(std::optional<double>&& absolute_tolerance,
30 std::optional<double>&& relative_tolerance,
31 const MathLib::VecNormType norm_type);
32
33 bool hasDeltaXCheck() const override { return true; }
34 bool hasResidualCheck() const override { return true; }
35
38 void checkDeltaX(const GlobalVector& minus_delta_x,
39 GlobalVector const& x) override;
40 void checkResidual(const GlobalVector& residual) override;
41
42private:
43 const std::optional<double> _abstol;
44 const std::optional<double> _reltol;
46};
47
48std::unique_ptr<ConvergenceCriterionResidual>
50
51} // namespace NumLib
Global vector based on Eigen vector.
Definition EigenVector.h:25
void checkResidual(const GlobalVector &residual) override
Check if the residual satisfies the convergence criterion.
ConvergenceCriterionResidual(std::optional< double > &&absolute_tolerance, std::optional< double > &&relative_tolerance, const MathLib::VecNormType norm_type)
void checkDeltaX(const GlobalVector &minus_delta_x, GlobalVector const &x) override
std::unique_ptr< ConvergenceCriterionResidual > createConvergenceCriterionResidual(const BaseLib::ConfigTree &config)