|
My Project
|
Convergence criterion which looks at the absolute value of the residual and fails if the linear solver stagnates. More...
#include <combinedcriterion.hh>
Public Member Functions | |
| CombinedCriterion (const CollectiveCommunication &comm) | |
| CombinedCriterion (const CollectiveCommunication &comm, Scalar residualReductionTolerance, Scalar absResidualTolerance=0.0, Scalar maxResidual=0.0) | |
| void | setResidualReductionTolerance (Scalar tol) |
| Sets the residual reduction tolerance. | |
| Scalar | residualReductionTolerance () const |
| Returns the tolerance of the residual reduction of the solution. | |
| Scalar | residualReduction () const |
| Returns the reduction of the maximum of the residual compared to the initial solution. | |
| void | setAbsResidualTolerance (Scalar tol) |
| Sets the maximum absolute tolerated residual. | |
| Scalar | absResidualTolerance () const |
| Returns the tolerated maximum of the the infinity norm of the absolute residual. | |
| Scalar | absResidual () const |
| Returns the infinity norm of the absolute residual. | |
| void | setInitial (const Vector &curSol, const Vector &curResid) override |
| Set the initial solution of the linear system of equations. | |
| void | update (const Vector &curSol, const Vector &changeIndicator, const Vector &curResid) override |
| Update the internal members of the convergence criterion with the current solution. | |
| bool | converged () const override |
| Returns true if and only if the convergence criterion is met. | |
| bool | failed () const override |
| Returns true if the convergence criterion cannot be met anymore because the solver has broken down. | |
| Scalar | accuracy () const override |
| Returns the accuracy of the solution at the last update. | |
| void | printInitial (std::ostream &os=std::cout) const override |
| Prints the initial information about the convergence behaviour. | |
| void | print (Scalar iter, std::ostream &os=std::cout) const override |
| Prints the information about the convergence behaviour for the current iteration. | |
Public Member Functions inherited from Opm::Linear::ConvergenceCriterion< Vector > | |
| virtual | ~ConvergenceCriterion () |
| Destructor. | |
| virtual void | print (Scalar, std::ostream &=std::cout) const |
| Prints the information about the convergence behaviour for the current iteration. | |
Convergence criterion which looks at the absolute value of the residual and fails if the linear solver stagnates.
For the CombinedCriterion, the error of the solution is defined as
![\[ e^k = \max_i\{
\left| r^k_i \right| \}\;, \]](form_123.png)
where 

In addition, to the reduction of the maximum residual, the linear solver is aborted early if the residual goes below or above absolute limits.
|
inlineoverridevirtual |
Returns the accuracy of the solution at the last update.
A value of zero means that the solution was exact.
For the accuracy we only take the residual into account,
Implements Opm::Linear::ConvergenceCriterion< Vector >.
|
inlineoverridevirtual |
Returns true if and only if the convergence criterion is met.
Implements Opm::Linear::ConvergenceCriterion< Vector >.
|
inlineoverridevirtual |
Returns true if the convergence criterion cannot be met anymore because the solver has broken down.
Reimplemented from Opm::Linear::ConvergenceCriterion< Vector >.
|
inlineoverride |
Prints the information about the convergence behaviour for the current iteration.
| 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. |
|
inlineoverridevirtual |
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.
| os | The output stream to which the message gets written. |
Reimplemented from Opm::Linear::ConvergenceCriterion< Vector >.
|
inlineoverridevirtual |
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.
| 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 |
Implements Opm::Linear::ConvergenceCriterion< Vector >.
|
inlineoverridevirtual |
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.
| curSol | The current iterative solution of the linear system of equations |
| changeIndicator | A vector where all non-zero values indicate that the solution has changed since the last iteration. |
| curResid | The residual vector of the current iterative solution of the linear system of equations |
Implements Opm::Linear::ConvergenceCriterion< Vector >.