Bridge++  Ver. 2.0.2
forceSmear_HYP.h
Go to the documentation of this file.
1 
14 #ifndef FORCESMEAR_HYP_INCLUDED
15 #define FORCESMEAR_HYP_INCLUDED
16 
17 #include "forceSmear.h"
18 
19 #include "Field/shiftField_lex.h"
20 
21 #include "IO/bridgeIO.h"
22 using Bridge::vout;
23 
25 
35 class ForceSmear_HYP : public ForceSmear
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, m_v2;
48  std::vector<Field_G> m_Sigma3, m_Sigma2;
49  std::vector<Field_G> m_iTheta3, m_iTheta2, m_iTheta1;
51 
52  public:
54  : m_vl(CommonParameters::Vlevel()), m_proj(proj)
55  {
56  init();
57  }
58 
59  ForceSmear_HYP(Projection *proj, const Parameters& params)
60  : m_vl(CommonParameters::Vlevel()), m_proj(proj)
61  {
62  init();
63  set_parameters(params);
64  }
65 
66  // ~ForceSmear_HYP(){ };
67 
68  void set_parameters(const Parameters& params);
69  void set_parameters(const double alpha1, const double alpha2, const double alpha3);
70 
71  void get_parameters(Parameters& params) const;
72 
73  void force_udiv(Field_G& Sigma, const Field_G& Sigma_p, const Field_G& U);
74 
75  private:
76  void init();
77 
78  void force_step3(Field_G&, const Field_G&);
79  void force_step2(Field_G&);
80  void force_step1(Field_G&);
81 
82  void force_each(Field_G&, const Field_G&, const Field_G&,
83  const Field_G&, const Field_G&, const int mu, const int nu);
84 
85  void smear_step1();
86  void smear_step2();
87 
88  void staple(Field_G&, const Field_G&, const Field_G&,
89  const int mu, const int nu);
90 
91  int idx1(const int mu, const int nu, const int rho)
92  {
93  int sig = 6 - mu - nu - rho;
94 
95  if (sig > mu) --sig;
96  return mu + m_Ndim * sig;
97  }
98 
99  int idx1b(const int mu, int nu, int rho)
100  {
101  if (nu > mu) --nu;
102  if (rho > mu) --rho;
103  if (rho > nu) --rho;
104  return mu + m_Ndim * (nu + (m_Ndim - 1) * rho);
105  }
106 
107  int idx2(const int mu, int nu)
108  {
109  if (nu > mu) --nu;
110  return mu + m_Ndim * nu;
111  }
112 
113  int size1()
114  {
115  return m_Ndim * (m_Ndim - 1);
116  }
117 
118  int size1b()
119  {
120  return m_Ndim * (m_Ndim - 1) * (m_Ndim - 2);
121  }
122 
123  int size2()
124  {
125  return m_Ndim * (m_Ndim - 1);
126  }
127 
128 #ifdef USE_FACTORY
129  private:
130  static ForceSmear *create_object(Projection *proj)
131  {
132  return new ForceSmear_HYP(proj);
133  }
134 
135  static ForceSmear *create_object_with_params(Projection *proj, const Parameters& params)
136  {
137  return new ForceSmear_HYP(proj, params);
138  }
139 
140  public:
141  static bool register_factory()
142  {
143  bool init = true;
144  init &= ForceSmear::Factory::Register("HYP", create_object);
145  init &= ForceSmear::Factory_params::Register("HYP", create_object_with_params);
146  return init;
147  }
148 #endif
149 };
150 #endif
ForceSmear_HYP::m_vl
Bridge::VerboseLevel m_vl
Definition: forceSmear_HYP.h:41
ForceSmear_HYP::force_udiv
void force_udiv(Field_G &Sigma, const Field_G &Sigma_p, const Field_G &U)
Definition: forceSmear_HYP.cpp:101
bridgeIO.h
ForceSmear_HYP::smear_step2
void smear_step2()
Definition: forceSmear_HYP.cpp:327
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
ForceSmear_HYP::m_Ndim
int m_Ndim
Definition: forceSmear_HYP.h:43
ForceSmear_HYP::m_iTheta2
std::vector< Field_G > m_iTheta2
Definition: forceSmear_HYP.h:49
ForceSmear_HYP::smear_step1
void smear_step1()
Definition: forceSmear_HYP.cpp:305
Parameters
Class for parameters.
Definition: parameters.h:46
ForceSmear_HYP::force_step1
void force_step1(Field_G &)
Definition: forceSmear_HYP.cpp:214
ForceSmear_HYP::m_iTheta3
std::vector< Field_G > m_iTheta3
Definition: forceSmear_HYP.h:49
shiftField_lex.h
ForceSmear_HYP::m_v1
std::vector< Field_G > m_v1
Definition: forceSmear_HYP.h:47
ForceSmear_HYP::force_step3
void force_step3(Field_G &, const Field_G &)
Definition: forceSmear_HYP.cpp:133
ForceSmear_HYP::idx2
int idx2(const int mu, int nu)
Definition: forceSmear_HYP.h:107
ForceSmear_HYP::ForceSmear_HYP
ForceSmear_HYP(Projection *proj, const Parameters &params)
Definition: forceSmear_HYP.h:59
ForceSmear_HYP::size2
int size2()
Definition: forceSmear_HYP.h:123
ForceSmear_HYP::m_Sigma3
std::vector< Field_G > m_Sigma3
Definition: forceSmear_HYP.h:48
ForceSmear_HYP::class_name
static const std::string class_name
Definition: forceSmear_HYP.h:38
ForceSmear_HYP::get_parameters
void get_parameters(Parameters &params) const
Definition: forceSmear_HYP.cpp:51
ForceSmear_HYP::m_Nvol
int m_Nvol
Definition: forceSmear_HYP.h:43
ForceSmear_HYP::m_alpha3
double m_alpha3
Definition: forceSmear_HYP.h:44
forceSmear.h
ForceSmear_HYP::set_parameters
void set_parameters(const Parameters &params)
Definition: forceSmear_HYP.cpp:25
ForceSmear_HYP
Recursive calculation of HYP smeared fermion force.
Definition: forceSmear_HYP.h:35
ForceSmear_HYP::m_v2
std::vector< Field_G > m_v2
Definition: forceSmear_HYP.h:47
ForceSmear_HYP::idx1
int idx1(const int mu, const int nu, const int rho)
Definition: forceSmear_HYP.h:91
ForceSmear_HYP::m_alpha1
double m_alpha1
Definition: forceSmear_HYP.h:44
ForceSmear_HYP::idx1b
int idx1b(const int mu, int nu, int rho)
Definition: forceSmear_HYP.h:99
ForceSmear_HYP::size1b
int size1b()
Definition: forceSmear_HYP.h:118
ForceSmear_HYP::force_step2
void force_step2(Field_G &)
Definition: forceSmear_HYP.cpp:172
ForceSmear_HYP::m_Sigma2
std::vector< Field_G > m_Sigma2
Definition: forceSmear_HYP.h:48
ShiftField_lex
Methods to shift a field in the lexical site index.
Definition: shiftField_lex.h:39
ForceSmear_HYP::init
void init()
Definition: forceSmear_HYP.cpp:81
ForceSmear_HYP::m_alpha2
double m_alpha2
Definition: forceSmear_HYP.h:44
ForceSmear_HYP::size1
int size1()
Definition: forceSmear_HYP.h:113
ForceSmear_HYP::ForceSmear_HYP
ForceSmear_HYP(Projection *proj)
Definition: forceSmear_HYP.h:53
Projection
base class for projection operator into gauge group.
Definition: projection.h:30
ForceSmear_HYP::m_iTheta1
std::vector< Field_G > m_iTheta1
Definition: forceSmear_HYP.h:49
ForceSmear_HYP::staple
void staple(Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
Definition: forceSmear_HYP.cpp:352
ForceSmear_HYP::m_U
std::vector< Field_G > m_U
Definition: forceSmear_HYP.h:46
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Field_G
SU(N) gauge field.
Definition: field_G.h:38
ForceSmear_HYP::m_proj
Projection * m_proj
Definition: forceSmear_HYP.h:45
ForceSmear
Base class for force calculation of smeared operators.
Definition: forceSmear.h:34
ForceSmear_HYP::m_shift
ShiftField_lex m_shift
Definition: forceSmear_HYP.h:50
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
ForceSmear_HYP::force_each
void force_each(Field_G &, const Field_G &, const Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
Definition: forceSmear_HYP.cpp:259