mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Aslash insertions work now?
This commit is contained in:
parent
2d659015ff
commit
4a70b2ffd4
@ -239,7 +239,7 @@ void TLapEvec<GImpl>::execute(void)
|
||||
auto &Umu = envGet(GaugeField, par().gauge);
|
||||
envGetTmp(GaugeField, Umu_smear);
|
||||
FieldMetaData header;
|
||||
if((0)) {
|
||||
if((1)) {
|
||||
const std::vector<int> seeds({1, 2, 3, 4, 5});
|
||||
GridParallelRNG pRNG4d(gridHD);
|
||||
pRNG4d.SeedFixedIntegers(seeds);
|
||||
|
@ -50,11 +50,10 @@ class TPerambFromSolve: public Module<PerambFromSolvePar>
|
||||
{
|
||||
public:
|
||||
FERM_TYPE_ALIASES(FImpl,);
|
||||
public:
|
||||
// constructor
|
||||
TPerambFromSolve(const std::string name);
|
||||
// destructor
|
||||
virtual ~TPerambFromSolve(void) {};
|
||||
virtual ~TPerambFromSolve(void);
|
||||
// dependency relation
|
||||
virtual std::vector<std::string> getInput(void);
|
||||
virtual std::vector<std::string> getOutput(void);
|
||||
@ -62,6 +61,12 @@ public:
|
||||
virtual void setup(void);
|
||||
// execution
|
||||
virtual void execute(void);
|
||||
protected:
|
||||
GridCartesian * grid3d; // Owned by me, so I must delete it
|
||||
GridCartesian * grid4d;
|
||||
protected:
|
||||
virtual void Cleanup(void);
|
||||
|
||||
};
|
||||
|
||||
MODULE_REGISTER_TMP(PerambFromSolve, TPerambFromSolve<FIMPL>, MDistil);
|
||||
@ -72,8 +77,15 @@ MODULE_REGISTER_TMP(PerambFromSolve, TPerambFromSolve<FIMPL>, MDistil);
|
||||
// constructor /////////////////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
TPerambFromSolve<FImpl>::TPerambFromSolve(const std::string name)
|
||||
: Module<PerambFromSolvePar>(name)
|
||||
:grid3d{nullptr}, grid4d{nullptr}, Module<PerambFromSolvePar>(name)
|
||||
{}
|
||||
//destructor
|
||||
template <typename FImpl>
|
||||
TPerambFromSolve<FImpl>::~TPerambFromSolve(void)
|
||||
{
|
||||
Cleanup();
|
||||
};
|
||||
|
||||
|
||||
// dependencies/products ///////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
@ -99,7 +111,9 @@ std::vector<std::string> TPerambFromSolve<FImpl>::getOutput(void)
|
||||
template <typename FImpl>
|
||||
void TPerambFromSolve<FImpl>::setup(void)
|
||||
{
|
||||
const int nvec{par().nvec};
|
||||
Cleanup();
|
||||
|
||||
const int nvec{par().nvec};
|
||||
const DistilParameters & Distil{par().Distil};
|
||||
const int LI{Distil.LI};
|
||||
const int nnoise{Distil.nnoise};
|
||||
@ -107,13 +121,33 @@ void TPerambFromSolve<FImpl>::setup(void)
|
||||
const int Ns{Distil.Ns};
|
||||
std::array<std::string,6> sIndexNames{"Nt", "nvec", "LI", "nnoise", "Nt_inv", "SI"};
|
||||
|
||||
grid4d = env().getGrid();
|
||||
grid3d = MakeLowerDimGrid(grid4d);
|
||||
|
||||
|
||||
envCreate(Perambulator<SpinVector COMMA 6 COMMA sizeof(Real)>, getName(), 1,
|
||||
sIndexNames,Distil.Nt,nvec,Distil.LI,Distil.nnoise,Distil.Nt_inv,Distil.SI);
|
||||
envCreate(std::vector<Complex>, getName() + "_noise", 1,
|
||||
nvec*Distil.Ns*Distil.Nt*Distil.nnoise);
|
||||
|
||||
|
||||
envTmp(LatticeColourVector, "result_3d",1,LatticeColourVector(grid3d));
|
||||
envTmp(LatticeColourVector, "evec3d",1,LatticeColourVector(grid3d));
|
||||
envTmpLat(LatticeColourVector, "result_nospin");
|
||||
|
||||
|
||||
}
|
||||
|
||||
template <typename FImpl>
|
||||
void TPerambFromSolve<FImpl>::Cleanup(void)
|
||||
{
|
||||
if( grid3d != nullptr ) {
|
||||
delete grid3d;
|
||||
grid3d = nullptr;
|
||||
}
|
||||
grid4d = nullptr;
|
||||
}
|
||||
|
||||
|
||||
// execution ///////////////////////////////////////////////////////////////////
|
||||
template <typename FImpl>
|
||||
void TPerambFromSolve<FImpl>::execute(void)
|
||||
|
@ -212,7 +212,7 @@ void TPerambLight<FImpl>::execute(void)
|
||||
|
||||
envGetTmp(GaugeField, Umu);
|
||||
FieldMetaData header;
|
||||
if((0)){
|
||||
if((1)){
|
||||
const std::vector<int> seeds({1, 2, 3, 4, 5});
|
||||
GridParallelRNG pRNG4d(grid4d);
|
||||
pRNG4d.SeedFixedIntegers(seeds);
|
||||
|
@ -203,7 +203,7 @@ void test_DistilVectorsS(Application &application)
|
||||
DistilVecPar.TI=32;
|
||||
DistilVecPar.nvec=3;
|
||||
DistilVecPar.Ns=4;
|
||||
DistilVecPar.Nt=32;
|
||||
DistilVecPar.Nt=8;
|
||||
DistilVecPar.Nt_inv=1;
|
||||
application.createModule<MDistil::DistilVectors>("DistilVecsS",DistilVecPar);
|
||||
}
|
||||
@ -430,10 +430,31 @@ void test_AslashSeq(Application &application)
|
||||
A2AAslashVectorsPar.vector="PerambS_unsmeared_sink";
|
||||
A2AAslashVectorsPar.emField="Em";
|
||||
A2AAslashVectorsPar.solver="CG_s";
|
||||
A2AAslashVectorsPar.output="Aslash_seq";
|
||||
A2AAslashVectorsPar.output="AslashSeq";
|
||||
application.createModule<MSolver::A2AAslashVectors>("Aslash_seq",A2AAslashVectorsPar);
|
||||
}
|
||||
/////////////////////////////////////////////////////////////
|
||||
// Aslash_perambulators
|
||||
/////////////////////////////////////////////////////////////
|
||||
void test_PerambulatorsSolve(Application &application)
|
||||
{
|
||||
// PerambLight parameters
|
||||
MDistil::PerambFromSolve::Par PerambFromSolvePar;
|
||||
PerambFromSolvePar.eigenPack="LapEvec";
|
||||
PerambFromSolvePar.solve="Aslash_seq";
|
||||
PerambFromSolvePar.PerambFileName="perambAslashS.bin";
|
||||
PerambFromSolvePar.Distil.tsrc = 0;
|
||||
PerambFromSolvePar.Distil.nnoise = 1;
|
||||
PerambFromSolvePar.Distil.LI=3;
|
||||
PerambFromSolvePar.Distil.SI=4;
|
||||
PerambFromSolvePar.Distil.TI=8;
|
||||
PerambFromSolvePar.nvec=3;
|
||||
PerambFromSolvePar.Distil.Ns=4;
|
||||
PerambFromSolvePar.Distil.Nt=8;
|
||||
PerambFromSolvePar.Distil.Nt_inv=1;
|
||||
application.createModule<MDistil::PerambFromSolve>("PerambAslashS",PerambFromSolvePar);
|
||||
}
|
||||
/////////////////////////////////////////////////////////////
|
||||
// DistilVectors
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
@ -454,24 +475,6 @@ void test_DistilVectorsAslashSeq(Application &application)
|
||||
DistilSinkPar.Nt_inv=1;
|
||||
application.createModule<MDistil::DistilSink>("DistilVecsAslashSeq",DistilSinkPar);
|
||||
}
|
||||
void test_PerambulatorsSolve(Application &application)
|
||||
{
|
||||
// PerambLight parameters
|
||||
MDistil::PerambFromSolve::Par PerambFromSolvePar;
|
||||
PerambFromSolvePar.eigenPack="LapEvec";
|
||||
PerambFromSolvePar.solve="Aslash_seq";
|
||||
PerambFromSolvePar.PerambFileName="perambAslashS.bin";
|
||||
PerambFromSolvePar.Distil.tsrc = 0;
|
||||
PerambFromSolvePar.Distil.nnoise = 1;
|
||||
PerambFromSolvePar.Distil.LI=3;
|
||||
PerambFromSolvePar.Distil.SI=4;
|
||||
PerambFromSolvePar.Distil.TI=8;
|
||||
PerambFromSolvePar.nvec=3;
|
||||
PerambFromSolvePar.Distil.Ns=4;
|
||||
PerambFromSolvePar.Distil.Nt=8;
|
||||
PerambFromSolvePar.Distil.Nt_inv=1;
|
||||
application.createModule<MDistil::PerambFromSolve>("PerambAslashS",PerambFromSolvePar);
|
||||
}
|
||||
/////////////////////////////////////////////////////////////
|
||||
// MesonFields - aslaaaash
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user