Feel++ 0.91.0
|
#include <backendpetsc.hpp>
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 (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) |
this class provides an interface to the PETSC linear algebra library
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().
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().
void Feel::BackendPetsc< T >::prod | ( | sparse_matrix_type const & | A, |
vector_type const & | x, | ||
vector_type & | y | ||
) | const [inline, virtual] |
Implements Feel::Backend< T >.
References Feel::MatrixPetsc< T >::mat(), and Feel::VectorPetsc< T >::vec().
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 where
is an approximation of the inverse of
.
A | matrix to inverse |
rhs | right hand side vector |
solution | solution of the system |
P | preconditioner |
maxit | maximum number of iterations |
tolerance | tolerance on the residual |
transpose | if true solve the transpose problem |
Implements Feel::Backend< T >.
References Feel::Backend< T >::setPrecMatrixStructure().