Ewoms::ConvergenceCriterion< Vector > Class Template Referenceabstract

Base class for all convergence criteria which only defines an virtual API. More...

#include <convergencecriterion.hh>

Inheritance diagram for Ewoms::ConvergenceCriterion< Vector >:
Inheritance graph

Public Member Functions

virtual ~ConvergenceCriterion ()
 Destructor. More...
 
virtual void setInitial (const Vector &curSol, const Vector &curResid)=0
 Set the initial solution of the linear system of equations. More...
 
virtual void update (const Vector &curSol, const Vector &curResid)=0
 Update the internal members of the convergence criterion with the current solution. More...
 
virtual bool converged () const =0
 Returns true if and only if the convergence criterion is met. More...
 
virtual Scalar accuracy () const =0
 Returns the accuracy of the solution at the last update. More...
 
virtual void printInitial (std::ostream &os=std::cout) const
 Prints the initial information about the convergence behaviour. More...
 
virtual void print (Scalar iter, std::ostream &os=std::cout) const
 Prints the information about the convergence behaviour for the current iteration. More...
 

Detailed Description

template<class Vector>
class Ewoms::ConvergenceCriterion< Vector >

Base class for all convergence criteria which only defines an virtual API.

Constructor & Destructor Documentation

template<class Vector >
virtual Ewoms::ConvergenceCriterion< Vector >::~ConvergenceCriterion ( )
inlinevirtual

Destructor.

In the ConvergenceCriterion it does not do anything, but it is required to be declared virtual.

Member Function Documentation

template<class Vector >
virtual Scalar Ewoms::ConvergenceCriterion< Vector >::accuracy ( ) const
pure virtual

Returns the accuracy of the solution at the last update.

A value of zero means that the solution was exact.

Implemented in Ewoms::WeightedResidualReductionCriterion< Vector, CollectiveCommunication >, Ewoms::FixPointCriterion< Vector, CollectiveCommunication >, and Ewoms::ResidReductionCriterion< Vector >.

template<class Vector >
virtual bool Ewoms::ConvergenceCriterion< Vector >::converged ( ) const
pure virtual
template<class Vector >
virtual void Ewoms::ConvergenceCriterion< Vector >::print ( Scalar  iter,
std::ostream &  os = std::cout 
) const
inlinevirtual

Prints the information about the convergence behaviour for the current iteration.

Parameters
iterThe iteration number. The semantics of this parameter are chosen by the linear solver.
osThe output stream to which the message gets written.

Reimplemented in Ewoms::WeightedResidualReductionCriterion< Vector, CollectiveCommunication >, and Ewoms::ResidReductionCriterion< Vector >.

template<class Vector >
virtual void Ewoms::ConvergenceCriterion< Vector >::printInitial ( std::ostream &  os = std::cout) const
inlinevirtual

Prints the initial information about the convergence behaviour.

This method is called after setInitial() if the solver thinks it's a good idea to be verbose. In practice, "printing the initial information" means printing column headers and the initial state.

Parameters
osThe output stream to which the message gets written.

Reimplemented in Ewoms::WeightedResidualReductionCriterion< Vector, CollectiveCommunication >, and Ewoms::ResidReductionCriterion< Vector >.

template<class Vector >
virtual void Ewoms::ConvergenceCriterion< Vector >::setInitial ( const Vector &  curSol,
const Vector &  curResid 
)
pure virtual

Set the initial solution of the linear system of equations.

This version of the method does NOT take the two-norm of the residual as argument. If the two-norm of the defect is available for the linear solver, the version of the update() method with it should be called.

Parameters
curSolThe current iterative solution of the linear system of equations
curResidThe residual vector of the current iterative solution of the linear system of equations

Implemented in Ewoms::WeightedResidualReductionCriterion< Vector, CollectiveCommunication >, Ewoms::FixPointCriterion< Vector, CollectiveCommunication >, and Ewoms::ResidReductionCriterion< Vector >.

template<class Vector >
virtual void Ewoms::ConvergenceCriterion< Vector >::update ( const Vector &  curSol,
const Vector &  curResid 
)
pure virtual

Update the internal members of the convergence criterion with the current solution.

This version of the method does NOT take the two-norm of the residual as argument. If the two-norm of the defect is available for the linear solver, the version of the update() method with it should be called.

Parameters
curSolThe current iterative solution of the linear system of equations
curResidThe residual vector of the current iterative solution of the linear system of equations

Implemented in Ewoms::WeightedResidualReductionCriterion< Vector, CollectiveCommunication >, Ewoms::FixPointCriterion< Vector, CollectiveCommunication >, and Ewoms::ResidReductionCriterion< Vector >.


The documentation for this class was generated from the following file: