Rheolef  7.1
an efficient C++ finite element environment
solver_mumps.h
Go to the documentation of this file.
1 #ifndef _RHEOLEF_SOLVER_MUMPS_H
2 #define _RHEOLEF_SOLVER_MUMPS_H
23 // solver implementation: interface
24 //
25 
26 #include "rheolef/config.h"
27 
28 #ifdef _RHEOLEF_HAVE_MUMPS
29 
30 #include "rheolef/solver.h"
31 #include "dmumps_c.h"
32 
33 namespace rheolef {
34 
35 // =======================================================================
36 // rep
37 // =======================================================================
38 template<class T, class M>
40 public:
41 // typedef:
42 
44  typedef typename base::size_type size_type;
46 
47 // allocator:
48 
49  explicit solver_mumps_rep (const csr<T,M>& a, const solver_option& opt = solver_option());
51  bool initialized() const { return true; }
52  void update_values (const csr<T,M>& a);
54 
55 // accessors:
56 
57  vec<T,M> trans_solve (const vec<T,M>& rhs) const;
58  vec<T,M> solve (const vec<T,M>& rhs) const;
59  determinant_type det() const { return _det; }
60 
61 protected:
62 // data:
64  bool _drop_ext_nnz; // when building schur complement
65  mutable DMUMPS_STRUC_C _mumps_par;
66  std::vector<MUMPS_INT> _row; // (i,j) matrix sparse tructure for mumps
67  std::vector<MUMPS_INT> _col;
68  std::vector<double> _val;
69  double _a00; // circumvent a bug when matrix size <= 1...
71 };
72 template <class T, class M>
73 inline
76 {
77  typedef solver_mumps_rep<T,M> rep;
78  return new_macro (rep(*this));
79 }
80 
81 } // namespace rheolef
82 #endif // MUMPS
83 #endif // _RHEOLEF_SOLVER_MUMPS_H
csr< T, M >::size_type size_type
Definition: solver.h:193
DMUMPS_STRUC_C _mumps_par
Definition: solver_mumps.h:65
std::vector< MUMPS_INT > _col
Definition: solver_mumps.h:67
determinant_type det() const
Definition: solver_mumps.h:59
std::vector< MUMPS_INT > _row
Definition: solver_mumps.h:66
void update_values(const csr< T, M > &a)
base::size_type size_type
Definition: solver_mumps.h:44
solver_abstract_rep< T, M > base
Definition: solver_mumps.h:43
base::determinant_type determinant_type
Definition: solver_mumps.h:45
solver_mumps_rep(const csr< T, M > &a, const solver_option &opt=solver_option())
std::vector< double > _val
Definition: solver_mumps.h:68
vec< T, M > trans_solve(const vec< T, M > &rhs) const
solver_abstract_rep< T, M > * clone() const
Definition: solver_mumps.h:75
vec< T, M > solve(const vec< T, M > &rhs) const
determinant_type _det
Definition: solver_mumps.h:70
see the solver_option page for the full documentation
This file is part of Rheolef.