Bridge++  Version 1.4.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hmc_General.h
Go to the documentation of this file.
1 
14 #ifndef HMC_GENERAL_INCLUDED
15 #define HMC_GENERAL_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 
26 
28 
29 /*
30  This class defines Hybrid Monte Carlo update algorithm
31  with a given molecular dynamics integrator.
32  To be improved:
33  - at present setting conjugate momenta explicitly assumes
34  SU(3) gauge group. This should be generalized, and for
35  SU(3) case assert is necessary.
36  [25 Dec 2011 H.Matsufuru]
37  (Coding history will be recovered from trac.)
38  YAML is implemented. [14 Nov 2012 Y.Namekawa]
39  Langevin step was moved to separate file.
40  [07 May 2014 H.Matsufuru]
41  unique_ptr is introduced to avoid memory leaks
42  [21 Mar 2015 Y.Namekawa]
43  */
44 
45 
47 {
48  public:
49  static const std::string class_name;
50 
51  private:
53  std::vector<Action *> m_action;
54  std::vector<Director *> m_director;
60 
62 
63  public:
65  HMC_General(const ActionList& action_list,
66  std::vector<Director *> director,
67  Integrator *integrator,
68  RandomNumbers *rand);
69 
70  HMC_General(const ActionList& action_list,
71  std::vector<Director *> director,
72  Integrator *integrator,
74 
76  HMC_General(const ActionList& action_list,
77  Integrator *integrator,
78  RandomNumbers *rand);
79 
80  HMC_General(const ActionList& action_list,
81  Integrator *integrator,
83 
85  ~HMC_General();
86 
87  private:
88  // non-copyable
89  HMC_General(const HMC_General&);
91 
92  public:
93  void set_parameters(const Parameters& params);
94  void set_parameters(double trajectory_length, int Metropolis_test);
95 
97 
98  double update(Field_G&);
99 
100  double langevin(Field_G& iP, Field_G& U);
101 
102  // double langevin_P(Field_G& iP); removed [07 May 2014]
103 
104  double calc_Hamiltonian(Field_G& iP, Field_G& U);
105  double calcH_P(Field_G& iP);
106 };
107 #endif
BridgeIO vout
Definition: bridgeIO.cpp:495
double calc_Hamiltonian(Field_G &iP, Field_G &U)
void set_parameters(const Parameters &params)
std::vector< Director * > m_director
directors
Definition: hmc_General.h:54
int m_Metropolis_test
Metropolis test: Metropolis_test=0: no test, !=0: test.
Definition: hmc_General.h:52
static const std::string class_name
Definition: hmc_General.h:49
General HMC update class.
Definition: hmc_General.h:46
Bridge::VerboseLevel m_vl
Definition: hmc_General.h:61
RandomNumbers * m_rand
random number generator
Definition: hmc_General.h:56
std::vector< Action * > m_action
actions
Definition: hmc_General.h:53
double calcH_P(Field_G &iP)
Class for parameters.
Definition: parameters.h:46
Staple_lex * m_staple
Definition: hmc_General.h:57
Base class of Integrator class family.
Definition: integrator.h:29
double langevin(Field_G &iP, Field_G &U)
Staple construction.
Definition: staple_lex.h:39
SU(N) gauge field.
Definition: field_G.h:38
~HMC_General()
destructor
double m_trajectory_length
Definition: hmc_General.h:59
Langevin_Momentum * m_Langevin_P
Definition: hmc_General.h:58
lists of actions at respective integrator levels.
Definition: action_list.h:40
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: hmc_General.h:96
Base class of random number generators.
Definition: randomNumbers.h:36
Bridge::VerboseLevel vl
Definition: checker.cpp:18
Integrator * m_integrator
MD integrator.
Definition: hmc_General.h:55
VerboseLevel
Definition: bridgeIO.h:42
double update(Field_G &)
HMC_General & operator=(const HMC_General &)
HMC_General(const ActionList &action_list, std::vector< Director * > director, Integrator *integrator, RandomNumbers *rand)
constructor with action_list, directors, and random number generator
Definition: hmc_General.cpp:22
Langevin part of HMC for conjugate momentum to link variable.