Bridge++  Ver. 1.3.x
action_F_Ratio.h
Go to the documentation of this file.
1 
14 #ifndef ACTION_F_RATIO_INCLUDED
15 #define ACTION_F_RATIO_INCLUDED
16 
17 #include "action.h"
18 #include "solver.h"
19 
20 #include "bridgeIO.h"
21 using Bridge::vout;
22 
24 
38 class Action_F_Ratio : public Action
39 {
40  public:
41  static const std::string class_name;
42 
43  private:
45 
46  Fopr *m_fopr_prec; // preconditioner
47  Force *m_fopr_prec_force; // force of preconditioner
48  Fopr *m_fopr; // dynamical fermion
49  Force *m_fopr_force; // force of dynamical fermion
50  Field m_psf; // pseudofermion field
51  std::string m_label; // label of action
52 
56 
58 
59  public:
61  Fopr *fopr_prec, Force *fopr_prec_force,
62  Fopr *fopr, Force *fopr_force)
63  : Action(),
64  m_fopr_prec(fopr_prec), m_fopr_prec_force(fopr_prec_force),
65  m_fopr(fopr), m_fopr_force(fopr_force)
66  {
68  }
69 
71  unique_ptr<Fopr>& fopr_prec, unique_ptr<Force>& fopr_prec_force,
72  unique_ptr<Fopr>& fopr, unique_ptr<Force>& fopr_force)
73  : Action(),
74  m_fopr_prec(fopr_prec.get()), m_fopr_prec_force(fopr_prec_force.get()),
75  m_fopr(fopr.get()), m_fopr_force(fopr_force.get())
76  {
78  }
79 
81  {
82  delete m_solver_H_prec;
83  delete m_solver_MD;
84  delete m_solver_H;
85  }
86 
87  void set_parameters(const Parameters&);
88  void set_parameters();
89 
90  void set_label(std::string label)
91  {
92  m_label = label;
93  vout.detailed(m_vl, " label: %s\n", m_label.c_str());
94  }
95 
96  std::string get_label()
97  {
98  return m_label;
99  }
100 
101  void set_config(Field *U)
102  {
103  m_U = U;
104 
105  m_fopr_prec->set_config(U);
106  m_fopr_prec_force->set_config(U);
107 
108  m_fopr->set_config(U);
109  m_fopr_force->set_config(U);
110  }
111 
112  double langevin(RandomNumbers *);
113 
114  double calcH();
115 
116  void force(Field&);
117 };
118 #endif
Solver * m_solver_MD
BridgeIO vout
Definition: bridgeIO.cpp:278
void detailed(const char *format,...)
Definition: bridgeIO.cpp:82
double langevin(RandomNumbers *)
Langevis step.
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
Base class of fermion force calculation.
Definition: force.h:31
Class for parameters.
Definition: parameters.h:38
static const std::string class_name
Action_F_Ratio(unique_ptr< Fopr > &fopr_prec, unique_ptr< Force > &fopr_prec_force, unique_ptr< Fopr > &fopr, unique_ptr< Force > &fopr_force)
Base class of HMC action class family.
Definition: action.h:42
Force * m_fopr_prec_force
Solver * m_solver_H_prec
Action_F_Ratio(Fopr *fopr_prec, Force *fopr_prec_force, Fopr *fopr, Force *fopr_force)
void set_label(std::string label)
RandomNumbers * m_rand
std::string m_label
std::string get_label()
Base class for linear solver class family.
Definition: solver.h:38
HMC action for Hasenbusch preconditioned fermions.
Bridge::VerboseLevel m_vl
Definition: action.h:81
Base class of random number generators.
Definition: randomNumbers.h:39
Base class of fermion operator family.
Definition: fopr.h:49
Solver * m_solver_H
void set_config(Field *U)
setting pointer to the gauge configuration.
void force(Field &)
returns force for molcular dynamical update of conjugate momenta.
double calcH()
calculate Hamiltonian of this action term.
Force * m_fopr_force