KASKADE 7 development version
Public Member Functions | List of all members
Kaskade::GaussSeidelPreconditioner< Matrix, Domain, Range > Class Template Referenceabstract

A simple single-level symmetric Gauss-Seidel preconditioner. More...

#include <GaussSeidelPreconditioner.hh>

Detailed Description

template<class Matrix, class Domain = typename MatrixTraits<Matrix>::NaturalDomain, class Range = typename MatrixTraits<Matrix>::NaturalRange>
class Kaskade::GaussSeidelPreconditioner< Matrix, Domain, Range >

A simple single-level symmetric Gauss-Seidel preconditioner.

For a square matrix \( A = L + D + R \), this solves \( (wL+D) x = wy \) in forward mode, \( (D+wR) x = wy \) in backward mode, or \( (wL+D)(D+wR) x = w^2y \) in symmetric mode for some stepsize (or damping factor) \( w \), and thus realizes a SOR or SSOR method as a generalization of the Gauss-Seidel method.

Template Parameters
Matrix

Definition at line 51 of file GaussSeidelPreconditioner.hh.

Inheritance diagram for Kaskade::GaussSeidelPreconditioner< Matrix, Domain, Range >:
Kaskade::SymmetricPreconditioner< typename MatrixTraits< Matrix >::NaturalDomain, typename MatrixTraits< Matrix >::NaturalRange >

Public Member Functions

 GaussSeidelPreconditioner (Matrix const &A_, field_type w_=1.0, GaussSeidelPreconditionerMode mode_=GaussSeidelPreconditionerMode::SYMMETRIC)
 Constructor. More...
 
void apply (Domain &x, Range const &y) override
 
field_type applyDp (Domain &x, Range const &y) override
 
bool requiresInitializedInput () const override
 Returns true if the target vector x has to be initialized to zero before calling apply or applyDp. More...
 
virtual void pre (typename MatrixTraits< Matrix >::NaturalDomain &, typename MatrixTraits< Matrix >::NaturalRange &)
 Preconditioner preparation. More...
 
virtual void post (typename MatrixTraits< Matrix >::NaturalDomain &x)
 Preconditioner cleanup. More...
 
virtual field_type applyDp (typename MatrixTraits< Matrix >::NaturalDomain &x, typename MatrixTraits< Matrix >::NaturalRange const &y)=0
 Computes \( x \leftarrow By \) and returns \( \langle By, y \rangle \). More...
 
virtual Dune::SolverCategory::Category category () const override
 returns the category of the operator More...
 

Constructor & Destructor Documentation

◆ GaussSeidelPreconditioner()

template<class Matrix , class Domain = typename MatrixTraits<Matrix>::NaturalDomain, class Range = typename MatrixTraits<Matrix>::NaturalRange>
Kaskade::GaussSeidelPreconditioner< Matrix, Domain, Range >::GaussSeidelPreconditioner ( Matrix const &  A_,
field_type  w_ = 1.0,
GaussSeidelPreconditionerMode  mode_ = GaussSeidelPreconditionerMode::SYMMETRIC 
)
inline

Constructor.

Parameters
Athe matrix to be preconditioned. This is copied and stored internally, such that the provided matrix need not exist after the constructor call. The matrix must be square (not necessarily symmetric, though) and must have invertible diagonal elements.
wthe stepsize or damping factor

Definition at line 65 of file GaussSeidelPreconditioner.hh.

Member Function Documentation

◆ apply()

template<class Matrix , class Domain = typename MatrixTraits<Matrix>::NaturalDomain, class Range = typename MatrixTraits<Matrix>::NaturalRange>
void Kaskade::GaussSeidelPreconditioner< Matrix, Domain, Range >::apply ( Domain &  x,
Range const &  y 
)
inlineoverride

◆ applyDp() [1/2]

template<class Matrix , class Domain = typename MatrixTraits<Matrix>::NaturalDomain, class Range = typename MatrixTraits<Matrix>::NaturalRange>
field_type Kaskade::GaussSeidelPreconditioner< Matrix, Domain, Range >::applyDp ( Domain &  x,
Range const &  y 
)
inlineoverride

Definition at line 113 of file GaussSeidelPreconditioner.hh.

◆ applyDp() [2/2]

virtual field_type Kaskade::SymmetricPreconditioner< typename MatrixTraits< Matrix >::NaturalDomain , typename MatrixTraits< Matrix >::NaturalRange >::applyDp ( typename MatrixTraits< Matrix >::NaturalDomain &  x,
typename MatrixTraits< Matrix >::NaturalRange const &  y 
)
pure virtualinherited

Computes \( x \leftarrow By \) and returns \( \langle By, y \rangle \).

◆ category()

virtual Dune::SolverCategory::Category Kaskade::SymmetricPreconditioner< typename MatrixTraits< Matrix >::NaturalDomain , typename MatrixTraits< Matrix >::NaturalRange >::category ( ) const
inlineoverridevirtualinherited

returns the category of the operator

From the Dune doxygen documentation it is unclear what this is supposed to mean. We return a dummy here.

Definition at line 242 of file symmetricOperators.hh.

◆ post()

virtual void Kaskade::SymmetricPreconditioner< typename MatrixTraits< Matrix >::NaturalDomain , typename MatrixTraits< Matrix >::NaturalRange >::post ( typename MatrixTraits< Matrix >::NaturalDomain &  x)
inlinevirtualinherited

Preconditioner cleanup.

The provided default implementation does nothing.

Definition at line 225 of file symmetricOperators.hh.

◆ pre()

virtual void Kaskade::SymmetricPreconditioner< typename MatrixTraits< Matrix >::NaturalDomain , typename MatrixTraits< Matrix >::NaturalRange >::pre ( typename MatrixTraits< Matrix >::NaturalDomain &  ,
typename MatrixTraits< Matrix >::NaturalRange &   
)
inlinevirtualinherited

Preconditioner preparation.

The provided default implementation does nothing.

Definition at line 218 of file symmetricOperators.hh.

◆ requiresInitializedInput()

template<class Matrix , class Domain = typename MatrixTraits<Matrix>::NaturalDomain, class Range = typename MatrixTraits<Matrix>::NaturalRange>
bool Kaskade::GaussSeidelPreconditioner< Matrix, Domain, Range >::requiresInitializedInput ( ) const
inlineoverridevirtual

Returns true if the target vector x has to be initialized to zero before calling apply or applyDp.

Implements Kaskade::SymmetricPreconditioner< typename MatrixTraits< Matrix >::NaturalDomain, typename MatrixTraits< Matrix >::NaturalRange >.

Definition at line 119 of file GaussSeidelPreconditioner.hh.


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