30#ifndef GRID_GENERIC_HMC_RUNNER
31#define GRID_GENERIC_HMC_RUNNER
33#include <unordered_map>
38template <
class ReaderClass >
41 virtual void Run() = 0;
45template <
class Implementation,
46 template <
typename,
typename,
typename>
class Integrator,
47 class RepresentationsPolicy =
NoHirep,
class ReaderClass = XmlReader>
52 template <
typename S = NoSmearing<Implementation> >
69 std::cout <<
"Initialization of the HMC" << std::endl;
84 if (arg !=
"HotStart" && arg !=
"ColdStart" && arg !=
"TepidStart" &&
85 arg !=
"CheckpointStart") {
86 std::cout <<
GridLogError <<
"Unrecognized option in --StartingType\n";
89 <<
"Valid [HotStart, ColdStart, TepidStart, CheckpointStart]\n";
93 std::cout <<
GridLogMessage <<
" GenericHMCrunner --StartingType "<<arg<<std::endl;
98 std::vector<int> ivec(0);
101 std::cout <<
GridLogMessage <<
" GenericHMCrunner --StartingTrajectory "<<ivec[0]<<std::endl;
106 std::vector<int> ivec(0);
109 std::cout <<
GridLogMessage<<
" GenericHMCrunner Command Line --Trajectories "<<ivec[0]<<std::endl;
114 std::vector<int> ivec(0);
117 std::cout <<
GridLogMessage<<
" GenericHMCrunner --Thermalizations "<<ivec[0]<<std::endl;
126 template <
class SmearingPolicy>
127 void Run(SmearingPolicy &S) {
144 Implementation::HotConfiguration(
Resources.GetParallelRNG(),
U);
145 }
else if (
Parameters.StartingType ==
"ColdStart") {
148 Implementation::ColdConfiguration(
Resources.GetParallelRNG(),
U);
149 }
else if (
Parameters.StartingType ==
"TepidStart") {
152 Implementation::TepidConfiguration(
Resources.GetParallelRNG(),
U);
153 }
else if (
Parameters.StartingType ==
"CheckpointStart") {
158 }
else if (
Parameters.StartingType ==
"CheckpointStartReseed") {
170 std::cout <<
GridLogError <<
"Unrecognized StartingType\n";
173 <<
"Valid [HotStart, ColdStart, TepidStart, CheckpointStart, CheckpointStartReseed]\n";
183 template <
class SmearingPolicy>
194 MDynamics.setMomentumFilter(*(
Resources.GetMomentumFilter()));
196 Smearing.set_Field(
U);
209template <
template <
typename,
typename,
typename>
class Integrator>
211template <
template <
typename,
typename,
typename>
class Integrator>
213template <
template <
typename,
typename,
typename>
class Integrator>
218template <
template <
typename,
typename,
typename>
class Integrator>
220template <
template <
typename,
typename,
typename>
class Integrator>
222template <
template <
typename,
typename,
typename>
class Integrator>
227template <
class RepresentationsPolicy,
228 template <
typename,
typename,
typename>
class Integrator>
234template <
template <
typename,
typename,
typename>
class Integrator>
237template <
class RepresentationsPolicy,
238 template <
typename,
typename,
typename>
class Integrator>
244template <
class Implementation,
class RepresentationsPolicy,
245 template <
typename,
typename,
typename>
class Integrator>
254template <
int Colours>
std::vector< ActionLevel< GaugeField, R > > ActionSet
HMCWrapperTemplate< PeriodicGimplD, Integrator > GenericHMCRunnerD
HMCWrapperTemplate< ScalarImplR, MinimumNorm2, ScalarFields > ScalarGenericHMCRunner
HMCWrapperTemplate< ConjugateGimplR, Integrator > ConjugateHMCRunner
HMCWrapperTemplate< ConjugateGimplD, Integrator > ConjugateHMCRunnerD
HMCWrapperTemplate< Implementation, Integrator, RepresentationsPolicy > GenericHMCRunnerTemplate
HMCWrapperTemplate< PeriodicGimplF, Integrator > GenericHMCRunnerF
HMCWrapperTemplate< ScalarNxNAdjImplR< Colours >, ForceGradient, ScalarNxNMatrixFields< Colours > > ScalarNxNAdjGenericHMCRunner
HMCWrapperTemplate< PeriodicGimplR, Integrator > GenericHMCRunner
HMCWrapperTemplate< PeriodicGimplR, Integrator, RepresentationsPolicy > GenericHMCRunnerHirep
HMCWrapperTemplate< ScalarAdjImplR, MinimumNorm2, ScalarMatrixFields > ScalarAdjGenericHMCRunner
HMCWrapperTemplate< ConjugateGimplF, Integrator > ConjugateHMCRunnerF
HMCWrapperTemplate< SpPeriodicGimplR, Integrator > GenericSpHMCRunner
HMCWrapperTemplate< SpPeriodicGimplR, Integrator, RepresentationsPolicy > GenericSpHMCRunnerHirep
bool GridCmdOptionExists(char **begin, char **end, const std::string &option)
void GridCmdOptionIntVector(const std::string &str, VectorInt &vec)
std::string GridCmdOptionPayload(char **begin, char **end, const std::string &option)
GridLogger GridLogError(1, "Error", GridLogColours, "RED")
GridLogger GridLogMessage(1, "Message", GridLogColours, "NORMAL")
#define NAMESPACE_BEGIN(A)
static INTERNAL_PRECISION U
virtual void initialize(ReaderClass &)=0
HMCWrapperTemplate(HMCparameters Par)
HMCWrapperTemplate()=default
Implementation ImplPolicy
Integrator< Implementation, S, RepresentationsPolicy > IntegratorType
ActionSet< Field, NoHirep > TheAction
void initialize(ReaderClass &TheReader)
void initializeGaugeFieldAndRNGs(Field &U)
void Run(SmearingPolicy &S)
INHERIT_FIELD_TYPES(Implementation)
HMCResourceManager< PeriodicGimplR > Resources
void ReadCommandLine(int argc, char **argv)
void Runner(SmearingPolicy &Smearing)
std::string ParameterFile
Class for Molecular Dynamics management.
Representations< FundamentalRepresentation > NoHirep
Representations< EmptyRep< typename ScalarNxNAdjImplR< Colours >::Field > > ScalarNxNMatrixFields