16int main(
int argc,
char **argv) {
20 test_setup(argc, argv);
25 std::string
out = a.get(
"output");
28 Field<int> coordinate, nb_coordinate1, nb_coordinate2;
32 assert(matrices.
fs ==
nullptr);
37 element<CoordinateVector> l = X.coordinates();
38 coordinate[X] = l[dir];
39 nb_coordinate1[X] = (l[dir] + 1) % nd[dir];
42 nb_coordinate2[
ALL] = coordinate[X + dir];
45 element<int> diff = nb_coordinate1[X] - nb_coordinate2[X];
48 assert(isum == 0 &&
"Value gathered from neighbour is correct");
54 lattices[0]->n_gather_done = 0;
55 lattices[0]->n_gather_avoided = 0;
57 nb_coordinate2[
ALL] = coordinate[X - e_x];
58 assert(lattices[0]->n_gather_done == 1);
59 assert(lattices[0]->n_gather_avoided == 0);
60 nb_coordinate2[
ALL] = coordinate[X - e_x];
61 assert(lattices[0]->n_gather_done == 1);
62 assert(lattices[0]->n_gather_avoided == 1);
68 element<Matrix<2, 2, double>> a;
69 element<double> theta =
71 a.c[0][0] =
cos(theta);
72 a.c[0][1] = -
sin(theta);
73 a.c[1][0] =
sin(theta);
74 a.c[1][1] =
cos(theta);
77 assert(matrices.
fs !=
nullptr);
80 matrices[X - e_x].conjugate();
89 matrices[X] *= matrices[X].conjugate();
95 onsites(
ALL) { dsum += matrices[X].trace(); }
97 assert(((
int)dsum) == lattice.volume() * 2 &&
"Matrix conjugate multiplication");
Array< n, m, T > cos(Array< n, m, T > a)
Cosine.
Array< n, m, T > sin(Array< n, m, T > a)
Sine.
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
field_struct *__restrict__ fs
Field::fs holds all of the field content in Field::field_struct.
constexpr Parity EVEN
bit pattern: 001
#define foralldir(d)
Macro to loop over (all) Direction(s)
constexpr Parity ODD
bit pattern: 010
constexpr Parity ALL
bit pattern: 011
std::ostream out
this is our default output file stream
double random()
Real valued uniform random number generator.
void finishrun()
Normal, controlled exit - all nodes must call this. Prints timing information and information about c...