solver_trilinos_ifpack.h
Go to the documentation of this file.
#ifndef _RHEOLEF_SOLVER_TRILINOS_IFPACK_H
#define _RHEOLEF_SOLVER_TRILINOS_IFPACK_H
// solver implementation: interface
//
#include "rheolef/config.h"
#if defined(_RHEOLEF_HAVE_TRILINOS) && defined(_RHEOLEF_HAVE_MPI)
#include "rheolef/solver.h"
#ifdef _RHEOLEF_HAVE_MPI
# include "mpi.h"
# include "Epetra_MpiComm.h"
#else // _RHEOLEF_HAVE_MPI
# include "Epetra_SerialComm.h"
#endif // _RHEOLEF_HAVE_MPI
#include "Epetra_CrsMatrix.h"
#include "Ifpack_Preconditioner.h"
namespace rheolef {
// =======================================================================
// rep
// =======================================================================
template<class T, class M>
class solver_trilinos_ifpack_rep : public solver_abstract_rep<T,M> {
public:
// allocator:
solver_trilinos_ifpack_rep()
: solver_abstract_rep<T,M>(solver_option()),
_ilu_ptr(0),
_petra_ownership_ptr(0)
{}
explicit solver_trilinos_ifpack_rep (const csr<T,M>& a, const solver_option& opt = solver_option());
void update_values (const csr<T,M>& a);
bool initialized() const { return true; }
~solver_trilinos_ifpack_rep ();
// accessors:
vec<T,M> trans_solve (const vec<T,M>& rhs) const;
vec<T,M> solve (const vec<T,M>& rhs) const;
protected:
// internal:
void destroy_values ();
void solve (const vec<T,M>& rhs, bool transpose, vec<T,M>& x) const;
// data:
Ifpack_Preconditioner* _ilu_ptr;
Epetra_Map* _petra_ownership_ptr;
};
} // namespace rheolef
#endif // defined(_RHEOLEF_HAVE_TRILINOS) && defined(_RHEOLEF_HAVE_MPI)
#endif // _RHEOLEF_SOLVER_TRILINOS_IFPACK_H
T
Expr1::float_type T
Definition: field_expr.h:261
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
rheolef::solve
void solve(tiny_matrix< T > &a, tiny_vector< size_t > &piv, const tiny_vector< T > &b, tiny_vector< T > &x)
Definition: tiny_lu.h:92
a
Definition: diffusion_isotropic.h:25
M
Expr1::memory_type M
Definition: vec_expr_v2.h:416