Loading...
Searching...
No Matches
solver_mumps.h
Go to the documentation of this file.
#ifndef _RHEOLEF_SOLVER_MUMPS_H
#define _RHEOLEF_SOLVER_MUMPS_H
// solver implementation: interface
//
#include "rheolef/config.h"
#ifdef _RHEOLEF_HAVE_MUMPS
#include "rheolef/solver.h"
#include "dmumps_c.h"
namespace rheolef {
// =======================================================================
// rep
// =======================================================================
template<class T, class M>
class solver_mumps_rep : public solver_abstract_rep<T,M> {
public:
// typedef:
typedef solver_abstract_rep<T,M> base;
typedef typename base::size_type size_type;
typedef typename base::determinant_type determinant_type;
// allocator:
explicit solver_mumps_rep (const csr<T,M>& a, const solver_option& opt = solver_option());
solver_abstract_rep<T,M>* clone() const;
bool initialized() const { return true; }
void update_values (const csr<T,M>& a);
~solver_mumps_rep ();
// accessors:
vec<T,M> trans_solve (const vec<T,M>& rhs) const;
vec<T,M> solve (const vec<T,M>& rhs) const;
determinant_type det() const { return _det; }
protected:
// data:
bool _has_mumps_instance;
bool _drop_ext_nnz; // when building schur complement
mutable DMUMPS_STRUC_C _mumps_par;
std::vector<MUMPS_INT> _row; // (i,j) matrix sparse tructure for mumps
std::vector<MUMPS_INT> _col;
std::vector<double> _val;
double _a00; // circumvent a bug when matrix size <= 1...
determinant_type _det;
};
template <class T, class M>
inline
solver_abstract_rep<T,M>*
solver_mumps_rep<T,M>::clone() const
{
typedef solver_mumps_rep<T,M> rep;
return new_macro (rep(*this));
}
} // namespace rheolef
#endif // MUMPS
#endif // _RHEOLEF_SOLVER_MUMPS_H
rheolef::csr
see the csr page for the full documentation
Definition csr.h:317
rheolef::solver_abstract_rep
Definition solver.h:191
rheolef::solver_mumps_rep
Definition solver_mumps.h:39
rheolef::solver_mumps_rep::_mumps_par
DMUMPS_STRUC_C _mumps_par
Definition solver_mumps.h:65
rheolef::solver_mumps_rep::_col
std::vector< MUMPS_INT > _col
Definition solver_mumps.h:67
rheolef::solver_mumps_rep::~solver_mumps_rep
~solver_mumps_rep()
Definition solver_mumps.cc:527
rheolef::solver_mumps_rep::det
determinant_type det() const
Definition solver_mumps.h:59
rheolef::solver_mumps_rep::_row
std::vector< MUMPS_INT > _row
Definition solver_mumps.h:66
rheolef::solver_mumps_rep::_has_mumps_instance
bool _has_mumps_instance
Definition solver_mumps.h:63
rheolef::solver_mumps_rep::update_values
void update_values(const csr< T, M > &a)
Definition solver_mumps.cc:265
rheolef::solver_mumps_rep::size_type
base::size_type size_type
Definition solver_mumps.h:44
rheolef::solver_mumps_rep::base
solver_abstract_rep< T, M > base
Definition solver_mumps.h:43
rheolef::solver_mumps_rep::determinant_type
base::determinant_type determinant_type
Definition solver_mumps.h:45
rheolef::solver_mumps_rep::_drop_ext_nnz
bool _drop_ext_nnz
Definition solver_mumps.h:64
rheolef::solver_mumps_rep::_val
std::vector< double > _val
Definition solver_mumps.h:68
rheolef::solver_mumps_rep::trans_solve
vec< T, M > trans_solve(const vec< T, M > &rhs) const
Definition solver_mumps.cc:521
rheolef::solver_mumps_rep::clone
solver_abstract_rep< T, M > * clone() const
Definition solver_mumps.h:75
rheolef::solver_mumps_rep::_a00
double _a00
Definition solver_mumps.h:69
rheolef::solver_mumps_rep::solve
vec< T, M > solve(const vec< T, M > &rhs) const
Definition solver_mumps.cc:445
rheolef::solver_mumps_rep::initialized
bool initialized() const
Definition solver_mumps.h:51
rheolef::solver_mumps_rep::_det
determinant_type _det
Definition solver_mumps.h:70
rheolef::solver_option
see the solver_option page for the full documentation
Definition solver_option.h:155
rheolef::vec
see the vec page for the full documentation
Definition vec.h:79
rheolef
This file is part of Rheolef.
Definition compiler_eigen.h:39