Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
forceSmear_HYP.h
Go to the documentation of this file.
1 
14 #ifndef FORCESMEAR_HYP_INCLUDED
15 #define FORCESMEAR_HYP_INCLUDED
16 
17 #include "forceSmear.h"
18 
19 #include "Field/shiftField_lex.h"
20 
21 #include "IO/bridgeIO.h"
22 using Bridge::vout;
23 
25 
35 class ForceSmear_HYP : public ForceSmear
36 {
37  public:
38  static const std::string class_name;
39 
40  private:
41  int m_Ndim, m_Nvol;
42  double m_alpha1, m_alpha2, m_alpha3; // HYP smearing parameters
44  std::vector<Field_G> m_U;
45  std::vector<Field_G> m_v1, m_v2;
46  std::vector<Field_G> m_Sigma3, m_Sigma2;
47  std::vector<Field_G> m_iTheta3, m_iTheta2, m_iTheta1;
49 
50  public:
52  : ForceSmear(), m_proj(proj)
53  {
54  init();
55  }
56 
58  : ForceSmear(), m_proj(proj.get())
59  {
60  init();
61  }
62 
63  // ~ForceSmear_HYP(){ };
64 
65  void set_parameters(const Parameters& params);
66  void set_parameters(const double alpha1, const double alpha2, const double alpha3);
67 
68  void force_udiv(Field_G& Sigma, const Field_G& Sigma_p, const Field_G& U);
69 
70  private:
71  void init();
72 
73  void force_step3(Field_G&, const Field_G&);
74  void force_step2(Field_G&);
75  void force_step1(Field_G&);
76 
77  void force_each(Field_G&, const Field_G&, const Field_G&,
78  const Field_G&, const Field_G&, const int mu, const int nu);
79 
80  void smear_step1();
81  void smear_step2();
82 
83  void staple(Field_G&, const Field_G&, const Field_G&,
84  const int mu, const int nu);
85 
86  int idx1(const int mu, const int nu, const int rho)
87  {
88  int sig = 6 - mu - nu - rho;
89 
90  if (sig > mu) --sig;
91  return mu + m_Ndim * sig;
92  }
93 
94  int idx1b(const int mu, int nu, int rho)
95  {
96  if (nu > mu) --nu;
97  if (rho > mu) --rho;
98  if (rho > nu) --rho;
99  return mu + m_Ndim * (nu + (m_Ndim - 1) * rho);
100  }
101 
102  int idx2(const int mu, int nu)
103  {
104  if (nu > mu) --nu;
105  return mu + m_Ndim * nu;
106  }
107 
108  int size1()
109  {
110  return m_Ndim * (m_Ndim - 1);
111  }
112 
113  int size1b()
114  {
115  return m_Ndim * (m_Ndim - 1) * (m_Ndim - 2);
116  }
117 
118  int size2()
119  {
120  return m_Ndim * (m_Ndim - 1);
121  }
122 
123 #ifdef USE_FACTORY
124  private:
125  static ForceSmear *create_object(Projection *proj)
126  {
127  return new ForceSmear_HYP(proj);
128  }
129 
130  public:
131  static bool register_factory()
132  {
133  return ForceSmear::Factory::Register("HYP", create_object);
134  }
135 #endif
136 };
137 #endif
Projection * m_proj
BridgeIO vout
Definition: bridgeIO.cpp:503
void set_parameters(const Parameters &params)
ForceSmear_HYP(unique_ptr< Projection > &proj)
std::vector< Field_G > m_U
void force_step3(Field_G &, const Field_G &)
void force_each(Field_G &, const Field_G &, const Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
std::vector< Field_G > m_iTheta2
Class for parameters.
Definition: parameters.h:46
ShiftField_lex m_shift
std::vector< Field_G > m_v2
Base class for force calculation of smeared operators.
Definition: forceSmear.h:34
SU(N) gauge field.
Definition: field_G.h:38
static const std::string class_name
int idx2(const int mu, int nu)
Recursive calculation of HYP smeared fermion force.
int idx1b(const int mu, int nu, int rho)
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
std::vector< Field_G > m_iTheta1
ForceSmear_HYP(Projection *proj)
int idx1(const int mu, const int nu, const int rho)
Methods to shift a field in the lexical site index.
std::vector< Field_G > m_v1
std::vector< Field_G > m_Sigma2
void force_step1(Field_G &)
void force_step2(Field_G &)
std::vector< Field_G > m_iTheta3
void staple(Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
std::vector< Field_G > m_Sigma3