Bridge++  Ver. 1.2.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
action_F_Rational.h
Go to the documentation of this file.
1 
14 #ifndef ACTION_F_RATIONAL_INCLUDED
15 #define ACTION_F_RATIONAL_INCLUDED
16 
17 #include "action.h"
18 #include "fopr_Rational.h"
19 #include "force_F_Rational.h"
20 
21 #include "bridgeIO.h"
22 using Bridge::vout;
23 
25 
39 //- parameters class
41 {
42  public:
44 };
45 //- end
46 
47 class Action_F_Rational : public Action {
48  public:
49  static const std::string class_name;
50 
51  private:
52  // rational approximation parameters:
53  int m_Np; // number of poles in rational approx.
54  int m_n_exp, m_d_exp; // numerator and denominator of the exponent
55  double m_x_min, m_x_max; // valid range of approximate sign function
56  int m_Niter; // max iteration of shiftsolver
57  double m_Stop_cond; // stopping condition of shift solver
58  std::string m_label; // label of action
59 
65 
68 
71 
72 
73  public:
75  Action_F_Rational(Fopr *fopr, Force *fopr_force) :
76  Action()
77  {
78  m_fopr = fopr;
79  m_fopr_force = fopr_force;
80  }
81 
84  {
85  tidyup();
86  }
87 
89  void set_parameters(const Parameters& params);
90  void set_parameters(int Np, int n_exp, int d_exp,
91  double x_min, double x_max,
92  int Niter, double Stop_cond);
93 
95  void set_label(std::string label)
96  {
97  m_label = label;
98  vout.detailed(m_vl, " label: %s\n", m_label.c_str());
99  }
100 
102  std::string get_label()
103  {
104  return m_label;
105  }
106 
108  void set_config(Field *U)
109  {
110  m_U = U;
111  m_fopr->set_config(U);
112  }
113 
116  {
117  m_status_linkv = 0;
118  }
119 
121  double langevin(RandomNumbers *);
122 
124  double calcH();
125 
127  const Field force();
128 
129  private:
130 
132  void setup();
133 
135  void tidyup();
136 };
137 #endif
Fermion operator for rational approximation.
Definition: fopr_Rational.h:46
BridgeIO vout
Definition: bridgeIO.cpp:207
action class for rational HMC.
void detailed(const char *format,...)
Definition: bridgeIO.cpp:50
static const std::string class_name
virtual void set_config(Field *)=0
setting pointer to the gauge configuration.
Container of Field-type object.
Definition: field.h:37
Base class of fermion force calculation.
Definition: force.h:34
std::string get_label()
returns the label of action.
Class for parameters.
Definition: parameters.h:40
const Field force()
returns the force for updating conjugate momentum.
double calcH()
calculation of Hamiltonian.
Base class of HMC action class family.
Definition: action.h:35
void set_config(Field *U)
setting gauge configuration.
void notify_linkv()
to be called when link variable is updated.
Fopr_Rational * m_fopr_H
void tidyup()
destruct class instances constructed in setup()
double langevin(RandomNumbers *)
Langevin step called at the beginning of HMC.
void set_parameters(const Parameters &params)
setting parameters and creating class instances.
Bridge::VerboseLevel m_vl
Definition: action.h:64
Base class of random number generators.
Definition: randomNumbers.h:40
void setup()
creating instances. called from set_parameters().
~Action_F_Rational()
destructor. constructed instances are deconstructed in tydyup().
Fopr_Rational * m_fopr_langev
Action_F_Rational(Fopr *fopr, Force *fopr_force)
constructor requires pointers to Fopr and Force instances.
void set_label(std::string label)
set the label of action.
Base class of fermion operator family.
Definition: fopr.h:39
Force_F_Rational * m_force_rational