From ced30b61e2d0dce10d121ec26c25c5bddde54cf8 Mon Sep 17 00:00:00 2001 From: Felix Erben Date: Fri, 18 Jan 2019 16:38:13 +0000 Subject: [PATCH] added phi vectors - still commented out and does not compile otherwise --- Hadrons/Modules/MDistil/DistilVectors.hpp | 44 ++++++++++++++++++++--- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/Hadrons/Modules/MDistil/DistilVectors.hpp b/Hadrons/Modules/MDistil/DistilVectors.hpp index 272380d1..59e38009 100644 --- a/Hadrons/Modules/MDistil/DistilVectors.hpp +++ b/Hadrons/Modules/MDistil/DistilVectors.hpp @@ -34,12 +34,12 @@ BEGIN_HADRONS_NAMESPACE /****************************************************************************** - * A2AVectorsSchurDiagTwo template implementation * + * DistilVectorsFromPerambulator template implementation * ******************************************************************************/ /* template -A2AVectorsSchurDiagTwo::A2AVectorsSchurDiagTwo(FMat &action) +DistilVectorsFromPerambulator::DistilVectorsFromPerambulator(FMat &action) : action_(action) , fGrid_(action_.FermionGrid()) , frbGrid_(action_.FermionRedBlackGrid()) @@ -53,7 +53,7 @@ A2AVectorsSchurDiagTwo::A2AVectorsSchurDiagTwo(FMat &action) {} template -void A2AVectorsSchurDiagTwo::makeRho(FermionField &rhoOut, const FermionField &evec, const Complex &noises) +void DistilVectorsFromPerambulator::makeRho(FermionField &rhoOut, const FermionField &evec, const Complex &noises) { LatticeSpinColourVector tmp2(grid4d); @@ -62,7 +62,7 @@ void A2AVectorsSchurDiagTwo::makeRho(FermionField &rhoOut, const FermionF LatticeColourVector tmp_nospin(grid4d); LatticeColourVector evec3d(grid3d); - + int vecindex; for (int inoise = 0; inoise < nnoise; inoise++) { for (int dk = 0; dk < LI; dk++) { for (int dt = 0; dt < Nt_inv; dt++) { @@ -98,6 +98,42 @@ void A2AVectorsSchurDiagTwo::makeRho(FermionField &rhoOut, const FermionF } +template +void DistilVectorsFromPerambulator::makePhi(FermionField &rhoOut, const FermionField &evec, const SpinVector &perambulator) +{ + + LatticeSpinColourVector tmp2(grid4d); + LatticeSpinColourVector tmp3d(grid3d); + LatticeColourVector tmp3d_nospin(grid3d); + LatticeColourVector tmp_nospin(grid4d); + LatticeColourVector evec3d(grid3d); + + int vecindex; + for (int inoise = 0; inoise < nnoise; inoise++) { + for (int dk = 0; dk < LI; dk++) { + for (int dt = 0; dt < Nt_inv; dt++) { + for (int ds = 0; ds < Ns; ds++) { + vecindex = inoise + nnoise * dk + nnoise * LI * ds + nnoise *LI * Ns*dt; + sinks_tsrc[vecindex] = zero; + for (int t = Ntfirst; t < Ntfirst + Ntlocal; t++) { + sink_tslice=zero; + for (int ivec = 0; ivec < nvec; ivec++) { + ExtractSliceLocal(evec3d,eig4d.evec[ivec],0,t,3); + sink_tslice += evec3d * perambulator(t, ivec, dk, inoise,dt,ds); + } +#ifdef USE_LOCAL_SLICES + InsertSliceLocal(sink_tslice,sinks_tsrc[vecindex],0,t-Ntfirst,Grid::QCD::Tdir); +#else + InsertSlice(sink_tslice,sinks_tsrc[vecindex],t,Grid::QCD::Tdir); +#endif + } + } + } + } + } + +} + */