Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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:
44  int m_Ndim, m_Nvol;
45  std::vector<double> m_rho;
48  std::vector<Field_G> m_U;
49  std::vector<Field_G> m_iTheta;
50 
51  public:
53  : ForceSmear(), m_proj(proj)
54  {
55  init();
56  }
57 
59  : ForceSmear(), m_proj(proj.get())
60  {
61  init();
62  }
63 
64  // ~ForceSmear_APE(){
65  // };
66 
67  // Setting parameters with Parameters object.
68  void set_parameters(const Parameters& params);
69 
70  // Setting parameters with uniform smearing parameter.
71  void set_parameters(const double rho1);
72 
73  // Setting parameters with anisotropic smearing parameter.
74  void set_parameters(const std::vector<double>& rho);
75 
76  // Force computation.
77  void force_udiv(Field_G& Sigma, const Field_G& Sigma_p, const Field_G& U);
78 
79  private:
80  void init();
81 
82  double rho(const int mu, const int nu)
83  {
84  return m_rho[mu + nu * m_Ndim];
85  }
86 
87  void force_each(Field_G&,
88  const Field_G&, const Field_G&,
89  const Field_G&, const Field_G&, const int mu, const int nu);
90 
91  void staple(Field_G&,
92  const Field_G&, const Field_G&,
93  const int mu, const int nu);
94 
95 #ifdef USE_FACTORY
96  private:
97  static ForceSmear *create_object(Projection *proj)
98  {
99  return new ForceSmear_APE(proj);
100  }
101 
102  public:
103  static bool register_factory()
104  {
105  return ForceSmear::Factory::Register("APE", create_object);
106  }
107 #endif
108 };
109 #endif
BridgeIO vout
Definition: bridgeIO.cpp:503
Recursive calculation for APE smeared fermion force.
std::vector< Field_G > m_iTheta
ForceSmear_APE(Projection *proj)
Class for parameters.
Definition: parameters.h:46
Base class for force calculation of smeared operators.
Definition: forceSmear.h:34
void force_each(Field_G &, const Field_G &, const Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
double rho(const int mu, const int nu)
SU(N) gauge field.
Definition: field_G.h:38
void set_parameters(const Parameters &params)
void staple(Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
void force_udiv(Field_G &Sigma, const Field_G &Sigma_p, const Field_G &U)
base class for projection operator into gauge group.
Definition: projection.h:30
ShiftField_lex m_shift
std::vector< Field_G > m_U
Methods to shift a field in the lexical site index.
ForceSmear_APE(unique_ptr< Projection > &proj)
std::vector< double > m_rho
static const std::string class_name
Projection * m_proj