Bridge++  Ver. 2.0.2
smear_HYP.h
Go to the documentation of this file.
1 
14 #ifndef SMEAR_HYP_INCLUDED
15 #define SMEAR_HYP_INCLUDED
16 
17 #include "smear.h"
18 
19 #include "Field/shiftField_lex.h"
20 
21 #include "IO/bridgeIO.h"
22 using Bridge::vout;
23 
25 
35 class Smear_HYP : public Smear
36 {
37  public:
38  static const std::string class_name;
39 
40  private:
42 
43  int m_Ndim, m_Nvol;
44  double m_alpha1, m_alpha2, m_alpha3; // HYP smearing parameters
46  std::vector<Field_G> m_U;
47  std::vector<Field_G> m_v1;
48  std::vector<Field_G> m_v2;
50 
51  public:
53  : m_vl(CommonParameters::Vlevel()), m_proj(proj)
54  {
55  init();
56  }
57 
58  Smear_HYP(Projection *proj, const Parameters& params)
59  : m_vl(CommonParameters::Vlevel()), m_proj(proj)
60  {
61  init();
62  set_parameters(params);
63  }
64 
66 
67  void init();
68 
69  void set_parameters(const Parameters& params);
70  void set_parameters(const double alpha1, const double alpha2, const double alpha3);
71 
72  void get_parameters(Parameters& params) const;
73 
74  void smear(Field_G& Usmear, const Field_G& U);
75 
76  private:
77  void staple(Field_G&, const Field_G&, const Field_G&,
78  const int mu, const int nu);
79 
80  void step1();
81  void step2();
82  void step3(Field_G&);
83 
84  int index_v1(const int mu, const int nu, const int rho)
85  {
86  int sig = 6 - mu - nu - rho;
87 
88  if (sig > mu) --sig;
89  return mu + m_Ndim * sig;
90  }
91 
92  int index_v2(const int mu, int nu)
93  {
94  if (nu > mu) --nu;
95  return mu + m_Ndim * nu;
96  }
97 
98  int size_v1()
99  {
100  return m_Ndim * (m_Ndim - 1);
101  }
102 
103  int size_v2()
104  {
105  return m_Ndim * (m_Ndim - 1);
106  }
107 
108 #ifdef USE_FACTORY
109  private:
110  static Smear *create_object(Projection *proj)
111  {
112  return new Smear_HYP(proj);
113  }
114 
115  static Smear *create_object_with_params(Projection *proj, const Parameters& params)
116  {
117  return new Smear_HYP(proj, params);
118  }
119 
120  public:
121  static bool register_factory()
122  {
123  bool init = true;
124  init &= Smear::Factory::Register("HYP", create_object);
125  init &= Smear::Factory_params::Register("HYP", create_object_with_params);
126  return init;
127  }
128 #endif
129 };
130 #endif
Smear_HYP::m_v1
std::vector< Field_G > m_v1
Definition: smear_HYP.h:47
bridgeIO.h
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
Smear_HYP::step1
void step1()
Definition: smear_HYP.cpp:114
Parameters
Class for parameters.
Definition: parameters.h:46
Smear
base class for smearing of link variables.
Definition: smear.h:34
Smear_HYP::m_Nvol
int m_Nvol
Definition: smear_HYP.h:43
Smear_HYP::size_v2
int size_v2()
Definition: smear_HYP.h:103
Smear_HYP::m_alpha3
double m_alpha3
Definition: smear_HYP.h:44
Smear_HYP::m_alpha2
double m_alpha2
Definition: smear_HYP.h:44
shiftField_lex.h
Smear_HYP::index_v2
int index_v2(const int mu, int nu)
Definition: smear_HYP.h:92
Smear_HYP::staple
void staple(Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
Definition: smear_HYP.cpp:189
Smear_HYP::init
void init()
Definition: smear_HYP.cpp:80
Smear_HYP::m_Ndim
int m_Ndim
Definition: smear_HYP.h:43
Smear_HYP::Smear_HYP
Smear_HYP(Projection *proj, const Parameters &params)
Definition: smear_HYP.h:58
Smear_HYP::class_name
static const std::string class_name
Definition: smear_HYP.h:38
Smear_HYP::set_parameters
void set_parameters(const Parameters &params)
Definition: smear_HYP.cpp:25
Smear_HYP::size_v1
int size_v1()
Definition: smear_HYP.h:98
Smear_HYP::index_v1
int index_v1(const int mu, const int nu, const int rho)
Definition: smear_HYP.h:84
Smear_HYP
HYP smearing of link variables.
Definition: smear_HYP.h:35
Smear_HYP::get_parameters
void get_parameters(Parameters &params) const
Definition: smear_HYP.cpp:50
Smear_HYP::m_vl
Bridge::VerboseLevel m_vl
Definition: smear_HYP.h:41
Smear_HYP::step3
void step3(Field_G &)
Definition: smear_HYP.cpp:164
Smear_HYP::m_U
std::vector< Field_G > m_U
Definition: smear_HYP.h:46
Smear_HYP::m_alpha1
double m_alpha1
Definition: smear_HYP.h:44
Smear_HYP::m_proj
Projection * m_proj
Definition: smear_HYP.h:45
ShiftField_lex
Methods to shift a field in the lexical site index.
Definition: shiftField_lex.h:39
Smear_HYP::smear
void smear(Field_G &Usmear, const Field_G &U)
Definition: smear_HYP.cpp:92
Smear_HYP::m_shift
ShiftField_lex m_shift
Definition: smear_HYP.h:49
smear.h
Smear_HYP::Smear_HYP
Smear_HYP(Projection *proj)
Definition: smear_HYP.h:52
Smear_HYP::m_v2
std::vector< Field_G > m_v2
Definition: smear_HYP.h:48
Projection
base class for projection operator into gauge group.
Definition: projection.h:30
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Smear_HYP::step2
void step2()
Definition: smear_HYP.cpp:137
Field_G
SU(N) gauge field.
Definition: field_G.h:38
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Smear_HYP::~Smear_HYP
~Smear_HYP()
Definition: smear_HYP.h:65