Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
solver_BiCGStab_Cmplx.h
Go to the documentation of this file.
1 
14 #ifndef SOLVER_BICGSTAB_CMPLX_INCLUDED
15 #define SOLVER_BICGSTAB_CMPLX_INCLUDED
16 
17 #include "solver.h"
18 #include "bridge_complex.h"
19 
20 #include "bridgeIO.h"
21 using Bridge::vout;
22 
23 //- parameters class
25 {
26  public:
28 };
29 //- end
30 
32 
44 {
45  private:
47  int m_Niter;
48  double m_Stop_cond;
49 
50  Field s, r, x, rh, p, v, w;
51  dcomplex rho_p, alpha_p, omega_p;
52 
53  public:
55  : Solver(), m_fopr(fopr) {}
56 
58 
59  void set_parameters(const Parameters& params);
60  void set_parameters(const int Niter, const double Stop_cond);
61 
62  void solve(Field& solution, const Field& source,
63  int& Nconv, double& diff);
64 
65  Fopr *get_fopr() { return m_fopr; }
66 
67  private:
68  void reset_field(const Field&);
69 
70  void solve_init(const Field&, double&);
71  void solve_step(double&);
72 
73  void innerprod_c(double& prod_r, double& prod_i,
74  const Field& v, const Field& w);
75 
76  void mult_c(Field& v,
77  const Field& w,
78  const double& prod_r, const double& prod_i);
79 };
80 #endif