Bridge++  Ver. 1.2.x
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fopr_Wilson_impl.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_WILSON_IMPL_INCLUDED
15 #define FOPR_WILSON_IMPL_INCLUDED
16 
17 #include "fopr_Wilson.h"
18 
19 #include "gammaMatrixSet.h"
20 #include "shiftField_lex.h"
21 
22 #include "mat_SU_N.h"
23 
24 #include "bridgeIO.h"
25 using Bridge::vout;
26 
28 
44 {
45  public:
46  static const std::string class_name;
47 
48  public:
49 
51 
52  void init(std::string repr);
53 
54  void set_parameters(const double kappa);
55  void set_parameters(const double kappa, const std::valarray<int> bc);
56 
57  void set_config(Field *U)
58  { m_U = (Field_G *)U; }
59 
60  void set_mode(std::string mode);
61 
62  std::string get_mode() const;
63 
64  inline void mult(Field& v, const Field& f)
65  { (this->*m_mult)(v, f); }
66 
67  inline void mult_dag(Field& v, const Field& f)
68  { (this->*m_mult_dag)(v, f); }
69 
70  void mult_gm5(Field& v, const Field& f);
71 
72  void proj_chiral(Field& w, const int ex1, const Field& v, const int ex2, const int ipm);
73 
74  void D(Field& v, const Field& f);
75 
76  void D_ex(Field& v, const int ex1, const Field& f, const int ex2);
77 
78  inline void Ddag(Field& w, const Field& f)
79  {
80  Field w2(f.nin(), f.nvol(), f.nex());
81 
82  mult_gm5(w, f);
83  D(w2, w);
84  mult_gm5(w, w2);
85  }
86 
87  inline void DdagD(Field& w, const Field& f)
88  {
89  Field w2(f.nin(), f.nvol(), f.nex());
90 
91  D(w2, f);
92  mult_gm5(w, w2);
93  D(w2, w);
94  mult_gm5(w, w2);
95  }
96 
97  inline void DDdag(Field& w, const Field& f)
98  {
99  Field w2(f.nin(), f.nvol(), f.nex());
100 
101  mult_gm5(w2, f);
102  D(w, w2);
103  mult_gm5(w2, w);
104  D(w, w2);
105  }
106 
107  inline void H(Field& w, const Field& f)
108  {
109  Field w2(f.nin(), f.nvol(), f.nex());
110 
111  D(w2, f);
112  mult_gm5(w, w2);
113  }
114 
115  inline void mult_undef(Field&, const Field& f)
116  {
117  vout.crucial(m_vl, "%s: mode undefined.\n", class_name.c_str());
118  abort();
119  }
120 
121  const Field_F mult_gm5p(int mu, const Field_F& w);
122 
123  void mult_gm5p(int mu, Field_F& v, const Field_F& w);
124 
125 // void gm5p(Field_F& v, const int mu, const Field_F& w);
126 
128  double flop_count();
129 
130  void mult_up(int mu, Field& w, const Field& f);
131  void mult_dn(int mu, Field& w, const Field& f);
132 
133  inline void fprop_normalize(Field& v)
134  { v *= (2.0 * m_kappa); }
135 
136  inline void fopr_normalize(Field& v)
137  { v *= 1.0 / (2.0 * m_kappa); }
138 
139 
140  private:
141  //- prohibit copy
144 
145 
147 
148  // lattice parameters
149  int m_Nvol;
150  int m_Ndim;
151  int m_Nc;
152  int m_Nd;
153 
154  double m_kappa;
155  std::valarray<int> m_boundary;
156 
157  std::string m_mode;
158  std::string m_repr;
159 
160  void (Fopr_Wilson::Fopr_Wilson_impl::*m_mult)(Field &, const Field &);
162 
163  const Field_G *m_U;
164 
165  std::valarray<GammaMatrix> m_GM;
166 
169 
170 // void mult_p (int mu, Field_F&, const Field_F&);
171 // void mult_m (int mu, Field_F&, const Field_F&);
172 };
173 #endif
BridgeIO vout
Definition: bridgeIO.cpp:207
void set_parameters(const double kappa, const std::valarray< int > bc)
void proj_chiral(Field &w, const int ex1, const Field &v, const int ex2, const int ipm)
void mult_dag(Field &v, const Field &f)
Container of Field-type object.
Definition: field.h:37
void D_ex(Field &v, const int ex1, const Field &f, const int ex2)
void D(Field &v, const Field &f)
int nvol() const
Definition: field.h:101
void(Fopr_Wilson::Fopr_Wilson_impl::* m_mult_dag)(Field &, const Field &)
void H(Field &w, const Field &f)
Wilson-type fermion field.
Definition: field_F.h:37
void DdagD(Field &w, const Field &f)
int nin() const
Definition: field.h:100
const Field_G * m_U
gauge configuration.
SU(N) gauge field.
Definition: field_G.h:36
Fopr_Wilson_impl & operator=(const Fopr_Wilson::Fopr_Wilson_impl &)
void(Fopr_Wilson::Fopr_Wilson_impl::* m_mult)(Field &, const Field &)
void DDdag(Field &w, const Field &f)
Fopr_Wilson_impl(const Fopr_Wilson::Fopr_Wilson_impl &)
std::valarray< GammaMatrix > m_GM
gamma matrices.
double m_kappa
hopping parameter.
int nex() const
Definition: field.h:102
static const std::string class_name
const Field_F mult_gm5p(int mu, const Field_F &w)
void crucial(const char *format,...)
Definition: bridgeIO.cpp:26
void set_mode(std::string mode)
VerboseLevel
Definition: bridgeIO.h:25
Wilson fermion operator.
std::valarray< int > m_boundary
boundary condition.
void mult_up(int mu, Field &, const Field &)
void mult(Field &v, const Field &f)
void mult_gm5(Field &v, const Field &f)
void mult_undef(Field &, const Field &f)
Methods to shift a field in the lexical site index.
void mult_dn(int mu, Field &, const Field &)
void Ddag(Field &w, const Field &f)
void init(std::string repr)