12#include "gauge/stout_smear.h"
15#include "tools/checkpoint.h"
21#include "parameters.h"
30 return (z + lattice.size(e_z)) % lattice.size(e_z);
40template <
typename group>
43 static bool first =
true;
54 auto plaq = U.
measure_plaq() / (lattice.volume() * NDIM * (NDIM - 1) / 2);
72template <
typename group>
99template <
typename group>
109 staples_timer.start();
112 staples_timer.stop();
119#ifdef SUN_OVERRELAX_dFJ
120 suN_overrelax_dFJ(U[d][X], staples[X], p.beta);
146template <
typename group>
149 for (
int n = 0; n < p.n_update; n++) {
150 for (
int i = 0; i < p.n_overrelax; i++) {
159int main(
int argc,
char **argv) {
182 lsize = par.get(
"lattice size");
184 p.beta = par.get(
"beta");
187 p.deltab = par.get(
"delta beta fraction");
189 p.n_overrelax = par.get(
"overrelax steps");
190 p.n_update = par.get(
"updates in trajectory");
191 p.n_trajectories = par.get(
"trajectories");
192 p.n_thermal = par.get(
"thermalization");
195 uint64_t seed = par.get(
"random seed");
197 p.n_save = par.get(
"traj/saved");
199 p.config_file = par.get(
"config name");
205 lattice.
setup(lsize);
213 int start_traj = -p.n_thermal;
218 restore_checkpoint(U, p.config_file, p.n_trajectories, start_traj);
224 for (
int trajectory = start_traj; trajectory < p.n_trajectories; trajectory++) {
228 update_timer.start();
235 hila::synchronize_threads();
239 if (trajectory >= 0) {
240 measure_timer.start();
242 hila::out0 <<
"Measure_start " << trajectory <<
'\n';
246 hila::out0 <<
"Measure_end " << trajectory << std::endl;
248 measure_timer.stop();
251 if (p.n_save > 0 && (trajectory + 1) % p.n_save == 0) {
252 checkpoint(U, p.config_file, p.n_trajectories, trajectory);
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,...
Direction
Enumerator for direction that assigns integer to direction to be interpreted as unit vector.
auto shuffle_directions_and_parities()
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