diff --git a/Hadrons/Modules/MIO/LoadDistilNoise.hpp b/Hadrons/Modules/MIO/LoadDistilNoise.hpp index ace88887..cf3513fe 100644 --- a/Hadrons/Modules/MIO/LoadDistilNoise.hpp +++ b/Hadrons/Modules/MIO/LoadDistilNoise.hpp @@ -44,7 +44,7 @@ class LoadDistilNoisePar: Serializable public: GRID_SERIALIZABLE_CLASS_MEMBERS(LoadDistilNoisePar, std::string, NoiseFileName, - std::string, DistilPar); + std::string, DistilParams); }; template @@ -62,8 +62,6 @@ public: virtual void setup(void); // execution virtual void execute(void); -protected: - std::string DParName; }; MODULE_REGISTER_TMP(LoadDistilNoise, TLoadDistilNoise, MIO); @@ -73,36 +71,28 @@ MODULE_REGISTER_TMP(LoadDistilNoise, TLoadDistilNoise, MIO); ******************************************************************************/ // constructor ///////////////////////////////////////////////////////////////// template -TLoadDistilNoise::TLoadDistilNoise(const std::string name) -: Module(name) -{} +TLoadDistilNoise::TLoadDistilNoise(const std::string name) : Module(name) {} // dependencies/products /////////////////////////////////////////////////////// template std::vector TLoadDistilNoise::getInput(void) { - DParName = par().DistilPar; - return { par().NoiseFileName, DParName }; - + return {par().NoiseFileName, par().DistilParams}; } template std::vector TLoadDistilNoise::getOutput(void) { - std::vector out = {getName()}; - - return out; + return {getName()}; } // setup /////////////////////////////////////////////////////////////////////// template void TLoadDistilNoise::setup(void) { - auto &DPar = envGet(MDistil::DistilParameters, DParName); - const int Nt{env().getDim(Tdir)}; - const int nvec{DPar.nvec}; - const int nnoise{DPar.nnoise}; - envCreate(MDistil::NoiseTensor, getName(), 1, nnoise, Nt, nvec, Ns); + const MDistil::DistilParameters &dp{envGet(MDistil::DistilParameters, par().DistilParams)}; + const int Nt{env().getDim(Tdir)}; + envCreate(MDistil::NoiseTensor, getName(), 1, dp.nnoise, Nt, dp.nvec, Ns); } // execution /////////////////////////////////////////////////////////////////// @@ -117,7 +107,5 @@ void TLoadDistilNoise::execute(void) } END_MODULE_NAMESPACE - END_HADRONS_NAMESPACE - -#endif // Hadrons_MIO_LoadDistilNoise_hpp_ +#endif diff --git a/Hadrons/Modules/MIO/LoadPerambulator.hpp b/Hadrons/Modules/MIO/LoadPerambulator.hpp index 46c0c74d..5b7d361b 100644 --- a/Hadrons/Modules/MIO/LoadPerambulator.hpp +++ b/Hadrons/Modules/MIO/LoadPerambulator.hpp @@ -44,7 +44,7 @@ class LoadPerambulatorPar: Serializable public: GRID_SERIALIZABLE_CLASS_MEMBERS(LoadPerambulatorPar, std::string, PerambFileName, - std::string, DistilPar); + std::string, DistilParams); }; template @@ -62,8 +62,6 @@ public: virtual void setup(void); // execution virtual void execute(void); -protected: - std::string DParName; }; MODULE_REGISTER_TMP(LoadPerambulator, TLoadPerambulator, MIO); @@ -73,42 +71,30 @@ MODULE_REGISTER_TMP(LoadPerambulator, TLoadPerambulator, MIO); ******************************************************************************/ // constructor ///////////////////////////////////////////////////////////////// template -TLoadPerambulator::TLoadPerambulator(const std::string name) -: Module(name) -{} +TLoadPerambulator::TLoadPerambulator(const std::string name) : Module(name) {} // dependencies/products /////////////////////////////////////////////////////// template std::vector TLoadPerambulator::getInput(void) { - DParName = par().DistilPar; - return { par().PerambFileName, DParName }; + return {par().PerambFileName, par().DistilParams}; } template std::vector TLoadPerambulator::getOutput(void) { - std::vector out = {getName()}; - - return out; + return {getName()}; } // setup /////////////////////////////////////////////////////////////////////// template void TLoadPerambulator::setup(void) { - auto &DPar = envGet(MDistil::DistilParameters, DParName); + const MDistil::DistilParameters &dp{envGet(MDistil::DistilParameters, par().DistilParams)}; const int Nt{env().getDim(Tdir)}; - const int nvec{DPar.nvec}; - const int nnoise{DPar.nnoise}; - const int tsrc{DPar.tsrc}; - const int TI{DPar.TI}; - const int LI{DPar.LI}; - const int SI{DPar.SI}; - const bool full_tdil{ TI == Nt }; - const bool exact_distillation{ full_tdil && LI == nvec }; - const int Nt_inv{ full_tdil ? 1 : TI }; - envCreate(MDistil::PerambTensor, getName(), 1, Nt,nvec,LI,nnoise,Nt_inv,SI); + const bool full_tdil{ dp.TI == Nt }; + const int Nt_inv{ full_tdil ? 1 : dp.TI }; + envCreate(MDistil::PerambTensor, getName(), 1, Nt,dp.nvec,dp.LI,dp.nnoise,Nt_inv,dp.SI); } // execution /////////////////////////////////////////////////////////////////// @@ -123,7 +109,5 @@ void TLoadPerambulator::execute(void) } END_MODULE_NAMESPACE - END_HADRONS_NAMESPACE - -#endif // Hadrons_MIO_LoadPerambulator_hpp_ +#endif