Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fopr_Wilson_eo_impl.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_WILSON_EO_IMPL_ORG_INCLUDED
15 #define FOPR_WILSON_EO_IMPL_ORG_INCLUDED
16 
17 #include "Fopr/fopr_eo.h"
18 
19 #include "Field/shiftField_eo.h"
20 #include "Tools/gammaMatrixSet.h"
21 
22 #include "IO/bridgeIO.h"
23 using Bridge::vout;
24 
26 
36 namespace Org {
37  class Fopr_Wilson_eo : public Fopr_eo
38  {
39  public:
40  static const std::string class_name;
41 
42  private:
44  int m_Nc, m_Nd;
45  double m_kappa;
46  std::vector<int> m_boundary;
49 
53 
54  std::vector<GammaMatrix> m_GM;
55 
56  std::string m_mode;
57  std::string m_repr;
58 
59  public:
61  : m_Nvol(CommonParameters::Nvol()),
62  m_Nvol2(CommonParameters::Nvol() / 2),
63  m_Ndim(CommonParameters::Ndim()),
64  m_Nc(CommonParameters::Nc()),
65  m_Nd(CommonParameters::Nd()),
66  trf(m_Nvol2, 1), trf2(m_Nvol2, 1)
67  {
68  init("Dirac");
69  }
70 
71  Fopr_Wilson_eo(const std::string repr)
72  : m_Nvol(CommonParameters::Nvol()),
73  m_Nvol2(CommonParameters::Nvol() / 2),
74  m_Ndim(CommonParameters::Ndim()),
75  m_Nc(CommonParameters::Nc()),
76  m_Nd(CommonParameters::Nd()),
77  trf(m_Nvol2, 1), trf2(m_Nvol2, 1)
78  {
79  init(repr);
80  }
81 
83  {
84  delete m_Ueo;
85  }
86 
87  void set_parameters(const Parameters& params);
88  void set_parameters(const double kappa, const std::vector<int> bc);
89 
90  void set_config(Field *U);
91 
93  { return set_config(U.get()); }
94 
95  void set_mode(std::string mode);
96  std::string get_mode() const;
97 
98  // method for even odd fermion operator
99  void preProp(Field& Be, Field& bo, const Field& b)
100  { (this->*m_preProp)(Be, bo, b); }
101 
102  void postProp(Field& x, const Field& xe, const Field& bo)
103  { (this->*m_postProp)(x, xe, bo); }
104 
105  void prePropD(Field&, Field&, const Field&);
106  void postPropD(Field&, const Field&, const Field&);
107  void prePropDag(Field&, Field&, const Field&);
108  void postPropDag(Field&, const Field&, const Field&);
109 
110  void mult(Field& v, const Field& f)
111  { (this->*m_mult)(v, f); }
112 
113  void mult_dag(Field& v, const Field& f)
114  { (this->*m_mult_dag)(v, f); }
115 
116  void D(Field& v, const Field& f);
117  void Ddag(Field& v, const Field& f);
118  void DdagD(Field& v, const Field& f);
119  void DDdag(Field& v, const Field& f);
120  void H(Field& v, const Field& f);
121 
122  // ieo=0: even <-- odd
123  // ieo=1: odd <-- even
124 
125  void Meo(Field&, const Field&, const int ieo);
126  void Mdageo(Field&, const Field&, const int ieo);
127  void MeoMoe(Field& v, const Field& f);
128  void Meo_gm5(Field&, const Field&, const int ieo);
129 
130  void mult_gm5(Field&, const Field&);
131 
133  void gm5p(const int mu, Field&, const Field& v);
134 
135  int field_nvol() { return CommonParameters::Nvol() / 2; }
137  int field_nex() { return 1; }
138 
140  double flop_count();
141 
142  private:
143  void init(const std::string);
144 
145  void (Fopr_Wilson_eo::*m_mult)(Field&, const Field&);
146  void (Fopr_Wilson_eo::*m_mult_dag)(Field&, const Field&);
147  void (Fopr_Wilson_eo::*m_D)(Field&, const Field&);
148  void (Fopr_Wilson_eo::*m_gm5)(Field&, const Field&);
149  void (Fopr_Wilson_eo::*m_preProp)(Field&, Field&, const Field&);
150  void (Fopr_Wilson_eo::*m_postProp)(Field&, const Field&, const Field&);
151 
152  void mult_p(const int mu, Field_F&, const Field_F&, const int ieo);
153  void mult_m(const int mu, Field_F&, const Field_F&, const int ieo);
154 
155  /*
156  void mult_xp(Field_F&, const Field_F&, const int ieo);
157  void mult_xm(Field_F&, const Field_F&, const int ieo);
158  void mult_yp(Field_F&, const Field_F&, const int ieo);
159  void mult_ym(Field_F&, const Field_F&, const int ieo);
160  void mult_zp(Field_F&, const Field_F&, const int ieo);
161  void mult_zm(Field_F&, const Field_F&, const int ieo);
162  void mult_tp(Field_F&, const Field_F&, const int ieo);
163  void mult_tm(Field_F&, const Field_F&, const int ieo);
164  */
165 
166 #ifdef USE_FACTORY
167  private:
168  static Fopr *create_object()
169  {
170  return new Fopr_Wilson_eo();
171  }
172 
173  static Fopr *create_object_with_repr(const std::string& repr)
174  {
175  return new Fopr_Wilson_eo(repr);
176  }
177 
178  public:
179  static bool register_factory()
180  {
181  bool init1 = Fopr::Factory_noarg::Register("Wilson_eo/Org", create_object);
182  bool init2 = Fopr::Factory_string::Register("Wilson_eo/Org", create_object_with_repr);
183 
184  return init1 && init2;
185  }
186 #endif
187  };
188 }
189 #endif /* FOPR_WILSON_EO_IMPL_ORG_INCLUDED */
BridgeIO vout
Definition: bridgeIO.cpp:503
void mult_gm5(Field &, const Field &)
gamma_5 multiplication. [31 Mar 2017 H.Matsufuru]
static const std::string class_name
int field_nin()
returns the on-site d.o.f. for which the fermion operator is defined.
void set_config(unique_ptr< Field_G > &U)
Container of Field-type object.
Definition: field.h:45
void Meo_gm5(Field &, const Field &, const int ieo)
void(Fopr_Wilson_eo::* m_preProp)(Field &, Field &, const Field &)
void prePropDag(Field &, Field &, const Field &)
Fopr_Wilson_eo(const std::string repr)
void mult_m(const int mu, Field_F &, const Field_F &, const int ieo)
void H(Field &v, const Field &f)
Class for parameters.
Definition: parameters.h:46
Even-odd site index.
Definition: index_eo.h:40
int field_nvol()
returns the volume for which the fermion operator is defined.
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field (2nd argument)
double flop_count()
this returns the number of floating point operations of Meo.
void(Fopr_Wilson_eo::* m_mult)(Field &, const Field &)
Wilson-type fermion field.
Definition: field_F.h:37
void(Fopr_Wilson_eo::* m_postProp)(Field &, const Field &, const Field &)
void postProp(Field &x, const Field &xe, const Field &bo)
void(Fopr_Wilson_eo::* m_D)(Field &, const Field &)
SU(N) gauge field.
Definition: field_G.h:38
void postPropDag(Field &, const Field &, const Field &)
pointer get() const
Base class of fermion operator family.
Definition: fopr_eo.h:34
Common parameter class: provides parameters as singleton.
void DdagD(Field &v, const Field &f)
void mult_p(const int mu, Field_F &, const Field_F &, const int ieo)
Methods to shift the even-odd field.
Definition: shiftField_eo.h:45
void mult_dag(Field &v, const Field &f)
hermitian conjugate of mult(Field&, const Field&).
void init(const std::string)
std::string get_mode() const
only for Fopr_Overlap
int field_nex()
returns the external d.o.f. for which the fermion operator is defined.
void Ddag(Field &v, const Field &f)
void set_mode(std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
void set_config(Field *U)
setting pointer to the gauge configuration.
void(Fopr_Wilson_eo::* m_mult_dag)(Field &, const Field &)
void set_parameters(const Parameters &params)
void postPropD(Field &, const Field &, const Field &)
void DDdag(Field &v, const Field &f)
Base class of fermion operator family.
Definition: fopr.h:46
void prePropD(Field &, Field &, const Field &)
void MeoMoe(Field &v, const Field &f)
void gm5p(const int mu, Field &, const Field &v)
gamma_5 (1 - gamma_mu) v(x + mu)
void D(Field &v, const Field &f)
void preProp(Field &Be, Field &bo, const Field &b)
std::vector< int > m_boundary
void(Fopr_Wilson_eo::* m_gm5)(Field &, const Field &)
void Meo(Field &, const Field &, const int ieo)
void Mdageo(Field &, const Field &, const int ieo)
std::vector< GammaMatrix > m_GM