Bridge++  Ver. 1.3.x
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.h"
18 #include "action_list.h"
19 #include "director.h"
20 #include "integrator.h"
21 #include "randomNumbers.h"
22 #include "staples.h"
23 #include "langevin_Momentum.h"
24 
25 #ifdef USE_PARAMETERS_FACTORY
26 #include "parameters_factory.h"
27 #endif
28 
29 #include "bridgeIO.h"
30 using Bridge::vout;
31 
33 
49 //- parameters class
50 class Parameters_HMC_Leapfrog : virtual public Parameters
51 {
52  public:
54 };
55 //- end
56 
58 {
59  public:
60  static const std::string class_name;
61 
62  private:
63  int m_Nmdc;
64  int m_Nprec;
66  double m_Estep;
67 
70 
71  std::vector<Action *> m_action;
72  std::vector<Director *> m_director;
75 
76  public:
77 
79  HMC_Leapfrog(std::vector<Action *> action,
80  RandomNumbers *rand);
81 
82  HMC_Leapfrog(std::vector<Action *> action,
84 
86  HMC_Leapfrog(std::vector<Action *> action,
87  std::vector<Director *> director,
88  RandomNumbers *rand);
89 
90  HMC_Leapfrog(std::vector<Action *> action,
91  std::vector<Director *> director,
93 
95  HMC_Leapfrog(const ActionList& action_list,
96  RandomNumbers *rand);
97 
98  HMC_Leapfrog(const ActionList& action_list,
100 
102  HMC_Leapfrog(const ActionList& action_list,
103  std::vector<Director *> director,
104  RandomNumbers *rand);
105 
106  HMC_Leapfrog(const ActionList& action_list,
107  std::vector<Director *> director,
109 
111  ~HMC_Leapfrog();
112 
113  private:
114  // non-copyable
115  HMC_Leapfrog(const HMC_Leapfrog&);
117 
118  public:
119  void set_parameters(const Parameters& params);
120  void set_parameters(double Estep, int Nmdc, int Nprec, int Metropolis_test);
121 
123 
124  // Metropolis_test=0: no test, !=0: test
125  double update(Field_G&);
126 
127  double langevin(Field_G& iP, Field_G& U);
128 
129  // double langevin_P(Field_G& iP); removed. [07 May 2014]
130 
131  double calc_Hamiltonian(Field_G& iP, Field_G& U);
132  double calcH_P(Field_G& iP);
133 
134  void integrate(Field_G& iP, Field_G& U);
135 
136  void update_U(double estep, Field_G& iP, Field_G& U);
137  void update_P(double estep, Field_G& iP, Field_G& U);
138 };
139 #endif
BridgeIO vout
Definition: bridgeIO.cpp:278
void set_parameters(const Parameters &params)
Staple construction.
Definition: staples.h:40
double m_Estep
Definition: hmc_Leapfrog.h:66
static const std::string class_name
Definition: hmc_Leapfrog.h:60
int m_Metropolis_test
Definition: hmc_Leapfrog.h:65
Class for parameters.
Definition: parameters.h:38
RandomNumbers * m_rand
Definition: hmc_Leapfrog.h:73
Langevin_Momentum * m_Langevin_P
Definition: hmc_Leapfrog.h:68
void update_P(double estep, Field_G &iP, Field_G &U)
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: hmc_Leapfrog.h:122
Bridge::VerboseLevel m_vl
Definition: hmc_Leapfrog.h:74
std::vector< Action * > m_action
Definition: hmc_Leapfrog.h:71
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 &)
void update_U(double estep, Field_G &iP, Field_G &U)
double langevin(Field_G &iP, Field_G &U)
double calcH_P(Field_G &iP)
std::vector< Director * > m_director
Definition: hmc_Leapfrog.h:72
lists of actions at respective integrator levels.
Definition: action_list.h:40
Base class of random number generators.
Definition: randomNumbers.h:39
Bridge::VerboseLevel vl
Definition: checker.cpp:18
VerboseLevel
Definition: bridgeIO.h:39
~HMC_Leapfrog()
destructor
Staples * m_staple
Definition: hmc_Leapfrog.h:69
double calc_Hamiltonian(Field_G &iP, Field_G &U)
HMC with single level leapfrog intetgrator.
Definition: hmc_Leapfrog.h:50
HMC_Leapfrog(std::vector< Action * > action, RandomNumbers *rand)
constructor: with array of actions
Langevin part of HMC for conjugate momentum to link variable.