Bridge++  Ver. 1.3.x
solver_BiCGStab_DS_L_Cmplx.h
Go to the documentation of this file.
1 
14 #ifndef SOLVER_BICGSTAB_DS_L_CMPLX_INCLUDED
15 #define SOLVER_BICGSTAB_DS_L_CMPLX_INCLUDED
16 
17 #include "solver.h"
18 
19 #include "bridgeIO.h"
20 using Bridge::vout;
21 
22 
23 //- parameters class
25 {
26  public:
28 };
29 //- end
30 
32 
46 {
47  public:
48  static const std::string class_name;
49 
50  private:
52 
53  int m_N_L;
54  double m_Tol_L;
55 
56  int m_Niter;
57  double m_Stop_cond;
58 
59  std::vector<Field> u, r;
60 
62 
63  dcomplex rho_prev, alpha_prev;
64  int N_L_prev;
65 
66  public:
68  : Solver(), m_fopr(fopr) {}
69 
71  : Solver(), m_fopr(fopr.get()) {}
72 
74 
75  void set_parameters(const Parameters& params);
76  void set_parameters(const int Niter, const double Stop_cond);
77  void set_parameters_DS_L(const int N_L, const double Tol_L);
78 
79  void solve(Field& solution, const Field& source,
80  int& Nconv, double& diff);
81 
82  Fopr *get_fopr() { return m_fopr; }
83 
84  private:
85  void reset_field(const Field&);
86 
87  void solve_init(const Field&, double&);
88  void solve_step(double&);
89 
90  int index_ij(int i, int j)
91  {
92  return i + m_N_L * j;
93  }
94 };
95 #endif
void set_parameters_DS_L(const int N_L, const double Tol_L)
BridgeIO vout
Definition: bridgeIO.cpp:278
Solver_BiCGStab_DS_L_Cmplx(unique_ptr< Fopr > &fopr)
void solve_init(const Field &, double &)
BiCGStab(DS_L) algorithm.
Container of Field-type object.
Definition: field.h:39
Class for parameters.
Definition: parameters.h:38
void solve(Field &solution, const Field &source, int &Nconv, double &diff)
static const std::string class_name
Base class for linear solver class family.
Definition: solver.h:38
void set_parameters(const Parameters &params)
Base class of fermion operator family.
Definition: fopr.h:49