Go to the documentation of this file.
10 #ifndef FOPR_WILSON_IMPL_COMMON_INC_INCLUDED
11 #define FOPR_WILSON_IMPL_COMMON_INC_INCLUDED
15 inline void mult_gamma5_dirac(
double *v,
const double *w,
const int Nc)
17 for (
int ivc = 0; ivc < 2 *
NC; ++ivc) {
18 v[ivc +
ID1] = w[ivc +
ID3];
19 v[ivc +
ID2] = w[ivc +
ID4];
20 v[ivc +
ID3] = w[ivc +
ID1];
21 v[ivc +
ID4] = w[ivc +
ID2];
26 inline void mult_gamma5_chiral(
double *v,
const double *w,
const int Nc)
28 for (
int ivc = 0; ivc < 2 *
NC; ++ivc) {
29 v[ivc +
ID1] = w[ivc +
ID1];
30 v[ivc +
ID2] = w[ivc +
ID2];
31 v[ivc +
ID3] = -w[ivc +
ID3];
32 v[ivc +
ID4] = -w[ivc +
ID4];
37 inline void set_sp2_xp(
double *vt1,
double *vt2,
38 const double *w,
const int Nc)
40 for (
int ic = 0; ic <
NC; ++ic) {
43 vt1[icr] = w[icr +
ID1] - w[ici +
ID4];
44 vt1[ici] = w[ici +
ID1] + w[icr +
ID4];
45 vt2[icr] = w[icr +
ID2] - w[ici +
ID3];
46 vt2[ici] = w[ici +
ID2] + w[icr +
ID3];
51 inline void set_sp4_xp(
double *v,
double w1r,
double w1i,
52 double w2r,
double w2i,
const int Nc)
65 inline void set_sp2_xm(
double *vt1,
double *vt2,
66 const double *w,
const int Nc)
68 for (
int ic = 0; ic <
NC; ++ic) {
71 vt1[icr] = w[icr +
ID1] + w[ici +
ID4];
72 vt1[ici] = w[ici +
ID1] - w[icr +
ID4];
73 vt2[icr] = w[icr +
ID2] + w[ici +
ID3];
74 vt2[ici] = w[ici +
ID2] - w[icr +
ID3];
79 inline void set_sp4_xm(
double *v,
double w1r,
double w1i,
80 double w2r,
double w2i,
const int Nc)
93 inline void set_sp2_yp(
double *vt1,
double *vt2,
94 const double *w,
const int Nc)
96 for (
int ic = 0; ic <
NC; ++ic) {
99 vt1[icr] = w[icr +
ID1] + w[icr +
ID4];
100 vt1[ici] = w[ici +
ID1] + w[ici +
ID4];
101 vt2[icr] = w[icr +
ID2] - w[icr +
ID3];
102 vt2[ici] = w[ici +
ID2] - w[ici +
ID3];
107 inline void set_sp4_yp(
double *v,
double w1r,
double w1i,
108 double w2r,
double w2i,
const int Nc)
121 inline void set_sp2_ym(
double *vt1,
double *vt2,
122 const double *w,
const int Nc)
124 for (
int ic = 0; ic <
NC; ++ic) {
126 int ici = 2 * ic + 1;
127 vt1[icr] = w[icr +
ID1] - w[icr +
ID4];
128 vt1[ici] = w[ici +
ID1] - w[ici +
ID4];
129 vt2[icr] = w[icr +
ID2] + w[icr +
ID3];
130 vt2[ici] = w[ici +
ID2] + w[ici +
ID3];
135 inline void set_sp4_ym(
double *v,
double w1r,
double w1i,
136 double w2r,
double w2i,
const int Nc)
149 inline void set_sp2_zp(
double *vt1,
double *vt2,
150 const double *w,
const int Nc)
152 for (
int ic = 0; ic <
NC; ++ic) {
154 int ici = 2 * ic + 1;
155 vt1[icr] = w[icr +
ID1] - w[ici +
ID3];
156 vt1[ici] = w[ici +
ID1] + w[icr +
ID3];
157 vt2[icr] = w[icr +
ID2] + w[ici +
ID4];
158 vt2[ici] = w[ici +
ID2] - w[icr +
ID4];
163 inline void set_sp4_zp(
double *v,
double w1r,
double w1i,
164 double w2r,
double w2i,
const int Nc)
177 inline void set_sp2_zm(
double *vt1,
double *vt2,
178 const double *w,
const int Nc)
180 for (
int ic = 0; ic <
NC; ++ic) {
182 int ici = 2 * ic + 1;
183 vt1[icr] = w[icr +
ID1] + w[ici +
ID3];
184 vt1[ici] = w[ici +
ID1] - w[icr +
ID3];
185 vt2[icr] = w[icr +
ID2] - w[ici +
ID4];
186 vt2[ici] = w[ici +
ID2] + w[icr +
ID4];
191 inline void set_sp4_zm(
double *v,
double w1r,
double w1i,
192 double w2r,
double w2i,
const int Nc)
205 inline void set_sp2_tp_dirac(
double *vt1,
double *vt2,
206 const double *w,
const int Nc)
208 for (
int ic = 0; ic <
NC; ++ic) {
210 int ici = 2 * ic + 1;
211 vt1[icr] = 2.0 * w[icr +
ID3];
212 vt1[ici] = 2.0 * w[ici +
ID3];
213 vt2[icr] = 2.0 * w[icr +
ID4];
214 vt2[ici] = 2.0 * w[ici +
ID4];
219 inline void set_sp4_tp_dirac(
double *v,
220 double w1r,
double w1i,
221 double w2r,
double w2i,
const int Nc)
230 inline void set_sp2_tm_dirac(
double *vt1,
double *vt2,
231 const double *w,
const int Nc)
233 for (
int ic = 0; ic <
NC; ++ic) {
235 int ici = 2 * ic + 1;
236 vt1[icr] = 2.0 * w[icr +
ID1];
237 vt1[ici] = 2.0 * w[ici +
ID1];
238 vt2[icr] = 2.0 * w[icr +
ID2];
239 vt2[ici] = 2.0 * w[ici +
ID2];
244 inline void set_sp4_tm_dirac(
double *v,
245 double w1r,
double w1i,
246 double w2r,
double w2i,
const int Nc)
255 inline void set_sp2_tp_chiral(
double *vt1,
double *vt2,
256 const double *w,
const int Nc)
258 for (
int ic = 0; ic <
NC; ++ic) {
260 int ici = 2 * ic + 1;
261 vt1[icr] = w[icr +
ID1] + w[icr +
ID3];
262 vt1[ici] = w[ici +
ID1] + w[ici +
ID3];
263 vt2[icr] = w[icr +
ID2] + w[icr +
ID4];
264 vt2[ici] = w[ici +
ID2] + w[ici +
ID4];
269 inline void set_sp4_tp_chiral(
double *v,
270 double w1r,
double w1i,
271 double w2r,
double w2i,
const int Nc)
284 inline void set_sp2_tm_chiral(
double *vt1,
double *vt2,
285 const double *w,
const int Nc)
287 for (
int ic = 0; ic <
NC; ++ic) {
289 int ici = 2 * ic + 1;
290 vt1[icr] = w[icr +
ID1] - w[icr +
ID3];
291 vt1[ici] = w[ici +
ID1] - w[ici +
ID3];
292 vt2[icr] = w[icr +
ID2] - w[icr +
ID4];
293 vt2[ici] = w[ici +
ID2] - w[ici +
ID4];
298 inline void set_sp4_tm_chiral(
double *v,
299 double w1r,
double w1i,
300 double w2r,
double w2i,
const int Nc)