22 assert(field_eo.
nin() == field_lex.
nin());
23 assert(field_eo.
nex() == field_lex.
nex());
27 const int Nin = field_lex.
nin();
28 const int Nex = field_lex.
nex();
30 for (
int t = 0; t <
m_Nt; ++t) {
31 for (
int z = 0; z <
m_Nz; ++z) {
32 for (
int y = 0; y <
m_Ny; ++y) {
33 for (
int x = 0; x <
m_Nx; ++x) {
35 int ieo = (x + y + z + t +
m_node_eo) % 2;
36 for (
int ex = 0; ex < Nex; ex++) {
37 for (
int in = 0; in < Nin; in++) {
38 field_eo.
set(in,
site(x2, y, z, t, ieo), ex,
53 assert(field_eo.
nin() == field_lex.
nin());
54 assert(field_eo.
nex() == field_lex.
nex());
58 const int Nin = field_lex.
nin();
59 const int Nex = field_lex.
nex();
61 for (
int t = 0; t <
m_Nt; ++t) {
62 for (
int z = 0; z <
m_Nz; ++z) {
63 for (
int y = 0; y <
m_Ny; ++y) {
64 for (
int x2 = 0; x2 <
m_Nx2; ++x2) {
65 int x = 2 * x2 + ((y + z + t +
m_node_eo + ieo) % 2);
67 for (
int ex = 0; ex < Nex; ex++) {
68 for (
int in = 0; in < Nin; in++) {
69 field_eo.
set(in,
siteh(x2, y, z, t), ex,
84 assert(field_eo.
nin() == field_lex.
nin());
85 assert(field_eo.
nex() == field_lex.
nex());
89 const int Nin = field_lex.
nin();
90 const int Nex = field_lex.
nex();
92 for (
int t = 0; t <
m_Nt; ++t) {
93 for (
int z = 0; z <
m_Nz; ++z) {
94 for (
int y = 0; y <
m_Ny; ++y) {
95 for (
int x2 = 0; x2 <
m_Nx2; ++x2) {
96 int x = 2 * x2 + ((y + z + t +
m_node_eo + ieo) % 2);
98 for (
int ex = 0; ex < Nex; ex++) {
99 for (
int in = 0; in < Nin; in++) {
101 field_eo.
cmp(in,
siteh(x2, y, z, t), ex));
114 assert(field_eo.
nin() == field_lex.
nin());
115 assert(field_eo.
nex() == field_lex.
nex());
119 const int Nin = field_lex.
nin();
120 const int Nex = field_lex.
nex();
122 for (
int t = 0; t <
m_Nt; ++t) {
123 for (
int z = 0; z <
m_Nz; ++z) {
124 for (
int y = 0; y <
m_Ny; ++y) {
125 for (
int x = 0; x <
m_Nx; ++x) {
127 int ieo = (x + y + z + t +
m_node_eo) % 2;
129 for (
int ex = 0; ex < Nex; ex++) {
130 for (
int in = 0; in < Nin; in++) {
132 field_eo.
cmp(in,
site(x2, y, z, t, ieo), ex));
144 const Field& field_eo)
146 const int Nin = field_eo.
nin();
147 const int Nex = field_eo.
nex();
149 assert(field_e.
nin() == Nin);
150 assert(field_e.
nex() == Nex);
152 assert(field_o.
nin() == Nin);
153 assert(field_o.
nex() == Nex);
155 const int Nvol2 = field_eo.
nvol() / 2;
157 for (
int iex = 0; iex < Nex; ++iex) {
158 for (
int ivol = 0; ivol < Nvol2; ++ivol) {
159 for (
int iin = 0; iin < Nin; ++iin) {
160 field_e.
set(iin, ivol, iex,
161 field_eo.
cmp(iin, ivol, iex));
162 field_o.
set(iin, ivol, iex,
163 field_eo.
cmp(iin, ivol + Nvol2, iex));
174 const int Nin = field_eo.
nin();
175 const int Nex = field_eo.
nex();
177 assert(field_e.
nin() == Nin);
178 assert(field_e.
nex() == Nex);
180 assert(field_o.
nin() == Nin);
181 assert(field_o.
nex() == Nex);
183 const int Nvol2 = field_eo.
nvol() / 2;
185 for (
int iex = 0; iex < Nex; ++iex) {
186 for (
int ivol = 0; ivol < Nvol2; ++ivol) {
187 for (
int iin = 0; iin < Nin; ++iin) {
188 field_eo.
set(iin, ivol, iex,
189 field_e.
cmp(iin, ivol, iex));
190 field_eo.
set(iin, ivol + Nvol2, iex,
191 field_o.
cmp(iin, ivol, iex));
void set(const int jin, const int site, const int jex, double v)
int site(const int &x, const int &y, const int &z, const int &t) const
int siteh(const int x2, const int y, const int z, const int t) const
Container of Field-type object.
double cmp(const int jin, const int site, const int jex) const
int site(const int x2, const int y, const int z, const int t, const int ieo) const
void convertField(Field &eo, const Field &lex)
void mergeField(Field &eo, const Field &e, const Field &o)
void reverseField(Field &lex, const Field &eo)
void splitField(Field &e, Field &o, const Field &eo)