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