Bridge++  Ver. 2.0.2
forceSmear_APE.h
Go to the documentation of this file.
1 
14 #ifndef FORCESMEAR_APE_INCLUDED
15 #define FORCESMEAR_APE_INCLUDED
16 
17 #include "forceSmear.h"
18 
19 #include "Field/shiftField_lex.h"
20 
21 #include "Smear/projection.h"
22 #include "Smear/smear_APE.h"
23 
24 #include "IO/bridgeIO.h"
25 using Bridge::vout;
26 
28 
38 class ForceSmear_APE : public ForceSmear
39 {
40  public:
41  static const std::string class_name;
42 
43  private:
45 
46  int m_Ndim, m_Nvol;
47  std::vector<double> m_rho;
50  std::vector<Field_G> m_U;
51  std::vector<Field_G> m_iTheta;
52 
53  public:
55  : m_vl(CommonParameters::Vlevel()), m_proj(proj)
56  {
57  init();
58  }
59 
60  ForceSmear_APE(Projection *proj, const Parameters& params)
61  : m_vl(CommonParameters::Vlevel()), m_proj(proj)
62  {
63  init();
64  set_parameters(params);
65  }
66 
67  // ~ForceSmear_APE(){
68  // };
69 
70  // Setting parameters with Parameters object.
71  void set_parameters(const Parameters& params);
72 
73  // Setting parameters with uniform smearing parameter.
74  void set_parameters(const double rho1);
75 
76  // Setting parameters with anisotropic smearing parameter.
77  void set_parameters(const std::vector<double>& rho);
78 
79  // Getting parameters by Parameters object.
80  void get_parameters(Parameters& params) const;
81 
82  // Force computation.
83  void force_udiv(Field_G& Sigma, const Field_G& Sigma_p, const Field_G& U);
84 
85  private:
86  void init();
87 
88  double rho(const int mu, const int nu)
89  {
90  return m_rho[mu + nu * m_Ndim];
91  }
92 
93  void force_each(Field_G&,
94  const Field_G&, const Field_G&,
95  const Field_G&, const Field_G&, const int mu, const int nu);
96 
97  void staple(Field_G&,
98  const Field_G&, const Field_G&,
99  const int mu, const int nu);
100 
101 #ifdef USE_FACTORY
102  private:
103  static ForceSmear *create_object(Projection *proj)
104  {
105  return new ForceSmear_APE(proj);
106  }
107 
108  static ForceSmear *create_object_with_params(Projection *proj, const Parameters& params)
109  {
110  return new ForceSmear_APE(proj, params);
111  }
112 
113  public:
114  static bool register_factory()
115  {
116  bool init = true;
117  init &= ForceSmear::Factory::Register("APE", create_object);
118  init &= ForceSmear::Factory_params::Register("APE", create_object_with_params);
119  return init;
120  }
121 #endif
122 };
123 #endif
ForceSmear_APE::ForceSmear_APE
ForceSmear_APE(Projection *proj, const Parameters &params)
Definition: forceSmear_APE.h:60
bridgeIO.h
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
Parameters
Class for parameters.
Definition: parameters.h:46
shiftField_lex.h
ForceSmear_APE::force_each
void force_each(Field_G &, const Field_G &, const Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
Definition: forceSmear_APE.cpp:170
ForceSmear_APE::get_parameters
void get_parameters(Parameters &params) const
Definition: forceSmear_APE.cpp:49
ForceSmear_APE::m_rho
std::vector< double > m_rho
Definition: forceSmear_APE.h:47
ForceSmear_APE::m_Nvol
int m_Nvol
Definition: forceSmear_APE.h:46
ForceSmear_APE::set_parameters
void set_parameters(const Parameters &params)
Definition: forceSmear_APE.cpp:25
projection.h
forceSmear.h
ForceSmear_APE::ForceSmear_APE
ForceSmear_APE(Projection *proj)
Definition: forceSmear_APE.h:54
ForceSmear_APE::m_vl
Bridge::VerboseLevel m_vl
Definition: forceSmear_APE.h:44
ForceSmear_APE::m_shift
ShiftField_lex m_shift
Definition: forceSmear_APE.h:49
ForceSmear_APE::m_U
std::vector< Field_G > m_U
Definition: forceSmear_APE.h:50
ForceSmear_APE::m_proj
Projection * m_proj
Definition: forceSmear_APE.h:48
ShiftField_lex
Methods to shift a field in the lexical site index.
Definition: shiftField_lex.h:39
ForceSmear_APE::force_udiv
void force_udiv(Field_G &Sigma, const Field_G &Sigma_p, const Field_G &U)
Definition: forceSmear_APE.cpp:119
ForceSmear_APE::init
void init()
Definition: forceSmear_APE.cpp:101
ForceSmear_APE::m_iTheta
std::vector< Field_G > m_iTheta
Definition: forceSmear_APE.h:51
ForceSmear_APE::rho
double rho(const int mu, const int nu)
Definition: forceSmear_APE.h:88
smear_APE.h
ForceSmear_APE::staple
void staple(Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
Definition: forceSmear_APE.cpp:216
Projection
base class for projection operator into gauge group.
Definition: projection.h:30
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Field_G
SU(N) gauge field.
Definition: field_G.h:38
ForceSmear_APE
Recursive calculation for APE smeared fermion force.
Definition: forceSmear_APE.h:38
ForceSmear_APE::m_Ndim
int m_Ndim
Definition: forceSmear_APE.h:46
ForceSmear
Base class for force calculation of smeared operators.
Definition: forceSmear.h:34
ForceSmear_APE::class_name
static const std::string class_name
Definition: forceSmear_APE.h:41
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512