Feel++
0.91.4
|
base class for preconditioner More...
#include <preconditioner.hpp>
Public Types | |
Typedefs | |
typedef Preconditioner< T > | preconditioner_type |
typedef boost::shared_ptr < Preconditioner< T > > | preconditioner_ptrtype |
typedef boost::shared_ptr < MatrixSparse< T > > | sparse_matrix_ptrtype |
typedef boost::shared_ptr < Vector< T > > | vector_ptrtype |
Public Member Functions | |
Operator overloads | |
Preconditioner & | operator= (Preconditioner const &o) |
copy operator | |
Accessors | |
bool | initialized () const |
virtual void | apply (const Vector< T > &x, Vector< T > &y)=0 |
void | apply (vector_ptrtype const &x, vector_ptrtype &y) |
virtual void | clear () |
PreconditionerType | type () const |
Mutators | |
void | setMatrix (sparse_matrix_ptrtype mat) |
void | setType (const PreconditionerType pct) |
Protected Attributes | |
sparse_matrix_ptrtype | M_matrix |
PreconditionerType | M_preconditioner_type |
bool | M_is_initialized |
mpi::communicator | M_comm |
Constructors, destructor | |
Preconditioner () | |
default constructor | |
Preconditioner (Preconditioner const &o) | |
copy constructor | |
~Preconditioner () | |
destructor | |
virtual void | init () |
static preconditioner_ptrtype | build (BackendType=BACKEND_PETSC) |
base class for preconditioner
virtual void Feel::Preconditioner< T >::apply | ( | const Vector< T > & | x, |
Vector< T > & | y | ||
) | [pure virtual] |
Computes the preconditioned vector "y" based on input "x". Usually by solving Py=x to get the action of P^-1 x.
Implemented in Feel::PreconditionerPetsc< T >.
Referenced by Feel::Preconditioner< T >::apply().
void Feel::Preconditioner< T >::apply | ( | vector_ptrtype const & | x, |
vector_ptrtype & | y | ||
) | [inline] |
Computes the preconditioned vector "y" based on input "x". Usually by solving Py=x to get the action of P^-1 x.
References Feel::Preconditioner< T >::apply().
virtual void Feel::Preconditioner< T >::clear | ( | ) | [inline, virtual] |
Release all memory and clear data structures.
Reimplemented in Feel::PreconditionerPetsc< T >.
virtual void Feel::Preconditioner< T >::init | ( | ) | [inline, virtual] |
Initialize data structures if not done so already.
Reimplemented in Feel::PreconditionerPetsc< T >.
bool Feel::Preconditioner< T >::initialized | ( | ) | const [inline] |
References Feel::Preconditioner< T >::M_is_initialized.
FEELPP_STRONG_INLINE void Feel::Preconditioner< T >::setMatrix | ( | sparse_matrix_ptrtype | mat | ) |
Sets the matrix P to be preconditioned.
void Feel::Preconditioner< T >::setType | ( | const PreconditionerType | pct | ) |
Sets the type of preconditioner to use.
PreconditionerType Feel::Preconditioner< T >::type | ( | ) | const [inline] |
Returns the type of preconditioner to use.
References Feel::Preconditioner< T >::M_preconditioner_type.
bool Feel::Preconditioner< T >::M_is_initialized [protected] |
Flag indicating if the data structures have been initialized.
Referenced by Feel::Preconditioner< T >::initialized(), and Feel::Preconditioner< T >::operator=().
sparse_matrix_ptrtype Feel::Preconditioner< T >::M_matrix [protected] |
The matrix P... ie the matrix to be preconditioned. This is often the actual system matrix of a linear sytem.
Referenced by Feel::Preconditioner< T >::operator=().
PreconditionerType Feel::Preconditioner< T >::M_preconditioner_type [protected] |
Enum statitng with type of preconditioner to use.
Referenced by Feel::Preconditioner< T >::operator=(), and Feel::Preconditioner< T >::type().