Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
smear_HYP.h
Go to the documentation of this file.
1 
13 #ifndef SMEAR_HYP_INCLUDED
14 #define SMEAR_HYP_INCLUDED
15 
16 #include "smear.h"
17 #include "shiftField_lex.h"
18 
19 #include "bridgeIO.h"
20 using Bridge::vout;
21 
23 
30 //- parameters class
31 class Parameters_Smear_HYP : virtual public Parameters
32 {
33  public:
35 };
36 //- end
37 
38 class Smear_HYP : public Smear
39 {
40  private:
41  int m_Ndim, m_Nvol;
42  double m_alpha1, m_alpha2, m_alpha3; // HYP smearing parameters
44  std::valarray<Field_G> m_U;
45  std::valarray<Field_G> m_v1;
46  std::valarray<Field_G> m_v2;
48 
49  public:
50 
52  : Smear(), m_proj(proj)
53  {
54  init();
55  }
56 
58 
59  void init();
60 
61  void set_parameters(const Parameters& params);
62  void set_parameters(double alpha1, double alpha2, double alpha3);
63 
64  void smear(Field_G& Usmear, const Field_G& U);
65 
66  private:
67  void staple(Field_G&, const Field_G&, const Field_G&,
68  int mu, int nu);
69 
70  void step1();
71  void step2();
72  void step3(Field_G&);
73 
74  int index_v1(int mu, int nu, int rho)
75  {
76  int sig = 6 - mu - nu - rho;
77 
78  if (sig > mu) --sig;
79  return mu + m_Ndim * sig;
80  }
81 
82  int index_v2(int mu, int nu)
83  {
84  if (nu > mu) --nu;
85  return mu + m_Ndim * nu;
86  }
87 
88  int size_v1()
89  {
90  return m_Ndim * (m_Ndim - 1);
91  }
92 
93  int size_v2()
94  {
95  return m_Ndim * (m_Ndim - 1);
96  }
97 };
98 #endif