|
My Project
|
Provides a convergence criterion for the linear solvers which looks at the weighted maximum of the difference between two iterations. More...
#include <fixpointcriterion.hh>
Public Member Functions | |
| FixPointCriterion (const CollectiveCommunication &comm) | |
| FixPointCriterion (const CollectiveCommunication &comm, const Vector &weightVec, Scalar reduction) | |
| void | setWeight (const Vector &weightVec) |
| Sets the relative weight of a primary variable. | |
| Scalar | weight (int outerIdx, int innerIdx) const |
| Return the relative weight of a primary variable. | |
| void | setTolerance (Scalar tol) |
| Set the maximum allowed weighted maximum difference between two iterations. | |
| Scalar | tolerance () const |
| Return the maximum allowed weighted difference between two iterations for the solution considered to be converged. | |
| void | setInitial (const Vector &curSol, const Vector &) override |
| Set the initial solution of the linear system of equations. | |
| void | update (const Vector &curSol, const Vector &, const Vector &) 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. | |
| Scalar | accuracy () const |
| Returns the accuracy of the solution at the last update. | |
Public Member Functions inherited from Opm::Linear::ConvergenceCriterion< Vector > | |
| virtual | ~ConvergenceCriterion () |
| Destructor. | |
| 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 &=std::cout) const |
| Prints the initial information about the convergence behaviour. | |
| virtual void | print (Scalar, std::ostream &=std::cout) const |
| Prints the information about the convergence behaviour for the current iteration. | |
Provides a convergence criterion for the linear solvers which looks at the weighted maximum of the difference between two iterations.
For the FixPointCriterion, the error of the solution is defined as
![\[ e^k = \max_i\{ \left| w_i \delta^k_i \right| \}\;, \]](form_128.png)
where 




This criterion requires that the block type of the vector is a Dune::FieldVector
|
inlinevirtual |
Returns the accuracy of the solution at the last update.
A value of zero means that the solution was exact.
Implements Opm::Linear::ConvergenceCriterion< Vector >.
|
inlineoverridevirtual |
Returns true if and only if the convergence criterion is met.
Implements 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 >.
|
inline |
Set the maximum allowed weighted maximum difference between two iterations.
Set the maximum allowed maximum difference between two iterationsfor the solution considered to be converged.
|
inline |
Sets the relative weight of a primary variable.
For the FixPointCriterion, the error of the solution is defined as
![\[ e^k = \max_i\{ \left| w_i \delta^k_i \right| \}\;, \]](form_128.png)
where 




This method is specific to the FixPointCriterion.
| weightVec | A Dune::BlockVector<Dune::FieldVector<Scalar, n> > with the relative weights of the degrees of freedom |
|
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 >.
|
inline |
Return the relative weight of a primary variable.
For the FixPointCriterion, the error of the solution is defined as
![\[ e^k = \max_i\{ \left| w_i \delta^k_i \right| \}\;, \]](form_128.png)
where 




This method is specific to the FixPointCriterion.
| outerIdx | The index of the outer vector (i.e. Dune::BlockVector) |
| innerIdx | The index of the inner vector (i.e. Dune::FieldVector) |