1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 15:27:06 +01:00

Unified integrator and integrator algorithm into virtual class used as a policy for the

HMC.
This commit is contained in:
Peter Boyle
2015-08-30 13:39:19 +01:00
parent eed889ea05
commit 29fd004d54
23 changed files with 133 additions and 126 deletions

View File

@ -28,7 +28,7 @@ namespace Grid{
};
// template <class GaugeField, class Integrator, class Smearer, class Boundary>
template <class GaugeField, class Algorithm>
template <class GaugeField, class IntegratorType>
class HybridMonteCarlo {
private:
@ -36,7 +36,7 @@ namespace Grid{
GridSerialRNG &sRNG; // Fixme: need a RNG management strategy.
GridParallelRNG &pRNG; // Fixme: need a RNG management strategy.
typedef Integrator<GaugeField,Algorithm> IntegratorType;
IntegratorType &TheIntegrator;
/////////////////////////////////////////////////////////
@ -69,7 +69,7 @@ namespace Grid{
/////////////////////////////////////////////////////////
RealD evolve_step(GaugeField& U){
TheIntegrator.init(U); // set U and initialize P and phi's
TheIntegrator.refresh(U,pRNG); // set U and initialize P and phi's
RealD H0 = TheIntegrator.S(U); // initial state action