Bridge++  Ver. 1.3.x
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 
39 //- parameters class
41 {
42  public:
44 };
45 //- end
46 
48 {
49  public:
50  static const std::string class_name;
51 
52  private:
53  int m_Ndim, m_Nvol;
54  double m_alpha1, m_alpha2, m_alpha3; // HYP smearing parameters
56  std::vector<Field_G> m_U;
57  std::vector<Field_G> m_v1, m_v2;
58  std::vector<Field_G> m_Sigma3, m_Sigma2;
59  std::vector<Field_G> m_iTheta3, m_iTheta2, m_iTheta1;
61 
63  double m_phi[3];
65  double m_phipr[3];
66 
68 
69  public:
71  : ForceSmear(), m_proj(proj)
72  {
73  init();
74  }
75 
77  : ForceSmear(), m_proj(proj.get())
78  {
79  init();
80  }
81 
82  // ~ForceSmear_HYP_SF(){ };
83 
84  void set_parameters(const Parameters& params);
85  void set_parameters(double alpha1, double alpha2, double alpha3, double *phi, double *phipr);
86 
87  void force_udiv(Field_G& Sigma, const Field_G& Sigma_p, const Field_G& U);
88 
89  // old interface
90  //Field force_udiv(const Field_G& Sigma, const Field_G& U);
91 
92  private:
93  void init();
94 
95  void force_step3(Field_G&, const Field_G&);
96  void force_step2(Field_G&);
97  void force_step1(Field_G&);
98 
99  void force_each(Field_G&, const Field_G&, const Field_G&,
100  const Field_G&, const Field_G&, int mu, int nu);
101 
102  void smear_step1();
103  void smear_step2();
104 
105  void staple(Field_G&, const Field_G&, const Field_G&,
106  int mu, int nu);
107 
108  int idx1(int mu, int nu, int rho)
109  {
110  int sig = 6 - mu - nu - rho;
111 
112  if (sig > mu) --sig;
113  return mu + m_Ndim * sig;
114  }
115 
116  int idx1b(int mu, int nu, int rho)
117  {
118  if (nu > mu) --nu;
119  if (rho > mu) --rho;
120  if (rho > nu) --rho;
121  return mu + m_Ndim * (nu + (m_Ndim - 1) * rho);
122  }
123 
124  int idx2(int mu, int nu)
125  {
126  if (nu > mu) --nu;
127  return mu + m_Ndim * nu;
128  }
129 
130  int size1()
131  {
132  return m_Ndim * (m_Ndim - 1);
133  }
134 
135  int size1b()
136  {
137  return m_Ndim * (m_Ndim - 1) * (m_Ndim - 2);
138  }
139 
140  int size2()
141  {
142  return m_Ndim * (m_Ndim - 1);
143  }
144 };
145 #endif
static const std::string class_name
BridgeIO vout
Definition: bridgeIO.cpp:278
ForceSmear_HYP_SF(unique_ptr< Projection > &proj)
void force_udiv(Field_G &Sigma, const Field_G &Sigma_p, const Field_G &U)
double m_phi[3]
SF boundary condition at t=0.
std::vector< Field_G > m_iTheta2
std::vector< Field_G > m_Sigma2
Class for parameters.
Definition: parameters.h:38
void force_step2(Field_G &)
void set_parameters(const Parameters &params)
Base class for force calculation of smeared operators.
Definition: forceSmear.h:34
SU(N) gauge field.
Definition: field_G.h:38
std::vector< Field_G > m_iTheta3
std::vector< Field_G > m_v1
int idx2(int mu, int nu)
ShiftField_lex m_shift
std::vector< Field_G > m_Sigma3
std::vector< Field_G > m_v2
base class for projection operator into gauge group.
Definition: projection.h:31
void staple(Field_G &, const Field_G &, const Field_G &, int mu, int nu)
void force_each(Field_G &, const Field_G &, const Field_G &, const Field_G &, const Field_G &, int mu, int nu)
std::vector< Field_G > m_U
int idx1b(int mu, int nu, int rho)
void force_step3(Field_G &, const Field_G &)
Methods to shift a field in the lexical site index.
Recursive calculation of HYP smeared fermion force with SF BC.
int idx1(int mu, int nu, int rho)
double m_phipr[3]
SF boundary condition at t=Nt.
void force_step1(Field_G &)
ForceSmear_HYP_SF(Projection *proj)
std::vector< Field_G > m_iTheta1