#include <backendeigen.hpp>
this class provides an interface to the EIGEN linear algebra library
Public Types | |
typedef super::datamap_ptrtype | datamap_ptrtype |
typedef super::datamap_type | datamap_type |
typedef boost::shared_ptr < eigen_sparse_matrix_type > | eigen_sparse_matrix_ptrtype |
typedef mpl::if_< mpl::bool_ < IsDense >, mpl::identity < MatrixEigenDense< value_type > >, mpl::identity < MatrixEigenSparse < value_type > > >::type::type | eigen_sparse_matrix_type |
typedef boost::shared_ptr < vector_type > | eigen_vector_ptrtype |
typedef VectorEigen< value_type > | eigen_vector_type |
typedef sparse_matrix_type::graph_ptrtype | graph_ptrtype |
typedef sparse_matrix_type::graph_type | graph_type |
typedef super::nl_solve_return_type | nl_solve_return_type |
typedef super::real_type | real_type |
typedef super::solve_return_type | solve_return_type |
typedef super::sparse_matrix_ptrtype | sparse_matrix_ptrtype |
typedef super::sparse_matrix_type | sparse_matrix_type |
typedef super::value_type | value_type |
typedef super::vector_ptrtype | vector_ptrtype |
typedef super::vector_type | vector_type |
![]() | |
typedef T | value_type |
typedef type_traits< T >::real_type | real_type |
typedef Vector< value_type > | vector_type |
typedef boost::shared_ptr < vector_type > | vector_ptrtype |
typedef MatrixSparse< value_type > | sparse_matrix_type |
typedef boost::shared_ptr < sparse_matrix_type > | sparse_matrix_ptrtype |
typedef MatrixShell< value_type > | shell_matrix_type |
typedef boost::shared_ptr < shell_matrix_type > | shell_matrix_ptrtype |
typedef sparse_matrix_type::graph_type | graph_type |
typedef sparse_matrix_type::graph_ptrtype | graph_ptrtype |
typedef Backend< value_type > | backend_type |
typedef boost::shared_ptr < backend_type > | backend_ptrtype |
typedef SolverNonLinear < value_type > | solvernonlinear_type |
typedef boost::shared_ptr < solvernonlinear_type > | solvernonlinear_ptrtype |
typedef boost::tuple< bool, size_type, value_type > | solve_return_type |
typedef boost::tuple< bool, size_type, value_type > | nl_solve_return_type |
typedef DataMap | datamap_type |
typedef boost::shared_ptr < datamap_type > | datamap_ptrtype |
Public Member Functions | |
BackendEigen (WorldComm const &worldComm=Environment::worldComm()) | |
BackendEigen (po::variables_map const &vm, std::string const &prefix="", WorldComm const &worldComm=Environment::worldComm()) | |
real_type | dot (const vector_type &f, const vector_type &x) const |
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 (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 | newMatrix (datamap_ptrtype const &d1, datamap_ptrtype const &d2, size_type matrix_properties=NON_HERMITIAN, bool init=true) |
vector_ptrtype | newVector (datamap_ptrtype const &d) |
vector_ptrtype | newVector (const size_type n, const size_type n_local) |
sparse_matrix_ptrtype | newZeroMatrix (const size_type m, const size_type n, const size_type m_l, const size_type n_l) |
sparse_matrix_ptrtype | newZeroMatrix (datamap_ptrtype const &d1, datamap_ptrtype const &d2) |
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, const vector_type &b) |
solve_return_type | solve (sparse_matrix_ptrtype const &A, vector_ptrtype &x, const vector_ptrtype &b) |
solve_return_type | solve (sparse_matrix_ptrtype const &A, sparse_matrix_ptrtype const &P, vector_ptrtype &x, const vector_ptrtype &b) |
![]() | |
std::string | prefix () const |
std::string | kspType () const |
std::string | pcType () const |
bool | hasConstantNullSpace () const |
std::string | fieldsplitType () const |
PreconditionerType | pcEnumType () const |
SolverType | kspEnumType () const |
FieldSplitType | fieldSplitEnumType () const |
std::string | pcFactorMatSolverPackageType () const |
MatSolverPackageType | matSolverPackageEnumType () const |
MatrixStructure | precMatrixStructure () const |
value_type | rTolerance () const |
value_type | rToleranceSNES () const |
value_type | dTolerance () const |
value_type | sToleranceSNES () const |
value_type | aTolerance () const |
value_type | aToleranceSNES () const |
size_type | maxIterations () const |
size_type | maxIterationsSNES () const |
value_type | rtoleranceKSPinSNES () const |
bool | converged () const |
size_type | nIterations () const |
bool | transpose () const |
WorldComm const & | comm () const |
bool | showKSPMonitor () const |
bool | showSNESMonitor () const |
bool | showKSPConvergedReason () const |
bool | showSNESConvergedReason () const |
bool | reusePrec () const |
bool | reuseJac () const |
bool | reusePrecRebuildAtFirstNewtonStep () const |
bool | reuseJacRebuildAtFirstNewtonStep () const |
BackendType | type () const |
void | setPrecMatrixStructure (MatrixStructure mstruct) |
solvernonlinear_ptrtype | nlSolver () |
void | setTranspose (bool transpose) |
void | setShowKSPMonitor (bool b) |
void | setShowSNESMonitor (bool b) |
void | setShowKSPConvergedReason (bool b) |
void | setShowSNESConvergedReason (bool b) |
void | setReusePrec (bool b) |
void | setReuseJac (bool b) |
void | setReusePrecRebuildAtFirstNewtonStep (bool b) |
void | setReuseJacRebuildAtFirstNewtonStep (bool b) |
virtual void | clear () |
real_type | dot (vector_ptrtype const &x, vector_ptrtype const &y) const |
void | prod (sparse_matrix_ptrtype const &A, vector_ptrtype const &x, vector_ptrtype &y) const |
solve_return_type | solve (sparse_matrix_ptrtype const &A, sparse_matrix_ptrtype const &P, vector_ptrtype &x, vector_ptrtype const &b, bool reuse_prec) |
virtual nl_solve_return_type | nlSolve (sparse_matrix_ptrtype &A, vector_ptrtype &x, vector_ptrtype &b, const double, const int) |
virtual nl_solve_return_type | nlSolve (sparse_matrix_ptrtype &A, vector_ptrtype &x, vector_ptrtype &b, const double, const int, bool reusePC, bool reuseJAC) |
void | attachPreconditioner (preconditioner_ptrtype preconditioner) |
template<typename Observer > | |
void | addDeleteObserver (Observer const &obs) |
template<typename Observer > | |
void | addDeleteObserver (boost::shared_ptr< Observer > const &obs) |
void | sendDeleteSignal () |
Backend (WorldComm const &worldComm=Environment::worldComm()) | |
Backend (po::variables_map const &vm, std::string const &prefix="", WorldComm const &worldComm=Environment::worldComm()) | |
Backend (Backend const &) | |
virtual | ~Backend () |
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, std::vector< std::vector< size_type > > indexSplit, size_type matrix_properties=NON_HERMITIAN) |
sparse_matrix_ptrtype | newMatrix (datamap_ptrtype const &domainmap, datamap_ptrtype const &imagemap, graph_ptrtype const &graph, size_type matrix_properties=NON_HERMITIAN, bool init=true) |
template<typename DomainSpace , typename ImageSpace > | |
sparse_matrix_ptrtype | newMatrix (DomainSpace const &dm, ImageSpace const &im, sparse_matrix_ptrtype const &M, size_type prop=NON_HERMITIAN) |
sparse_matrix_ptrtype | newBlockMatrixImpl (vf::BlocksBase< sparse_matrix_ptrtype > const &b, bool copy_values=true, bool diag_is_nonzero=true) |
sparse_matrix_ptrtype | newBlockMatrixImpl (vf::BlocksBase< boost::shared_ptr< GraphCSR > > const &b, bool copy_values=true, bool diag_is_nonzero=true) |
template<typename BlockType = vector_ptrtype> | |
vector_ptrtype | newBlockVectorImpl (vf::BlocksBase< BlockType > const &b, bool copy_values=true) |
Static Public Member Functions | |
template<typename DomainSpace , typename DualImageSpace > | |
static sparse_matrix_ptrtype | newMatrix (boost::shared_ptr< DomainSpace > const &space1, boost::shared_ptr< DualImageSpace > const &space2, size_type matrix_properties=NON_HERMITIAN) |
template<typename SpaceT > | |
static vector_ptrtype | newVector (boost::shared_ptr< SpaceT > const &space) |
template<typename SpaceT > | |
static vector_ptrtype | newVector (SpaceT const &space) |
![]() | |
static backend_ptrtype | build (BackendType=BACKEND_GMM, WorldComm const &worldComm=Environment::worldComm()) |
static backend_ptrtype | build (po::variables_map const &vm, std::string const &prefix="", WorldComm const &worldComm=Environment::worldComm()) |
Static Public Attributes | |
static const bool | IsDense = (_Options == 1) |
static const bool | IsSparse = (_Options == 0) |
Additional Inherited Members | |
![]() | |
preconditioner_ptrtype | M_preconditioner |
|
inlinevirtual |
|
inlinevirtual |
instantiate a new sparse vector
Implements Feel::Backend< T >.
|
inlinevirtual |
instantiate a new sparse vector
Implements Feel::Backend< T >.
|
inlinevirtual |
instantiate a new sparse vector
Implements Feel::Backend< T >.
|
inlinevirtual |
instantiate a new vector
Implements Feel::Backend< T >.
|
inlinevirtual |
instantiate a new vector
Implements Feel::Backend< T >.
|
inlinevirtual |
instantiate a new sparse vector
Implements Feel::Backend< T >.
|
inlinevirtual |
|
inlinevirtual |
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 >.