diff --git a/Hadrons/Modules/MDistil/PerambFromSolve.hpp b/Hadrons/Modules/MDistil/PerambFromSolve.hpp index 63a98af5..c9f62b6e 100644 --- a/Hadrons/Modules/MDistil/PerambFromSolve.hpp +++ b/Hadrons/Modules/MDistil/PerambFromSolve.hpp @@ -42,6 +42,8 @@ public: std::string, PerambFileName, std::string, solve, int, nvec, + int, nvec_reduced, + int, LI_reduced, DistilParameters, Distil); }; @@ -125,8 +127,12 @@ void TPerambFromSolve::setup(void) grid3d = MakeLowerDimGrid(grid4d); + const int nvec_reduced{par().nvec_reduced}; + const int LI_reduced{par().LI_reduced}; + //envCreate(Perambulator, getName(), 1, + // sIndexNames,Distil.Nt,nvec,Distil.LI,Distil.nnoise,Distil.Nt_inv,Distil.SI); envCreate(Perambulator, getName(), 1, - sIndexNames,Distil.Nt,nvec,Distil.LI,Distil.nnoise,Distil.Nt_inv,Distil.SI); + sIndexNames,Distil.Nt,nvec_reduced,LI_reduced,Distil.nnoise,Distil.Nt_inv,Distil.SI); envCreate(std::vector, getName() + "_noise", 1, nvec*Distil.Ns*Distil.Nt*Distil.nnoise); @@ -152,6 +158,8 @@ void TPerambFromSolve::Cleanup(void) template void TPerambFromSolve::execute(void) { + const int nvec_reduced{par().nvec_reduced}; + const int LI_reduced{par().LI_reduced}; const int nvec{par().nvec}; const DistilParameters & Distil{par().Distil}; const int LI{Distil.LI}; @@ -181,14 +189,14 @@ void TPerambFromSolve::execute(void) for (int inoise = 0; inoise < nnoise; inoise++) { - for (int dk = 0; dk < LI; dk++) { + for (int dk = 0; dk < LI_reduced; dk++) { for (int dt = 0; dt < Nt_inv; dt++) { for (int ds = 0; ds < Ns; ds++) { for (int is = 0; is < Ns; is++) { result_nospin = peekSpin(solve[inoise+nnoise*(dk+LI*(dt+Nt_inv*ds))],is); for (int t = Ntfirst; t < Ntfirst + Ntlocal; t++) { ExtractSliceLocal(result_3d,result_nospin,0,t-Ntfirst,Grid::QCD::Tdir); - for (int ivec = 0; ivec < nvec; ivec++) { + for (int ivec = 0; ivec < nvec_reduced; ivec++) { ExtractSliceLocal(evec3d,epack.evec[ivec],0,t,3); pokeSpin(perambulator(t, ivec, dk, inoise,dt,ds),innerProduct(evec3d, result_3d),is); std::cout << "perambulator(t, ivec, dk, inoise,dt,ds)(is) = (" << t << "," << ivec << "," << dk << "," << inoise << "," << dt << "," << ds << ")(" << is << ") = " << perambulator(t, ivec, dk, inoise,dt,ds)()(is)() << std::endl; diff --git a/tests/hadrons/Test_hadrons_distil.cc b/tests/hadrons/Test_hadrons_distil.cc index daa765c8..062c805e 100644 --- a/tests/hadrons/Test_hadrons_distil.cc +++ b/tests/hadrons/Test_hadrons_distil.cc @@ -141,48 +141,43 @@ void test_Perambulators(Application &application) void test_MultiPerambulators(Application &application) { // PerambLight parameters - MDistil::PerambMultipleSolves::Par PerambPar; + MDistil::PerambLight::Par PerambPar; PerambPar.eigenPack="LapEvec"; PerambPar.UniqueIdentifier="full_dilution"; + PerambPar.PerambFileName="Peramb5"; PerambPar.solver="CG_s"; PerambPar.Distil.tsrc = 0; PerambPar.Distil.nnoise = 1; - PerambPar.Distil.LI=10; + PerambPar.Distil.LI=5; PerambPar.Distil.SI=4; PerambPar.Distil.TI=8; PerambPar.nvec=5; - PerambPar.nsolves=3; - PerambPar.nvecs={2,3,5}; PerambPar.Distil.Ns=4; PerambPar.Distil.Nt=8; PerambPar.Distil.Nt_inv=1; - application.createModule("PerambMulti",PerambPar); + application.createModule("Peramb5",PerambPar); MDistil::PerambFromSolve::Par SolvePar; SolvePar.eigenPack="LapEvec"; - SolvePar.PerambFileName="PerMulti2"; - SolvePar.solve = "PerambMulti_solve_2"; + SolvePar.PerambFileName="Peramb2"; + SolvePar.solve = "Peramb5_unsmeared_sink"; SolvePar.Distil.nnoise = 1; - SolvePar.Distil.LI=2; + SolvePar.Distil.LI=5; SolvePar.Distil.SI=4; SolvePar.Distil.TI=8; - SolvePar.nvec=2; + SolvePar.nvec=5; + SolvePar.nvec_reduced=2; + SolvePar.LI_reduced=2; SolvePar.Distil.Ns=4; SolvePar.Distil.Nt=8; SolvePar.Distil.Nt_inv=1; - application.createModule("PerambMulti2",SolvePar); - SolvePar.PerambFileName="PerMulti3"; - SolvePar.solve = "PerambMulti_solve_3"; - SolvePar.Distil.LI=3; - SolvePar.nvec=3; - application.createModule("PerambMulti3",SolvePar); - SolvePar.PerambFileName="PerMulti5"; - SolvePar.solve = "PerambMulti_solve_5"; - SolvePar.Distil.LI=5; - SolvePar.nvec=5; - application.createModule("PerambMulti5",SolvePar); + application.createModule("Peramb2",SolvePar); + SolvePar.PerambFileName="Peramb3"; + SolvePar.nvec_reduced=3; + SolvePar.LI_reduced=3; + application.createModule("Peramb3",SolvePar); MDistil::DistilVectors::Par DistilVecPar; - DistilVecPar.noise="PerambMulti_noise"; - DistilVecPar.perambulator="PerambMulti2"; + DistilVecPar.noise="Peramb5_noise"; + DistilVecPar.perambulator="Peramb2"; DistilVecPar.eigenPack="LapEvec"; DistilVecPar.tsrc = 0; DistilVecPar.nnoise = 1; @@ -194,11 +189,11 @@ void test_MultiPerambulators(Application &application) DistilVecPar.Nt=8; DistilVecPar.Nt_inv=1; application.createModule("DistilVecs2",DistilVecPar); - DistilVecPar.perambulator="PerambMulti3"; + DistilVecPar.perambulator="Peramb3"; DistilVecPar.LI=3; DistilVecPar.nvec=3; application.createModule("DistilVecs3",DistilVecPar); - DistilVecPar.perambulator="PerambMulti5"; + DistilVecPar.perambulator="Peramb5_perambulator_light"; DistilVecPar.LI=5; DistilVecPar.nvec=5; application.createModule("DistilVecs5",DistilVecPar);