Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hmc_Leapfrog.h
Go to the documentation of this file.
1 
14 #ifndef HMC_LEAPFROG_INCLUDED
15 #define HMC_LEAPFROG_INCLUDED
16 
17 #include "action_list.h"
18 #include "integrator.h"
19 #include "langevin_Momentum.h"
20 
22 
23 #include "IO/bridgeIO.h"
24 using Bridge::vout;
25 
27 
45 {
46  public:
47  static const std::string class_name;
48 
49  private:
50  int m_Nmdc;
51  int m_Nprec;
53  double m_Estep;
54 
57 
58  std::vector<Action *> m_action;
59  std::vector<Director *> m_director;
62 
63  public:
64 
66  HMC_Leapfrog(std::vector<Action *> action,
67  RandomNumbers *rand);
68 
69  HMC_Leapfrog(std::vector<Action *> action,
71 
73  HMC_Leapfrog(std::vector<Action *> action,
74  std::vector<Director *> director,
75  RandomNumbers *rand);
76 
77  HMC_Leapfrog(std::vector<Action *> action,
78  std::vector<Director *> director,
80 
82  HMC_Leapfrog(const ActionList& action_list,
83  RandomNumbers *rand);
84 
85  HMC_Leapfrog(const ActionList& action_list,
87 
89  HMC_Leapfrog(const ActionList& action_list,
90  std::vector<Director *> director,
91  RandomNumbers *rand);
92 
93  HMC_Leapfrog(const ActionList& action_list,
94  std::vector<Director *> director,
96 
98  ~HMC_Leapfrog();
99 
100  private:
101  // non-copyable
102  HMC_Leapfrog(const HMC_Leapfrog&);
104 
105  public:
106  void set_parameters(const Parameters& params);
107  void set_parameters(const double Estep, const int Nmdc, const int Nprec, const int Metropolis_test); // backward compability
108  void set_parameters(const double Estep, const int Nmdc, const int Nprec, const bool Metropolis_test);
109 
111 
112  // Metropolis_test: enabled if true.
113  double update(Field_G&);
114 
115  double langevin(Field_G& iP, const Field_G& U);
116 
117  double calc_Hamiltonian(const Field_G& iP, const Field_G& U);
118  double calcH_P(const Field_G& iP);
119 
120  void integrate(Field_G& iP, Field_G& U);
121 
122  void update_U(const double estep, const Field_G& iP, Field_G& U);
123  void update_P(const double estep, Field_G& iP, const Field_G& U);
124 };
125 #endif
bool m_Metropolis_test
Definition: hmc_Leapfrog.h:52
BridgeIO vout
Definition: bridgeIO.cpp:503
void set_parameters(const Parameters &params)
double calcH_P(const Field_G &iP)
double m_Estep
Definition: hmc_Leapfrog.h:53
static const std::string class_name
Definition: hmc_Leapfrog.h:47
double calc_Hamiltonian(const Field_G &iP, const Field_G &U)
Class for parameters.
Definition: parameters.h:46
RandomNumbers * m_rand
Definition: hmc_Leapfrog.h:60
Langevin_Momentum * m_Langevin_P
Definition: hmc_Leapfrog.h:55
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: hmc_Leapfrog.h:110
Bridge::VerboseLevel m_vl
Definition: hmc_Leapfrog.h:61
std::vector< Action * > m_action
Definition: hmc_Leapfrog.h:58
Staple construction.
Definition: staple_lex.h:39
SU(N) gauge field.
Definition: field_G.h:38
void integrate(Field_G &iP, Field_G &U)
HMC_Leapfrog & operator=(const HMC_Leapfrog &)
double update(Field_G &)
double langevin(Field_G &iP, const Field_G &U)
HMC with single level leapfrog intetgrator.
Definition: hmc_Leapfrog.h:44
Staple_lex * m_staple
Definition: hmc_Leapfrog.h:56
void update_U(const double estep, const Field_G &iP, Field_G &U)
std::vector< Director * > m_director
Definition: hmc_Leapfrog.h:59
lists of actions at respective integrator levels.
Definition: action_list.h:40
Base class of random number generators.
Definition: randomNumbers.h:43
Bridge::VerboseLevel vl
VerboseLevel
Definition: bridgeIO.h:42
~HMC_Leapfrog()
destructor
HMC_Leapfrog(std::vector< Action * > action, RandomNumbers *rand)
constructor: with array of actions
Langevin part of HMC for conjugate momentum to link variable.
void update_P(const double estep, Field_G &iP, const Field_G &U)