Bridge++  Ver. 1.3.x
fopr_Wilson_General_impl.h
Go to the documentation of this file.
1 
14 #ifndef FOPR_WILSON_GENERAL_IMPL_INCLUDED
15 #define FOPR_WILSON_GENERAL_IMPL_INCLUDED
16 
17 #include "fopr_Wilson_General.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 
37 {
38  public:
39  static const std::string class_name;
40 
41  private:
42  // lattice parameters
43  int m_Nvol;
44  int m_Ndim;
45  int m_Nc;
46  int m_Nd;
47 
48  double m_kappa_s, m_kappa_t;
49  double m_nu_s, m_r_s;
50  std::vector<int> m_boundary;
51 
52  std::string m_mode;
53  std::string m_repr;
54 
57 
58  const Field_G *m_U;
59 
60  std::vector<GammaMatrix> m_GM;
61 
64 
66 
67 
68  public:
70 
71  void init(std::string repr);
72 
73  void set_parameters(const double kappa_s, const double kappa_t,
74  const double nu_s, const double r_s);
75  void set_parameters(const double kappa_s, const double kappa_t,
76  const double nu_s, const double r_s,
77  const std::vector<int> bc);
78 
79  void set_config(Field *U)
80  { m_U = (Field_G *)U; }
81 
82  void set_mode(std::string mode);
83 
84  std::string get_mode() const;
85 
86  inline void mult(Field& v, const Field& f)
87  { (this->*m_mult)(v, f); }
88 
89  inline void mult_dag(Field& v, const Field& f)
90  { (this->*m_mult_dag)(v, f); }
91 
92  void mult_gm5(Field& v, const Field& f);
93 
94  void proj_chiral(Field& w, const int ex1, const Field& v, const int ex2, const int ipm);
95 
96  void D(Field& v, const Field& f);
97 
98  void D_ex(Field& v, const int ex1, const Field& f, const int ex2);
99 
100  inline void Ddag(Field& w, const Field& f)
101  {
102  Field w2(f.nin(), f.nvol(), f.nex());
103 
104  mult_gm5(w, f);
105  D(w2, w);
106  mult_gm5(w, w2);
107  }
108 
109  inline void DdagD(Field& w, const Field& f)
110  {
111  Field w2(f.nin(), f.nvol(), f.nex());
112 
113  D(w2, f);
114  mult_gm5(w, w2);
115  D(w2, w);
116  mult_gm5(w, w2);
117  }
118 
119  inline void DDdag(Field& w, const Field& f)
120  {
121  Field w2(f.nin(), f.nvol(), f.nex());
122 
123  mult_gm5(w2, f);
124  D(w, w2);
125  mult_gm5(w2, w);
126  D(w, w2);
127  }
128 
129  inline void H(Field& w, const Field& f)
130  {
131  Field w2(f.nin(), f.nvol(), f.nex());
132 
133  D(w2, f);
134  mult_gm5(w, w2);
135  }
136 
137  inline void mult_undef(Field&, const Field& f)
138  {
139  vout.crucial(m_vl, "%s: mode undefined.\n", class_name.c_str());
140  exit(EXIT_FAILURE);
141  }
142 
143  const Field_F mult_gm5p(int mu, const Field_F& w);
144 
145  void mult_gm5p(int mu, Field_F& v, const Field_F& w);
146 
147 // void gm5p(Field_F& v, const int mu, const Field_F& w);
148 
150  double flop_count();
151 
152  void mult_up(int mu, Field& w, const Field& f);
153  void mult_dn(int mu, Field& w, const Field& f);
154 
155  // inline void fprop_normalize(Field& v)
156  // { v *= (2.0 * m_kappa); }
157  //
158  // inline void fopr_normalize(Field& v)
159  // { v *= 1.0 / (2.0 * m_kappa); }
160 
161 
162  private:
163  //- prohibit copy
166 
167 // void mult_p (int mu, Field_F&, const Field_F&);
168 // void mult_m (int mu, Field_F&, const Field_F&);
169 };
170 #endif
BridgeIO vout
Definition: bridgeIO.cpp:278
void(Fopr_Wilson_General::Fopr_Wilson_General_impl::* m_mult)(Field &, const Field &)
std::vector< GammaMatrix > m_GM
gamma matrices.
Container of Field-type object.
Definition: field.h:39
int nvol() const
Definition: field.h:116
double m_nu_s
spatial anisotropy parameter.
void set_parameters(const double kappa_s, const double kappa_t, const double nu_s, const double r_s, const std::vector< int > bc)
Wilson-type fermion field.
Definition: field_F.h:37
int nin() const
Definition: field.h:115
const Field_F mult_gm5p(int mu, const Field_F &w)
SU(N) gauge field.
Definition: field_G.h:38
int nex() const
Definition: field.h:117
std::vector< int > m_boundary
boundary condition.
void crucial(const char *format,...)
Definition: bridgeIO.cpp:48
void(Fopr_Wilson_General::Fopr_Wilson_General_impl::* m_mult_dag)(Field &, const Field &)
void D_ex(Field &v, const int ex1, const Field &f, const int ex2)
VerboseLevel
Definition: bridgeIO.h:39
void proj_chiral(Field &w, const int ex1, const Field &v, const int ex2, const int ipm)
Methods to shift a field in the lexical site index.
Fopr_Wilson_General_impl(const Fopr_Wilson_General::Fopr_Wilson_General_impl &)
Fopr_Wilson_General_impl & operator=(const Fopr_Wilson_General::Fopr_Wilson_General_impl &)