Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fopr_Rational_SF.h
Go to the documentation of this file.
1 
15 #ifndef FOPR_RATIONAL_SF_INCLUDED
16 #define FOPR_RATIONAL_SF_INCLUDED
17 
18 #include "fopr_Rational.h"
19 #include "field_F_SF.h"
20 
21 #include "bridgeIO.h"
22 using Bridge::vout;
23 
25 
40 //- parameters class
42 {
43  public:
45 };
46 //- end
47 
48 
49 class Fopr_Rational_SF : public Fopr
50 {
51  private:
52  int m_Np; // number of poles in rational approx.
53  int m_n_exp, m_d_exp; // numerator and denominator of the exponent
54  double m_x_min, m_x_max; // valid range of approximate sign function
55  int m_Niter; // max iteration of shiftsolver
56  double m_Stop_cond; // stopping condition of shift solver
57 
60 
61  double m_a0;
62  std::valarray<double> m_cl;
63  std::valarray<double> m_bl;
64  std::valarray<Field> m_xq;
65 
66  public:
67 
69  : Fopr(), m_fopr(fopr) {}
70 
72  {
73  delete m_solver;
74  }
75 
76  void set_parameters(const Parameters& params);
77  void set_parameters(int Np, int n_exp, int d_exp, double x_min, double x_max,
78  int Niter, double Stop_cond);
79 
80  void set_config(Field *U)
81  {
82  m_fopr->set_config(U);
83  }
84 
85  const Field mult(const Field& f);
86 
87  void mult(Field& v, const Field& f)
88  {
89  v = mult(f);
90  }
91 
92  const Field mult_dag(const Field& f)
93  {
94  return mult(f);
95  }
96 
97  void mult_dag(Field& v, const Field& f)
98  {
99  v = mult_dag(f);
100  }
101 
102  double func(double x);
103 
104  int field_nvol() { return m_fopr->field_nvol(); }
105  int field_nin() { return m_fopr->field_nin(); }
106  int field_nex() { return m_fopr->field_nex(); }
107 
108  private:
109  void init_parameters();
110 };
111 #endif