5int n_measurements = 100;
6int n_updates_per_measurement = 10;
12int main(
int argc,
char **argv) {
30 for (
int i = 0; i < n_measurements; i++) {
36 for (
int j = 0; j < 2 * n_updates_per_measurement; j++) {
42 deltaS = 2.0 * spin[X] *
43 (spin[X + e_x] + spin[X - e_x] + spin[X + e_y] + spin[X - e_y]);
50 hila::log <<
"Update " << j <<
" loop done\n";
56 onsites(
ALL) { M += spin[X]; }
58 hila::log <<
"Magnetisation " << M / VOLUME <<
"\n";
Array< n, m, T > exp(Array< n, m, T > a)
Exponential.
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
void setup(const CoordinateVector &siz)
General lattice setup.
void set_verbosity(int level)
Set logging level.
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
logger_class log
Now declare the logger.
double random()
Real valued uniform random number generator.
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...