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 MatrixPetscMPI < value_type > | petscMPI_sparse_matrix_type |
typedef sparse_matrix_type::graph_type | graph_type |
typedef sparse_matrix_type::graph_ptrtype | graph_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 VectorPetscMPI < value_type > | petscMPI_vector_type |
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, size_type matrix_properties=NON_HERMITIAN) |
sparse_matrix_ptrtype | newMatrix (DataMap const &domainmap, DataMap const &imagemap, size_type matrix_properties=NON_HERMITIAN, bool init=true) |
sparse_matrix_ptrtype | newMatrix (DataMap const &domainmap, DataMap const &imagemap, graph_ptrtype const &graph, size_type matrix_properties=NON_HERMITIAN) |
sparse_matrix_ptrtype | newMatrix (const size_type m, const size_type n, const size_type m_l, const size_type n_l, graph_ptrtype const &graph, size_type matrix_properties=NON_HERMITIAN) |
sparse_matrix_ptrtype | newZeroMatrix (DataMap const &domainmap, DataMap const &imagemap) |
sparse_matrix_ptrtype | newZeroMatrix (const size_type m, const size_type n, const size_type m_l, const size_type n_l) |
vector_ptrtype | newVector (DataMap const &dm) |
vector_ptrtype | newVector (const size_type n, const size_type n_local) |
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, size_type matrix_properties=NON_HERMITIAN) |
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 | ( | 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 , |
||
size_type | prop = NON_HERMITIAN |
||
) | [inline, virtual] |
instantiate a new sparse vector
Implements Feel::Backend< T >.
References Feel::Backend< T >::comm().
sparse_matrix_ptrtype Feel::BackendPetsc< T >::newMatrix | ( | DataMap const & | dm1, |
DataMap const & | dm2, | ||
size_type | prop = NON_HERMITIAN , |
||
bool | init = true |
||
) | [inline, virtual] |
instantiate a new sparse vector
Implements Feel::Backend< T >.
References Feel::DataMap::nDof(), Feel::DataMap::nLocalDofWithoutGhost(), and Feel::DataMap::worldComm().
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, | ||
graph_ptrtype const & | graph, | ||
size_type | matrix_properties = NON_HERMITIAN |
||
) | [inline, virtual] |
instantiate a new sparse vector
Implements Feel::Backend< T >.
References Feel::Backend< T >::comm().
vector_ptrtype Feel::BackendPetsc< T >::newVector | ( | DataMap const & | dm | ) | [inline, virtual] |
vector_ptrtype Feel::BackendPetsc< T >::newVector | ( | const size_type | n, |
const size_type | n_local | ||
) | [inline, virtual] |
instantiate a new vector
Implements Feel::Backend< T >.
sparse_matrix_ptrtype Feel::BackendPetsc< T >::newZeroMatrix | ( | const size_type | m, |
const size_type | n, | ||
const size_type | m_l, | ||
const size_type | n_l | ||
) | [inline, virtual] |
instantiate a new sparse vector
Implements Feel::Backend< T >.
References Feel::Backend< T >::comm().
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 >::attachPreconditioner().