diff --git a/lib/qcd/action/gauge/WilsonGaugeAction.h b/lib/qcd/action/gauge/WilsonGaugeAction.h index d5eb56e8..aaedf2f9 100644 --- a/lib/qcd/action/gauge/WilsonGaugeAction.h +++ b/lib/qcd/action/gauge/WilsonGaugeAction.h @@ -27,16 +27,13 @@ namespace Grid{ //not optimal implementation FIXME //extend Ta to include Lorentz indexes RealD factor = 0.5*beta/RealD(Nc); - std::cout << "Debug force Wilson "<< factor << "\n"; MatrixField dSdU_mu(U._grid); MatrixField Umu(U._grid); for (int mu=0; mu < Nd; mu++){ Umu = PeekIndex(U,mu); // Staple in direction mu WilsonLoops::Staple(dSdU_mu,U,mu); - std::cout << "Staple norm ["< #include +#include namespace Grid{ namespace QCD{ @@ -55,12 +56,12 @@ namespace Grid{ MD.init(U,pRNG); // set U and initialize P and phi's RealD H0 = MD.S(U); // current state - std::cout<<"Total H_before = "<< H0 << "\n"; + std::cout<<"Total H before = "<< H0 << "\n"; MD.integrate(U,0); RealD H1 = MD.S(U); // updated state - std::cout<<"Total H_after = "<< H1 << "\n"; + std::cout<<"Total H after = "<< H1 << "\n"; return (H1-H0); } @@ -84,19 +85,14 @@ namespace Grid{ void evolve(LatticeLorentzColourMatrix& Uin){ Real DeltaH; - Real timer; // Thermalizations for(int iter=1; iter <= Params.ThermalizationSteps; ++iter){ std::cout << "-- # Thermalization step = "<< iter << "\n"; DeltaH = evolve_step(Uin); - - std::cout<< "[Timing] Trajectory time (s) : "<< timer/1000.0 << "\n"; std::cout<< " dH = "<< DeltaH << "\n"; - // Update matrix - //Uin = MD->get_U(); //accept every time } // Actual updates (evolve a copy Ucopy then copy back eventually) @@ -109,13 +105,9 @@ namespace Grid{ DeltaH = evolve_step(Ucopy); if(metropolis_test(DeltaH)) Uin = Ucopy; - // need sync? + //need sync? } - - } - - }; }// QCD diff --git a/lib/qcd/hmc/integrators/Integrator_base.cc b/lib/qcd/hmc/integrators/Integrator_base.cc index 0a256444..8947405e 100644 --- a/lib/qcd/hmc/integrators/Integrator_base.cc +++ b/lib/qcd/hmc/integrators/Integrator_base.cc @@ -15,10 +15,12 @@ namespace Grid{ void MDutils::generate_momenta_su3(LatticeLorentzColourMatrix& P,GridParallelRNG& pRNG){ LatticeColourMatrix Pmu(P._grid); + Pmu = zero; for(int mu=0;mu Pnew(new LatticeLorentzColourMatrix(U._grid)); + std::unique_ptr Pnew(new LatticeLorentzColourMatrix(U._grid)); P = std::move(Pnew); - } MDutils::generate_momenta(*P,pRNG); - - - for(int level=0; level< as.size(); ++level){ for(int actionID=0; actionIDinit(U, pRNG); @@ -128,7 +123,7 @@ namespace Grid{ // Momenta for (int mu=0; mu rel ={1}; Integrator MDleapfrog(MDpar, FullSet,rel);