diff --git a/lib/qcd/action/ActionBase.h b/lib/qcd/action/ActionBase.h index e6c8b0f8..56d6b8e0 100644 --- a/lib/qcd/action/ActionBase.h +++ b/lib/qcd/action/ActionBase.h @@ -45,27 +45,6 @@ class Action { virtual ~Action(){}; }; -// Could derive PseudoFermion action with a PF field, FermionField, and a Grid; -// implement refresh -/* -template -class PseudoFermionAction : public Action { - public: - FermionField Phi; - GridParallelRNG &pRNG; - GridBase &Grid; - - PseudoFermionAction(GridBase &_Grid,GridParallelRNG &_pRNG) : Grid(_Grid), -Phi(&_Grid), pRNG(_pRNG) { - }; - - virtual void refresh(const GaugeField &gauge) { - gaussian(Phi,pRNG); - }; - -}; -*/ - // Indexing of tuple types template struct Index; @@ -80,6 +59,7 @@ struct Index> { static const std::size_t value = 1 + Index>::value; }; +/* template struct ActionLevel { public: @@ -99,10 +79,10 @@ struct ActionLevel { void push_back(ActPtr ptr) { actions.push_back(ptr); } }; +*/ - -template -struct ActionLevelHirep { +template +struct ActionLevel { public: unsigned int multiplier; @@ -118,9 +98,9 @@ struct ActionLevelHirep { std::vector& actions; // Temporary conversion between ActionLevel and ActionLevelHirep - ActionLevelHirep(ActionLevel& AL ):actions(AL.actions), multiplier(AL.multiplier){} + //ActionLevelHirep(ActionLevel& AL ):actions(AL.actions), multiplier(AL.multiplier){} - ActionLevelHirep(unsigned int mul = 1) : actions(std::get<0>(actions_hirep)), multiplier(mul) { + ActionLevel(unsigned int mul = 1) : actions(std::get<0>(actions_hirep)), multiplier(mul) { // initialize the hirep vectors to zero. //apply(this->resize, actions_hirep, 0); //need a working resize assert(mul >= 1); @@ -162,11 +142,11 @@ struct ActionLevelHirep { }; -template -using ActionSet = std::vector >; +//template +//using ActionSet = std::vector >; template -using ActionSetHirep = std::vector >; +using ActionSet = std::vector >; } } diff --git a/lib/qcd/hmc/HmcRunner.h b/lib/qcd/hmc/HmcRunner.h index dafd2a01..a31ba784 100644 --- a/lib/qcd/hmc/HmcRunner.h +++ b/lib/qcd/hmc/HmcRunner.h @@ -39,7 +39,7 @@ class NerscHmcRunnerTemplate { enum StartType_t { ColdStart, HotStart, TepidStart, CheckpointStart }; - ActionSetHirep TheAction; + ActionSet TheAction; GridCartesian *UGrid; GridCartesian *FGrid; diff --git a/lib/qcd/hmc/integrators/Integrator.h b/lib/qcd/hmc/integrators/Integrator.h index b2fbf039..f89b7959 100644 --- a/lib/qcd/hmc/integrators/Integrator.h +++ b/lib/qcd/hmc/integrators/Integrator.h @@ -71,7 +71,7 @@ class Integrator { IntegratorParameters Params; - const ActionSetHirep as; + const ActionSet as; int levels; // double t_U; // Track time passing on each level and for U and for P @@ -180,7 +180,7 @@ class Integrator { public: Integrator(GridBase* grid, IntegratorParameters Par, - ActionSetHirep& Aset, + ActionSet& Aset, SmearingPolicy& Sm) : Params(Par), as(Aset), diff --git a/lib/qcd/hmc/integrators/Integrator_algorithm.h b/lib/qcd/hmc/integrators/Integrator_algorithm.h index 3c89a14d..cd289b08 100644 --- a/lib/qcd/hmc/integrators/Integrator_algorithm.h +++ b/lib/qcd/hmc/integrators/Integrator_algorithm.h @@ -101,7 +101,7 @@ namespace Grid{ LeapFrog(GridBase* grid, IntegratorParameters Par, - ActionSet & Aset, + ActionSet & Aset, SmearingPolicy & Sm): Integrator(grid,Par,Aset,Sm) {}; @@ -151,7 +151,7 @@ namespace Grid{ MinimumNorm2(GridBase* grid, IntegratorParameters Par, - ActionSetHirep & Aset, + ActionSet & Aset, SmearingPolicy& Sm): Integrator(grid,Par,Aset,Sm) {}; @@ -215,7 +215,7 @@ namespace Grid{ // Looks like dH scales as dt^4. tested wilson/wilson 2 level. ForceGradient(GridBase* grid, IntegratorParameters Par, - ActionSet & Aset, + ActionSet & Aset, SmearingPolicy &Sm): Integrator(grid,Par,Aset, Sm) {}; diff --git a/tests/hmc/Test_hmc_WilsonAdjointFermionGauge.cc b/tests/hmc/Test_hmc_WilsonAdjointFermionGauge.cc index bec35e2e..51171e8e 100644 --- a/tests/hmc/Test_hmc_WilsonAdjointFermionGauge.cc +++ b/tests/hmc/Test_hmc_WilsonAdjointFermionGauge.cc @@ -40,7 +40,6 @@ namespace QCD { // Here change the allowed (higher) representations typedef Representations< FundamentalRepresentation, AdjointRepresentation > TheRepresentations; -//typedef Representations< FundamentalRepresentation > TheRepresentations; class HmcRunner : public NerscHmcRunnerHirep< TheRepresentations > { @@ -80,10 +79,10 @@ class HmcRunner : public NerscHmcRunnerHirep< TheRepresentations > { Nf2.is_smeared = false; // Collect actions - ActionLevelHirep Level1(1); + ActionLevel Level1(1); Level1.push_back(&Nf2); - ActionLevelHirep Level2(4); + ActionLevel Level2(4); Level2.push_back(&Waction); TheAction.push_back(Level1); diff --git a/tests/hmc/Test_hmc_WilsonMixedRepresentationsFermionGauge.cc b/tests/hmc/Test_hmc_WilsonMixedRepresentationsFermionGauge.cc index 593012b4..50cb219e 100644 --- a/tests/hmc/Test_hmc_WilsonMixedRepresentationsFermionGauge.cc +++ b/tests/hmc/Test_hmc_WilsonMixedRepresentationsFermionGauge.cc @@ -69,7 +69,7 @@ class HmcRunner : public NerscHmcRunnerHirep< TheRepresentations > { TwoIndexSymmetricRepresentation::LatticeField US(UGrid); // Gauge action - WilsonGaugeActionR Waction(2.25); + WilsonGaugeActionR Waction(5.6); Real adjoint_mass = -0.1; Real symm_mass = -0.5; @@ -84,11 +84,11 @@ class HmcRunner : public NerscHmcRunnerHirep< TheRepresentations > { TwoFlavourPseudoFermionAction Nf2_Symm(SymmFermOp, CG_symm, CG_symm); // Collect actions - ActionLevelHirep Level1(1); + ActionLevel Level1(1); Level1.push_back(&Nf2_Adj); Level1.push_back(&Nf2_Symm); - ActionLevelHirep Level2(4); + ActionLevel Level2(4); Level2.push_back(&Waction); TheAction.push_back(Level1); diff --git a/tests/hmc/Test_hmc_WilsonTwoIndexSymmetricFermionGauge.cc b/tests/hmc/Test_hmc_WilsonTwoIndexSymmetricFermionGauge.cc index acd932d7..b027b111 100644 --- a/tests/hmc/Test_hmc_WilsonTwoIndexSymmetricFermionGauge.cc +++ b/tests/hmc/Test_hmc_WilsonTwoIndexSymmetricFermionGauge.cc @@ -75,10 +75,10 @@ class HmcRunner : public NerscHmcRunnerHirep< TheRepresentations > { Nf2.is_smeared = false; // Collect actions - ActionLevelHirep Level1(1); + ActionLevel Level1(1); Level1.push_back(&Nf2); - ActionLevelHirep Level2(4); + ActionLevel Level2(4); Level2.push_back(&Waction); TheAction.push_back(Level1);