Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Feel::Preconditioner< T > Class Template Referenceabstract

#include <preconditioner.hpp>

Detailed Description

template<typename T>
class Feel::Preconditioner< T >

base class for preconditioner

Author
Christophe Prud'homme
See Also
+ Inheritance diagram for Feel::Preconditioner< T >:

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
Preconditioneroperator= (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())
 

Member Function Documentation

template<typename T>
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 >.

template<typename T>
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().

template<typename T>
virtual void Feel::Preconditioner< T >::clear ( )
inlinevirtual

Release all memory and clear data structures.

Reimplemented in Feel::PreconditionerPetsc< T >.

template<typename T>
virtual void Feel::Preconditioner< T >::init ( )
inlinevirtual

Initialize data structures if not done so already.

Reimplemented in Feel::PreconditionerPetsc< T >.

template<typename T>
bool Feel::Preconditioner< T >::initialized ( ) const
inline
Returns
true if the data structures are initialized, false otherwise.

References Feel::Preconditioner< T >::M_is_initialized.

template<typename T >
FEELPP_STRONG_INLINE void Feel::Preconditioner< T >::setMatrix ( sparse_matrix_ptrtype  mat)

Sets the matrix P to be preconditioned.

template<typename T >
void Feel::Preconditioner< T >::setMatSolverPackageType ( const MatSolverPackageType  mspt)

the software that is used to perform the factorization

template<typename T >
void Feel::Preconditioner< T >::setPrecMatrixStructure ( MatrixStructure  mstruct)

information about the preconditioner matrix structure during successive linear solves

template<typename T >
void Feel::Preconditioner< T >::setType ( const PreconditionerType  pct)

Sets the type of preconditioner to use.

template<typename T>
PreconditionerType Feel::Preconditioner< T >::type ( ) const
inline

Returns the type of preconditioner to use.

References Feel::Preconditioner< T >::M_preconditioner_type.

Member Data Documentation

template<typename T>
bool Feel::Preconditioner< T >::M_is_initialized
protected

Flag indicating if the data structures have been initialized.

template<typename T>
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.

template<typename T>
MatSolverPackageType Feel::Preconditioner< T >::M_matSolverPackage_type
protected

Enum the software that is used to perform the factorization

template<typename T>
std::string Feel::Preconditioner< T >::M_name
protected

name of the preconditioner

template<typename T>
MatrixStructure Feel::Preconditioner< T >::M_prec_matrix_structure
protected

Enum that indicating information about the preconditioner matrix structure during successive linear solves

template<typename T>
PreconditionerType Feel::Preconditioner< T >::M_preconditioner_type
protected

Enum statitng with type of preconditioner to use.

template<typename T>
WorldComm Feel::Preconditioner< T >::M_worldComm
protected

Communicator


The documentation for this class was generated from the following files:

Generated on Fri Oct 25 2013 14:24:32 for Feel++ by doxygen 1.8.4