#include <preconditioner.hpp>
base class for preconditioner
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 | |
void | operator() () |
Accessors | |
bool | initialized () const |
WorldComm const & | worldComm () 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 |
virtual std::string | name () const |
sparse_matrix_ptrtype const & | matrix () const |
Mutators | |
virtual void | setName (std::string const &n) |
void | setMatrix (sparse_matrix_ptrtype mat) |
void | setType (const PreconditionerType pct) |
void | setMatSolverPackageType (const MatSolverPackageType mspt) |
void | setPrecMatrixStructure (MatrixStructure mstruct) |
Protected Attributes | |
bool | M_is_initialized |
bool | M_mat_has_changed |
sparse_matrix_ptrtype | M_matrix |
MatSolverPackageType | M_matSolverPackage_type |
std::string | M_name |
MatrixStructure | M_prec_matrix_structure |
PreconditionerType | M_preconditioner_type |
WorldComm | M_worldComm |
Constructors, destructor | |
Preconditioner (std::string const &name="", WorldComm const &worldComm=Environment::worldComm()) | |
default constructor | |
Preconditioner (Preconditioner const &o) | |
copy constructor | |
~Preconditioner () | |
destructor | |
virtual void | init () |
static preconditioner_ptrtype | build (std::string const &name="", BackendType=BACKEND_PETSC, WorldComm const &worldComm=Environment::worldComm()) |
|
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 >.
|
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().
|
inlinevirtual |
Release all memory and clear data structures.
Reimplemented in Feel::PreconditionerPetsc< T >.
|
inlinevirtual |
Initialize data structures if not done so already.
Reimplemented in Feel::PreconditionerPetsc< T >.
|
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 >::setMatSolverPackageType | ( | const MatSolverPackageType | mspt | ) |
the software that is used to perform the factorization
void Feel::Preconditioner< T >::setPrecMatrixStructure | ( | MatrixStructure | mstruct | ) |
information about the preconditioner matrix structure during successive linear solves
void Feel::Preconditioner< T >::setType | ( | const PreconditionerType | pct | ) |
Sets the type of preconditioner to use.
|
inline |
Returns the type of preconditioner to use.
References Feel::Preconditioner< T >::M_preconditioner_type.
|
protected |
Flag indicating if the data structures have been initialized.
|
protected |
The matrix P... ie the matrix to be preconditioned. This is often the actual system matrix of a linear sytem.
|
protected |
Enum the software that is used to perform the factorization
|
protected |
name of the preconditioner
|
protected |
Enum that indicating information about the preconditioner matrix structure during successive linear solves
|
protected |
Enum statitng with type of preconditioner to use.
|
protected |
Communicator