Bridge++
Ver. 2.0.2
aindex_eo-tmpl.h
Go to the documentation of this file.
1
11
//====================================================================
12
template
<
typename
REALTYPE>
13
void
AIndex_eo<REALTYPE, QXS>::init
()
14
{
15
Nx =
CommonParameters::Nx
();
16
Ny =
CommonParameters::Ny
();
17
Nz =
CommonParameters::Nz
();
18
Nt =
CommonParameters::Nt
();
19
Nvol =
CommonParameters::Nvol
();
20
Nx2 = Nx / 2;
21
Nvol2 = Nvol / 2;
22
m_vl =
CommonParameters::Vlevel
();
23
24
Nc =
CommonParameters::Nc
();
25
Nd =
CommonParameters::Nd
();
26
Ndf = 2 * Nc * Nc;
27
Nvcd = 2 * Nc * Nd;
28
29
if
((Nx % 2) != 0) {
30
vout
.
crucial
(m_vl,
"Index_eo_alt: Nx must be even.\n"
);
31
exit(EXIT_FAILURE);
32
}
33
34
if
((Nx2 %
VLENX
) != 0) {
35
vout
.
crucial
(m_vl,
"Index_eo_alt: Nx2 % VLENX must be 0.\n"
);
36
exit(EXIT_FAILURE);
37
}
38
39
if
((Ny %
VLENY
) != 0) {
40
vout
.
crucial
(m_vl,
"Index_eo_alt: Ny % VLENY must be 0.\n"
);
41
exit(EXIT_FAILURE);
42
}
43
44
Leo.resize(Ny * Nz * Nt);
45
for
(
int
it = 0; it < Nt; ++it) {
46
int
it2 =
Communicator::ipe
(3) * Nt + it;
47
for
(
int
iz = 0; iz < Nz; ++iz) {
48
int
iz2 =
Communicator::ipe
(2) * Nz + iz;
49
for
(
int
iy = 0; iy < Ny; ++iy) {
50
int
iy2 =
Communicator::ipe
(1) * Ny + iy;
51
Leo[iy + Ny * (iz + Nz * it)] = (iy2 + iz2 + it2) % 2;
52
}
53
}
54
}
55
}
56
57
58
//============================================================END=====
CommonParameters::Ny
static int Ny()
Definition:
commonParameters.h:106
CommonParameters::Nz
static int Nz()
Definition:
commonParameters.h:107
CommonParameters::Nvol
static int Nvol()
Definition:
commonParameters.h:109
CommonParameters::Nx
static int Nx()
Definition:
commonParameters.h:105
CommonParameters::Nc
static int Nc()
Definition:
commonParameters.h:115
CommonParameters::Nt
static int Nt()
Definition:
commonParameters.h:108
VLENY
#define VLENY
Definition:
bridgeQXS_Clover_coarse_double.cpp:14
CommonParameters::Nd
static int Nd()
Definition:
commonParameters.h:116
CommonParameters::Vlevel
static Bridge::VerboseLevel Vlevel()
Definition:
commonParameters.h:122
VLENX
#define VLENX
Definition:
bridgeQXS_Clover_coarse_double.cpp:13
Communicator::ipe
static int ipe(const int dir)
logical coordinate of current proc.
Definition:
communicator.cpp:105
Bridge::BridgeIO::crucial
void crucial(const char *format,...)
Definition:
bridgeIO.cpp:180
Bridge::vout
BridgeIO vout
Definition:
bridgeIO.cpp:512
AIndex_eo
Definition:
aindex_eo_base.h:17
src
lib_alt_QXS
Field
aindex_eo-tmpl.h
Generated on Sat Feb 10 2024 14:20:00 for Bridge++ by
1.8.17