rheolef  6.6
solver_mumps.h
Go to the documentation of this file.
1 #ifndef _RHEOLEF_SOLVER_MUMPS_H
2 #define _RHEOLEF_SOLVER_MUMPS_H
3 
4 #include "rheolef/config.h"
5 
6 #ifdef _RHEOLEF_HAVE_MUMPS
7 
8 #include "rheolef/solver.h"
9 #include "dmumps_c.h"
10 
11 namespace rheolef {
12 
13 template<class T, class M>
14 class solver_mumps_rep : public solver_abstract_rep<T,M> {
15 public:
16 
17  typedef solver_abstract_rep<T,M> base;
18  typedef typename base::size_type size_type;
19  typedef typename base::determinant_type determinant_type;
20 
21 
22  solver_mumps_rep()
23  : solver_abstract_rep<T,M>(solver_option_type()),
24  _has_mumps_instance(false),
25  _drop_ext_nnz(false),
26  _mumps_par(),
27  _row(),
28  _col(),
29  _a00(0),
30  _det()
31  {}
32  explicit solver_mumps_rep (const csr<T,M>& a, const solver_option_type& opt = solver_option_type());
33  void update_values (const csr<T,M>& a);
34  ~solver_mumps_rep ();
35 
36 
37  vec<T,M> trans_solve (const vec<T,M>& rhs) const;
38  vec<T,M> solve (const vec<T,M>& rhs) const;
39  determinant_type det() const { return _det; }
40 
41 protected:
42  bool _has_mumps_instance;
43  bool _drop_ext_nnz; // when building schur complement
44  mutable DMUMPS_STRUC_C _mumps_par;
45  std::vector<int> _row; // (i,j) matrix sparse tructure for mumps
46  std::vector<int> _col;
47  T _a00; // circumvent a bug when matrix size <= 1...
48  determinant_type _det;
49 };
50 
51 } // namespace rheolef
52 #endif // MUMPS
53 #endif // _RHEOLEF_SOLVER_MUMPS_H
irheostream, orheostream - large data streams
Definition: compiler.h:7
void solve(tiny_matrix< T > &a, tiny_vector< size_t > &piv, const tiny_vector< T > &b, tiny_vector< T > &x)
Definition: tiny_lu.h:50
reference_element_H::size_type size_type