KASKADE 7 development version
Public Types | Public Member Functions | List of all members
Kaskade::PCGTerminationCriterion< R > Class Template Referenceabstract

Interface for IterateType::PCG termination criterion policy classes. More...

#include <apcg.hh>

Detailed Description

template<class R>
class Kaskade::PCGTerminationCriterion< R >

Interface for IterateType::PCG termination criterion policy classes.

Template Parameters
Ra floating point type for real numbers

Definition at line 63 of file linalg/apcg.hh.

Inheritance diagram for Kaskade::PCGTerminationCriterion< R >:
Kaskade::PCGCountingTerminationCriterion< R > Kaskade::PCGEnergyErrorTerminationCriterion< R > Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R > Kaskade::StrakosTichyPTerminationCriterion< R >

Public Types

typedef R Real
 real field type More...
 
typedef R Real
 real field type More...
 

Public Member Functions

virtual void clear ()=0
 re-initializes the termination criterion for a new IterateType::CG run More...
 
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...
 
virtual void clear ()=0
 re-initializes the termination criterion for a new IterateType::CG run More...
 
virtual void setTolerance (Real tol)=0
 set requested tolerance More...
 
virtual void setLookAhead (int lah)=0
 set requested look-ahead count More...
 
virtual void addStepQuantities (Real stepLength, Real qAq, Real qPq, Real rPINVr)=0
 addStepQuantities supplies algorithmic quantities to the termination criterion More...
 
virtual int getMaxIterationSteps ()=0
 get the maximum number of allowed iteration steps More...
 
virtual operator bool ()=0
 termination decision More...
 
virtual bool minimalDecreaseAchieved ()
 

Member Typedef Documentation

◆ Real [1/2]

template<class R >
typedef R Kaskade::PCGTerminationCriterion< R >::Real

real field type

Definition at line 69 of file linalg/apcg.hh.

◆ Real [2/2]

template<class R >
typedef R Kaskade::PCGTerminationCriterion< R >::Real

real field type

Definition at line 28 of file cgTerminationCriteria.hh.

Member Function Documentation

◆ addStepQuantities()

template<class R >
virtual void Kaskade::PCGTerminationCriterion< R >::addStepQuantities ( Real  stepLength,
Real  qAq,
Real  qPq,
Real  rPINVr 
)
pure virtual

addStepQuantities supplies algorithmic quantities to the termination criterion

Parameters
stepLengthscaling for the conjugate search direction \(q\)
qAqsquared energy norm of the conjugate search direction \(q\)
qPqsquared \(P\)-norm, i. e. the norm induced by the preconditioner, of the conjugate search direction \(q\)
rPINVrsquared \(P^{-1}\)-norm of the residual

Implemented in Kaskade::StrakosTichyPTerminationCriterion< R >, and Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >.

◆ clear() [1/2]

template<class R >
virtual void Kaskade::PCGTerminationCriterion< R >::clear ( )
pure virtual

◆ clear() [2/2]

template<class R >
virtual void Kaskade::PCGTerminationCriterion< R >::clear ( )
pure virtual

◆ getMaxIterationSteps()

template<class R >
virtual int Kaskade::PCGTerminationCriterion< R >::getMaxIterationSteps ( )
pure virtual

◆ minimalDecreaseAchieved()

template<class R >
virtual bool Kaskade::PCGTerminationCriterion< R >::minimalDecreaseAchieved ( )
inlinevirtual

◆ operator bool() [1/2]

template<class R >
virtual Kaskade::PCGTerminationCriterion< R >::operator bool ( ) const
pure virtual

termination decision

Returns
true if the iteration has reached the required accuracy

Implemented in Kaskade::PCGCountingTerminationCriterion< R >, and Kaskade::PCGEnergyErrorTerminationCriterion< R >.

◆ operator bool() [2/2]

template<class R >
virtual Kaskade::PCGTerminationCriterion< R >::operator bool ( )
pure virtual

termination decision

Returns
true if the iteration has reached the required accuracy

Implemented in Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >, and Kaskade::StrakosTichyPTerminationCriterion< R >.

◆ residual()

template<class R >
virtual void Kaskade::PCGTerminationCriterion< R >::residual ( Real  sigma)
pure virtual

supplies the preconditioned residual to the termination criterion

Parameters
sigmathe preconditioned residual norm

Implemented in Kaskade::PCGEnergyErrorTerminationCriterion< R >, and Kaskade::PCGCountingTerminationCriterion< R >.

Referenced by Kaskade::Pcg< X, Xstar >::apply().

◆ setLookAhead()

template<class R >
virtual void Kaskade::PCGTerminationCriterion< R >::setLookAhead ( int  lah)
pure virtual

set requested look-ahead count

Parameters
lahthe requested look-ahead count (positive integer)

Implemented in Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >, and Kaskade::StrakosTichyPTerminationCriterion< R >.

◆ setTolerance()

template<class R >
virtual void Kaskade::PCGTerminationCriterion< R >::setTolerance ( Real  tol)
pure virtual

set requested tolerance

Parameters
tolthe requested tolerance (nonnegative)

Implemented in Kaskade::StrakosTichyEnergyErrorTerminationCriterion< R >, and Kaskade::StrakosTichyPTerminationCriterion< R >.

Referenced by Kaskade::CGBase< X, Xstar, impl, TimerPolicy, Functor >::apply().

◆ step()

template<class R >
virtual void Kaskade::PCGTerminationCriterion< R >::step ( Real  gamma2)
pure virtual

supplies energy of step to the termination criterion

Parameters
gamma2the 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().

◆ tolerance()

template<class R >
virtual PCGTerminationCriterion< R > & Kaskade::PCGTerminationCriterion< R >::tolerance ( Real  tol)
pure virtual

set requested tolerance

Parameters
tolthe requested tolerance (nonnegative)

Implemented in Kaskade::PCGEnergyErrorTerminationCriterion< R >, and Kaskade::PCGCountingTerminationCriterion< R >.

Referenced by Kaskade::Pcg< X, Xstar >::apply().


The documentation for this class was generated from the following files: