Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
smear_HYP.h
Go to the documentation of this file.
1 
14 #ifndef SMEAR_HYP_INCLUDED
15 #define SMEAR_HYP_INCLUDED
16 
17 #include "smear.h"
18 
19 #include "Field/shiftField_lex.h"
20 
21 #include "IO/bridgeIO.h"
22 using Bridge::vout;
23 
25 
35 class Smear_HYP : public Smear
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;
46  std::vector<Field_G> m_v2;
48 
49  public:
51  : Smear(), m_proj(proj)
52  {
53  init();
54  }
55 
57  : Smear(), m_proj(proj.get())
58  {
59  init();
60  }
61 
63 
64  void init();
65 
66  void set_parameters(const Parameters& params);
67  void set_parameters(const double alpha1, const double alpha2, const double alpha3);
68 
69  void smear(Field_G& Usmear, const Field_G& U);
70 
71  private:
72  void staple(Field_G&, const Field_G&, const Field_G&,
73  const int mu, const int nu);
74 
75  void step1();
76  void step2();
77  void step3(Field_G&);
78 
79  int index_v1(const int mu, const int nu, const int rho)
80  {
81  int sig = 6 - mu - nu - rho;
82 
83  if (sig > mu) --sig;
84  return mu + m_Ndim * sig;
85  }
86 
87  int index_v2(const int mu, int nu)
88  {
89  if (nu > mu) --nu;
90  return mu + m_Ndim * nu;
91  }
92 
93  int size_v1()
94  {
95  return m_Ndim * (m_Ndim - 1);
96  }
97 
98  int size_v2()
99  {
100  return m_Ndim * (m_Ndim - 1);
101  }
102 
103 #ifdef USE_FACTORY
104  private:
105  static Smear *create_object(Projection *proj)
106  {
107  return new Smear_HYP(proj);
108  }
109 
110  public:
111  static bool register_factory()
112  {
113  return Smear::Factory::Register("HYP", create_object);
114  }
115 #endif
116 };
117 #endif
BridgeIO vout
Definition: bridgeIO.cpp:503
int index_v2(const int mu, int nu)
Definition: smear_HYP.h:87
std::vector< Field_G > m_v2
Definition: smear_HYP.h:46
void init()
Definition: smear_HYP.cpp:68
double m_alpha2
Definition: smear_HYP.h:42
HYP smearing of link variables.
Definition: smear_HYP.h:35
int m_Nvol
Definition: smear_HYP.h:41
void set_parameters(const Parameters &params)
Definition: smear_HYP.cpp:25
Class for parameters.
Definition: parameters.h:46
Smear_HYP(unique_ptr< Projection > &proj)
Definition: smear_HYP.h:56
void step3(Field_G &)
Definition: smear_HYP.cpp:152
void staple(Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
Definition: smear_HYP.cpp:177
static const std::string class_name
Definition: smear_HYP.h:38
int size_v1()
Definition: smear_HYP.h:93
Projection * m_proj
Definition: smear_HYP.h:43
int size_v2()
Definition: smear_HYP.h:98
SU(N) gauge field.
Definition: field_G.h:38
void step1()
Definition: smear_HYP.cpp:102
std::vector< Field_G > m_U
Definition: smear_HYP.h:44
ShiftField_lex m_shift
Definition: smear_HYP.h:47
double m_alpha1
Definition: smear_HYP.h:42
base class for projection operator into gauge group.
Definition: projection.h:30
int index_v1(const int mu, const int nu, const int rho)
Definition: smear_HYP.h:79
void step2()
Definition: smear_HYP.cpp:125
Smear_HYP(Projection *proj)
Definition: smear_HYP.h:50
base class for smearing of link variables.
Definition: smear.h:34
Methods to shift a field in the lexical site index.
void smear(Field_G &Usmear, const Field_G &U)
Definition: smear_HYP.cpp:80
double m_alpha3
Definition: smear_HYP.h:42
std::vector< Field_G > m_v1
Definition: smear_HYP.h:45
int m_Ndim
Definition: smear_HYP.h:41
~Smear_HYP()
Definition: smear_HYP.h:62