Bridge++  Ver. 2.0.2
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_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:
42 
43  int m_Ndim, m_Nvol;
44  double m_alpha1, m_alpha2, m_alpha3; // HYP smearing parameters
45  std::vector<double> m_phi, m_phipr; // raw parameter values
46 
48  std::vector<Field_G> m_U;
49  std::vector<Field_G> m_v1;
50  std::vector<Field_G> m_v2;
52 
53  // Field_G_SF set_wk;
56 
57  public:
59  : m_vl(CommonParameters::Vlevel()), m_proj(proj),
61  {
62  init();
63  }
64 
65  Smear_HYP_SF(Projection *proj, const Parameters& params)
66  : m_vl(CommonParameters::Vlevel()), m_proj(proj),
68  {
69  init();
70  set_parameters(params);
71  }
72 
74 
75  void init();
76 
77  void set_parameters(const Parameters& params);
78  void set_parameters(const double alpha1,
79  const double alpha2,
80  const double alpha3,
81  const std::vector<double>& phi,
82  const std::vector<double>& phipr);
83 
84  void get_parameters(Parameters& params) const;
85 
86  void smear(Field_G& Usmear, const Field_G& U);
87 
88  private:
89  void staple(Field_G&, const Field_G&, const Field_G&,
90  const int mu, const int nu);
91 
92  void step1();
93  void step2();
94  void step3(Field_G&);
95 
96  int index_v1(const int mu, const int nu, const int rho)
97  {
98  int sig = 6 - mu - nu - rho;
99 
100  if (sig > mu) --sig;
101  return mu + m_Ndim * sig;
102  }
103 
104  int index_v2(const int mu, int nu)
105  {
106  if (nu > mu) --nu;
107  return mu + m_Ndim * nu;
108  }
109 
110  int size_v1()
111  {
112  return m_Ndim * (m_Ndim - 1);
113  }
114 
115  int size_v2()
116  {
117  return m_Ndim * (m_Ndim - 1);
118  }
119 
120 #ifdef USE_FACTORY
121  private:
122  static Smear *create_object(Projection *proj)
123  {
124  return new Smear_HYP_SF(proj);
125  }
126 
127  static Smear *create_object_with_params(Projection *proj, const Parameters& params)
128  {
129  return new Smear_HYP_SF(proj, params);
130  }
131 
132  public:
133  static bool register_factory()
134  {
135  bool init = true;
136  init &= Smear::Factory::Register("HYP_SF", create_object);
137  init &= Smear::Factory_params::Register("HYP_SF", create_object_with_params);
138  return init;
139  }
140 #endif
141 };
142 #endif
Smear_HYP_SF::m_proj
Projection * m_proj
Definition: smear_HYP_SF.h:47
bridgeIO.h
Smear_HYP_SF::m_alpha2
double m_alpha2
Definition: smear_HYP_SF.h:44
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
Smear_HYP_SF::m_alpha3
double m_alpha3
Definition: smear_HYP_SF.h:44
Parameters
Class for parameters.
Definition: parameters.h:46
Smear
base class for smearing of link variables.
Definition: smear.h:34
Smear_HYP_SF::step1
void step1()
Definition: smear_HYP_SF.cpp:142
shiftField_lex.h
Smear_HYP_SF::staple
void staple(Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
Definition: smear_HYP_SF.cpp:225
Smear_HYP_SF::smear
void smear(Field_G &Usmear, const Field_G &U)
Definition: smear_HYP_SF.cpp:119
Smear_HYP_SF::m_Ndim
int m_Ndim
Definition: smear_HYP_SF.h:43
Smear_HYP_SF::m_U
std::vector< Field_G > m_U
Definition: smear_HYP_SF.h:48
Smear_HYP_SF::init
void init()
Definition: smear_HYP_SF.cpp:107
Smear_HYP_SF::m_phipr
std::vector< double > m_phipr
Definition: smear_HYP_SF.h:45
Smear_HYP_SF::m_alpha1
double m_alpha1
Definition: smear_HYP_SF.h:44
Smear_HYP_SF::m_wk
Mat_SU_N m_wk
SF boundary condition at t=0.
Definition: smear_HYP_SF.h:54
Smear_HYP_SF
HYP smearing of link variables with SF BC.
Definition: smear_HYP_SF.h:35
Smear_HYP_SF::m_v2
std::vector< Field_G > m_v2
Definition: smear_HYP_SF.h:50
Smear_HYP_SF::step3
void step3(Field_G &)
Definition: smear_HYP_SF.cpp:197
SU_N::Mat_SU_N
Definition: mat_SU_N.h:36
Smear_HYP_SF::m_vl
Bridge::VerboseLevel m_vl
Definition: smear_HYP_SF.h:41
field_SF.h
Smear_HYP_SF::get_parameters
void get_parameters(Parameters &params) const
Definition: smear_HYP_SF.cpp:53
Smear_HYP_SF::size_v1
int size_v1()
Definition: smear_HYP_SF.h:110
Smear_HYP_SF::Smear_HYP_SF
Smear_HYP_SF(Projection *proj)
Definition: smear_HYP_SF.h:58
Smear_HYP_SF::index_v2
int index_v2(const int mu, int nu)
Definition: smear_HYP_SF.h:104
Smear_HYP_SF::size_v2
int size_v2()
Definition: smear_HYP_SF.h:115
Smear_HYP_SF::step2
void step2()
Definition: smear_HYP_SF.cpp:168
ShiftField_lex
Methods to shift a field in the lexical site index.
Definition: shiftField_lex.h:39
Smear_HYP_SF::Smear_HYP_SF
Smear_HYP_SF(Projection *proj, const Parameters &params)
Definition: smear_HYP_SF.h:65
smear.h
Smear_HYP_SF::class_name
static const std::string class_name
Definition: smear_HYP_SF.h:38
Smear_HYP_SF::m_v1
std::vector< Field_G > m_v1
Definition: smear_HYP_SF.h:49
Smear_HYP_SF::m_wkpr
Mat_SU_N m_wkpr
SF boundary condition at t=Nt.
Definition: smear_HYP_SF.h:55
Projection
base class for projection operator into gauge group.
Definition: projection.h:30
Smear_HYP_SF::m_Nvol
int m_Nvol
Definition: smear_HYP_SF.h:43
Smear_HYP_SF::~Smear_HYP_SF
~Smear_HYP_SF()
Definition: smear_HYP_SF.h:73
Smear_HYP_SF::index_v1
int index_v1(const int mu, const int nu, const int rho)
Definition: smear_HYP_SF.h:96
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Field_G
SU(N) gauge field.
Definition: field_G.h:38
Smear_HYP_SF::m_shift
ShiftField_lex m_shift
Definition: smear_HYP_SF.h:51
Smear_HYP_SF::m_phi
std::vector< double > m_phi
Definition: smear_HYP_SF.h:45
Smear_HYP_SF::set_parameters
void set_parameters(const Parameters &params)
Definition: smear_HYP_SF.cpp:25
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512