![]() |
KASKADE 7 development version
|
Interface for IterateType::PCG termination criterion policy classes. More...
#include <cgTerminationCriteria.hh>
Public Types | |
| typedef R | Real |
| real field type | |
Public Member Functions | |
| virtual void | clear ()=0 |
| re-initializes the termination criterion for a new IterateType::CG run | |
| virtual PCGTerminationCriterion< Real > & | tolerance (Real tol)=0 |
| set requested tolerance | |
| virtual void | step (Real gamma)=0 |
| supplies energy of step to the termination criterion | |
| virtual void | stepDetail (Real alpha, Real qAq, Real qPq, Real rPINVr) |
| supplies additional algorithmic quantities to the termination criterion | |
| virtual void | residual (Real sigma) |
| supplies the preconditioned residual to the termination criterion | |
| virtual int | getMaxIterationSteps ()=0 |
| get the maximum number of allowed iteration steps | |
| virtual | operator bool ()=0 |
| termination decision | |
| virtual bool | minimalDecreaseAchieved () |
| whether a minimal decrease has been achieved (used by hybrid CG) | |
Interface for IterateType::PCG termination criterion policy classes.
This is the unified termination criterion interface used by the Kaskade 7 conjugate gradient solver (see CGBase). It is a merger of the former two interfaces residing in linalg/cgTerminationCriteria.hh and linalg/apcg.hh.
| R | a floating point type for real numbers |
Definition at line 37 of file cgTerminationCriteria.hh.
| typedef R Kaskade::PCGTerminationCriterion< R >::Real |
real field type
Definition at line 42 of file cgTerminationCriteria.hh.
|
pure virtual |
re-initializes the termination criterion for a new IterateType::CG run
Implemented in Kaskade::PCGCountingTerminationCriterion< R >, Kaskade::PCGEnergyErrorTerminationCriterion< R >, Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >, and Kaskade::StrakosTichyPTerminationCriterion< R >.
|
pure virtual |
get the maximum number of allowed iteration steps
Implemented in Kaskade::PCGCountingTerminationCriterion< R >, Kaskade::PCGEnergyErrorTerminationCriterion< R >, Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >, and Kaskade::StrakosTichyPTerminationCriterion< R >.
|
inlinevirtual |
whether a minimal decrease has been achieved (used by hybrid CG)
Reimplemented in Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >, and Kaskade::StrakosTichyPTerminationCriterion< R >.
Definition at line 100 of file cgTerminationCriteria.hh.
|
pure virtual |
termination decision
Implemented in Kaskade::PCGCountingTerminationCriterion< R >, Kaskade::PCGEnergyErrorTerminationCriterion< R >, Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >, and Kaskade::StrakosTichyPTerminationCriterion< R >.
|
inlinevirtual |
supplies the preconditioned residual to the termination criterion
| sigma | the preconditioned residual norm |
Definition at line 84 of file cgTerminationCriteria.hh.
|
pure virtual |
supplies energy of step to the termination criterion
| gamma | the energy \( \gamma = \alpha^2 q^T A q \) of the step \( \alpha q \). (Note: some implementations call this with \( \gamma^2 = \alpha \langle q, Aq \rangle \); the exact meaning is documented per implementation.) |
Implemented in Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >, and Kaskade::StrakosTichyPTerminationCriterion< R >.
|
inlinevirtual |
supplies additional algorithmic quantities to the termination criterion
The default implementation does nothing. Termination criteria that need more detailed information (e.g. the Strakos-Tichy \(P\)-criterion, which requires \( q^T A q \) and \( q^T P q \)) override this method.
| alpha | scaling for the conjugate search direction \( q \) |
| qAq | squared energy norm of the conjugate search direction \( q \) |
| qPq | squared \(P\)-norm, i. e. the norm induced by the preconditioner, of the conjugate search direction \( q \) |
| rPINVr | squared \(P^{-1}\)-norm of the residual |
Reimplemented in Kaskade::StrakosTichyPTerminationCriterion< R >.
Definition at line 78 of file cgTerminationCriteria.hh.
|
pure virtual |
set requested tolerance
| tol | the requested tolerance (nonnegative) |
Implemented in Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >, and Kaskade::StrakosTichyPTerminationCriterion< R >.