Bridge++  Ver. 1.3.x
solver_BiCGStab.h
Go to the documentation of this file.
1 
14 #ifndef SOLVER_BICGSTAB_INCLUDED
15 #define SOLVER_BICGSTAB_INCLUDED
16 
17 #include "solver.h"
18 
19 #include "bridgeIO.h"
20 using Bridge::vout;
21 
22 //- parameters class
23 class Parameters_Solver_BiCGStab : virtual public Parameters
24 {
25  public:
27 };
28 //- end
29 
31 
43 class Solver_BiCGStab : public Solver
44 {
45  public:
46  static const std::string class_name;
47 
48  private:
50  int m_Niter;
51  double m_Stop_cond;
52 
53  Field s, r, x, rh, p, v, t;
55 
56  public:
58  : Solver(), m_fopr(fopr) {}
59 
61  : Solver(), m_fopr(fopr.get()) {}
62 
64 
65  void set_parameters(const Parameters& params);
66  void set_parameters(const int Niter, const double Stop_cond);
67 
68  void solve(Field& solution, const Field& source,
69  int& Nconv, double& diff);
70 
71  Fopr *get_fopr() { return m_fopr; }
72 
73  private:
74  void reset_field(const Field&);
75 
76  void solve_init(const Field&, double&);
77  void solve_step(double&);
78 };
79 #endif
BridgeIO vout
Definition: bridgeIO.cpp:278
void solve(Field &solution, const Field &source, int &Nconv, double &diff)
Container of Field-type object.
Definition: field.h:39
void set_parameters(const Parameters &params)
Class for parameters.
Definition: parameters.h:38
void solve_init(const Field &, double &)
Solver_BiCGStab(unique_ptr< Fopr > &fopr)
Solver_BiCGStab(Fopr *fopr)
static const std::string class_name
Base class for linear solver class family.
Definition: solver.h:38
BiCGStab algorithm.
void solve_step(double &)
void reset_field(const Field &)
Base class of fermion operator family.
Definition: fopr.h:49