Provides a convergence criterion which looks at the reduction of the two-norm of the residual for the linear solvers.
More...
#include <residreductioncriterion.hh>
|
| ResidReductionCriterion (Dune::ScalarProduct< Vector > &scalarProduct, Scalar tolerance=1e-6) |
|
void | setTolerance (Scalar tol) |
| Set the maximum allowed weighted maximum of the reduction of the linear residual.
|
|
Scalar | tolerance () const |
| Return the maximum allowed weighted maximum of the reduction of the linear residual.
|
|
void | setInitial (const Vector &curSol OPM_UNUSED, const Vector &curResid) |
| Set the initial solution of the linear system of equations. More...
|
|
void | update (const Vector &curSol OPM_UNUSED, const Vector &changeIndicator OPM_UNUSED, const Vector &curResid) |
|
bool | converged () const |
| Returns true if and only if the convergence criterion is met. More...
|
|
Scalar | accuracy () const |
| Returns the accuracy of the solution at the last update. More...
|
|
void | printInitial (std::ostream &os=std::cout) const |
| Prints the initial information about the convergence behaviour. More...
|
|
void | print (Scalar iter, std::ostream &os=std::cout) const |
| Prints the information about the convergence behaviour for the current iteration. More...
|
|
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 &changeIndicator, const Vector &curResid)=0 |
| Update the internal members of the convergence criterion with the current solution. More...
|
|
virtual bool | failed () const |
| Returns true if the convergence criterion cannot be met anymore because the solver has broken down.
|
|
virtual void | printInitial (std::ostream &os OPM_UNUSED=std::cout) const |
| Prints the initial information about the convergence behaviour. More...
|
|
virtual void | print (Scalar iter OPM_UNUSED, std::ostream &os OPM_UNUSED=std::cout) const |
| Prints the information about the convergence behaviour for the current iteration. More...
|
|
template<class Vector>
class Ewoms::Linear::ResidReductionCriterion< Vector >
Provides a convergence criterion which looks at the reduction of the two-norm of the residual for the linear solvers.
For the ResidReductionCriterion, the error of the solution is defined as
Prints the information about the convergence behaviour for the current iteration.
- Parameters
-
iter | The iteration number. The semantics of this parameter are chosen by the linear solver. |
os | The output stream to which the message gets written. |
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
-
os | The output stream to which the message gets written. |
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
-
curSol | The current iterative solution of the linear system of equations |
curResid | The residual vector of the current iterative solution of the linear system of equations |
The documentation for this class was generated from the following file: