Bridge++  Ver. 1.1.x
 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 "shiftField_lex.h"
20 #include "bridge_complex.h"
21 
22 #include "projection.h"
23 
24 #include "bridgeIO.h"
25 using Bridge::vout;
26 
28 
35 //- parameters class
36 class Parameters_ForceSmear_HYP : virtual public Parameters
37 {
38  public:
40 };
41 //- end
42 
43 class ForceSmear_HYP : public ForceSmear
44 {
45  private:
46  int m_Ndim, m_Nvol;
47  double m_alpha1, m_alpha2, m_alpha3; // HYP smearing parameters
49  std::valarray<Field_G> m_U;
50  std::valarray<Field_G> m_v1, m_v2;
51  std::valarray<Field_G> m_Sigma3, m_Sigma2;
52  std::valarray<Field_G> m_iTheta3, m_iTheta2, m_iTheta1;
54 
55  public:
56 
58  : ForceSmear(), m_proj(proj)
59  {
60  init();
61  }
62 
63  // ~ForceSmear_HYP(){ };
64 
65  void set_parameters(const Parameters& params);
66 
67  // void set_parameters(const Parameters_Smear_HYP& params);
68  void set_parameters(double alpha1, double alpha2, double alpha3);
69 
70  Field force_udiv(const Field_G& Sigma, const Field_G& U);
71 
72  private:
73  void init();
74 
75  void force_step3(Field_G&, const Field_G&);
76  void force_step2(Field_G&);
77  void force_step1(Field_G&);
78 
79  void force_each(Field_G&, const Field_G&, const Field_G&,
80  const Field_G&, const Field_G&, int mu, int nu);
81 
82  void smear_step1();
83  void smear_step2();
84 
85  void staple(Field_G&, const Field_G&, const Field_G&,
86  int mu, int nu);
87 
88  int idx1(int mu, int nu, int rho)
89  {
90  int sig = 6 - mu - nu - rho;
91 
92  if (sig > mu) --sig;
93  return mu + m_Ndim * sig;
94  }
95 
96  int idx1b(int mu, int nu, int rho)
97  {
98  if (nu > mu) --nu;
99  if (rho > mu) --rho;
100  if (rho > nu) --rho;
101  return mu + m_Ndim * (nu + (m_Ndim - 1) * rho);
102  }
103 
104  int idx2(int mu, int nu)
105  {
106  if (nu > mu) --nu;
107  return mu + m_Ndim * nu;
108  }
109 
110  int size1()
111  {
112  return m_Ndim * (m_Ndim - 1);
113  }
114 
115  int size1b()
116  {
117  return m_Ndim * (m_Ndim - 1) * (m_Ndim - 2);
118  }
119 
120  int size2()
121  {
122  return m_Ndim * (m_Ndim - 1);
123  }
124 };
125 #endif