Bridge++  Version 1.4.4
 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 "Field/shiftField_lex.h"
20 #include "bridge_complex.h"
21 
22 #include "Smear/projection.h"
23 
24 #include "IO/bridgeIO.h"
25 using Bridge::vout;
26 
28 
38 class ForceSmear_HYP : public ForceSmear
39 {
40  public:
41  static const std::string class_name;
42 
43  private:
44  int m_Ndim, m_Nvol;
45  double m_alpha1, m_alpha2, m_alpha3; // HYP smearing parameters
47  std::vector<Field_G> m_U;
48  std::vector<Field_G> m_v1, m_v2;
49  std::vector<Field_G> m_Sigma3, m_Sigma2;
50  std::vector<Field_G> m_iTheta3, m_iTheta2, m_iTheta1;
52 
53  public:
55  : ForceSmear(), m_proj(proj)
56  {
57  init();
58  }
59 
61  : ForceSmear(), m_proj(proj.get())
62  {
63  init();
64  }
65 
66  // ~ForceSmear_HYP(){ };
67 
68  void set_parameters(const Parameters& params);
69 
70  void set_parameters(double alpha1, double alpha2, double alpha3);
71 
72  void force_udiv(Field_G& Sigma, const Field_G& Sigma_p, const Field_G& U);
73 
74  private:
75  void init();
76 
77  void force_step3(Field_G&, const Field_G&);
78  void force_step2(Field_G&);
79  void force_step1(Field_G&);
80 
81  void force_each(Field_G&, const Field_G&, const Field_G&,
82  const Field_G&, const Field_G&, int mu, int nu);
83 
84  void smear_step1();
85  void smear_step2();
86 
87  void staple(Field_G&, const Field_G&, const Field_G&,
88  int mu, int nu);
89 
90  int idx1(int mu, int nu, int rho)
91  {
92  int sig = 6 - mu - nu - rho;
93 
94  if (sig > mu) --sig;
95  return mu + m_Ndim * sig;
96  }
97 
98  int idx1b(int mu, int nu, int rho)
99  {
100  if (nu > mu) --nu;
101  if (rho > mu) --rho;
102  if (rho > nu) --rho;
103  return mu + m_Ndim * (nu + (m_Ndim - 1) * rho);
104  }
105 
106  int idx2(int mu, int nu)
107  {
108  if (nu > mu) --nu;
109  return mu + m_Ndim * nu;
110  }
111 
112  int size1()
113  {
114  return m_Ndim * (m_Ndim - 1);
115  }
116 
117  int size1b()
118  {
119  return m_Ndim * (m_Ndim - 1) * (m_Ndim - 2);
120  }
121 
122  int size2()
123  {
124  return m_Ndim * (m_Ndim - 1);
125  }
126 };
127 #endif
Projection * m_proj
BridgeIO vout
Definition: bridgeIO.cpp:495
void set_parameters(const Parameters &params)
ForceSmear_HYP(unique_ptr< Projection > &proj)
int idx2(int mu, int nu)
std::vector< Field_G > m_U
void force_step3(Field_G &, const Field_G &)
std::vector< Field_G > m_iTheta2
Class for parameters.
Definition: parameters.h:46
void force_each(Field_G &, const Field_G &, const Field_G &, const Field_G &, const Field_G &, int mu, int nu)
ShiftField_lex m_shift
void staple(Field_G &, const Field_G &, const Field_G &, int mu, int nu)
std::vector< Field_G > m_v2
Base class for force calculation of smeared operators.
Definition: forceSmear.h:34
SU(N) gauge field.
Definition: field_G.h:38
static const std::string class_name
Recursive calculation of HYP smeared fermion force.
int idx1(int mu, int nu, int rho)
int idx1b(int mu, int nu, int rho)
void force_udiv(Field_G &Sigma, const Field_G &Sigma_p, const Field_G &U)
base class for projection operator into gauge group.
Definition: projection.h:31
std::vector< Field_G > m_iTheta1
ForceSmear_HYP(Projection *proj)
Methods to shift a field in the lexical site index.
std::vector< Field_G > m_v1
std::vector< Field_G > m_Sigma2
void force_step1(Field_G &)
void force_step2(Field_G &)
std::vector< Field_G > m_iTheta3
std::vector< Field_G > m_Sigma3