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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user