diff --git a/Hadrons/Modules/MIO/LoadEigenPack.hpp b/Hadrons/Modules/MIO/LoadEigenPack.hpp index 330d35ad..99b6d866 100644 --- a/Hadrons/Modules/MIO/LoadEigenPack.hpp +++ b/Hadrons/Modules/MIO/LoadEigenPack.hpp @@ -54,7 +54,9 @@ template class TLoadEigenPack: public Module { public: - typedef EigenPack BasePack; + typedef typename Pack::Field Field; + typedef typename Pack::FieldIo FieldIo; + typedef EigenPack BasePack; public: // constructor TLoadEigenPack(const std::string name); @@ -102,9 +104,14 @@ std::vector TLoadEigenPack::getOutput(void) template void TLoadEigenPack::setup(void) { - env().createGrid(par().Ls); + GridBase *gridIo = nullptr; + + if (typeHash() != typeHash()) + { + gridIo = envGetRbGrid(FieldIo, par().Ls); + } envCreateDerived(BasePack, Pack, getName(), par().Ls, par().size, - env().getRbGrid(par().Ls)); + envGetRbGrid(Field, par().Ls), gridIo); } // execution ///////////////////////////////////////////////////////////////////