HLIBpro  3.0
TGaussSeidel< T_value > Class Template Reference

implements Gauss-Seidel preconditioner More...

#include <TSOR.hh>

Inheritance diagram for TGaussSeidel< T_value >:
TLinearOperator< T_value > TTypeInfo

Public Member Functions

 TGaussSeidel (const TMatrix< value_t > *A, const gs_type_t gs_type, const real_t damping=real_t(1))
 constructs Gauss-Seidel preconditioner of type gs_type
 
const TMatrix< value_t > * matrix () const
 return internal sparse matrix
 
gs_type_t gs_type () const
 return GaussSeidel type
 
real_t damping_factor () const
 return damping factor
 
bool is_complex () const
 return true, if field type is complex
 
bool is_self_adjoint () const
 return true, of operator is self adjoint
 
virtual void apply (const TVector< value_t > *x, TVector< value_t > *y, const matop_t op=apply_normal) const
 
virtual void apply_add (const value_t alpha, const TVector< value_t > *x, TVector< value_t > *y, const matop_t op=apply_normal) const
 
virtual void apply_add (const value_t alpha, const BLAS::Vector< value_t > &x, BLAS::Vector< value_t > &y, const matop_t op=apply_normal) const
 
virtual size_t domain_dim () const
 return dimension of domain
 
virtual size_t range_dim () const
 return dimension of range
 
virtual auto domain_vector () const -> std::unique_ptr< TVector< value_t > >
 return vector in domain space
 
virtual auto range_vector () const -> std::unique_ptr< TVector< value_t > >
 return vector in range space
 
- Public Member Functions inherited from TLinearOperator< T_value >
virtual bool is_real () const
 return true, if field type is real valued
 
- Public Member Functions inherited from TTypeInfo
virtual typeid_t type () const =0
 return type ID of object
 
virtual bool is_type (const typeid_t t) const
 return true if local object is of given type ID t
 
virtual std::string typestr () const
 return string representation of type
 

Detailed Description

template<typename T_value>
class Hpro::TGaussSeidel< T_value >

     TGaussSeidel provides application of a Gauss-Seidel type preconditioner 
     for a given matrix \f$A = D - E - F\f$, with diagonal D, strictly lower triangular
     matrix E and strictly upper triangular matrix F.

     For forward GS, the applied operator is \f$ ( D - E )^{-1}\f$,
     for backward GS \f$ ( D - F )^{-1}\f$ and the combination of both
     for the symmetric GS, i.e., \f$ ( D - F )^{-1} D ( D - E )^{-1}\f$.

     TGaussSeidel implements point-wise and block-wise GS steps. However, point-wise
     GS is only supported for sparse matrices while block-wise GS is only supported
     for H-matrices

Member Function Documentation

◆ apply()

virtual void apply ( const TVector< value_t > *  x,
TVector< value_t > *  y,
const matop_t  op = apply_normal 
) const
virtual

mapping function of linear operator \(A\), e.g. \( y := A(x)\). Depending on op, either \(A\), \(A^T\) or \(A^H\) is applied.

Implements TLinearOperator< T_value >.

◆ apply_add() [1/2]

virtual void apply_add ( const value_t  alpha,
const BLAS::Vector< value_t > &  x,
BLAS::Vector< value_t > &  y,
const matop_t  op = apply_normal 
) const
virtual

same as above but only the dimension of the vector spaces is tested, not the corresponding index sets

Implements TLinearOperator< T_value >.

◆ apply_add() [2/2]

virtual void apply_add ( const value_t  alpha,
const TVector< value_t > *  x,
TVector< value_t > *  y,
const matop_t  op = apply_normal 
) const
virtual

mapping function with update: \( y := y + \alpha A(x)\). Depending on op, either \(A\), \(A^T\) or \(A^H\) is applied.

Implements TLinearOperator< T_value >.