rheolef  6.5
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>
15 public:
16 
17  typedef typename csr<T,M>::size_type size_type;
18 
19 
22  _has_mumps_instance(false),
23  _mumps_par(),
24  _row(),
25  _col(),
26  _a00(0)
27  {}
28  explicit solver_mumps_rep (const csr<T,M>& a, const solver_option_type& opt = solver_option_type());
29  void update_values (const csr<T,M>& a);
31 
32 
33  vec<T,M> trans_solve (const vec<T,M>& rhs) const;
34  vec<T,M> solve (const vec<T,M>& rhs) const;
35 
36 protected:
38  mutable DMUMPS_STRUC_C _mumps_par;
39  std::vector<int> _row; // (i,j) matrix sparse tructure for mumps
40  std::vector<int> _col;
41  T _a00; // circumvent a bug when matrix size <= 1...
42 };
43 
44 } // namespace rheolef
45 #endif // MUMPS
46 #endif // _RHEOLEF_SOLVER_MUMPS_H
47