HLIBpro  2.0
Public Member Functions | List of all members
TSOR Class Reference

implements SOR preconditioner More...

#include <TSOR.hh>

Inheritance diagram for TSOR:
TLinearOperator

Public Member Functions

 TSOR (const TSparseMatrix *A, const sor_type_t sor_type, const real omega=1.0, const real damping=1.0)
 
const TSparseMatrixmatrix () 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) const
 
virtual void apply_add (const real alpha, const TVector *x, TVector *y, const matop_t op) const
 
virtual TVectordomain_vector () const
 return vector in domain space
 
virtual TVectorrange_vector () const
 return vector in range space
 

Detailed Description

TSOR provides application of a SOR type preconditioner for a given matrix $A = D - L - U$, with diagonal D, strictly lower triangular matrix L and strictly upper triangular matrix U.

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

The matrix A must be a sparse matrix.

Constructor & Destructor Documentation

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 A

Member Function Documentation

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

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