Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
solver_BiCGStab_L_Cmplx.h
Go to the documentation of this file.
1 
14 #ifndef SOLVER_BICGSTAB_L_CMPLX_INCLUDED
15 #define SOLVER_BICGSTAB_L_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 
46 {
47  private:
49 
50  int m_N_L;
51  double m_Tol_L;
52 
53  int m_Niter;
54  double m_Stop_cond;
55 
56  std::valarray<Field> u, r;
57 
59  dcomplex rho_p, alpha_p, omega_p;
60 
61  public:
63  : Solver(), m_fopr(fopr) {}
64 
66 
67  void set_parameters(const Parameters& params);
68 
69  void set_parameters(const int Niter, const double Stop_cond);
70  void set_parameters_L(const int N_L);
71 
72  void solve(Field& solution, const Field& source,
73  int& Nconv, double& diff);
74 
75  Fopr *get_fopr() { return m_fopr; }
76 
77  private:
78  void reset_field(const Field&);
79 
80  void solve_init(const Field&, double&);
81  void solve_step(double&);
82 
83  void innerprod_c(double& prod_r, double& prod_i,
84  const Field& v, const Field& w);
85 
86  void mult_c(Field& v,
87  const Field& w,
88  const double& prod_r, const double& prod_i);
89 
90  int index_ij(int i, int j)
91  {
92  return i + m_N_L * j;
93  }
94 };
95 #endif