HLIBpro  2.8.1
TSOR Class Reference

implements SOR preconditioner for sparse matrices More...

#include <TSOR.hh>

Inheritance diagram for TSOR:
TLinearOperator TTypeInfo

Public Member Functions

 TSOR (const TSparseMatrix *A, const sor_type_t sor_type, const real omega=1.0, const real damping=1.0)
 
const TMatrixmatrix () const
 return internal sparse matrix
 
sor_type_t sor_type () const
 return SOR type
 
real 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 *x, TVector *y, const matop_t op=apply_normal) const
 
virtual void apply_add (const real alpha, const TVector *x, TVector *y, const matop_t op=apply_normal) const
 
virtual void apply_add (const real alpha, const BLAS::Vector< real > &x, BLAS::Vector< real > &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 >
 return vector in domain space
 
virtual auto range_vector () const -> std::unique_ptr< TVector >
 return vector in range space
 
- 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

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

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

Constructor & Destructor Documentation

◆ TSOR()

TSOR ( const TSparseMatrix A,
const sor_type_t  sor_type,
const real  omega = 1.0,
const real  damping = 1.0 
)

constructs SOR preconditioner of type sor_type using coefficients as defined by sparse matrix A

Member Function Documentation

◆ apply()

virtual void apply ( const TVector x,
TVector 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.

◆ apply_add() [1/2]

virtual void apply_add ( const real  alpha,
const BLAS::Vector< real > &  x,
BLAS::Vector< real > &  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.

◆ apply_add() [2/2]

virtual void apply_add ( const real  alpha,
const TVector x,
TVector 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.