1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Hadrons: Lanczos more conservative type names

This commit is contained in:
Antonin Portelli 2018-03-01 12:53:16 +00:00
parent 6ec42b4b82
commit b8b05f143f
2 changed files with 17 additions and 17 deletions

View File

@ -11,16 +11,13 @@ BEGIN_HADRONS_NAMESPACE
#define HADRONS_DEFAULT_LANCZOS_NBASIS 60
#endif
template <typename FImpl, int nBasis>
using LCL = LocalCoherenceLanczos<typename FImpl::SiteSpinor,
typename FImpl::SiteComplex, nBasis>;
template <typename T>
struct EigenPack
{
typedef T VectorType;
std::vector<RealD> eval;
std::vector<T> evec;
EigenPack(void) = default;
EigenPack(const size_t size, GridBase *grid)
@ -81,7 +78,10 @@ template <typename FImpl>
using FineEigenPack = EigenPack<typename FImpl::FermionField>;
template <typename FImpl, int nBasis>
using CoarseEigenPack = EigenPack<typename LCL<FImpl, nBasis>::CoarseField>;
using CoarseEigenPack = EigenPack<
typename LocalCoherenceLanczos<typename FImpl::SiteSpinor,
typename FImpl::SiteComplex,
nBasis>::CoarseField>;
END_HADRONS_NAMESPACE

View File

@ -60,9 +60,11 @@ class TLocalCoherenceLanczos: public Module<LocalCoherenceLanczosPar>
{
public:
FERM_TYPE_ALIASES(FImpl,);
typedef LCL<FImpl, nBasis> LCL;
typedef FineEigenPack<FImpl> FineEigenPack;
typedef CoarseEigenPack<FImpl, nBasis> CoarseEigenPack;
typedef LocalCoherenceLanczos<typename FImpl::SiteSpinor,
typename FImpl::SiteComplex,
nBasis> LCL;
typedef FineEigenPack<FImpl> FinePack;
typedef CoarseEigenPack<FImpl, nBasis> CoarsePack;
typedef HADRONS_DEFAULT_SCHUR_OP<FMat, FermionField> SchurFMat;
public:
// constructor
@ -185,12 +187,10 @@ void TLocalCoherenceLanczos<FImpl, nBasis>::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<FImpl, nBasis>::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)