12#include "gauge/stout_smear.h"
19#include "parameters.h"
20#include "checkpoint.h"
29 return (z + lattice.size(e_z)) % lattice.size(e_z);
39template <
typename group>
42 static bool first =
true;
53 auto plaq = U.
measure_plaq() / (lattice.volume() * NDIM * (NDIM - 1) / 2);
71template <
typename group>
94template <
typename group>
104 staples_timer.start();
107 staples_timer.stop();
114#ifdef SUN_OVERRELAX_dFJ
115 suN_overrelax_dFJ(U[d][X], staples[X], p.beta);
141template <
typename group>
144 for (
int n = 0; n < p.n_update; n++) {
145 for (
int i = 0; i < p.n_overrelax; i++) {
154int main(
int argc,
char **argv) {
177 lsize = par.get(
"lattice size");
179 p.beta = par.get(
"beta");
182 p.deltab = par.get(
"delta beta fraction");
184 p.n_overrelax = par.get(
"overrelax steps");
185 p.n_update = par.get(
"updates in trajectory");
186 p.n_trajectories = par.get(
"trajectories");
187 p.n_thermal = par.get(
"thermalization");
190 uint64_t seed = par.get(
"random seed");
192 p.n_save = par.get(
"traj/saved");
194 p.config_file = par.get(
"config name");
200 lattice.
setup(lsize);
208 int start_traj = -p.n_thermal;
213 restore_checkpoint(U, start_traj, p);
219 for (
int trajectory = start_traj; trajectory < p.n_trajectories; trajectory++) {
223 update_timer.start();
230 hila::synchronize_threads();
234 if (trajectory >= 0) {
235 measure_timer.start();
237 hila::out0 <<
"Measure_start " << trajectory <<
'\n';
241 hila::out0 <<
"Measure_end " << trajectory << std::endl;
243 measure_timer.stop();
246 if (p.n_save > 0 && (trajectory + 1) % p.n_save == 0) {
247 checkpoint(U, trajectory, p);
The field class implements the standard methods for accessing Fields. Hilapp replaces the parity acce...
void reunitarize_gauge()
Reunitarize Gauge Field consisting of matrices.
double measure_plaq() const
Computes Wilson action.
static constexpr int size()
Returns size of Vector or square Matrix.
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
#define foralldir(d)
Macro to loop over (all) Direction(s)
constexpr Parity ODD
bit pattern: 010
Direction
Enumerator for direction that assigns integer to direction to be interpreted as unit vector.
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...
bool is_rng_seeded()
Check if RNG is seeded already.
void finishrun()
Normal, controlled exit - all nodes must call this. Prints timing information and information about c...
Complex< double > measure_polyakov(const GaugeField< T > &U, Direction dir=Direction(NDIM - 1))
Measure Polyakov lines to direction dir.
void staplesum(const GaugeField< T > &U, Field< T > &staples, Direction d1, Parity par=ALL)
Sum the staples of link matrices to direction dir.
void update(GaugeField< group > &U, const parameters &p, bool relax)
Wrapper update function.
void update_parity_dir(GaugeField< group > &U, const parameters &p, Parity par, Direction d, bool relax)
Wrapper function to updated GaugeField per direction.
void do_trajectory(GaugeField< group > &U, const parameters &p)
Evolve gauge field.
int z_ind(int z)
Helper function to get valid z-coordinate index.
void measure_stuff(const GaugeField< group > &U, const parameters &p)
Measures Polyakov lines and Wilson action.
double suN_heatbath(SU< N, T > &U, const SU< N, T > &staple, double beta)
heatbath
void suN_overrelax(SU< N, T > &U, const SU< N, T > &staple)
Overrelaxation using SU(2) subgroups