Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
smear_HYP_SF.h
Go to the documentation of this file.
1 
14 #ifndef SMEAR_HYP_SF_INCLUDED
15 #define SMEAR_HYP_SF_INCLUDED
16 
17 #include "smear.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 
35 class Smear_HYP_SF : public Smear
36 {
37  public:
38  static const std::string class_name;
39 
40  private:
41  int m_Ndim, m_Nvol;
42  double m_alpha1, m_alpha2, m_alpha3; // HYP smearing parameters
44  std::vector<Field_G> m_U;
45  std::vector<Field_G> m_v1;
46  std::vector<Field_G> m_v2;
48 
50 
51  public:
53  : Smear(), m_proj(proj)
54  {
55  init();
56  }
57 
59  : Smear(), m_proj(proj.get())
60  {
61  init();
62  }
63 
65 
66  void init();
67 
68  void set_parameters(const Parameters& params);
69  void set_parameters(const double alpha1, const double alpha2, const double alpha3,
70  double *phi, double *phipr);
71 
72  void smear(Field_G& Usmear, const Field_G& U);
73 
74  private:
75  void staple(Field_G&, const Field_G&, const Field_G&,
76  const int mu, const int nu);
77 
78  void step1();
79  void step2();
80  void step3(Field_G&);
81 
82  int index_v1(const int mu, const int nu, const int rho)
83  {
84  int sig = 6 - mu - nu - rho;
85 
86  if (sig > mu) --sig;
87  return mu + m_Ndim * sig;
88  }
89 
90  int index_v2(const int mu, int nu)
91  {
92  if (nu > mu) --nu;
93  return mu + m_Ndim * nu;
94  }
95 
96  int size_v1()
97  {
98  return m_Ndim * (m_Ndim - 1);
99  }
100 
101  int size_v2()
102  {
103  return m_Ndim * (m_Ndim - 1);
104  }
105 
106 #ifdef USE_FACTORY
107  private:
108  static Smear *create_object(Projection *proj)
109  {
110  return new Smear_HYP_SF(proj);
111  }
112 
113  public:
114  static bool register_factory()
115  {
116  return Smear::Factory::Register("HYP_SF", create_object);
117  }
118 #endif
119 };
120 #endif
SU(N) gauge field class in which a few functions are added for the SF.
Definition: field_G_SF.h:33
BridgeIO vout
Definition: bridgeIO.cpp:503
double m_alpha2
Definition: smear_HYP_SF.h:42
void smear(Field_G &Usmear, const Field_G &U)
Smear_HYP_SF(Projection *proj)
Definition: smear_HYP_SF.h:52
Class for parameters.
Definition: parameters.h:46
double m_alpha1
Definition: smear_HYP_SF.h:42
Field_G_SF set_wk
Definition: smear_HYP_SF.h:49
void set_parameters(const Parameters &params)
double m_alpha3
Definition: smear_HYP_SF.h:42
SU(N) gauge field.
Definition: field_G.h:38
void step3(Field_G &)
std::vector< Field_G > m_v1
Definition: smear_HYP_SF.h:45
int index_v2(const int mu, int nu)
Definition: smear_HYP_SF.h:90
Smear_HYP_SF(unique_ptr< Projection > &proj)
Definition: smear_HYP_SF.h:58
HYP smearing of link variables with SF BC.
Definition: smear_HYP_SF.h:35
ShiftField_lex m_shift
Definition: smear_HYP_SF.h:47
int index_v1(const int mu, const int nu, const int rho)
Definition: smear_HYP_SF.h:82
std::vector< Field_G > m_U
Definition: smear_HYP_SF.h:44
base class for projection operator into gauge group.
Definition: projection.h:30
static const std::string class_name
Definition: smear_HYP_SF.h:38
void staple(Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
base class for smearing of link variables.
Definition: smear.h:34
Methods to shift a field in the lexical site index.
Projection * m_proj
Definition: smear_HYP_SF.h:43
std::vector< Field_G > m_v2
Definition: smear_HYP_SF.h:46