27 #ifndef EWOMS_ISTL_CONVERGENCE_CRITERION_HH 28 #define EWOMS_ISTL_CONVERGENCE_CRITERION_HH 30 #include <dune/common/version.hh> 31 #include <dune/common/fvector.hh> 54 template <
class Vector>
58 using real_type =
typename Dune::FieldTraits<typename Vector::field_type>::real_type;
60 using Scalar = real_type;
85 virtual void setInitial(
const Vector& curSol,
const Vector& curResid) = 0;
103 virtual void update(
const Vector& curSol,
const Vector& changeIndicator,
const Vector& curResid) = 0;
123 virtual Scalar
accuracy()
const = 0;
146 virtual void print(Scalar, std::ostream& = std::cout)
const virtual ~ConvergenceCriterion()
Destructor.
Definition: convergencecriterion.hh:69
Base class for all convergence criteria which only defines an virtual API.
Definition: convergencecriterion.hh:55
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
virtual bool converged() const =0
Returns true if and only if the convergence criterion is met.
virtual void print(Scalar, std::ostream &=std::cout) const
Prints the information about the convergence behaviour for the current iteration. ...
Definition: convergencecriterion.hh:146
virtual bool failed() const
Returns true if the convergence criterion cannot be met anymore because the solver has broken down...
Definition: convergencecriterion.hh:115
virtual void update(const Vector &curSol, const Vector &changeIndicator, const Vector &curResid)=0
Update the internal members of the convergence criterion with the current solution.
virtual void printInitial(std::ostream &=std::cout) const
Prints the initial information about the convergence behaviour.
Definition: convergencecriterion.hh:135
virtual Scalar accuracy() const =0
Returns the accuracy of the solution at the last update.
virtual void setInitial(const Vector &curSol, const Vector &curResid)=0
Set the initial solution of the linear system of equations.