Bridge++  Ver. 2.0.2
fopr_Rational.h
Go to the documentation of this file.
1 
15 #ifndef FOPR_RATIONAL_INCLUDED
16 #define FOPR_RATIONAL_INCLUDED
17 
18 #include "Fopr/afopr_Rational.h"
19 //#include "Fopr/afopr_Rational-tmpl.h"
20 #include "Field/field.h"
21 
22 /*
23 #include "Field/field_G.h"
24 #include "Solver/shiftsolver_CG.h"
25 #include "Tools/math_Rational.h"
26 
27 #include "IO/bridgeIO.h"
28 using Bridge::vout;
29 */
30 
31 
33 
47 
48 /*
49 class Fopr_Rational : public Fopr
50 {
51  public:
52  static const std::string class_name;
53 
54  private:
55  Bridge::VerboseLevel m_vl;
56 
57  int m_Np; // number of poles in rational approx.
58  int m_n_exp, m_d_exp; // numerator and denominator of the exponent
59  double m_x_min, m_x_max; // valid range of approximate sign function
60  int m_Niter; // max iteration of shiftsolver
61  double m_Stop_cond; // stopping condition of shift solver
62 
63  Fopr *m_fopr;
64  Shiftsolver_CG *m_solver;
65 
66  double m_a0;
67  std::vector<double> m_cl;
68  std::vector<double> m_bl;
69  std::vector<Field> m_xq;
70 
71  public:
72  Fopr_Rational(Fopr *fopr)
73  : m_vl(CommonParameters::Vlevel()), m_fopr(fopr) {}
74 
75  ~Fopr_Rational()
76  {
77  delete m_solver;
78  }
79 
80  void set_parameters(const Parameters& params);
81  void set_parameters(const int Np, const int n_exp, const int d_exp, const double x_min, const double x_max,
82  const int Niter, const double Stop_cond);
83 
84  void get_parameters(Parameters& params) const;
85 
86  void set_config(Field *U)
87  {
88  m_fopr->set_config(U);
89  }
90 
91  void mult(Field& v, const Field& f);
92 
93  void mult_dag(Field& v, const Field& f)
94  {
95  mult(v, f);
96  }
97 
98  double func(const double x);
99 
100  int field_nvol() { return m_fopr->field_nvol(); }
101  int field_nin() { return m_fopr->field_nin(); }
102  int field_nex() { return m_fopr->field_nex(); }
103 
104  private:
105  void init_parameters();
106 
107 #ifdef USE_FACTORY
108  private:
109  static Fopr *create_object(Fopr *fopr)
110  {
111  return new Fopr_Rational(fopr);
112  }
113 
114  public:
115  static bool register_factory()
116  {
117  return Fopr::Factory_fopr::Register("Rational", create_object);
118  }
119 #endif
120 
121 };
122 */
123 #endif
Fopr_Rational
AFopr_Rational< Field > Fopr_Rational
Fermion operator for rational approximation.
Definition: fopr_Rational.h:46
afopr_Rational.h
field.h
AFopr_Rational
Fermion operator for rational approximation.
Definition: afopr_Rational.h:42