KASKADE 7 development version
|
Relative energy error termination criterion according to Strakos, Tichy: Error estimation in preconditioned conjugate gradients. Requires that IterateType::CG starts at \( x = 0 \). More general starting values might be used, but must be chosen such that the estimate for the energy norm of the solution stays positive (see the above mentioned paper for details). More...
#include <cgTerminationCriteria.hh>
Relative energy error termination criterion according to Strakos, Tichy: Error estimation in preconditioned conjugate gradients. Requires that IterateType::CG starts at \( x = 0 \). More general starting values might be used, but must be chosen such that the estimate for the energy norm of the solution stays positive (see the above mentioned paper for details).
Definition at line 80 of file cgTerminationCriteria.hh.
Public Types | |
typedef R | Real |
Public Member Functions | |
StrakosTichyEnergyErrorTerminationCriterion (Real tol_, int maxit_, double eps_=1e-12) | |
constructor More... | |
StrakosTichyEnergyErrorTerminationCriterion (Real tol_, Real minTol_, int maxit_, double eps_=1e-12) | |
constructor More... | |
virtual void | clear () |
re-initializes the termination criterion for a new IterateType::CG run More... | |
virtual void | setTolerance (Real tol_) |
set requested relative tolerance More... | |
virtual void | setLookAhead (int d_) |
set requested lookahead value More... | |
virtual void | addStepQuantities (Real stepLength, Real, Real, Real rPINVr) |
addStepQuantities supplies algorithmic quantities to the termination criterion More... | |
virtual int | getMaxIterationSteps () |
get the maximum number of allowed iteration steps More... | |
virtual | operator bool () |
termination decision More... | |
Real | relativeError () |
returns the estimated absolute energy error More... | |
bool | minimalDecreaseAchieved () |
virtual PCGTerminationCriterion< R > & | tolerance (Real tol)=0 |
set requested tolerance More... | |
virtual void | step (Real gamma2)=0 |
supplies energy of step to the termination criterion More... | |
virtual void | residual (Real sigma)=0 |
supplies the preconditioned residual to the termination criterion More... | |
virtual | operator bool () const =0 |
termination decision More... | |
typedef R Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >::Real |
Definition at line 82 of file cgTerminationCriteria.hh.
|
inline |
constructor
The pcg iteration is terminated as soon as either the estimated error satisfies \( [\epsilon] \le \mathrm{tol} \) or the number of iterations exceeds the limit maxit. Note that the estimate of the relative error requires a look ahead parameter L. Thus, if \(\mathrm{maxit}\ge\mathrm{L}\), then the error is first estimated in the (L+1)-th iteration.
tol | the relative error tolerance for termination |
maxit | the maximum number of iterations |
eps | maximal attainable accuracy |
Definition at line 95 of file cgTerminationCriteria.hh.
|
inline |
constructor
The pcg iteration is terminated as soon as either the estimated error satisfies \( [\epsilon] \le \mathrm{tol} \) or the number of iterations exceeds the limit maxit. Note that the estimate of the relative error requires a look ahead parameter L. Thus, if \(\mathrm{maxit}\ge\mathrm{L}\), then the error is first estimated in the (L+1)-th iteration.
tol | the relative error tolerance for termination |
minTol | relative error tolerance to admit truncation in the hybrid cg implementation |
maxit | the maximum number of iterations |
eps | maximal attainable accuracy |
Definition at line 111 of file cgTerminationCriteria.hh.
|
inlinevirtual |
addStepQuantities supplies algorithmic quantities to the termination criterion
stepLength | scaling for the conjugate search direction \(q\) |
qAq | squared energy norm of the conjugate search direction \(q\) (here: unused) |
qPq | squared \(P\)-norm, i. e. the norm induced by the preconditioner, of the conjugate search direction \(q\) (here: unused) |
rPINVr | squared \(P^{-1}\)-norm of the residual |
Implements Kaskade::PCGTerminationCriterion< R >.
Definition at line 147 of file cgTerminationCriteria.hh.
|
inlinevirtual |
re-initializes the termination criterion for a new IterateType::CG run
Implements Kaskade::PCGTerminationCriterion< R >.
Definition at line 118 of file cgTerminationCriteria.hh.
|
inlinevirtual |
get the maximum number of allowed iteration steps
Implements Kaskade::PCGTerminationCriterion< R >.
Definition at line 156 of file cgTerminationCriteria.hh.
|
inlinevirtual |
Reimplemented from Kaskade::PCGTerminationCriterion< R >.
Definition at line 178 of file cgTerminationCriteria.hh.
|
inlinevirtual |
termination decision
Implements Kaskade::PCGTerminationCriterion< R >.
Definition at line 164 of file cgTerminationCriteria.hh.
|
pure virtualinherited |
termination decision
Implemented in Kaskade::PCGCountingTerminationCriterion< R >, and Kaskade::PCGEnergyErrorTerminationCriterion< R >.
|
inline |
returns the estimated absolute energy error
Definition at line 172 of file cgTerminationCriteria.hh.
Referenced by Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >::minimalDecreaseAchieved(), and Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >::operator bool().
|
pure virtualinherited |
supplies the preconditioned residual to the termination criterion
sigma | the preconditioned residual norm |
Implemented in Kaskade::PCGEnergyErrorTerminationCriterion< R >, and Kaskade::PCGCountingTerminationCriterion< R >.
Referenced by Kaskade::Pcg< X, Xstar >::apply().
|
inlinevirtual |
set requested lookahead value
lah | the requested lookahead (nonnegative) |
The default value is 50.
Implements Kaskade::PCGTerminationCriterion< R >.
Definition at line 138 of file cgTerminationCriteria.hh.
|
inlinevirtual |
set requested relative tolerance
tol | the requested tolerance (nonnegative) |
Implements Kaskade::PCGTerminationCriterion< R >.
Definition at line 129 of file cgTerminationCriteria.hh.
|
pure virtualinherited |
supplies energy of step to the termination criterion
gamma2 | the energy \( \alpha^2 q^T A q \) of the step \( \alpha q \) |
Implemented in Kaskade::PCGEnergyErrorTerminationCriterion< R >, and Kaskade::PCGCountingTerminationCriterion< R >.
Referenced by Kaskade::Pcg< X, Xstar >::apply().
|
pure virtualinherited |
set requested tolerance
tol | the requested tolerance (nonnegative) |
Implemented in Kaskade::PCGEnergyErrorTerminationCriterion< R >, and Kaskade::PCGCountingTerminationCriterion< R >.
Referenced by Kaskade::Pcg< X, Xstar >::apply().