Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
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
33namespace rheolef {
34
35// =======================================================================
36// rep
37// =======================================================================
38template<class T, class M>
40public:
41// typedef:
42
44 typedef typename base::size_type size_type;
45 typedef typename base::determinant_type determinant_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
61protected:
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};
72template <class T, class M>
73inline
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
see the csr page for the full documentation
Definition csr.h:317
DMUMPS_STRUC_C _mumps_par
std::vector< MUMPS_INT > _col
determinant_type det() const
std::vector< MUMPS_INT > _row
void update_values(const csr< T, M > &a)
base::size_type size_type
solver_abstract_rep< T, M > base
base::determinant_type determinant_type
std::vector< double > _val
vec< T, M > trans_solve(const vec< T, M > &rhs) const
solver_abstract_rep< T, M > * clone() const
vec< T, M > solve(const vec< T, M > &rhs) const
determinant_type _det
see the solver_option page for the full documentation
see the vec page for the full documentation
Definition vec.h:79
This file is part of Rheolef.