Bridge++  Ver. 2.0.2
fopr_CloverTerm_eo_impl.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_CLOVERTERM_EO_IMPL_ORG_INCLUDED
15 #define FOPR_CLOVERTERM_EO_IMPL_ORG_INCLUDED
16 
17 #include "Fopr/fopr.h"
18 
19 #include "Field/index_eo.h"
20 #include "Field/field_F.h"
21 #include "Tools/gammaMatrix.h"
22 
23 #include "IO/bridgeIO.h"
24 using Bridge::vout;
25 
26 class ShiftField_eo;
27 class Staple_eo;
28 class Solver_CG;
29 
31 
63 namespace Org {
64  class Fopr_CloverTerm_eo : public Fopr
65  {
66  public:
67  static const std::string class_name;
68 
69  // This class returns D_ee = 1-f_ee or D_oo = 1-f_oo
70  private:
72 
73  double m_kappa;
74  double m_cSW;
75  std::vector<int> m_boundary;
76  std::string m_repr;
77  std::string m_mode;
78 
80  int m_Ndim;
81  int m_Nc, m_Nd, m_Ndm2;
82  int m_NinF;
83 
85  std::vector<GammaMatrix> m_GM, m_SG;
86 
87  void (Fopr_CloverTerm_eo::*m_mult)(Field&, const Field&);
88 
89  //Field_G *m_Ueo;
91 
96 
99 
102 
104  std::vector<Field_G> m_T2;
105 
106 
109 
112 
113  public:
114  DEPRECATED
115  Fopr_CloverTerm_eo(std::string repr) { init(repr); }
116 
117  Fopr_CloverTerm_eo(const Parameters& params) { init(params); }
118 
120 
121  void set_parameters(const Parameters& params);
122  void set_parameters(const double kappa, const double cSW,
123  const std::vector<int> bc);
124 
125  void get_parameters(Parameters& params) const;
126 
127  void set_config(Field *U);
128 
129  void set_mode(const std::string mode);
130 
131  std::string get_mode() const { return m_mode; }
132 
134  void mult(Field&, const Field&);
135 
136  void mult_dag(Field&, const Field&);
137 
138  void mult_isigma(Field_F&, const Field_F&,
139  const int mu, const int nu);
140 
142  void D(Field& v, const Field& f, const int ieo);
143 
145  void mult_csw_inv(Field&, const Field&, const int ieo);
146 
147  int field_nvol() { return m_Nvol2; }
148  int field_nin() { return 2 * m_Nc * m_Nd; }
149  int field_nex() { return 1; }
150 
152  double flop_count();
153 
154  private:
155 
156  void init(const std::string repr);
157 
158  void init(const Parameters& params);
159 
160  void setup();
161 
162  void tidyup();
163 
164  void set_config_omp(Field *U);
165 
166  void set_config_impl(Field *U);
167 
168  void solve_csw_inv();
169 
170  void set_csw();
171 
172  void mult_csw(Field_F&, const Field_F&, const int ieo);
173 
174  void set_fieldstrength(Field_G&, const int, const int);
175 
176  inline int sg_index(const int mu, const int nu)
177  { return mu * m_Ndim + nu; }
178  };
179 }
180 #endif /* FOPR_CLOVERTERM_EO_IMPL_ORG_INCLUDED */
Org::Fopr_CloverTerm_eo::m_staple
Staple_eo * m_staple
Definition: fopr_CloverTerm_eo_impl.h:93
bridgeIO.h
Org::Fopr_CloverTerm_eo::m_Cup
Field_G m_Cup
Definition: fopr_CloverTerm_eo_impl.h:111
Org::Fopr_CloverTerm_eo::m_T2
std::vector< Field_G > m_T2
m_T2 is used in Org-version.
Definition: fopr_CloverTerm_eo_impl.h:104
ShiftField_eo
Methods to shift the even-odd field.
Definition: shiftField_eo.h:49
Org::Fopr_CloverTerm_eo::m_kappa
double m_kappa
Definition: fopr_CloverTerm_eo_impl.h:73
field_F.h
AFopr< Field >
Org::Fopr_CloverTerm_eo::tidyup
void tidyup()
Definition: fopr_CloverTerm_eo_impl.cpp:166
Org::Fopr_CloverTerm_eo::field_nex
int field_nex()
returns the external degree of freedom of the fermion field.
Definition: fopr_CloverTerm_eo_impl.h:149
Org::Fopr_CloverTerm_eo::solve_csw_inv
void solve_csw_inv()
Definition: fopr_CloverTerm_eo_impl.cpp:482
Org::Fopr_CloverTerm_eo
Definition: fopr_CloverTerm_eo_impl.h:64
gammaMatrix.h
Parameters
Class for parameters.
Definition: parameters.h:46
Org::Fopr_CloverTerm_eo::flop_count
double flop_count()
returns number of floating point operations.
Definition: fopr_CloverTerm_eo_impl.cpp:568
Org::Fopr_CloverTerm_eo::m_T
Field_G m_T
m_T = 1 - kappa c_SW sigma F / 2
Definition: fopr_CloverTerm_eo_impl.h:101
Org::Fopr_CloverTerm_eo::set_fieldstrength
void set_fieldstrength(Field_G &, const int, const int)
Definition: fopr_CloverTerm_eo_impl.cpp:546
Org::Fopr_CloverTerm_eo::m_v1
Field_F m_v1
Definition: fopr_CloverTerm_eo_impl.h:108
Org::Fopr_CloverTerm_eo::m_Ueo
Field_G m_Ueo
Definition: fopr_CloverTerm_eo_impl.h:90
Org::Fopr_CloverTerm_eo::m_u1
Field_G m_u1
Definition: fopr_CloverTerm_eo_impl.h:111
Org::Fopr_CloverTerm_eo::~Fopr_CloverTerm_eo
~Fopr_CloverTerm_eo()
Definition: fopr_CloverTerm_eo_impl.h:119
Org::Fopr_CloverTerm_eo::m_GM
std::vector< GammaMatrix > m_GM
Gamma Matrix and Sigma_{mu,nu} = -i [Gamma_mu, Gamma_nu] /2.
Definition: fopr_CloverTerm_eo_impl.h:85
Org::Fopr_CloverTerm_eo::m_NinF
int m_NinF
Definition: fopr_CloverTerm_eo_impl.h:82
Org::Fopr_CloverTerm_eo::m_Umu
Field_G m_Umu
Definition: fopr_CloverTerm_eo_impl.h:111
Org::Fopr_CloverTerm_eo::m_u2
Field_G m_u2
working fields
Definition: fopr_CloverTerm_eo_impl.h:111
Org::Fopr_CloverTerm_eo::m_v2
Field_F m_v2
Definition: fopr_CloverTerm_eo_impl.h:108
Org::Fopr_CloverTerm_eo::get_parameters
void get_parameters(Parameters &params) const
gets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_CloverTerm_eo_impl.cpp:229
Index_eo
Even-odd site index.
Definition: index_eo.h:44
Org::Fopr_CloverTerm_eo::m_index_eo
Index_eo m_index_eo
Definition: fopr_CloverTerm_eo_impl.h:92
Org::Fopr_CloverTerm_eo::m_cSW
double m_cSW
Definition: fopr_CloverTerm_eo_impl.h:74
Org::Fopr_CloverTerm_eo::class_name
static const std::string class_name
Definition: fopr_CloverTerm_eo_impl.h:67
Org::Fopr_CloverTerm_eo::mult_isigma
void mult_isigma(Field_F &, const Field_F &, const int mu, const int nu)
Definition: fopr_CloverTerm_eo_impl.cpp:421
Org::Fopr_CloverTerm_eo::field_nin
int field_nin()
returns the on-site degree of freedom of the fermion field.
Definition: fopr_CloverTerm_eo_impl.h:148
Org::Fopr_CloverTerm_eo::D
void D(Field &v, const Field &f, const int ieo)
multiplies 1 - csw kappa sigma_{mu nu} F_{mu nu}
Definition: fopr_CloverTerm_eo_impl.cpp:322
Org::Fopr_CloverTerm_eo::m_Nvol2
int m_Nvol2
Definition: fopr_CloverTerm_eo_impl.h:79
Org::Fopr_CloverTerm_eo::set_config
void set_config(Field *U)
sets the gauge configuration.
Definition: fopr_CloverTerm_eo_impl.cpp:241
Org::Fopr_CloverTerm_eo::field_nvol
int field_nvol()
returns the volume of the fermion field.
Definition: fopr_CloverTerm_eo_impl.h:147
Org::Fopr_CloverTerm_eo::m_Ndm2
int m_Ndm2
Definition: fopr_CloverTerm_eo_impl.h:81
Org::Fopr_CloverTerm_eo::m_v3
Field_F m_v3
working vector (in D)
Definition: fopr_CloverTerm_eo_impl.h:108
Org::Fopr_CloverTerm_eo::m_Ft
Field_G m_Ft
Definition: fopr_CloverTerm_eo_impl.h:110
Org::Fopr_CloverTerm_eo::sg_index
int sg_index(const int mu, const int nu)
Definition: fopr_CloverTerm_eo_impl.h:176
Org::Fopr_CloverTerm_eo::mult_csw_inv
void mult_csw_inv(Field &, const Field &, const int ieo)
multiplies [1 - csw kappa sigma_{mu nu} F_{mu nu} ]^{-1}
Definition: fopr_CloverTerm_eo_impl.cpp:364
Org::Fopr_CloverTerm_eo::m_vl
Bridge::VerboseLevel m_vl
Definition: fopr_CloverTerm_eo_impl.h:71
Org::Fopr_CloverTerm_eo::m_repr
std::string m_repr
Definition: fopr_CloverTerm_eo_impl.h:76
Org::Fopr_CloverTerm_eo::mult_csw
void mult_csw(Field_F &, const Field_F &, const int ieo)
Org::Fopr_CloverTerm_eo::m_Nd
int m_Nd
Definition: fopr_CloverTerm_eo_impl.h:81
Org::Fopr_CloverTerm_eo::m_Ndim
int m_Ndim
Definition: fopr_CloverTerm_eo_impl.h:80
Org::Fopr_CloverTerm_eo::mult_dag
void mult_dag(Field &, const Field &)
hermitian conjugate of mult.
Definition: fopr_CloverTerm_eo_impl.cpp:307
Org::Fopr_CloverTerm_eo::set_parameters
void set_parameters(const Parameters &params)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_CloverTerm_eo_impl.cpp:175
Org::Fopr_CloverTerm_eo::set_config_impl
void set_config_impl(Field *U)
Definition: fopr_CloverTerm_eo_impl.cpp:270
Org::Fopr_CloverTerm_eo::mult
void mult(Field &, const Field &)
return D = D^dag = 1-f_ee or 1-f_oo
Definition: fopr_CloverTerm_eo_impl.cpp:292
Org::Fopr_CloverTerm_eo::m_mode
std::string m_mode
Definition: fopr_CloverTerm_eo_impl.h:77
Org
Clover term operator.
Definition: fopr_CloverTerm_eo_impl.cpp:23
Org::Fopr_CloverTerm_eo::m_w2
Field_F m_w2
working vector (in solve_csw_inv)
Definition: fopr_CloverTerm_eo_impl.h:107
Org::Fopr_CloverTerm_eo::m_boundary
std::vector< int > m_boundary
Definition: fopr_CloverTerm_eo_impl.h:75
Org::Fopr_CloverTerm_eo::m_Nc
int m_Nc
Definition: fopr_CloverTerm_eo_impl.h:81
Org::Fopr_CloverTerm_eo::m_shift_eo
ShiftField_eo * m_shift_eo
Definition: fopr_CloverTerm_eo_impl.h:94
fopr.h
Staple_eo
Staple construction.
Definition: staple_eo.h:33
Org::Fopr_CloverTerm_eo::get_mode
std::string get_mode() const
Definition: fopr_CloverTerm_eo_impl.h:131
Org::Fopr_CloverTerm_eo::init
void init(const std::string repr)
Definition: fopr_CloverTerm_eo_impl.cpp:62
Org::Fopr_CloverTerm_eo::m_mult
void(Fopr_CloverTerm_eo::* m_mult)(Field &, const Field &)
Definition: fopr_CloverTerm_eo_impl.h:87
Org::Fopr_CloverTerm_eo::m_Foo_inv
Field_F m_Foo_inv
Definition: fopr_CloverTerm_eo_impl.h:98
Org::Fopr_CloverTerm_eo::setup
void setup()
Definition: fopr_CloverTerm_eo_impl.cpp:83
Field_F
Wilson-type fermion field.
Definition: field_F.h:37
Org::Fopr_CloverTerm_eo::m_w1
Field_F m_w1
Definition: fopr_CloverTerm_eo_impl.h:107
index_eo.h
Org::Fopr_CloverTerm_eo::Fopr_CloverTerm_eo
DEPRECATED Fopr_CloverTerm_eo(std::string repr)
Definition: fopr_CloverTerm_eo_impl.h:115
Org::Fopr_CloverTerm_eo::set_mode
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
Definition: fopr_CloverTerm_eo_impl.cpp:280
Solver_CG
Standard Conjugate Gradient solver algorithm.
Definition: solver_CG.h:38
Org::Fopr_CloverTerm_eo::Fopr_CloverTerm_eo
Fopr_CloverTerm_eo(const Parameters &params)
Definition: fopr_CloverTerm_eo_impl.h:117
Field
Container of Field-type object.
Definition: field.h:46
Org::Fopr_CloverTerm_eo::set_config_omp
void set_config_omp(Field *U)
Definition: fopr_CloverTerm_eo_impl.cpp:258
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Org::Fopr_CloverTerm_eo::m_Fee_inv
Field_F m_Fee_inv
Definition: fopr_CloverTerm_eo_impl.h:97
Field_G
SU(N) gauge field.
Definition: field_G.h:38
Org::Fopr_CloverTerm_eo::m_Cdn
Field_G m_Cdn
Definition: fopr_CloverTerm_eo_impl.h:111
Org::Fopr_CloverTerm_eo::m_solver
Solver_CG * m_solver
Definition: fopr_CloverTerm_eo_impl.h:95
Org::Fopr_CloverTerm_eo::set_csw
void set_csw()
Definition: fopr_CloverTerm_eo_impl.cpp:434
DEPRECATED
#define DEPRECATED
Definition: configure.h:28
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Org::Fopr_CloverTerm_eo::m_Nvol
int m_Nvol
Definition: fopr_CloverTerm_eo_impl.h:79
Org::Fopr_CloverTerm_eo::m_SG
std::vector< GammaMatrix > m_SG
Definition: fopr_CloverTerm_eo_impl.h:85