Rheolef  7.1
an efficient C++ finite element environment
solver_gmres_cg.h
Go to the documentation of this file.
1 #ifndef _RHEOLEF_SOLVER_GMRES_CG_H
2 #define _RHEOLEF_SOLVER_GMRES_CG_H
23 #include "rheolef/solver.h"
24 namespace rheolef {
25 
26 template<class T, class M>
28 public:
29 // typedef:
30 
32  typedef typename base::size_type size_type;
34 
35 // allocator:
36 
37  explicit solver_gmres_cg_rep (const csr<T,M>& a, const solver_option& opt = solver_option());
39  bool initialized() const { return true; }
40  void update_values (const csr<T,M>& a) { _a = a; }
42 
43 // accessors:
44 
45  vec<T,M> trans_solve (const vec<T,M>& rhs) const;
46  vec<T,M> solve (const vec<T,M>& rhs) const;
47  determinant_type det() const;
48 
49 protected:
50 // data:
53 };
54 
55 template<class T, class M>
56 inline
58  : solver_abstract_rep<T,M>(opt),
59  _a(a),
60  _precond()
61 {
62  update_values (_a);
63 }
64 template <class T, class M>
65 inline
68 {
69  typedef solver_gmres_cg_rep<T,M> rep;
70  return new_macro (rep(*this));
71 }
72 
73 } // namespace rheolef
74 #endif // _RHEOLEF_SOLVER_GMRES_CG_H
csr< T, M >::size_type size_type
Definition: solver.h:193
solver_basic< T, M > _precond
determinant_type det() const
void set_preconditioner(const solver_basic< T, M > &p)
solver_gmres_cg_rep(const csr< T, M > &a, const solver_option &opt=solver_option())
void update_values(const csr< T, M > &a)
solver_abstract_rep< T, M > base
base::determinant_type determinant_type
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
see the solver_option page for the full documentation
Expr1::float_type T
Definition: field_expr.h:261
This file is part of Rheolef.
Definition: sphere.icc:25
Expr1::memory_type M
Definition: vec_expr_v2.h:416