Bridge++  Ver. 2.0.2
fopr_Wilson_impl.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_WILSON_IMPL_ORG_INCLUDED
15 #define FOPR_WILSON_IMPL_ORG_INCLUDED
16 
17 #include "Fopr/fopr.h"
18 
19 #include "Field/field_F.h"
20 #include "Field/shiftField_lex.h"
21 #include "Tools/gammaMatrixSet.h"
22 
23 #include "IO/bridgeIO.h"
24 using Bridge::vout;
25 
27 
37 namespace Org {
38  class Fopr_Wilson : public Fopr
39  {
40  public:
41  static const std::string class_name;
42 
43  private:
44 
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 
56  const Field_G *m_U;
57 
58  std::vector<GammaMatrix> m_GM;
59 
61 
64 
65  public:
66 
68  Fopr_Wilson(const Parameters& params) { init(params); }
69 
71  Fopr_Wilson() { init("Dirac"); }
72 
74  Fopr_Wilson(const std::string repr) { init(repr); }
75 
77 
78  void set_parameters(const Parameters& params);
79 
80  void set_parameters(const double kappa, const std::vector<int> bc);
81 
82  void get_parameters(Parameters& params) const;
83 
84  void set_config(Field *U);
85 
86  void set_mode(const std::string mode);
87 
88  std::string get_mode() const { return m_mode; }
89 
90  void mult(Field& v, const Field& w);
91 
92  void mult_dag(Field& v, const Field& w);
93 
94  void mult(Field& v, const Field& w, const std::string mod);
95 
96  void mult_dag(Field& v, const Field& w, const std::string mode);
97 
98  void mult_gm5(Field& v, const Field& w);
99 
100  void mult_up(const int mu, Field& v, const Field& w);
101 
102  void mult_dn(const int mu, Field& v, const Field& w);
103 
104  void D(Field&, const Field&);
105 
106  void D_ex(Field& v, const int ex1, const Field& w, const int ex2);
107 
108  void Ddag(Field&, const Field&);
109 
110  void DdagD(Field&, const Field&);
111 
112  void DDdag(Field&, const Field&);
113 
114  void H(Field&, const Field&);
115 
116  void proj_chiral(Field& w, const int ex1, const Field& v,
117  const int ex2, const int ipm);
118 
119  void mult_gm5p(const int mu, Field& v, const Field& w);
120 
121  int field_nin() { return 2 * m_Nc * m_Nd; }
122  int field_nvol() { return m_Nvol; }
123  int field_nex() { return 1; }
124 
126  double flop_count();
127 
128  private:
129  //- prohibit copy
132 
134  void init(const Parameters& params);
135 
137  void init(std::string repr);
138 
140  void setup();
141 
143  void tidyup();
144 
145 
146 #ifdef USE_FACTORY
147  private:
148  static Fopr *create_object()
149  {
150  return new Fopr_Wilson();
151  }
152 
153  static Fopr *create_object_with_repr(const std::string& repr)
154  {
155  return new Fopr_Wilson(repr);
156  }
157 
158  static Fopr *create_object_with_params(const Parameters& params)
159  {
160  return new Fopr_Wilson(params);
161  }
162 
163  public:
164  static bool register_factory()
165  {
166  bool init = true;
167  init &= Fopr::Factory_noarg::Register("Wilson/Org", create_object);
168  init &= Fopr::Factory_string::Register("Wilson/Org", create_object_with_repr);
169  init &= Fopr::Factory_params::Register("Wilson/Org", create_object_with_params);
170  return init;
171  }
172 #endif
173  };
174 }
175 #endif /* FOPR_WILSON_IMPL_ORG_INCLUDED */
Org::Fopr_Wilson::m_v1
Field_F m_v1
Definition: fopr_Wilson_impl.h:63
Org::Fopr_Wilson::m_vl
Bridge::VerboseLevel m_vl
verbose level
Definition: fopr_Wilson_impl.h:49
bridgeIO.h
Org::Fopr_Wilson::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_Wilson_impl.cpp:200
Org::Fopr_Wilson::m_Nd
int m_Nd
Definition: fopr_Wilson_impl.h:54
field_F.h
Org::Fopr_Wilson::m_w1
Field m_w1
Definition: fopr_Wilson_impl.h:62
AFopr< Field >
Org::Fopr_Wilson::get_mode
std::string get_mode() const
Definition: fopr_Wilson_impl.h:88
Org::Fopr_Wilson::m_Nvol
int m_Nvol
Definition: fopr_Wilson_impl.h:54
Org::Fopr_Wilson::proj_chiral
void proj_chiral(Field &w, const int ex1, const Field &v, const int ex2, const int ipm)
Definition: fopr_Wilson_impl.cpp:387
Parameters
Class for parameters.
Definition: parameters.h:46
shiftField_lex.h
Org::Fopr_Wilson::init
void init(const Parameters &params)
standard initial setup.
Definition: fopr_Wilson_impl.cpp:26
Org::Fopr_Wilson::m_v2
Field_F m_v2
working fields with spinor structure
Definition: fopr_Wilson_impl.h:63
Org::Fopr_Wilson::Fopr_Wilson
DEPRECATED Fopr_Wilson(const std::string repr)
Definition: fopr_Wilson_impl.h:74
Org::Fopr_Wilson::mult_up
void mult_up(const int mu, Field &v, const Field &w)
upward nearest neighbor hopping term.
Definition: fopr_Wilson_impl.cpp:417
Org::Fopr_Wilson::Fopr_Wilson
DEPRECATED Fopr_Wilson()
Definition: fopr_Wilson_impl.h:71
Org::Fopr_Wilson::m_Nc
int m_Nc
Definition: fopr_Wilson_impl.h:54
Org::Fopr_Wilson::m_Ndim
int m_Ndim
Definition: fopr_Wilson_impl.h:54
Org::Fopr_Wilson::field_nex
int field_nex()
returns the external degree of freedom of the fermion field.
Definition: fopr_Wilson_impl.h:123
Org::Fopr_Wilson::get_parameters
void get_parameters(Parameters &params) const
gets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Wilson_impl.cpp:177
Org::Fopr_Wilson::setup
void setup()
common parts of setup.
Definition: fopr_Wilson_impl.cpp:84
Org::Fopr_Wilson::Fopr_Wilson
Fopr_Wilson(const Parameters &params)
standard constructor with input parameters.
Definition: fopr_Wilson_impl.h:68
Org::Fopr_Wilson::H
void H(Field &, const Field &)
Definition: fopr_Wilson_impl.cpp:325
Org::Fopr_Wilson::m_w2
Field m_w2
Definition: fopr_Wilson_impl.h:62
Org::Fopr_Wilson::Ddag
void Ddag(Field &, const Field &)
Definition: fopr_Wilson_impl.cpp:306
Org::Fopr_Wilson::set_parameters
void set_parameters(const Parameters &params)
sets parameters by a Parameter object: to be implemented in a subclass.
Definition: fopr_Wilson_impl.cpp:127
Org::Fopr_Wilson::mult_gm5p
void mult_gm5p(const int mu, Field &v, const Field &w)
Definition: fopr_Wilson_impl.cpp:406
Org::Fopr_Wilson::m_kappa
double m_kappa
hopping parameter
Definition: fopr_Wilson_impl.h:46
Org::Fopr_Wilson::mult_dag
void mult_dag(Field &v, const Field &w)
hermitian conjugate of mult.
Definition: fopr_Wilson_impl.cpp:231
Org::Fopr_Wilson::m_shift
ShiftField_lex * m_shift
Definition: fopr_Wilson_impl.h:60
Org::Fopr_Wilson::m_repr
std::string m_repr
Dirac matrix representation.
Definition: fopr_Wilson_impl.h:48
Org::Fopr_Wilson::tidyup
void tidyup()
final clean-up.
Definition: fopr_Wilson_impl.cpp:120
Org::Fopr_Wilson::mult
void mult(Field &v, const Field &w)
multiplies fermion operator to a given field.
Definition: fopr_Wilson_impl.cpp:210
Org::Fopr_Wilson::class_name
static const std::string class_name
Definition: fopr_Wilson_impl.h:41
Org
Clover term operator.
Definition: fopr_CloverTerm_eo_impl.cpp:23
Org::Fopr_Wilson::field_nvol
int field_nvol()
returns the volume of the fermion field.
Definition: fopr_Wilson_impl.h:122
Org::Fopr_Wilson::D_ex
void D_ex(Field &v, const int ex1, const Field &w, const int ex2)
Definition: fopr_Wilson_impl.cpp:349
ShiftField_lex
Methods to shift a field in the lexical site index.
Definition: shiftField_lex.h:39
Org::Fopr_Wilson::mult_gm5
void mult_gm5(Field &v, const Field &w)
multiplies gamma_5 matrix.
Definition: fopr_Wilson_impl.cpp:370
fopr.h
Org::Fopr_Wilson::m_U
const Field_G * m_U
pointer ot gauge configuration
Definition: fopr_Wilson_impl.h:56
Org::Fopr_Wilson::m_mode
std::string m_mode
matrix multiplcation mode
Definition: fopr_Wilson_impl.h:51
Org::Fopr_Wilson::mult_dn
void mult_dn(const int mu, Field &v, const Field &w)
downward nearest neighbor hopping term.
Definition: fopr_Wilson_impl.cpp:433
Org::Fopr_Wilson::m_boundary
std::vector< int > m_boundary
boundary condition
Definition: fopr_Wilson_impl.h:47
Org::Fopr_Wilson::set_config
void set_config(Field *U)
sets the gauge configuration.
Definition: fopr_Wilson_impl.cpp:188
Field_F
Wilson-type fermion field.
Definition: field_F.h:37
Org::Fopr_Wilson::~Fopr_Wilson
~Fopr_Wilson()
Definition: fopr_Wilson_impl.h:76
Org::Fopr_Wilson::D
void D(Field &, const Field &)
Definition: fopr_Wilson_impl.cpp:333
Org::Fopr_Wilson::m_w3
Field m_w3
working fields
Definition: fopr_Wilson_impl.h:62
Field
Container of Field-type object.
Definition: field.h:46
Org::Fopr_Wilson::DDdag
void DDdag(Field &, const Field &)
Definition: fopr_Wilson_impl.cpp:315
Org::Fopr_Wilson::m_GM
std::vector< GammaMatrix > m_GM
Definition: fopr_Wilson_impl.h:58
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Field_G
SU(N) gauge field.
Definition: field_G.h:38
Org::Fopr_Wilson
Definition: fopr_Wilson_impl.h:38
Org::Fopr_Wilson::DdagD
void DdagD(Field &, const Field &)
Definition: fopr_Wilson_impl.cpp:296
Org::Fopr_Wilson::operator=
Fopr_Wilson & operator=(const Fopr_Wilson &)
DEPRECATED
#define DEPRECATED
Definition: configure.h:28
Org::Fopr_Wilson::field_nin
int field_nin()
returns the on-site degree of freedom of the fermion field.
Definition: fopr_Wilson_impl.h:121
gammaMatrixSet.h
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Org::Fopr_Wilson::Fopr_Wilson
Fopr_Wilson(const Fopr_Wilson &)
Definition: fopr_Wilson_impl.h:130
Org::Fopr_Wilson::flop_count
double flop_count()
this returns the number of floating point operations.
Definition: fopr_Wilson_impl.cpp:449