Bridge++  Ver. 2.0.2
action_F_Ratio_lex_alt.h
Go to the documentation of this file.
1 
10 #ifndef ACTION_F_RATIO_LEX_ALT_INCLUDED
11 #define ACTION_F_RATIO_LEX_ALT_INCLUDED
12 
13 #include "lib/Action/action.h"
14 
17 #include "lib/IO/bridgeIO.h"
18 using Bridge::vout;
19 
20 // include files in alt-code
21 //#include "Field/afield.h"
22 #include "lib_alt/Measurements/Fermion/afprop.h"
23 
25 
32 template<typename AFIELD>
34 {
35  public:
36  // typedef AField<double> AFIELD;
37  typedef typename AFIELD::real_t real_t;
38  static const std::string class_name;
39 
40  private:
42 
43  AFopr<AFIELD> *m_fopr_prec; // preconditioner
44  AForce_F<AFIELD> *m_fopr_prec_force; // force of preconditioner
45  AFopr<AFIELD> *m_fopr; // dynamical fermion
46  AForce_F<AFIELD> *m_fopr_force; // force of dynamical fermion
47  AFIELD m_psf; // pseudofermion field
48  std::string m_label; // label of action
49 
50  AFprop<AFIELD> *m_fprop_H_prec;
51  AFprop<AFIELD> *m_fprop_MD;
52  AFprop<AFIELD> *m_fprop_H;
53 
54  public:
56  AFopr<AFIELD> *fopr_prec, AForce_F<AFIELD> *fopr_prec_force,
57  AFopr<AFIELD> *fopr, AForce_F<AFIELD> *fopr_force,
58  AFprop<AFIELD> *fprop_H_prec,
59  AFprop<AFIELD> *fprop_MD, AFprop<AFIELD> *fprop_H)
60  : Action(),
61  m_fopr_prec(fopr_prec), m_fopr_prec_force(fopr_prec_force),
62  m_fopr(fopr), m_fopr_force(fopr_force),
63  m_fprop_H_prec(fprop_H_prec),
64  m_fprop_MD(fprop_MD), m_fprop_H(fprop_H)
65  { init(); }
66 
68  { tidyup(); }
69 
70  void set_parameters(const Parameters&);
71  void set_parameters();
72 
73  void set_label(const std::string label)
74  {
75  m_label = label;
76  vout.detailed(m_vl, " label: %s\n", m_label.c_str());
77  }
78 
79  std::string get_label()
80  { return m_label; }
81 
82  void set_config(Field *U);
83 
84  double langevin(RandomNumbers *);
85 
86  double calcH();
87 
88  void force(Field&);
89 
90  private:
91  void init();
92  void tidyup();
93 };
94 #endif
Action_F_Ratio_lex_alt::Action_F_Ratio_lex_alt
Action_F_Ratio_lex_alt(AFopr< AFIELD > *fopr_prec, AForce_F< AFIELD > *fopr_prec_force, AFopr< AFIELD > *fopr, AForce_F< AFIELD > *fopr_force, AFprop< AFIELD > *fprop_H_prec, AFprop< AFIELD > *fprop_MD, AFprop< AFIELD > *fprop_H)
Definition: action_F_Ratio_lex_alt.h:55
Action_F_Ratio_lex_alt::m_fprop_H
AFprop< AFIELD > * m_fprop_H
Definition: action_F_Ratio_lex_alt.h:52
bridgeIO.h
Action_F_Ratio_lex_alt::tidyup
void tidyup()
Definition: action_F_Ratio_lex_alt-tmpl.h:24
AFopr
Definition: afopr.h:48
Action_F_Ratio_lex_alt::m_label
std::string m_label
Definition: action_F_Ratio_lex_alt.h:48
Parameters
Class for parameters.
Definition: parameters.h:46
Action_F_Ratio_lex_alt::m_U
Field * m_U
Definition: action_F_Ratio_lex_alt.h:41
Bridge::BridgeIO::detailed
void detailed(const char *format,...)
Definition: bridgeIO.cpp:219
RandomNumbers
Base class of random number generators.
Definition: randomNumbers.h:43
Action_F_Ratio_lex_alt::calcH
double calcH()
calculate Hamiltonian of this action term.
Definition: action_F_Ratio_lex_alt-tmpl.h:132
Action_F_Ratio_lex_alt::set_label
void set_label(const std::string label)
Definition: action_F_Ratio_lex_alt.h:73
Action_F_Ratio_lex_alt::m_fopr_force
AForce_F< AFIELD > * m_fopr_force
Definition: action_F_Ratio_lex_alt.h:46
Action_F_Ratio_lex_alt::m_psf
AFIELD m_psf
Definition: action_F_Ratio_lex_alt.h:47
Action_F_Ratio_lex_alt::m_fopr_prec
AFopr< AFIELD > * m_fopr_prec
Definition: action_F_Ratio_lex_alt.h:43
Action
Base class of HMC action class family.
Definition: action.h:36
Action_F_Ratio_lex_alt::real_t
AFIELD::real_t real_t
Definition: action_F_Ratio_lex_alt.h:37
action.h
Field::real_t
double real_t
Definition: field.h:51
Action_F_Ratio_lex_alt::m_fopr_prec_force
AForce_F< AFIELD > * m_fopr_prec_force
Definition: action_F_Ratio_lex_alt.h:44
Action_F_Ratio_lex_alt::init
void init()
Definition: action_F_Ratio_lex_alt-tmpl.h:16
Action_F_Ratio_lex_alt::set_parameters
void set_parameters()
Definition: action_F_Ratio_lex_alt-tmpl.h:41
Action_F_Ratio_lex_alt::force
void force(Field &)
returns force for molcular dynamical update of conjugate momenta.
Definition: action_F_Ratio_lex_alt-tmpl.h:190
Action_F_Ratio_lex_alt::m_fprop_MD
AFprop< AFIELD > * m_fprop_MD
Definition: action_F_Ratio_lex_alt.h:51
Action_F_Ratio_lex_alt
HMC action for Hasenbusch preconditioned fermions.
Definition: action_F_Ratio_lex_alt.h:33
Action_F_Ratio_lex_alt::class_name
static const std::string class_name
Definition: action_F_Ratio_lex_alt.h:38
Action_F_Ratio_lex_alt::m_fprop_H_prec
AFprop< AFIELD > * m_fprop_H_prec
Definition: action_F_Ratio_lex_alt.h:50
Action_F_Ratio_lex_alt::m_fopr
AFopr< AFIELD > * m_fopr
Definition: action_F_Ratio_lex_alt.h:45
Action_F_Ratio_lex_alt::langevin
double langevin(RandomNumbers *)
Langevis step.
Definition: action_F_Ratio_lex_alt-tmpl.h:63
Action_F_Ratio_lex_alt::~Action_F_Ratio_lex_alt
~Action_F_Ratio_lex_alt()
Definition: action_F_Ratio_lex_alt.h:67
force_F.h
Action_F_Ratio_lex_alt::get_label
std::string get_label()
Definition: action_F_Ratio_lex_alt.h:79
Field
Container of Field-type object.
Definition: field.h:46
Action_F_Ratio_lex_alt::set_config
void set_config(Field *U)
setting pointer to the gauge configuration.
Definition: action_F_Ratio_lex_alt-tmpl.h:49
fprop.h
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512