Bridge++  Ver. 2.0.2
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 #include "Field/field_F.h"
19 #include "Field/shiftField_eo.h"
20 #include "Tools/gammaMatrixSet.h"
21 #include "IO/bridgeIO.h"
22 using Bridge::vout;
23 
25 
38 namespace Org {
39  class Fopr_Wilson_eo : public Fopr_eo
40  {
41  public:
42  static const std::string class_name;
43 
44  private:
45  //input parameters
46  double m_kappa;
47  std::vector<int> m_boundary;
48  std::string m_repr;
50 
51  std::string m_mode;
52 
53  // local variables
55  int m_Nc, m_Nd;
56 
58 
60 
61  std::vector<GammaMatrix> m_GM;
62 
64 
67 
70 
71  public:
72 
74  Fopr_Wilson_eo() { init("Dirac"); }
75 
77  Fopr_Wilson_eo(const std::string repr) { init(repr); }
78 
79  Fopr_Wilson_eo(const Parameters& params) { init(params); }
80 
82 
83  void set_parameters(const Parameters& params);
84  void set_parameters(const double kappa, const std::vector<int> bc);
85 
86  void get_parameters(Parameters& params) const;
87 
88  void set_config(Field *U);
89 
90  void set_mode(std::string mode);
91 
92  std::string get_mode() const { return m_mode; }
93 
94  void mult(Field&, const Field&);
95 
96  void mult_dag(Field&, const Field&);
97 
98  void mult(Field& v, const Field& w, const std::string mode);
99 
100  void mult_dag(Field& v, const Field& w, const std::string mode);
101 
102  void preProp(Field& Be, Field& bo, const Field& b);
103  void postProp(Field& x, const Field& xe, const Field& bo);
104 
105  void D(Field&, const Field&);
106  void Ddag(Field&, const Field&);
107  void DdagD(Field&, const Field&);
108  void DDdag(Field&, const Field&);
109  void H(Field&, const Field&);
110 
111  // ieo=0: even <-- odd
112  // ieo=1: odd <-- even
113 
114  void Meo(Field&, const Field&, const int ieo);
115  void Mdageo(Field&, const Field&, const int ieo);
116 
117  void mult_gm5(Field&, const Field&);
118 
120  void gm5p(const int mu, Field&, const Field& v);
121 
122  int field_nvol() { return m_Nvol2; }
123  int field_nin() { return 2 * m_Nc * m_Nd; }
124  int field_nex() { return 1; }
125 
127  double flop_count();
128 
129  private:
131  void init(const Parameters&);
132 
134  void init(const std::string);
135 
137  void setup();
138 
140  void tidyup();
141 
142  void mult_up(const int mu, Field_F&, const Field_F&, const int ieo);
143 
144  void mult_dn(const int mu, Field_F&, const Field_F&, const int ieo);
145 
146 #ifdef USE_FACTORY
147  private:
148  static Fopr *create_object()
149  {
150  return new Fopr_Wilson_eo();
151  }
152 
153  static Fopr *create_object_with_repr(const std::string& repr)
154  {
155  return new Fopr_Wilson_eo(repr);
156  }
157 
158  static Fopr *create_object_with_params(const Parameters& params)
159  {
160  return new Fopr_Wilson_eo(params);
161  }
162 
163  public:
164  static bool register_factory()
165  {
166  bool init = true;
167  init &= Fopr::Factory_noarg::Register("Wilson_eo/Org", create_object);
168  init &= Fopr::Factory_string::Register("Wilson_eo/Org",
169  create_object_with_repr);
170  init &= Fopr::Factory_params::Register("Wilson_eo/Org",
171  create_object_with_params);
172  return init;
173  }
174 #endif
175  };
176 }
177 #endif /* FOPR_WILSON_EO_IMPL_ORG_INCLUDED */
Org::Fopr_Wilson_eo::mult_dn
void mult_dn(const int mu, Field_F &, const Field_F &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:517
Org::Fopr_Wilson_eo::~Fopr_Wilson_eo
~Fopr_Wilson_eo()
Definition: fopr_Wilson_eo_impl.h:81
Org::Fopr_Wilson_eo::Fopr_Wilson_eo
DEPRECATED Fopr_Wilson_eo(const std::string repr)
Definition: fopr_Wilson_eo_impl.h:77
Org::Fopr_Wilson_eo::m_v3
Field_F m_v3
working field (used in DdagD, DDdag, H)
Definition: fopr_Wilson_eo_impl.h:66
bridgeIO.h
ShiftField_eo
Methods to shift the even-odd field.
Definition: shiftField_eo.h:49
field_F.h
AFopr< Field >
Org::Fopr_Wilson_eo::mult_dag
void mult_dag(Field &, const Field &)
hermitian conjugate of mult(Field&, const Field&).
Definition: fopr_Wilson_eo_impl.cpp:244
Org::Fopr_Wilson_eo::m_v2
Field_F m_v2
working field (used in D, Ddag)
Definition: fopr_Wilson_eo_impl.h:65
Org::Fopr_Wilson_eo::m_Nvol2
int m_Nvol2
Definition: fopr_Wilson_eo_impl.h:54
Parameters
Class for parameters.
Definition: parameters.h:46
AFopr_eo
Base class of fermion operator family.
Definition: afopr_eo.h:35
Org::Fopr_Wilson_eo::flop_count
double flop_count()
this returns the number of floating point operations of Meo.
Definition: fopr_Wilson_eo_impl.cpp:543
Org::Fopr_Wilson_eo::init
void init(const Parameters &)
initial setup (standard)
Definition: fopr_Wilson_eo_impl.cpp:28
Org::Fopr_Wilson_eo::postProp
void postProp(Field &x, const Field &xe, const Field &bo)
Definition: fopr_Wilson_eo_impl.cpp:339
Org::Fopr_Wilson_eo::DDdag
void DDdag(Field &, const Field &)
Definition: fopr_Wilson_eo_impl.cpp:378
Org::Fopr_Wilson_eo::class_name
static const std::string class_name
Definition: fopr_Wilson_eo_impl.h:42
Org::Fopr_Wilson_eo::m_boundary
std::vector< int > m_boundary
boundary condition
Definition: fopr_Wilson_eo_impl.h:47
Org::Fopr_Wilson_eo::m_Nd
int m_Nd
Definition: fopr_Wilson_eo_impl.h:55
Org::Fopr_Wilson_eo::m_GM
std::vector< GammaMatrix > m_GM
Definition: fopr_Wilson_eo_impl.h:61
Index_eo
Even-odd site index.
Definition: index_eo.h:44
Org::Fopr_Wilson_eo::field_nin
int field_nin()
returns the on-site d.o.f. for which the fermion operator is defined.
Definition: fopr_Wilson_eo_impl.h:123
Org::Fopr_Wilson_eo::m_repr
std::string m_repr
gamma matrix representation
Definition: fopr_Wilson_eo_impl.h:48
Org::Fopr_Wilson_eo::m_w1
Field_F m_w1
Definition: fopr_Wilson_eo_impl.h:69
Org::Fopr_Wilson_eo::Ddag
void Ddag(Field &, const Field &)
Definition: fopr_Wilson_eo_impl.cpp:394
Org::Fopr_Wilson_eo::m_t1
Field_F m_t1
Definition: fopr_Wilson_eo_impl.h:68
Org::Fopr_Wilson_eo::tidyup
void tidyup()
final clean-up
Definition: fopr_Wilson_eo_impl.cpp:129
shiftField_eo.h
Org::Fopr_Wilson_eo::DdagD
void DdagD(Field &, const Field &)
Definition: fopr_Wilson_eo_impl.cpp:370
fopr_eo.h
Org::Fopr_Wilson_eo::H
void H(Field &, const Field &)
Definition: fopr_Wilson_eo_impl.cpp:386
Org::Fopr_Wilson_eo::mult_up
void mult_up(const int mu, Field_F &, const Field_F &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:489
Org::Fopr_Wilson_eo::setup
void setup()
common setup in initialization.
Definition: fopr_Wilson_eo_impl.cpp:92
Org::Fopr_Wilson_eo::m_shift
ShiftField_eo * m_shift
even-odd field shifter
Definition: fopr_Wilson_eo_impl.h:59
Org::Fopr_Wilson_eo::Fopr_Wilson_eo
Fopr_Wilson_eo(const Parameters &params)
Definition: fopr_Wilson_eo_impl.h:79
Org::Fopr_Wilson_eo::field_nvol
int field_nvol()
returns the volume for which the fermion operator is defined.
Definition: fopr_Wilson_eo_impl.h:122
Org::Fopr_Wilson_eo::get_parameters
void get_parameters(Parameters &params) const
gets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Wilson_eo_impl.cpp:191
Org::Fopr_Wilson_eo::m_index
Index_eo m_index
Definition: fopr_Wilson_eo_impl.h:63
Org::Fopr_Wilson_eo::m_mode
std::string m_mode
multiplication mode
Definition: fopr_Wilson_eo_impl.h:51
Org::Fopr_Wilson_eo::m_t2
Field_F m_t2
working field (used in mult_up/dn)
Definition: fopr_Wilson_eo_impl.h:68
Org::Fopr_Wilson_eo
Definition: fopr_Wilson_eo_impl.h:39
Org
Clover term operator.
Definition: fopr_CloverTerm_eo_impl.cpp:23
Org::Fopr_Wilson_eo::m_Nvol
int m_Nvol
Definition: fopr_Wilson_eo_impl.h:54
Org::Fopr_Wilson_eo::m_kappa
double m_kappa
hopping parameter
Definition: fopr_Wilson_eo_impl.h:46
Org::Fopr_Wilson_eo::m_Ndim
int m_Ndim
Definition: fopr_Wilson_eo_impl.h:54
Org::Fopr_Wilson_eo::preProp
void preProp(Field &Be, Field &bo, const Field &b)
Definition: fopr_Wilson_eo_impl.cpp:308
Org::Fopr_Wilson_eo::m_vl
Bridge::VerboseLevel m_vl
verbose level
Definition: fopr_Wilson_eo_impl.h:49
Org::Fopr_Wilson_eo::D
void D(Field &, const Field &)
Definition: fopr_Wilson_eo_impl.cpp:414
Org::Fopr_Wilson_eo::set_parameters
void set_parameters(const Parameters &params)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Wilson_eo_impl.cpp:136
Org::Fopr_Wilson_eo::Fopr_Wilson_eo
DEPRECATED Fopr_Wilson_eo()
Definition: fopr_Wilson_eo_impl.h:74
Org::Fopr_Wilson_eo::get_mode
std::string get_mode() const
Definition: fopr_Wilson_eo_impl.h:92
Org::Fopr_Wilson_eo::Mdageo
void Mdageo(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:455
Org::Fopr_Wilson_eo::gm5p
void gm5p(const int mu, Field &, const Field &v)
gamma_5 (1 - gamma_mu) v(x + mu)
Definition: fopr_Wilson_eo_impl.cpp:480
Field_F
Wilson-type fermion field.
Definition: field_F.h:37
Org::Fopr_Wilson_eo::Meo
void Meo(Field &, const Field &, const int ieo)
Definition: fopr_Wilson_eo_impl.cpp:434
Field
Container of Field-type object.
Definition: field.h:46
Org::Fopr_Wilson_eo::m_v1
Field_F m_v1
Definition: fopr_Wilson_eo_impl.h:65
Org::Fopr_Wilson_eo::mult
void mult(Field &, const Field &)
multiplies fermion operator to a given field (2nd argument)
Definition: fopr_Wilson_eo_impl.cpp:225
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Field_G
SU(N) gauge field.
Definition: field_G.h:38
Org::Fopr_Wilson_eo::m_Nc
int m_Nc
Definition: fopr_Wilson_eo_impl.h:55
Org::Fopr_Wilson_eo::mult_gm5
void mult_gm5(Field &, const Field &)
multiplies gamma_5 matrix.
Definition: fopr_Wilson_eo_impl.cpp:295
Org::Fopr_Wilson_eo::set_mode
void set_mode(std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
Definition: fopr_Wilson_eo_impl.cpp:213
DEPRECATED
#define DEPRECATED
Definition: configure.h:28
Org::Fopr_Wilson_eo::set_config
void set_config(Field *U)
setting pointer to the gauge configuration.
Definition: fopr_Wilson_eo_impl.cpp:202
gammaMatrixSet.h
Org::Fopr_Wilson_eo::field_nex
int field_nex()
returns the external d.o.f. for which the fermion operator is defined.
Definition: fopr_Wilson_eo_impl.h:124
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Org::Fopr_Wilson_eo::m_Ueo
Field_G m_Ueo
even-odd configuration
Definition: fopr_Wilson_eo_impl.h:57
Org::Fopr_Wilson_eo::m_w2
Field_F m_w2
working field (used in Meo, Mdageo, mult_gm5)
Definition: fopr_Wilson_eo_impl.h:69