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