21 const Field& w,
const int mu)
23 const int boundary_condition = 1;
26 up_x(&v, &w, boundary_condition);
28 up_y(&v, &w, boundary_condition);
30 up_z(&v, &w, boundary_condition);
32 up_t(&v, &w, boundary_condition);
42 const Field& w,
const int mu)
44 const int boundary_condition = 1;
47 dn_x(&v, &w, boundary_condition);
49 dn_y(&v, &w, boundary_condition);
51 dn_z(&v, &w, boundary_condition);
53 dn_t(&v, &w, boundary_condition);
63 const Field& w,
const int boundary_condition,
const int mu)
66 up_x(&v, &w, boundary_condition);
68 up_y(&v, &w, boundary_condition);
70 up_z(&v, &w, boundary_condition);
72 up_t(&v, &w, boundary_condition);
82 const Field& w,
const int boundary_condition,
const int mu)
85 dn_x(&v, &w, boundary_condition);
87 dn_y(&v, &w, boundary_condition);
89 dn_z(&v, &w, boundary_condition);
91 dn_t(&v, &w, boundary_condition);
101 const Field *w,
const int boundary_condition)
106 bc2 = boundary_condition;
111 const int Nin = w->
nin();
112 const int Nex = w->
nex();
113 const int Nvol = w->
nvol();
114 const int Nvol2 = Nvol /
m_Nx;
116 double *vp = v->
ptr(0);
117 const double *wp = w->
ptr(0);
119 std::vector<double> wt(Nin * Nvol2 * Nex);
120 std::vector<double> vt(Nin * Nvol2 * Nex);
124 for (
int x = 0; x <
m_Nx - 1; x++) {
125 int ix = x + m_Nx * s2;
127 for (
int ex = 0; ex < Nex; ex++) {
128 for (
int in = 0; in < Nin; in++) {
129 vp[in + Nin * (ix + Nvol * ex)] = wp[in + Nin * (px + Nvol * ex)];
137 for (
int ex = 0; ex < Nex; ex++) {
138 for (
int in = 0; in < Nin; in++) {
139 wt[in + Nin * (s2 + Nvol2 * ex)] = bc2 * wp[in + Nin * (px + Nvol * ex)];
144 const int size = Nin * Nvol2 * Nex;
150 int ix =
m_Nx - 1 + px;
151 for (
int in = 0; in < Nin; in++) {
152 for (
int ex = 0; ex < Nex; ex++) {
153 vp[in + Nin * (ix + Nvol * ex)] = vt[in + Nin * (s2 + Nvol2 * ex)];
162 const Field *w,
const int boundary_condition)
167 bc2 = boundary_condition;
172 const int Nin = w->
nin();
173 const int Nex = w->
nex();
174 const int Nvol = w->
nvol();
175 const int Nvol2 = Nvol /
m_Nx;
177 double *vp = v->
ptr(0);
178 const double *wp = w->
ptr(0);
180 std::vector<double> wt(Nin * Nvol2 * Nex);
181 std::vector<double> vt(Nin * Nvol2 * Nex);
185 for (
int x = 1; x <
m_Nx; x++) {
186 int ix = x + m_Nx * s2;
188 for (
int ex = 0; ex < Nex; ex++) {
189 for (
int in = 0; in < Nin; in++) {
190 vp[in + Nin * (ix + Nvol * ex)] = wp[in + Nin * (px + Nvol * ex)];
196 int px = m_Nx - 1 + m_Nx * s2;
197 for (
int ex = 0; ex < Nex; ex++) {
198 for (
int in = 0; in < Nin; in++) {
199 wt[in + Nin * (s2 + Nvol2 * ex)] = wp[in + Nin * (px + Nvol * ex)];
204 const int size = Nin * Nvol2 * Nex;
210 for (
int ex = 0; ex < Nex; ex++) {
211 for (
int in = 0; in < Nin; in++) {
212 vp[in + Nin * (ix + Nvol * ex)] = bc2 * vt[in + Nin * (s2 + Nvol2 * ex)];
221 const Field *w,
const int boundary_condition)
226 bc2 = boundary_condition;
231 const int Nin = w->
nin();
232 const int Nex = w->
nex();
233 const int Nvol = w->
nvol();
234 const int Nvol2 = Nvol /
m_Ny;
236 double *vp = v->
ptr(0);
237 const double *wp = w->
ptr(0);
239 std::vector<double> wt(Nin * Nvol2 * Nex);
240 std::vector<double> vt(Nin * Nvol2 * Nex);
242 for (
int zt = 0; zt <
m_Nz *
m_Nt; zt++) {
243 for (
int x = 0; x <
m_Nx; x++) {
244 int s1 = x + m_Nx *
m_Ny * zt;
245 int s2 = x + m_Nx * zt;
248 for (
int y = 0; y <
m_Ny - 1; y++) {
249 int ix = s1 + m_Nx * y;
251 for (
int ex = 0; ex < Nex; ex++) {
252 for (
int in = 0; in < Nin; in++) {
253 vp[in + Nin * (ix + Nvol * ex)] = wp[in + Nin * (px + Nvol * ex)];
260 for (
int ex = 0; ex < Nex; ex++) {
261 for (
int in = 0; in < Nin; in++) {
262 wt[in + Nin * (s2 + Nvol2 * ex)] = bc2 * wp[in + Nin * (px + Nvol * ex)];
268 const int size = Nin * Nvol2 * Nex;
271 for (
int zt = 0; zt <
m_Nz *
m_Nt; zt++) {
272 for (
int x = 0; x <
m_Nx; x++) {
273 int s1 = x + m_Nx *
m_Ny * zt;
274 int s2 = x + m_Nx * zt;
277 int ix = s1 + m_Nx * (
m_Ny - 1);
278 for (
int ex = 0; ex < Nex; ex++) {
279 for (
int in = 0; in < Nin; in++) {
280 vp[in + Nin * (ix + Nvol * ex)] = vt[in + Nin * (s2 + Nvol2 * ex)];
290 const Field *w,
const int boundary_condition)
295 bc2 = boundary_condition;
300 const int Nin = w->
nin();
301 const int Nex = w->
nex();
302 const int Nvol = w->
nvol();
303 const int Nvol2 = Nvol /
m_Ny;
305 double *vp = v->
ptr(0);
306 const double *wp = w->
ptr(0);
308 std::vector<double> wt(Nin * Nvol2 * Nex);
309 std::vector<double> vt(Nin * Nvol2 * Nex);
311 for (
int zt = 0; zt <
m_Nz *
m_Nt; zt++) {
312 for (
int x = 0; x <
m_Nx; x++) {
313 int s1 = x + m_Nx *
m_Ny * zt;
314 int s2 = x + m_Nx * zt;
317 for (
int y = 1; y <
m_Ny; y++) {
318 int ix = s1 + m_Nx * y;
320 for (
int ex = 0; ex < Nex; ex++) {
321 for (
int in = 0; in < Nin; in++) {
322 vp[in + Nin * (ix + Nvol * ex)] = wp[in + Nin * (px + Nvol * ex)];
328 int px = s1 + m_Nx * (m_Ny - 1);
329 for (
int ex = 0; ex < Nex; ex++) {
330 for (
int in = 0; in < Nin; in++) {
331 wt[in + Nin * (s2 + Nvol2 * ex)] = wp[in + Nin * (px + Nvol * ex)];
337 const int size = Nin * Nvol2 * Nex;
340 for (
int zt = 0; zt <
m_Nz *
m_Nt; zt++) {
341 for (
int x = 0; x <
m_Nx; x++) {
342 int s1 = x + m_Nx *
m_Ny * zt;
343 int s2 = x + m_Nx * zt;
347 for (
int ex = 0; ex < Nex; ex++) {
348 for (
int in = 0; in < Nin; in++) {
349 vp[in + Nin * (ix + Nvol * ex)] = bc2 * vt[in + Nin * (s2 + Nvol2 * ex)];
359 const Field *w,
const int boundary_condition)
364 bc2 = boundary_condition;
369 const int Nin = w->
nin();
370 const int Nex = w->
nex();
371 const int Nvol = w->
nvol();
372 const int Nvol2 = Nvol /
m_Nz;
374 double *vp = v->
ptr(0);
375 const double *wp = w->
ptr(0);
377 std::vector<double> wt(Nin * Nvol2 * Nex);
378 std::vector<double> vt(Nin * Nvol2 * Nex);
380 for (
int t = 0; t <
m_Nt; t++) {
381 for (
int xy = 0; xy <
m_Nx *
m_Ny; xy++) {
382 int s1 = xy +
m_Nx * m_Ny *
m_Nz * t;
383 int s2 = xy +
m_Nx * m_Ny * t;
386 for (
int z = 0; z <
m_Nz - 1; z++) {
387 int ix = s1 +
m_Nx * m_Ny * z;
389 for (
int ex = 0; ex < Nex; ex++) {
390 for (
int in = 0; in < Nin; in++) {
391 vp[in + Nin * (ix + Nvol * ex)] = wp[in + Nin * (px + Nvol * ex)];
398 for (
int ex = 0; ex < Nex; ex++) {
399 for (
int in = 0; in < Nin; in++) {
400 wt[in + Nin * (s2 + Nvol2 * ex)] = bc2 * wp[in + Nin * (px + Nvol * ex)];
406 const int size = Nin * (Nvol /
m_Nz) * Nex;
409 for (
int t = 0; t <
m_Nt; t++) {
410 for (
int xy = 0; xy <
m_Nx *
m_Ny; xy++) {
411 int s1 = xy +
m_Nx * m_Ny *
m_Nz * t;
412 int s2 = xy +
m_Nx * m_Ny * t;
415 int ix = s1 +
m_Nx * m_Ny * (
m_Nz - 1);
416 for (
int ex = 0; ex < Nex; ex++) {
417 for (
int in = 0; in < Nin; in++) {
418 vp[in + Nin * (ix + Nvol * ex)] = vt[in + Nin * (s2 + Nvol2 * ex)];
428 const Field *w,
const int boundary_condition)
433 bc2 = boundary_condition;
438 const int Nin = w->
nin();
439 const int Nex = w->
nex();
440 const int Nvol = w->
nvol();
441 const int Nvol2 = Nvol /
m_Nz;
443 double *vp = v->
ptr(0);
444 const double *wp = w->
ptr(0);
446 std::vector<double> wt(Nin * Nvol2 * Nex);
447 std::vector<double> vt(Nin * Nvol2 * Nex);
449 for (
int t = 0; t <
m_Nt; t++) {
450 for (
int xy = 0; xy <
m_Nx *
m_Ny; xy++) {
451 int s1 = xy +
m_Nx * m_Ny *
m_Nz * t;
452 int s2 = xy +
m_Nx * m_Ny * t;
455 for (
int z = 1; z <
m_Nz; z++) {
456 int ix = s1 +
m_Nx * m_Ny * z;
458 for (
int ex = 0; ex < Nex; ex++) {
459 for (
int in = 0; in < Nin; in++) {
460 vp[in + Nin * (ix + Nvol * ex)] = wp[in + Nin * (px + Nvol * ex)];
465 int px = s1 +
m_Nx * m_Ny * (m_Nz - 1);
466 for (
int in = 0; in < Nin; in++) {
467 for (
int ex = 0; ex < Nex; ex++) {
468 wt[in + Nin * (s2 + Nvol2 * ex)] = wp[in + Nin * (px + Nvol * ex)];
474 const int size = Nin * Nvol2 * Nex;
477 for (
int t = 0; t <
m_Nt; t++) {
478 for (
int xy = 0; xy <
m_Nx *
m_Ny; xy++) {
479 int s1 = xy +
m_Nx * m_Ny *
m_Nz * t;
480 int s2 = xy +
m_Nx * m_Ny * t;
484 for (
int in = 0; in < Nin; in++) {
485 for (
int ex = 0; ex < Nex; ex++) {
486 vp[in + Nin * (ix + Nvol * ex)] = bc2 * vt[in + Nin * (s2 + Nvol2 * ex)];
496 const Field *w,
const int boundary_condition)
501 bc2 = boundary_condition;
506 const int Nin = w->
nin();
507 const int Nex = w->
nex();
508 const int Nvol = w->
nvol();
509 const int Nvol2 = Nvol /
m_Nt;
511 double *vp = v->
ptr(0);
512 const double *wp = w->
ptr(0);
514 std::vector<double> wt(Nin * Nvol2 * Nex);
515 std::vector<double> vt(Nin * Nvol2 * Nex);
519 for (
int t = 0; t <
m_Nt - 1; t++) {
520 int ix = s2 +
m_Nx *
m_Ny * m_Nz * t;
522 for (
int ex = 0; ex < Nex; ex++) {
523 for (
int in = 0; in < Nin; in++) {
524 vp[in + Nin * (ix + Nvol * ex)] = wp[in + Nin * (px + Nvol * ex)];
531 for (
int ex = 0; ex < Nex; ex++) {
532 for (
int in = 0; in < Nin; in++) {
533 wt[in + Nin * (s2 + Nvol2 * ex)] = bc2 * wp[in + Nin * (px + Nvol * ex)];
538 const int size = Nin * Nvol2 * Nex;
544 for (
int ex = 0; ex < Nex; ex++) {
545 for (
int in = 0; in < Nin; in++) {
546 vp[in + Nin * (ix + Nvol * ex)] = vt[in + Nin * (s2 + Nvol2 * ex)];
555 const Field *w,
const int boundary_condition)
560 bc2 = boundary_condition;
565 const int Nin = w->
nin();
566 const int Nex = w->
nex();
567 const int Nvol = w->
nvol();
568 const int Nvol2 = Nvol /
m_Nt;
570 double *vp = v->
ptr(0);
571 const double *wp = w->
ptr(0);
573 std::vector<double> wt(Nin * Nvol2 * Nex);
574 std::vector<double> vt(Nin * Nvol2 * Nex);
578 for (
int t = 1; t <
m_Nt; t++) {
579 int ix = s2 +
m_Nx *
m_Ny * m_Nz * t;
581 for (
int ex = 0; ex < Nex; ex++) {
582 for (
int in = 0; in < Nin; in++) {
583 vp[in + Nin * (ix + Nvol * ex)] = wp[in + Nin * (px + Nvol * ex)];
588 int px = s2 +
m_Nx *
m_Ny * m_Nz * (m_Nt - 1);
589 for (
int ex = 0; ex < Nex; ex++) {
590 for (
int in = 0; in < Nin; in++) {
591 wt[in + Nin * (s2 + Nvol2 * ex)] = wp[in + Nin * (px + Nvol * ex)];
596 const int size = Nin * Nvol2 * Nex;
602 for (
int ex = 0; ex < Nex; ex++) {
603 for (
int in = 0; in < Nin; in++) {
604 vp[in + Nin * (ix + Nvol * ex)] = bc2 * vt[in + Nin * (s2 + Nvol2 * ex)];
Bridge::VerboseLevel m_vl
const double * ptr(const int jin, const int site, const int jex) const
static const std::string class_name
void up_x(Field *, const Field *, const int boundary_condition)
void up_z(Field *, const Field *, const int boundary_condition)
Container of Field-type object.
void dn_t(Field *, const Field *, const int boundary_condition)
static int ipe(const int dir)
logical coordinate of current proc.
static int exchange(int count, double *recv_buf, double *send_buf, int idir, int ipm, int tag)
receive array of double from upstream specified by idir and ipm, and send array to downstream...
void backward(Field &, const Field &, const int mu)
void crucial(const char *format,...)
void up_y(Field *, const Field *, const int boundary_condition)
void dn_z(Field *, const Field *, const int boundary_condition)
void up_t(Field *, const Field *, const int boundary_condition)
void dn_x(Field *, const Field *, const int boundary_condition)
void dn_y(Field *, const Field *, const int boundary_condition)
void forward(Field &, const Field &, const int mu)