Bridge++  Ver. 2.0.2
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_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:
43 
44  int m_Ndim, m_Nvol;
47  std::vector<Field_G> m_U;
48  std::vector<Field_G> m_v1, m_v2;
49  std::vector<Field_G> m_Sigma3, m_Sigma2;
50  std::vector<Field_G> m_iTheta3, m_iTheta2, m_iTheta1;
52 
53  std::vector<double> m_phi;
54  std::vector<double> m_phipr;
55 
58 
59  public:
61  : m_vl(CommonParameters::Vlevel()), m_proj(proj),
63  {
64  init();
65  }
66 
67  ForceSmear_HYP_SF(Projection *proj, const Parameters& params)
68  : m_vl(CommonParameters::Vlevel()), m_proj(proj),
70  {
71  init();
72  set_parameters(params);
73  }
74 
75  // ~ForceSmear_HYP_SF(){ };
76 
77  void set_parameters(const Parameters& params);
78  void set_parameters(const double alpha1, const double alpha2,
79  const double alpha3,
80  const std::vector<double>& phi,
81  const std::vector<double>& phipr);
82 
83  void get_parameters(Parameters& params) const;
84 
85  void force_udiv(Field_G& Sigma, const Field_G& Sigma_p, const Field_G& U);
86 
87  // old interface
88  //Field force_udiv(const Field_G& Sigma, const Field_G& U);
89 
90  private:
91  void init();
92 
93  void force_step3(Field_G&, const Field_G&);
94  void force_step2(Field_G&);
95  void force_step1(Field_G&);
96 
97  void force_each(Field_G&, const Field_G&, const Field_G&,
98  const Field_G&, const Field_G&, const int mu, const int nu);
99 
100  void smear_step1();
101  void smear_step2();
102 
103  void staple(Field_G&, const Field_G&, const Field_G&,
104  const int mu, const int nu);
105 
106  int idx1(const int mu, const int nu, const int rho)
107  {
108  int sig = 6 - mu - nu - rho;
109 
110  if (sig > mu) --sig;
111  return mu + m_Ndim * sig;
112  }
113 
114  int idx1b(const int mu, int nu, int rho)
115  {
116  if (nu > mu) --nu;
117  if (rho > mu) --rho;
118  if (rho > nu) --rho;
119  return mu + m_Ndim * (nu + (m_Ndim - 1) * rho);
120  }
121 
122  int idx2(const int mu, int nu)
123  {
124  if (nu > mu) --nu;
125  return mu + m_Ndim * nu;
126  }
127 
128  int size1()
129  {
130  return m_Ndim * (m_Ndim - 1);
131  }
132 
133  int size1b()
134  {
135  return m_Ndim * (m_Ndim - 1) * (m_Ndim - 2);
136  }
137 
138  int size2()
139  {
140  return m_Ndim * (m_Ndim - 1);
141  }
142 
143 #ifdef USE_FACTORY
144  private:
145  static ForceSmear *create_object(Projection *proj)
146  {
147  return new ForceSmear_HYP_SF(proj);
148  }
149 
150  static ForceSmear *create_object_with_params(Projection *proj, const Parameters& params)
151  {
152  return new ForceSmear_HYP_SF(proj, params);
153  }
154 
155  public:
156  static bool register_factory()
157  {
158  bool init = true;
159  init &= ForceSmear::Factory::Register("HYP_SF", create_object);
160  init &= ForceSmear::Factory_params::Register("HYP_SF", create_object_with_params);
161  return init;
162  }
163 #endif
164 };
165 #endif
ForceSmear_HYP_SF::m_wk
Mat_SU_N m_wk
SF boundary condition at t=0.
Definition: forceSmear_HYP_SF.h:56
bridgeIO.h
ForceSmear_HYP_SF::force_step1
void force_step1(Field_G &)
Definition: forceSmear_HYP_SF.cpp:319
ForceSmear_HYP_SF::ForceSmear_HYP_SF
ForceSmear_HYP_SF(Projection *proj, const Parameters &params)
Definition: forceSmear_HYP_SF.h:67
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
ForceSmear_HYP_SF::m_alpha3
double m_alpha3
HYP smearing parameters.
Definition: forceSmear_HYP_SF.h:45
Parameters
Class for parameters.
Definition: parameters.h:46
ForceSmear_HYP_SF::m_iTheta2
std::vector< Field_G > m_iTheta2
Definition: forceSmear_HYP_SF.h:50
ForceSmear_HYP_SF::set_parameters
void set_parameters(const Parameters &params)
Definition: forceSmear_HYP_SF.cpp:25
ForceSmear_HYP_SF::m_proj
Projection * m_proj
Definition: forceSmear_HYP_SF.h:46
shiftField_lex.h
ForceSmear_HYP_SF::m_phi
std::vector< double > m_phi
SF boundary condition at t=0.
Definition: forceSmear_HYP_SF.h:53
ForceSmear_HYP_SF::init
void init()
Definition: forceSmear_HYP_SF.cpp:135
ForceSmear_HYP_SF::m_alpha2
double m_alpha2
Definition: forceSmear_HYP_SF.h:45
ForceSmear_HYP_SF::idx1b
int idx1b(const int mu, int nu, int rho)
Definition: forceSmear_HYP_SF.h:114
ForceSmear_HYP_SF::m_wkpr
Mat_SU_N m_wkpr
SF boundary condition at t=Nt.
Definition: forceSmear_HYP_SF.h:57
ForceSmear_HYP_SF::idx1
int idx1(const int mu, const int nu, const int rho)
Definition: forceSmear_HYP_SF.h:106
ForceSmear_HYP_SF::class_name
static const std::string class_name
Definition: forceSmear_HYP_SF.h:39
forceSmear.h
ForceSmear_HYP_SF::size1
int size1()
Definition: forceSmear_HYP_SF.h:128
ForceSmear_HYP_SF::m_v2
std::vector< Field_G > m_v2
Definition: forceSmear_HYP_SF.h:48
ForceSmear_HYP_SF::size1b
int size1b()
Definition: forceSmear_HYP_SF.h:133
SU_N::Mat_SU_N
Definition: mat_SU_N.h:36
ForceSmear_HYP_SF::size2
int size2()
Definition: forceSmear_HYP_SF.h:138
ForceSmear_HYP_SF::m_Sigma3
std::vector< Field_G > m_Sigma3
Definition: forceSmear_HYP_SF.h:49
ForceSmear_HYP_SF::m_phipr
std::vector< double > m_phipr
SF boundary condition at t=Nt.
Definition: forceSmear_HYP_SF.h:54
field_SF.h
ForceSmear_HYP_SF::m_shift
ShiftField_lex m_shift
Definition: forceSmear_HYP_SF.h:51
ForceSmear_HYP_SF::force_step3
void force_step3(Field_G &, const Field_G &)
Definition: forceSmear_HYP_SF.cpp:213
ShiftField_lex
Methods to shift a field in the lexical site index.
Definition: shiftField_lex.h:39
ForceSmear_HYP_SF::m_Nvol
int m_Nvol
Definition: forceSmear_HYP_SF.h:44
ForceSmear_HYP_SF::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_SF.cpp:377
ForceSmear_HYP_SF::m_Ndim
int m_Ndim
Definition: forceSmear_HYP_SF.h:44
ForceSmear_HYP_SF::m_iTheta3
std::vector< Field_G > m_iTheta3
Definition: forceSmear_HYP_SF.h:50
ForceSmear_HYP_SF::m_v1
std::vector< Field_G > m_v1
Definition: forceSmear_HYP_SF.h:48
ForceSmear_HYP_SF::smear_step1
void smear_step1()
Definition: forceSmear_HYP_SF.cpp:433
ForceSmear_HYP_SF
Recursive calculation of HYP smeared fermion force with SF BC.
Definition: forceSmear_HYP_SF.h:36
ForceSmear_HYP_SF::m_Sigma2
std::vector< Field_G > m_Sigma2
Definition: forceSmear_HYP_SF.h:49
ForceSmear_HYP_SF::ForceSmear_HYP_SF
ForceSmear_HYP_SF(Projection *proj)
Definition: forceSmear_HYP_SF.h:60
Projection
base class for projection operator into gauge group.
Definition: projection.h:30
ForceSmear_HYP_SF::m_iTheta1
std::vector< Field_G > m_iTheta1
Definition: forceSmear_HYP_SF.h:50
ForceSmear_HYP_SF::idx2
int idx2(const int mu, int nu)
Definition: forceSmear_HYP_SF.h:122
ForceSmear_HYP_SF::get_parameters
void get_parameters(Parameters &params) const
Definition: forceSmear_HYP_SF.cpp:55
ForceSmear_HYP_SF::m_alpha1
double m_alpha1
Definition: forceSmear_HYP_SF.h:45
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Field_G
SU(N) gauge field.
Definition: field_G.h:38
ForceSmear_HYP_SF::m_vl
Bridge::VerboseLevel m_vl
Definition: forceSmear_HYP_SF.h:42
ForceSmear_HYP_SF::force_udiv
void force_udiv(Field_G &Sigma, const Field_G &Sigma_p, const Field_G &U)
Definition: forceSmear_HYP_SF.cpp:168
ForceSmear_HYP_SF::smear_step2
void smear_step2()
Definition: forceSmear_HYP_SF.cpp:456
ForceSmear
Base class for force calculation of smeared operators.
Definition: forceSmear.h:34
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
ForceSmear_HYP_SF::force_step2
void force_step2(Field_G &)
Definition: forceSmear_HYP_SF.cpp:264
ForceSmear_HYP_SF::m_U
std::vector< Field_G > m_U
Definition: forceSmear_HYP_SF.h:47
ForceSmear_HYP_SF::staple
void staple(Field_G &, const Field_G &, const Field_G &, const int mu, const int nu)
Definition: forceSmear_HYP_SF.cpp:482