From b8b05f143fa7bdf66d2b5bbeed193b74b32037fa Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Thu, 1 Mar 2018 12:53:16 +0000 Subject: [PATCH] Hadrons: Lanczos more conservative type names --- extras/Hadrons/LanczosUtils.hpp | 12 +++++----- .../Modules/MSolver/LocalCoherenceLanczos.hpp | 22 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/extras/Hadrons/LanczosUtils.hpp b/extras/Hadrons/LanczosUtils.hpp index e6a78753..ab3ddbd5 100644 --- a/extras/Hadrons/LanczosUtils.hpp +++ b/extras/Hadrons/LanczosUtils.hpp @@ -11,16 +11,13 @@ BEGIN_HADRONS_NAMESPACE #define HADRONS_DEFAULT_LANCZOS_NBASIS 60 #endif -template -using LCL = LocalCoherenceLanczos; - template struct EigenPack { + typedef T VectorType; std::vector eval; std::vector evec; - + EigenPack(void) = default; EigenPack(const size_t size, GridBase *grid) @@ -81,7 +78,10 @@ template using FineEigenPack = EigenPack; template -using CoarseEigenPack = EigenPack::CoarseField>; +using CoarseEigenPack = EigenPack< + typename LocalCoherenceLanczos::CoarseField>; END_HADRONS_NAMESPACE diff --git a/extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp b/extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp index feb1d0be..b708d59d 100644 --- a/extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp +++ b/extras/Hadrons/Modules/MSolver/LocalCoherenceLanczos.hpp @@ -60,9 +60,11 @@ class TLocalCoherenceLanczos: public Module { public: FERM_TYPE_ALIASES(FImpl,); - typedef LCL LCL; - typedef FineEigenPack FineEigenPack; - typedef CoarseEigenPack CoarseEigenPack; + typedef LocalCoherenceLanczos LCL; + typedef FineEigenPack FinePack; + typedef CoarseEigenPack CoarsePack; typedef HADRONS_DEFAULT_SCHUR_OP SchurFMat; public: // constructor @@ -185,12 +187,10 @@ void TLocalCoherenceLanczos::setup(void) { makeCoarseGrid(); } - envCreate(FineEigenPack, fineName_, Ls_, par().fineParams.Nm, - env().getRbGrid(Ls_)); - envCreate(CoarseEigenPack, coarseName_, Ls_, par().coarseParams.Nm, - coarseGridRb_.get()); - auto &fine = envGet(FineEigenPack, fineName_); - auto &coarse = envGet(CoarseEigenPack, coarseName_); + envCreate(FinePack, fineName_, Ls_, par().fineParams.Nm, env().getRbGrid(Ls_)); + envCreate(CoarsePack, coarseName_, Ls_, par().coarseParams.Nm, coarseGridRb_.get()); + auto &fine = envGet(FinePack, fineName_); + auto &coarse = envGet(CoarsePack, coarseName_); envTmp(SchurFMat, "mat", Ls_, envGet(FMat, par().action)); envGetTmp(SchurFMat, mat); envTmp(LCL, "solver", Ls_, env().getRbGrid(Ls_), coarseGridRb_.get(), mat, @@ -203,8 +203,8 @@ void TLocalCoherenceLanczos::execute(void) { auto &finePar = par().fineParams; auto &coarsePar = par().coarseParams; - auto &fine = envGet(FineEigenPack, fineName_); - auto &coarse = envGet(CoarseEigenPack, coarseName_); + auto &fine = envGet(FinePack, fineName_); + auto &coarse = envGet(CoarsePack, coarseName_); envGetTmp(LCL, solver); if (par().doFine)