Bridge++  Ver. 1.3.x
action_F_Rational_Frame.h
Go to the documentation of this file.
1 
14 #ifndef ACTION_F_RATIONAL_FRAME_INCLUDED
15 #define ACTION_F_RATIONAL_FRAME_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 
36 //- parameters class
38 {
39  public:
41 };
42 //- end
43 
45 {
46  public:
47  static const std::string class_name;
48 
49  private:
50  std::string m_label; // label of action
51 
55 
57 
59 
60  public:
63  Fopr *fopr_langev, Fopr *fopr_H, Force *fopr_force_MD)
64  : Action(),
65  m_fopr_langev(fopr_langev), m_fopr_H(fopr_H), m_fopr_force_MD(fopr_force_MD)
66  {
67  setup();
68  }
69 
71  unique_ptr<Fopr>& fopr_langev, unique_ptr<Fopr>& fopr_H, unique_ptr<Force>& fopr_force_MD)
72  : Action(),
73  m_fopr_langev(fopr_langev.get()), m_fopr_H(fopr_H.get()), m_fopr_force_MD(fopr_force_MD.get())
74  {
75  setup();
76  }
77 
80 
81  void set_parameters(const Parameters& params);
82 
84  void set_label(std::string label)
85  {
86  m_label = label;
87  vout.detailed(m_vl, " label: %s\n", m_label.c_str());
88  }
89 
91  std::string get_label()
92  {
93  return m_label;
94  }
95 
97  void set_config(Field *U)
98  {
99  m_U = U;
100  m_fopr_langev->set_config(U);
101  m_fopr_H->set_config(U);
102  m_fopr_force_MD->set_config(U);
103  }
104 
106  double langevin(RandomNumbers *);
107 
109  double calcH();
110 
112  //const Field force();
113  void force(Field&);
114 
115  private:
116 
118  void setup();
119 
121  void tidyup();
122 };
123 #endif
BridgeIO vout
Definition: bridgeIO.cpp:278
void set_parameters(const Parameters &params)
void detailed(const char *format,...)
Definition: bridgeIO.cpp:82
double langevin(RandomNumbers *)
Langevin step called at the beginning of HMC.
virtual void set_config(Field *)=0
setting pointer to the gauge configuration.
Container of Field-type object.
Definition: field.h:39
virtual void set_config(Field *)=0
void set_config(Field *U)
setting gauge configuration.
std::string get_label()
returns the label of action.
Base class of fermion force calculation.
Definition: force.h:31
Class for parameters.
Definition: parameters.h:38
Base class of HMC action class family.
Definition: action.h:42
Action_F_Rational_frame(unique_ptr< Fopr > &fopr_langev, unique_ptr< Fopr > &fopr_H, unique_ptr< Force > &fopr_force_MD)
~Action_F_Rational_frame()
destructor. constructed instances are deconstructed in tydyup().
void set_label(std::string label)
set the label of action.
double calcH()
calculation of Hamiltonian.
static const std::string class_name
action class for RHMC, with externally constructed Fopr_Rational.
void force(Field &)
returns the force for updating conjugate momentum.
Bridge::VerboseLevel m_vl
Definition: action.h:81
Base class of random number generators.
Definition: randomNumbers.h:39
Action_F_Rational_frame(Fopr *fopr_langev, Fopr *fopr_H, Force *fopr_force_MD)
constructor requires pointers to Fopr and Force instances.
Base class of fermion operator family.
Definition: fopr.h:49
void setup()
creating instances. called from set_parameters().
void tidyup()
destruct class instances constructed in setup()