Bridge++  Version 1.5.4
 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/field_G_SF.h"
20 #include "Field/shiftField_lex.h"
21 
22 #include "IO/bridgeIO.h"
23 using Bridge::vout;
24 
26 
37 {
38  public:
39  static const std::string class_name;
40 
41  private:
42  int m_Ndim, m_Nvol;
43  double m_alpha1, m_alpha2, m_alpha3; // HYP smearing parameters
45  std::vector<Field_G> m_U;
46  std::vector<Field_G> m_v1, m_v2;
47  std::vector<Field_G> m_Sigma3, m_Sigma2;
48  std::vector<Field_G> m_iTheta3, m_iTheta2, m_iTheta1;
50 
52  double m_phi[3];
54  double m_phipr[3];
55 
57 
58  public:
60  : ForceSmear(), m_proj(proj)
61  {
62  init();
63  }
64 
66  : ForceSmear(), m_proj(proj.get())
67  {
68  init();
69  }
70 
71  // ~ForceSmear_HYP_SF(){ };
72 
73  void set_parameters(const Parameters& params);
74  void set_parameters(const double alpha1, const double alpha2, const double alpha3,
75  double *phi, double *phipr);
76 
77  void force_udiv(Field_G& Sigma, const Field_G& Sigma_p, const Field_G& U);
78 
79  // old interface
80  //Field force_udiv(const Field_G& Sigma, 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&, const int mu, const int nu);
91 
92  void smear_step1();
93  void smear_step2();
94 
95  void staple(Field_G&, const Field_G&, const Field_G&,
96  const int mu, const int nu);
97 
98  int idx1(const int mu, const int nu, const 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(const 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(const 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 #ifdef USE_FACTORY
136  private:
137  static ForceSmear *create_object(Projection *proj)
138  {
139  return new ForceSmear_HYP_SF(proj);
140  }
141 
142  public:
143  static bool register_factory()
144  {
145  return ForceSmear::Factory::Register("HYP_SF", create_object);
146  }
147 #endif
148 };
149 #endif
SU(N) gauge field class in which a few functions are added for the SF.
Definition: field_G_SF.h:33
static const std::string class_name
BridgeIO vout
Definition: bridgeIO.cpp:503
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:46
int idx1b(const int mu, int nu, int rho)
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(const int mu, int nu)
ShiftField_lex m_shift
std::vector< Field_G > m_Sigma3
Recursive calculation of HYP smeared fermion force with SF BC.
std::vector< Field_G > m_v2
base class for projection operator into gauge group.
Definition: projection.h:30
std::vector< Field_G > m_U
void force_step3(Field_G &, const Field_G &)
Methods to shift a field in the lexical site index.
int idx1(const int mu, const int nu, const int rho)
void staple(Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
double m_phipr[3]
SF boundary condition at t=Nt.
void force_step1(Field_G &)
void force_each(Field_G &, const Field_G &, const Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
ForceSmear_HYP_SF(Projection *proj)
std::vector< Field_G > m_iTheta1