Bridge++  Ver. 1.3.x
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 
37 //- parameters class
38 class Parameters_ForceSmear_HYP : virtual public Parameters
39 {
40  public:
42 };
43 //- end
44 
45 class ForceSmear_HYP : public ForceSmear
46 {
47  public:
48  static const std::string class_name;
49 
50  private:
51  int m_Ndim, m_Nvol;
52  double m_alpha1, m_alpha2, m_alpha3; // HYP smearing parameters
54  std::vector<Field_G> m_U;
55  std::vector<Field_G> m_v1, m_v2;
56  std::vector<Field_G> m_Sigma3, m_Sigma2;
57  std::vector<Field_G> m_iTheta3, m_iTheta2, m_iTheta1;
59 
60  public:
62  : ForceSmear(), m_proj(proj)
63  {
64  init();
65  }
66 
68  : ForceSmear(), m_proj(proj.get())
69  {
70  init();
71  }
72 
73  // ~ForceSmear_HYP(){ };
74 
75  void set_parameters(const Parameters& params);
76 
77  // void set_parameters(const Parameters_Smear_HYP& params);
78  void set_parameters(double alpha1, double alpha2, double alpha3);
79 
80  void force_udiv(Field_G& Sigma, const Field_G& Sigma_p, const Field_G& U);
81 
82  private:
83  void init();
84 
85  void force_step3(Field_G&, const Field_G&);
86  void force_step2(Field_G&);
87  void force_step1(Field_G&);
88 
89  void force_each(Field_G&, const Field_G&, const Field_G&,
90  const Field_G&, const Field_G&, int mu, int nu);
91 
92  void smear_step1();
93  void smear_step2();
94 
95  void staple(Field_G&, const Field_G&, const Field_G&,
96  int mu, int nu);
97 
98  int idx1(int mu, int nu, int rho)
99  {
100  int sig = 6 - mu - nu - rho;
101 
102  if (sig > mu) --sig;
103  return mu + m_Ndim * sig;
104  }
105 
106  int idx1b(int mu, int nu, int rho)
107  {
108  if (nu > mu) --nu;
109  if (rho > mu) --rho;
110  if (rho > nu) --rho;
111  return mu + m_Ndim * (nu + (m_Ndim - 1) * rho);
112  }
113 
114  int idx2(int mu, int nu)
115  {
116  if (nu > mu) --nu;
117  return mu + m_Ndim * nu;
118  }
119 
120  int size1()
121  {
122  return m_Ndim * (m_Ndim - 1);
123  }
124 
125  int size1b()
126  {
127  return m_Ndim * (m_Ndim - 1) * (m_Ndim - 2);
128  }
129 
130  int size2()
131  {
132  return m_Ndim * (m_Ndim - 1);
133  }
134 };
135 #endif
Projection * m_proj
BridgeIO vout
Definition: bridgeIO.cpp:278
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:38
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
Recursive calculation of HYP smeared fermion force.
static const std::string class_name
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