33 if ((
m_Nx % 2) != 0) {
45 for (
int it = 0; it <
m_Nt; ++it) {
46 for (
int iz = 0; iz <
m_Nz; ++iz) {
47 for (
int iy = 0; iy <
m_Ny; ++iy) {
52 = (iy_global + iz_global + it_global) % 2;
89 const int mu,
const int ieo)
91 const int boundary_condition = 1;
94 up_xh(v, w, boundary_condition, ieo);
96 up_yh(v, w, boundary_condition, ieo);
98 up_zh(v, w, boundary_condition, ieo);
100 up_th(v, w, boundary_condition, ieo);
110 const int mu,
const int ieo)
112 const int boundary_condition = 1;
115 dn_xh(v, w, boundary_condition, ieo);
116 }
else if (mu == 1) {
117 dn_yh(v, w, boundary_condition, ieo);
118 }
else if (mu == 2) {
119 dn_zh(v, w, boundary_condition, ieo);
120 }
else if (mu == 3) {
121 dn_th(v, w, boundary_condition, ieo);
131 const int boundary_condition,
const int mu,
const int ieo)
134 up_xh(v, w, boundary_condition, ieo);
135 }
else if (mu == 1) {
136 up_yh(v, w, boundary_condition, ieo);
137 }
else if (mu == 2) {
138 up_zh(v, w, boundary_condition, ieo);
139 }
else if (mu == 3) {
140 up_th(v, w, boundary_condition, ieo);
150 const int boundary_condition,
const int mu,
const int ieo)
153 dn_xh(v, w, boundary_condition, ieo);
154 }
else if (mu == 1) {
155 dn_yh(v, w, boundary_condition, ieo);
156 }
else if (mu == 2) {
157 dn_zh(v, w, boundary_condition, ieo);
158 }
else if (mu == 3) {
159 dn_th(v, w, boundary_condition, ieo);
183 const int boundary_condition,
const int mu)
185 const int Nex = w.
nex();
191 for (
int ex = 0; ex < Nex; ++ex) {
208 const int Nin = w.
nin();
209 const int Nvol2 = w.
nvol() / 2;
211 Field field_e(Nin, Nvol2, Nex);
212 Field field_o(Nin, Nvol2, Nex);
214 Field field_se(Nin, Nvol2, Nex);
215 Field field_so(Nin, Nvol2, Nex);
219 backward_h(field_se, field_o, boundary_condition, mu, 0);
220 backward_h(field_so, field_e, boundary_condition, mu, 1);
229 const int boundary_condition,
const int mu)
231 const int Nex = w.
nex();
237 for (
int ex = 0; ex < Nex; ++ex) {
254 const int Nin = w.
nin();
255 const int Nvol2 = w.
nvol() / 2;
256 const int Nex = w.
nex();
260 Field wt_e(Nin, Nvol2, Nex);
261 Field wt_o(Nin, Nvol2, Nex);
263 Field vt_e(Nin, Nvol2, Nex);
264 Field vt_o(Nin, Nvol2, Nex);
278 const int bc,
const int ieo)
287 int ith, nth, is, ns;
288 set_threadtask(ith, nth, is, ns,
m_Nvol2);
302 wt =
new double[Nin * Nvbufx];
303 vt =
new double[Nin * Nvbufx];
312 for (
int ex = 0; ex < Nex; ++ex) {
316 for (
int site = is; site < ns; ++site) {
317 int ix2 = site %
m_Nx2;
318 int iyzt = site /
m_Nx2;
319 int keo = (ieo +
m_yzt_eo[iyzt]) % 2;
320 if ((ix2 == 0) && (keo == 1)) {
321 int iyzt2 = iyzt / 2;
322 for (
int in = 0; in < Nin; ++in) {
323 wt[in + Nin * iyzt2] = bc2 * wp[in + Nin * site];
332 int size = Nin * Nvbufx;
338 for (
int site = is; site < ns; ++site) {
339 int ix2 = site %
m_Nx2;
340 int iyzt = site /
m_Nx2;
341 int keo = (ieo +
m_yzt_eo[iyzt]) % 2;
342 int ix2n = ix2 + keo;
343 int nei = ix2n +
m_Nx2 * iyzt;
345 for (
int in = 0; in < Nin; ++in) {
346 vp[in + Nin * site] = wp[in + Nin * nei];
349 int iyzt2 = iyzt / 2;
350 for (
int in = 0; in < Nin; ++in) {
351 vp[in + Nin * site] = vt[in + Nin * iyzt2];
357 if ((
m_Nin == 0) && (ith == 0)) {
368 const int bc,
const int ieo)
377 int ith, nth, is, ns;
378 set_threadtask(ith, nth, is, ns,
m_Nvol2);
392 wt =
new double[Nin * Nvbufx];
393 vt =
new double[Nin * Nvbufx];
402 for (
int ex = 0; ex < Nex; ++ex) {
406 for (
int site = is; site < ns; ++site) {
407 int ix2 = site %
m_Nx2;
408 int iyzt = site /
m_Nx2;
409 int keo = (ieo +
m_yzt_eo[iyzt]) % 2;
410 if ((ix2 ==
m_Nx2 - 1) && (keo == 0)) {
411 int iyzt2 = iyzt / 2;
412 for (
int in = 0; in < Nin; ++in) {
413 wt[in + Nin * iyzt2] = wp[in + Nin * site];
422 int size = Nin * Nvbufx;
428 for (
int site = is; site < ns; ++site) {
429 int ix2 = site %
m_Nx2;
430 int iyzt = site /
m_Nx2;
431 int keo = (ieo +
m_yzt_eo[iyzt]) % 2;
432 int ix2n = ix2 - (1 - keo);
433 int nei = ix2n +
m_Nx2 * iyzt;
435 for (
int in = 0; in < Nin; ++in) {
436 vp[in + Nin * site] = wp[in + Nin * nei];
439 int iyzt2 = iyzt / 2;
440 for (
int in = 0; in < Nin; ++in) {
441 vp[in + Nin * site] = bc2 * vt[in + Nin * iyzt2];
447 if ((
m_Nin == 0) && (ith == 0)) {
458 const int bc,
const int ieo)
466 int ith, nth, is, ns;
467 set_threadtask(ith, nth, is, ns,
m_Nvol2);
491 for (
int ex = 0; ex < Nex; ++ex) {
495 for (
int site = is; site < ns; ++site) {
496 int ix2 = site %
m_Nx2;
497 int iyzt = site /
m_Nx2;
498 int iy = iyzt %
m_Ny;
499 int izt = iyzt /
m_Ny;
500 int ixzt = ix2 +
m_Nx2 * izt;
502 for (
int in = 0; in < Nin; ++in) {
503 wt[in + Nin * ixzt] = bc2 * wp[in + Nin * site];
518 for (
int site = is; site < ns; ++site) {
519 int ix2 = site %
m_Nx2;
520 int iyzt = site /
m_Nx2;
521 int iy = iyzt %
m_Ny;
522 int izt = iyzt /
m_Ny;
523 int ixzt = ix2 +
m_Nx2 * izt;
524 int nei = ix2 +
m_Nx2 * (iy + 1 +
m_Ny * izt);
527 for (
int in = 0; in < Nin; ++in) {
528 vp[in + Nin * site] = wp[in + Nin * nei];
531 for (
int in = 0; in < Nin; ++in) {
532 vp[in + Nin * site] = vt[in + Nin * ixzt];
538 if ((
m_Nin == 0) && (ith == 0)) {
549 const int bc,
const int ieo)
557 int ith, nth, is, ns;
558 set_threadtask(ith, nth, is, ns,
m_Nvol2);
582 for (
int ex = 0; ex < Nex; ++ex) {
586 for (
int site = is; site < ns; ++site) {
587 int ix2 = site %
m_Nx2;
588 int iyzt = site /
m_Nx2;
589 int iy = iyzt %
m_Ny;
590 int izt = iyzt /
m_Ny;
591 int ixzt = ix2 +
m_Nx2 * izt;
592 if (iy ==
m_Ny - 1) {
593 for (
int in = 0; in < Nin; ++in) {
594 wt[in + Nin * ixzt] = wp[in + Nin * site];
609 for (
int site = is; site < ns; ++site) {
610 int ix2 = site %
m_Nx2;
611 int iyzt = site /
m_Nx2;
612 int iy = iyzt %
m_Ny;
613 int izt = iyzt /
m_Ny;
614 int ixzt = ix2 +
m_Nx2 * izt;
615 int nei = ix2 +
m_Nx2 * (iy - 1 +
m_Ny * izt);
618 for (
int in = 0; in < Nin; ++in) {
619 vp[in + Nin * site] = wp[in + Nin * nei];
622 for (
int in = 0; in < Nin; ++in) {
623 vp[in + Nin * site] = bc2 * vt[in + Nin * ixzt];
629 if ((
m_Nin == 0) && (ith == 0)) {
640 const int bc,
const int ieo)
648 int ith, nth, is, ns;
649 set_threadtask(ith, nth, is, ns,
m_Nvol2);
675 for (
int ex = 0; ex < Nex; ++ex) {
679 for (
int site = is; site < ns; ++site) {
680 int ixy = site % Nxy;
681 int izt = site / Nxy;
684 int ixyt = ixy + Nxy * it;
686 for (
int in = 0; in < Nin; ++in) {
687 wt[in + Nin * ixyt] = bc2 * wp[in + Nin * site];
702 for (
int site = is; site < ns; ++site) {
703 int ixy = site % Nxy;
704 int izt = site / Nxy;
707 int ixyt = ixy + Nxy * it;
708 int nei = ixy + Nxy * (iz + 1 +
m_Nz * it);
711 for (
int in = 0; in < Nin; ++in) {
712 vp[in + Nin * site] = wp[in + Nin * nei];
715 for (
int in = 0; in < Nin; ++in) {
716 vp[in + Nin * site] = vt[in + Nin * ixyt];
722 if ((
m_Nin == 0) && (ith == 0)) {
733 const int bc,
const int ieo)
741 int ith, nth, is, ns;
742 set_threadtask(ith, nth, is, ns,
m_Nvol2);
768 for (
int ex = 0; ex < Nex; ++ex) {
772 for (
int site = is; site < ns; ++site) {
773 int ixy = site % Nxy;
774 int izt = site / Nxy;
777 int ixyt = ixy + Nxy * it;
778 if (iz ==
m_Nz - 1) {
779 for (
int in = 0; in < Nin; ++in) {
780 wt[in + Nin * ixyt] = wp[in + Nin * site];
795 for (
int site = is; site < ns; ++site) {
796 int ixy = site % Nxy;
797 int izt = site / Nxy;
800 int ixyt = ixy + Nxy * it;
801 int nei = ixy + Nxy * (iz - 1 +
m_Nz * it);
804 for (
int in = 0; in < Nin; ++in) {
805 vp[in + Nin * site] = wp[in + Nin * nei];
808 for (
int in = 0; in < Nin; ++in) {
809 vp[in + Nin * site] = bc2 * vt[in + Nin * ixyt];
815 if ((
m_Nin == 0) && (ith == 0)) {
826 const int bc,
const int ieo)
834 int ith, nth, is, ns;
835 set_threadtask(ith, nth, is, ns,
m_Nvol2);
861 for (
int ex = 0; ex < Nex; ++ex) {
865 for (
int site = is; site < ns; ++site) {
866 int ixyz = site % Nxyz;
867 int it = site / Nxyz;
869 for (
int in = 0; in < Nin; ++in) {
870 wt[in + Nin * ixyz] = bc2 * wp[in + Nin * site];
885 for (
int site = is; site < ns; ++site) {
886 int ixyz = site % Nxyz;
887 int it = site / Nxyz;
888 int nei = ixyz + Nxyz * (it + 1);
891 for (
int in = 0; in < Nin; ++in) {
892 vp[in + Nin * site] = wp[in + Nin * nei];
895 for (
int in = 0; in < Nin; ++in) {
896 vp[in + Nin * site] = vt[in + Nin * ixyz];
902 if ((
m_Nin == 0) && (ith == 0)) {
913 const int bc,
const int ieo)
921 int ith, nth, is, ns;
922 set_threadtask(ith, nth, is, ns,
m_Nvol2);
948 for (
int ex = 0; ex < Nex; ++ex) {
952 for (
int site = is; site < ns; ++site) {
953 int ixyz = site % Nxyz;
954 int it = site / Nxyz;
955 if (it ==
m_Nt - 1) {
956 for (
int in = 0; in < Nin; ++in) {
957 wt[in + Nin * ixyz] = wp[in + Nin * site];
972 for (
int site = is; site < ns; ++site) {
973 int ixyz = site % Nxyz;
974 int it = site / Nxyz;
975 int nei = ixyz + Nxyz * (it - 1);
978 for (
int in = 0; in < Nin; ++in) {
979 vp[in + Nin * site] = wp[in + Nin * nei];
982 for (
int in = 0; in < Nin; ++in) {
983 vp[in + Nin * site] = bc2 * vt[in + Nin * ixyz];
989 if ((
m_Nin == 0) && (ith == 0)) {