13int n_measurements = 100;
14int n_updates_per_measurement = 10;
17int VOLUME = nd[0] * nd[1];
19int main(
int argc,
char **argv) {
33 for (
int i = 0; i < n_measurements; i++) {
38 for (
int j = 0; j < 2 * n_updates_per_measurement; j++) {
41 double tspin = spin[X];
42 double tnspin = tspin + M_PI * (1. - 2. *
hila::random());
43 deltaS =
cos(spin[X + e_x] - tspin) +
cos(spin[X - e_x] - tspin) +
44 cos(spin[X + e_y] - tspin) +
cos(spin[X - e_y] - tspin);
45 deltaS -=
cos(spin[X + e_x] - tnspin) +
cos(spin[X - e_x] - tnspin) +
46 cos(spin[X + e_y] - tnspin) +
cos(spin[X - e_y] - tnspin);
51 }
else if (tnspin > M_PI) {
64 onsites(
ALL) { M +=
cos(spin[X]); }
65 hila::out0 <<
"Magnetisation " << M / VOLUME <<
"\n";
Array< n, m, T > exp(Array< n, m, T > a)
Exponential.
Array< n, m, T > cos(Array< n, m, T > a)
Cosine.
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
void setup(const CoordinateVector &siz)
General lattice setup.
Parity
Parity enum with values EVEN, ODD, ALL; refers to parity of the site. Parity of site (x,...
constexpr Parity EVEN
bit pattern: 001
constexpr Parity ALL
bit pattern: 011
This files containts definitions for the Field class and the classes required to define it such as fi...
double random()
Real valued uniform random number generator.
std::ostream out0
This writes output only from main process (node 0)
void initialize(int argc, char **argv)
Read in command line arguments. Initialise default stream and MPI communication.
void seed_random(uint64_t seed, bool device_rng=true)
Seed random generators with 64-bit unsigned value. On MPI shuffles the seed so that different MPI ran...
void finishrun()
Normal, controlled exit - all nodes must call this. Prints timing information and information about c...