Feel++ 0.91.0
Public Types | Public Member Functions | Static Public Member Functions
Feel::BackendPetsc< T > Class Template Reference

#include <backendpetsc.hpp>

Inheritance diagram for Feel::BackendPetsc< T >:
Feel::Backend< T >

List of all members.

Public Types

typedef super::value_type value_type
typedef super::sparse_matrix_type sparse_matrix_type
typedef
super::sparse_matrix_ptrtype 
sparse_matrix_ptrtype
typedef MatrixPetsc< value_type > petsc_sparse_matrix_type
typedef boost::shared_ptr
< sparse_matrix_type
petsc_sparse_matrix_ptrtype
typedef super::vector_type vector_type
typedef super::vector_ptrtype vector_ptrtype
typedef VectorPetsc< value_type > petsc_vector_type
typedef boost::shared_ptr
< vector_type
petsc_vector_ptrtype
typedef super::solve_return_type solve_return_type
typedef super::nl_solve_return_type nl_solve_return_type

Public Member Functions

 BackendPetsc (po::variables_map const &vm, std::string const &prefix="")
sparse_matrix_ptrtype newMatrix (const size_type m, const size_type n, const size_type m_l, const size_type n_l, const size_type nnz=30, const size_type noz=10)
sparse_matrix_ptrtype newMatrix (DataMap const &domainmap, DataMap const &imagemap)
vector_ptrtype newVector (DataMap const &dm)
void set_symmetric (bool)
void prod (sparse_matrix_type const &A, vector_type const &x, vector_type &b) const
solve_return_type solve (sparse_matrix_type const &A, vector_type &x, vector_type const &b)
solve_return_type solve (sparse_matrix_ptrtype const &A, sparse_matrix_ptrtype const &B, vector_ptrtype &x, vector_ptrtype const &b)

Static Public Member Functions

template<typename DomainSpace , typename DualImageSpace >
static sparse_matrix_ptrtype newMatrix (DomainSpace const &Xh, DualImageSpace const &Yh)
template<typename SpaceT >
static vector_ptrtype newVector (SpaceT const &space)
template<class Vector >
static void applyMatrix (sparse_matrix_type const &A, const Vector &x, vector_type &b)
template<class Vector >
static value_type dot (const vector_type &f, const Vector &x)

Detailed Description

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

this class provides an interface to the PETSC linear algebra library


Member Function Documentation

template<typename T>
sparse_matrix_ptrtype Feel::BackendPetsc< T >::newMatrix ( const size_type  m,
const size_type  n,
const size_type  m_l,
const size_type  n_l,
const size_type  nnz = 30,
const size_type  noz = 10 
) [inline, virtual]

instantiate a new sparse vector

Implements Feel::Backend< T >.

template<typename T>
sparse_matrix_ptrtype Feel::BackendPetsc< T >::newMatrix ( DataMap const &  dm1,
DataMap const &  dm2 
) [inline, virtual]

instantiate a new sparse vector

Implements Feel::Backend< T >.

References Feel::DataMap::nGlobalElements(), and Feel::DataMap::nMyElements().

template<typename T>
vector_ptrtype Feel::BackendPetsc< T >::newVector ( DataMap const &  dm) [inline, virtual]

instantiate a new vector

Implements Feel::Backend< T >.

References Feel::DataMap::nGlobalElements(), and Feel::DataMap::nMyElements().

template<typename T>
void Feel::BackendPetsc< T >::prod ( sparse_matrix_type const &  A,
vector_type const &  x,
vector_type y 
) const [inline, virtual]
template<typename T >
BackendPetsc< T >::solve_return_type Feel::BackendPetsc< T >::solve ( sparse_matrix_ptrtype const &  A,
sparse_matrix_ptrtype const &  P,
vector_ptrtype &  x,
vector_ptrtype const &  b 
) [virtual]

solve for $P A x = P b$ where $P$ is an approximation of the inverse of $A$.

Parameters:
Amatrix to inverse
rhsright hand side vector
solutionsolution of the system
Ppreconditioner
maxitmaximum number of iterations
tolerancetolerance on the residual
transposeif true solve the transpose problem
Warning:
some parameter may not be meaningful for all backends

Implements Feel::Backend< T >.

References Feel::Backend< T >::setPrecMatrixStructure().