Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
forceSmear_HYP_SF.h
Go to the documentation of this file.
1 
14 #ifndef FORCESMEAR_HYP_SF_INCLUDED
15 #define FORCESMEAR_HYP_SF_INCLUDED
16 
17 #include "forceSmear.h"
18 
19 #include "field_G_SF.h"
20 
21 #include "shiftField_lex.h"
22 #include "bridge_complex.h"
23 
24 #include "projection.h"
25 
26 #include "bridgeIO.h"
27 using Bridge::vout;
28 
30 
37 //- parameters class
39 {
40  public:
42 };
43 //- end
44 
46 {
47  private:
48  int m_Ndim, m_Nvol;
49  double m_alpha1, m_alpha2, m_alpha3; // HYP smearing parameters
51  std::valarray<Field_G> m_U;
52  std::valarray<Field_G> m_v1, m_v2;
53  std::valarray<Field_G> m_Sigma3, m_Sigma2;
54  std::valarray<Field_G> m_iTheta3, m_iTheta2, m_iTheta1;
56 
58  double m_phi[3];
60  double m_phipr[3];
61 
63 
64  public:
65 
67  : ForceSmear(), m_proj(proj)
68  {
69  init();
70  }
71 
72  // ~ForceSmear_HYP_SF(){ };
73 
74  void set_parameters(const Parameters& params);
75  void set_parameters(double alpha1, double alpha2, double alpha3, double *phi, double *phipr);
76 
77  Field force_udiv(const Field_G& Sigma, const Field_G& U);
78 
79  private:
80  void init();
81 
82  void force_step3(Field_G&, const Field_G&);
83  void force_step2(Field_G&);
84  void force_step1(Field_G&);
85 
86  void force_each(Field_G&, const Field_G&, const Field_G&,
87  const Field_G&, const Field_G&, int mu, int nu);
88 
89  void smear_step1();
90  void smear_step2();
91 
92  void staple(Field_G&, const Field_G&, const Field_G&,
93  int mu, int nu);
94 
95  int idx1(int mu, int nu, int rho)
96  {
97  int sig = 6 - mu - nu - rho;
98 
99  if (sig > mu) --sig;
100  return mu + m_Ndim * sig;
101  }
102 
103  int idx1b(int mu, int nu, int rho)
104  {
105  if (nu > mu) --nu;
106  if (rho > mu) --rho;
107  if (rho > nu) --rho;
108  return mu + m_Ndim * (nu + (m_Ndim - 1) * rho);
109  }
110 
111  int idx2(int mu, int nu)
112  {
113  if (nu > mu) --nu;
114  return mu + m_Ndim * nu;
115  }
116 
117  int size1()
118  {
119  return m_Ndim * (m_Ndim - 1);
120  }
121 
122  int size1b()
123  {
124  return m_Ndim * (m_Ndim - 1) * (m_Ndim - 2);
125  }
126 
127  int size2()
128  {
129  return m_Ndim * (m_Ndim - 1);
130  }
131 };
132 #endif