1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-13 04:37:05 +01:00

Moving parameters outside of the HMCrunner

This commit is contained in:
Guido Cossu
2016-10-14 17:22:32 +01:00
parent 261342c15f
commit e250e6b7bb
4 changed files with 68 additions and 37 deletions

View File

@ -49,6 +49,8 @@ class HMCRunnerParameters : Serializable {
std::string, format,
std::string, conf_prefix,
std::string, rng_prefix,
double, rho,
int, SmearingLevels,
);
HMCRunnerParameters() {}
@ -115,11 +117,21 @@ class HmcRunner : public BinaryHmcRunner {
// Then force all checkpoint to have few common functions
// return an object that is then passed to the Run function
PlaquetteLogger<BinaryHmcRunner::ImplPolicy> PlaqLog(std::string("Plaquette"));
PlaquetteLogger<BinaryHmcRunner::ImplPolicy> PlaqLog(
std::string("Plaquette"));
ObservablesList.push_back(&PlaqLog);
ObservablesList.push_back(&Checkpoint);
Run(argc, argv, Checkpoint);
// Smearing section, omit if not needed
double rho = 0.1; // smearing parameter
int Nsmear = 2; // number of smearing levels
Smear_Stout<BinaryHmcRunner::ImplPolicy> Stout(rho);
SmearedConfiguration<BinaryHmcRunner::ImplPolicy> SmearingPolicy(
UGrid, Nsmear, Stout);
///////////////////
// Run(argc, argv, Checkpoint, SmearingPolicy);
Run(argc, argv, Checkpoint); // no smearing
};
};
}
@ -134,5 +146,12 @@ int main(int argc, char **argv) {
HmcRunner TheHMC;
// Seeds for the random number generators
std::vector<int> SerSeed({1, 2, 3, 4, 5});
std::vector<int> ParSeed({6, 7, 8, 9, 10});
TheHMC.RNGSeeds(SerSeed, ParSeed);
TheHMC.MDparameters.set(20, 1.0);// MDsteps, traj length
TheHMC.BuildTheAction(argc, argv);
}