From 52569d98d8d46d5b248eaff0d06c9df042d0c1fb Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Wed, 3 Oct 2018 14:24:43 +0100 Subject: [PATCH] Hadrons: multiprec eigenpack I/O fix --- Hadrons/Modules/MIO/LoadEigenPack.hpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 ///////////////////////////////////////////////////////////////////