mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Hadrons: most modules ported to the new interface, compiles but untested
This commit is contained in:
parent
0887566134
commit
842754bea9
@ -92,8 +92,8 @@ static ns##mod##ModuleRegistrar ns##mod##ModuleRegistrarInstance;
|
|||||||
#define envGet(type, name)\
|
#define envGet(type, name)\
|
||||||
*env().template getObject<type>(name)
|
*env().template getObject<type>(name)
|
||||||
|
|
||||||
#define envGetTmp(type, name)\
|
#define envGetTmp(type, var)\
|
||||||
*env().template getObject<type>(getName() + "_tmp_" + name)
|
type &var = *env().template getObject<type>(getName() + "_tmp_" + #var)
|
||||||
|
|
||||||
#define envHasType(type, name)\
|
#define envHasType(type, name)\
|
||||||
env().template isObjectOfType<type>(name)
|
env().template isObjectOfType<type>(name)
|
||||||
|
@ -30,31 +30,31 @@ See the full license in the file "LICENSE" in the top level distribution directo
|
|||||||
|
|
||||||
#include <Grid/Hadrons/Modules/MAction/DWF.hpp>
|
#include <Grid/Hadrons/Modules/MAction/DWF.hpp>
|
||||||
#include <Grid/Hadrons/Modules/MAction/Wilson.hpp>
|
#include <Grid/Hadrons/Modules/MAction/Wilson.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MContraction/Baryon.hpp>
|
#include <Grid/Hadrons/Modules/MContraction/Baryon.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MContraction/DiscLoop.hpp>
|
#include <Grid/Hadrons/Modules/MContraction/DiscLoop.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MContraction/Gamma3pt.hpp>
|
#include <Grid/Hadrons/Modules/MContraction/Gamma3pt.hpp>
|
||||||
#include <Grid/Hadrons/Modules/MContraction/Meson.hpp>
|
#include <Grid/Hadrons/Modules/MContraction/Meson.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MContraction/WardIdentity.hpp>
|
#include <Grid/Hadrons/Modules/MContraction/WardIdentity.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MContraction/WeakHamiltonian.hpp>
|
#include <Grid/Hadrons/Modules/MContraction/WeakHamiltonian.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MContraction/WeakHamiltonianEye.hpp>
|
#include <Grid/Hadrons/Modules/MContraction/WeakHamiltonianEye.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MContraction/WeakHamiltonianNonEye.hpp>
|
#include <Grid/Hadrons/Modules/MContraction/WeakHamiltonianNonEye.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MContraction/WeakNeutral4ptDisc.hpp>
|
#include <Grid/Hadrons/Modules/MContraction/WeakNeutral4ptDisc.hpp>
|
||||||
#include <Grid/Hadrons/Modules/MFermion/GaugeProp.hpp>
|
#include <Grid/Hadrons/Modules/MFermion/GaugeProp.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MGauge/Load.hpp>
|
#include <Grid/Hadrons/Modules/MGauge/Load.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MGauge/Random.hpp>
|
#include <Grid/Hadrons/Modules/MGauge/Random.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MGauge/StochEm.hpp>
|
#include <Grid/Hadrons/Modules/MGauge/StochEm.hpp>
|
||||||
#include <Grid/Hadrons/Modules/MGauge/Unit.hpp>
|
#include <Grid/Hadrons/Modules/MGauge/Unit.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MLoop/NoiseLoop.hpp>
|
#include <Grid/Hadrons/Modules/MLoop/NoiseLoop.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MScalar/ChargedProp.hpp>
|
// #include <Grid/Hadrons/Modules/MScalar/ChargedProp.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MScalar/FreeProp.hpp>
|
// #include <Grid/Hadrons/Modules/MScalar/FreeProp.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MScalar/Scalar.hpp>
|
// #include <Grid/Hadrons/Modules/MScalar/Scalar.hpp>
|
||||||
#include <Grid/Hadrons/Modules/MSink/Point.hpp>
|
#include <Grid/Hadrons/Modules/MSink/Point.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MSink/Smear.hpp>
|
#include <Grid/Hadrons/Modules/MSink/Smear.hpp>
|
||||||
#include <Grid/Hadrons/Modules/MSolver/RBPrecCG.hpp>
|
#include <Grid/Hadrons/Modules/MSolver/RBPrecCG.hpp>
|
||||||
#include <Grid/Hadrons/Modules/MSource/Point.hpp>
|
#include <Grid/Hadrons/Modules/MSource/Point.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MSource/SeqConserved.hpp>
|
#include <Grid/Hadrons/Modules/MSource/SeqConserved.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MSource/SeqGamma.hpp>
|
#include <Grid/Hadrons/Modules/MSource/SeqGamma.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MSource/Wall.hpp>
|
#include <Grid/Hadrons/Modules/MSource/Wall.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MSource/Z2.hpp>
|
#include <Grid/Hadrons/Modules/MSource/Z2.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MUtilities/TestSeqConserved.hpp>
|
#include <Grid/Hadrons/Modules/MUtilities/TestSeqConserved.hpp>
|
||||||
// #include <Grid/Hadrons/Modules/MUtilities/TestSeqGamma.hpp>
|
#include <Grid/Hadrons/Modules/MUtilities/TestSeqGamma.hpp>
|
||||||
|
@ -119,6 +119,7 @@ void TDWF<FImpl>::setup(void)
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
LOG(Message) << "Fermion boundary conditions: " << par().boundary
|
LOG(Message) << "Fermion boundary conditions: " << par().boundary
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
env().createGrid(par().Ls);
|
env().createGrid(par().Ls);
|
||||||
auto &U = envGet(LatticeGaugeField, par().gauge);
|
auto &U = envGet(LatticeGaugeField, par().gauge);
|
||||||
auto &g4 = *env().getGrid();
|
auto &g4 = *env().getGrid();
|
||||||
|
@ -115,6 +115,7 @@ void TWilson<FImpl>::setup(void)
|
|||||||
<< " using gauge field '" << par().gauge << "'" << std::endl;
|
<< " using gauge field '" << par().gauge << "'" << std::endl;
|
||||||
LOG(Message) << "Fermion boundary conditions: " << par().boundary
|
LOG(Message) << "Fermion boundary conditions: " << par().boundary
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
auto &U = envGet(LatticeGaugeField, par().gauge);
|
auto &U = envGet(LatticeGaugeField, par().gauge);
|
||||||
auto &grid = *env().getGrid();
|
auto &grid = *env().getGrid();
|
||||||
auto &gridRb = *env().getRbGrid();
|
auto &gridRb = *env().getRbGrid();
|
||||||
|
@ -71,8 +71,11 @@ public:
|
|||||||
virtual ~TBaryon(void) = default;
|
virtual ~TBaryon(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
|
// setup
|
||||||
|
virtual void setup(void);
|
||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
};
|
};
|
||||||
@ -97,14 +100,29 @@ std::vector<std::string> TBaryon<FImpl1, FImpl2, FImpl3>::getInput(void)
|
|||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename FImpl1, typename FImpl2, typename FImpl3>
|
||||||
|
std::vector<std::string> TBaryon<FImpl1, FImpl2, FImpl3>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl1, typename FImpl2, typename FImpl3>
|
template <typename FImpl1, typename FImpl2, typename FImpl3>
|
||||||
std::vector<std::string> TBaryon<FImpl1, FImpl2, FImpl3>::getOutput(void)
|
std::vector<std::string> TBaryon<FImpl1, FImpl2, FImpl3>::getOutput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> out = {getName()};
|
std::vector<std::string> out = {};
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// setup ///////////////////////////////////////////////////////////////////////
|
||||||
|
template <typename FImpl1, typename FImpl2, typename FImpl3>
|
||||||
|
void TBaryon<FImpl1, FImpl2, FImpl3>::setup(void)
|
||||||
|
{
|
||||||
|
envTmpLat(LatticeComplex, "c");
|
||||||
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
template <typename FImpl1, typename FImpl2, typename FImpl3>
|
template <typename FImpl1, typename FImpl2, typename FImpl3>
|
||||||
void TBaryon<FImpl1, FImpl2, FImpl3>::execute(void)
|
void TBaryon<FImpl1, FImpl2, FImpl3>::execute(void)
|
||||||
@ -114,10 +132,10 @@ void TBaryon<FImpl1, FImpl2, FImpl3>::execute(void)
|
|||||||
<< par().q3 << "'" << std::endl;
|
<< par().q3 << "'" << std::endl;
|
||||||
|
|
||||||
CorrWriter writer(par().output);
|
CorrWriter writer(par().output);
|
||||||
PropagatorField1 &q1 = *env().template getObject<PropagatorField1>(par().q1);
|
auto &q1 = envGet(PropagatorField1, par().q1);
|
||||||
PropagatorField2 &q2 = *env().template getObject<PropagatorField2>(par().q2);
|
auto &q2 = envGet(PropagatorField2, par().q2);
|
||||||
PropagatorField3 &q3 = *env().template getObject<PropagatorField3>(par().q2);
|
auto &q3 = envGet(PropagatorField3, par().q2);
|
||||||
LatticeComplex c(env().getGrid());
|
envGetTmp(LatticeComplex, c);
|
||||||
Result result;
|
Result result;
|
||||||
|
|
||||||
// FIXME: do contractions
|
// FIXME: do contractions
|
||||||
|
@ -67,6 +67,7 @@ public:
|
|||||||
virtual ~TDiscLoop(void) = default;
|
virtual ~TDiscLoop(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
@ -95,10 +96,18 @@ std::vector<std::string> TDiscLoop<FImpl>::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename FImpl>
|
||||||
|
std::vector<std::string> TDiscLoop<FImpl>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> out = {};
|
||||||
|
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TDiscLoop<FImpl>::getOutput(void)
|
std::vector<std::string> TDiscLoop<FImpl>::getOutput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> out = {getName()};
|
std::vector<std::string> out = {};
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
@ -107,7 +116,7 @@ std::vector<std::string> TDiscLoop<FImpl>::getOutput(void)
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TDiscLoop<FImpl>::setup(void)
|
void TDiscLoop<FImpl>::setup(void)
|
||||||
{
|
{
|
||||||
|
envTmpLat(LatticeComplex, "c");
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -119,12 +128,12 @@ void TDiscLoop<FImpl>::execute(void)
|
|||||||
<< " insertion." << std::endl;
|
<< " insertion." << std::endl;
|
||||||
|
|
||||||
CorrWriter writer(par().output);
|
CorrWriter writer(par().output);
|
||||||
PropagatorField &q_loop = *env().template getObject<PropagatorField>(par().q_loop);
|
auto &q_loop = envGet(PropagatorField, par().q_loop);
|
||||||
LatticeComplex c(env().getGrid());
|
|
||||||
Gamma gamma(par().gamma);
|
Gamma gamma(par().gamma);
|
||||||
std::vector<TComplex> buf;
|
std::vector<TComplex> buf;
|
||||||
Result result;
|
Result result;
|
||||||
|
|
||||||
|
envGetTmp(LatticeComplex, c);
|
||||||
c = trace(gamma*q_loop);
|
c = trace(gamma*q_loop);
|
||||||
sliceSum(c, buf, Tp);
|
sliceSum(c, buf, Tp);
|
||||||
|
|
||||||
|
@ -98,6 +98,7 @@ public:
|
|||||||
virtual ~TGamma3pt(void) = default;
|
virtual ~TGamma3pt(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
@ -126,10 +127,18 @@ std::vector<std::string> TGamma3pt<FImpl1, FImpl2, FImpl3>::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename FImpl1, typename FImpl2, typename FImpl3>
|
||||||
|
std::vector<std::string> TGamma3pt<FImpl1, FImpl2, FImpl3>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl1, typename FImpl2, typename FImpl3>
|
template <typename FImpl1, typename FImpl2, typename FImpl3>
|
||||||
std::vector<std::string> TGamma3pt<FImpl1, FImpl2, FImpl3>::getOutput(void)
|
std::vector<std::string> TGamma3pt<FImpl1, FImpl2, FImpl3>::getOutput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> out = {getName()};
|
std::vector<std::string> out = {};
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
@ -138,7 +147,7 @@ std::vector<std::string> TGamma3pt<FImpl1, FImpl2, FImpl3>::getOutput(void)
|
|||||||
template <typename FImpl1, typename FImpl2, typename FImpl3>
|
template <typename FImpl1, typename FImpl2, typename FImpl3>
|
||||||
void TGamma3pt<FImpl1, FImpl2, FImpl3>::setup(void)
|
void TGamma3pt<FImpl1, FImpl2, FImpl3>::setup(void)
|
||||||
{
|
{
|
||||||
|
envTmpLat(LatticeComplex, "c");
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -153,10 +162,9 @@ void TGamma3pt<FImpl1, FImpl2, FImpl3>::execute(void)
|
|||||||
// Initialise variables. q2 and q3 are normal propagators, q1 may be
|
// Initialise variables. q2 and q3 are normal propagators, q1 may be
|
||||||
// sink smeared.
|
// sink smeared.
|
||||||
CorrWriter writer(par().output);
|
CorrWriter writer(par().output);
|
||||||
SlicedPropagator1 &q1 = *env().template getObject<SlicedPropagator1>(par().q1);
|
auto &q1 = envGet(SlicedPropagator1, par().q1);
|
||||||
PropagatorField2 &q2 = *env().template getObject<PropagatorField2>(par().q2);
|
auto &q2 = envGet(PropagatorField2, par().q2);
|
||||||
PropagatorField3 &q3 = *env().template getObject<PropagatorField2>(par().q3);
|
auto &q3 = envGet(PropagatorField2, par().q3);
|
||||||
LatticeComplex c(env().getGrid());
|
|
||||||
Gamma g5(Gamma::Algebra::Gamma5);
|
Gamma g5(Gamma::Algebra::Gamma5);
|
||||||
Gamma gamma(par().gamma);
|
Gamma gamma(par().gamma);
|
||||||
std::vector<TComplex> buf;
|
std::vector<TComplex> buf;
|
||||||
@ -165,6 +173,7 @@ void TGamma3pt<FImpl1, FImpl2, FImpl3>::execute(void)
|
|||||||
// Extract relevant timeslice of sinked propagator q1, then contract &
|
// Extract relevant timeslice of sinked propagator q1, then contract &
|
||||||
// sum over all spacial positions of gamma insertion.
|
// sum over all spacial positions of gamma insertion.
|
||||||
SitePropagator1 q1Snk = q1[par().tSnk];
|
SitePropagator1 q1Snk = q1[par().tSnk];
|
||||||
|
envGetTmp(LatticeComplex, c);
|
||||||
c = trace(g5*q1Snk*adj(q2)*(g5*gamma)*q3);
|
c = trace(g5*q1Snk*adj(q2)*(g5*gamma)*q3);
|
||||||
sliceSum(c, buf, Tp);
|
sliceSum(c, buf, Tp);
|
||||||
|
|
||||||
|
@ -161,6 +161,7 @@ void TMeson<FImpl1, FImpl2>::parseGammaString(std::vector<GammaPair> &gammaList)
|
|||||||
// Parse individual contractions from input string.
|
// Parse individual contractions from input string.
|
||||||
gammaList = strToVec<GammaPair>(par().gammas);
|
gammaList = strToVec<GammaPair>(par().gammas);
|
||||||
}
|
}
|
||||||
|
envTmpLat(LatticeComplex, "c");
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -192,8 +193,8 @@ void TMeson<FImpl1, FImpl2>::execute(void)
|
|||||||
if (envHasType(SlicedPropagator1, par().q1) and
|
if (envHasType(SlicedPropagator1, par().q1) and
|
||||||
envHasType(SlicedPropagator2, par().q2))
|
envHasType(SlicedPropagator2, par().q2))
|
||||||
{
|
{
|
||||||
SlicedPropagator1 &q1 = envGet(SlicedPropagator1, par().q1);
|
auto &q1 = envGet(SlicedPropagator1, par().q1);
|
||||||
SlicedPropagator2 &q2 = envGet(SlicedPropagator2, par().q2);
|
auto &q2 = envGet(SlicedPropagator2, par().q2);
|
||||||
|
|
||||||
LOG(Message) << "(propagator already sinked)" << std::endl;
|
LOG(Message) << "(propagator already sinked)" << std::endl;
|
||||||
for (unsigned int i = 0; i < result.size(); ++i)
|
for (unsigned int i = 0; i < result.size(); ++i)
|
||||||
@ -209,10 +210,10 @@ void TMeson<FImpl1, FImpl2>::execute(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PropagatorField1 &q1 = envGet(PropagatorField1, par().q1);
|
auto &q1 = envGet(PropagatorField1, par().q1);
|
||||||
PropagatorField2 &q2 = envGet(PropagatorField2, par().q2);
|
auto &q2 = envGet(PropagatorField2, par().q2);
|
||||||
LatticeComplex c(env().getGrid());
|
|
||||||
|
|
||||||
|
envGetTmp(LatticeComplex, c);
|
||||||
LOG(Message) << "(using sink '" << par().sink << "')" << std::endl;
|
LOG(Message) << "(using sink '" << par().sink << "')" << std::endl;
|
||||||
for (unsigned int i = 0; i < result.size(); ++i)
|
for (unsigned int i = 0; i < result.size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -73,6 +73,7 @@ public:
|
|||||||
virtual ~TWardIdentity(void) = default;
|
virtual ~TWardIdentity(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
@ -103,10 +104,18 @@ std::vector<std::string> TWardIdentity<FImpl>::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename FImpl>
|
||||||
|
std::vector<std::string> TWardIdentity<FImpl>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TWardIdentity<FImpl>::getOutput(void)
|
std::vector<std::string> TWardIdentity<FImpl>::getOutput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> out = {getName()};
|
std::vector<std::string> out = {};
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
@ -120,6 +129,15 @@ void TWardIdentity<FImpl>::setup(void)
|
|||||||
{
|
{
|
||||||
HADRON_ERROR(Size, "Ls mismatch between quark action and propagator");
|
HADRON_ERROR(Size, "Ls mismatch between quark action and propagator");
|
||||||
}
|
}
|
||||||
|
envTmpLat(PropagatorField, "tmp");
|
||||||
|
envTmpLat(PropagatorField, "vector_WI");
|
||||||
|
if (par().test_axial)
|
||||||
|
{
|
||||||
|
envTmpLat(PropagatorField, "psi");
|
||||||
|
envTmpLat(LatticeComplex, "PP");
|
||||||
|
envTmpLat(LatticeComplex, "axial_defect");
|
||||||
|
envTmpLat(LatticeComplex, "PJ5q");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -129,12 +147,13 @@ void TWardIdentity<FImpl>::execute(void)
|
|||||||
LOG(Message) << "Performing Ward Identity checks for quark '" << par().q
|
LOG(Message) << "Performing Ward Identity checks for quark '" << par().q
|
||||||
<< "'." << std::endl;
|
<< "'." << std::endl;
|
||||||
|
|
||||||
PropagatorField tmp(env().getGrid()), vector_WI(env().getGrid());
|
auto &q = envGet(PropagatorField, par().q);
|
||||||
PropagatorField &q = *env().template getObject<PropagatorField>(par().q);
|
auto &act = envGet(FMat, par().action);
|
||||||
FMat &act = *(env().template getObject<FMat>(par().action));
|
|
||||||
Gamma g5(Gamma::Algebra::Gamma5);
|
Gamma g5(Gamma::Algebra::Gamma5);
|
||||||
|
|
||||||
// Compute D_mu V_mu, D here is backward derivative.
|
// Compute D_mu V_mu, D here is backward derivative.
|
||||||
|
envGetTmp(PropagatorField, tmp);
|
||||||
|
envGetTmp(PropagatorField, vector_WI);
|
||||||
vector_WI = zero;
|
vector_WI = zero;
|
||||||
for (unsigned int mu = 0; mu < Nd; ++mu)
|
for (unsigned int mu = 0; mu < Nd; ++mu)
|
||||||
{
|
{
|
||||||
@ -149,9 +168,10 @@ void TWardIdentity<FImpl>::execute(void)
|
|||||||
|
|
||||||
if (par().test_axial)
|
if (par().test_axial)
|
||||||
{
|
{
|
||||||
PropagatorField psi(env().getGrid());
|
envGetTmp(PropagatorField, psi);
|
||||||
LatticeComplex PP(env().getGrid()), axial_defect(env().getGrid()),
|
envGetTmp(LatticeComplex, PP);
|
||||||
PJ5q(env().getGrid());
|
envGetTmp(LatticeComplex, axial_defect);
|
||||||
|
envGetTmp(LatticeComplex, PJ5q);
|
||||||
std::vector<TComplex> axial_buf;
|
std::vector<TComplex> axial_buf;
|
||||||
|
|
||||||
// Compute <P|D_mu A_mu>, D is backwards derivative.
|
// Compute <P|D_mu A_mu>, D is backwards derivative.
|
||||||
|
@ -99,6 +99,7 @@ public:\
|
|||||||
virtual ~T##modname(void) = default;\
|
virtual ~T##modname(void) = default;\
|
||||||
/* dependency relation */ \
|
/* dependency relation */ \
|
||||||
virtual std::vector<std::string> getInput(void);\
|
virtual std::vector<std::string> getInput(void);\
|
||||||
|
virtual std::vector<std::string> getReference(void);\
|
||||||
virtual std::vector<std::string> getOutput(void);\
|
virtual std::vector<std::string> getOutput(void);\
|
||||||
public:\
|
public:\
|
||||||
std::vector<std::string> VA_label = {"V", "A"};\
|
std::vector<std::string> VA_label = {"V", "A"};\
|
||||||
|
@ -74,9 +74,16 @@ std::vector<std::string> TWeakHamiltonianEye::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> TWeakHamiltonianEye::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> out = {};
|
||||||
|
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<std::string> TWeakHamiltonianEye::getOutput(void)
|
std::vector<std::string> TWeakHamiltonianEye::getOutput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> out = {getName()};
|
std::vector<std::string> out = {};
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
@ -84,7 +91,15 @@ std::vector<std::string> TWeakHamiltonianEye::getOutput(void)
|
|||||||
// setup ///////////////////////////////////////////////////////////////////////
|
// setup ///////////////////////////////////////////////////////////////////////
|
||||||
void TWeakHamiltonianEye::setup(void)
|
void TWeakHamiltonianEye::setup(void)
|
||||||
{
|
{
|
||||||
|
unsigned int ndim = env().getNd();
|
||||||
|
|
||||||
|
envTmpLat(LatticeComplex, "expbuf");
|
||||||
|
envTmpLat(PropagatorField, "tmp1");
|
||||||
|
envTmpLat(LatticeComplex, "tmp2");
|
||||||
|
envTmp(std::vector<PropagatorField>, "S_body", 1, ndim, PropagatorField(env().getGrid()));
|
||||||
|
envTmp(std::vector<PropagatorField>, "S_loop", 1, ndim, PropagatorField(env().getGrid()));
|
||||||
|
envTmp(std::vector<LatticeComplex>, "E_body", 1, ndim, LatticeComplex(env().getGrid()));
|
||||||
|
envTmp(std::vector<LatticeComplex>, "E_loop", 1, ndim, LatticeComplex(env().getGrid()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -96,22 +111,22 @@ void TWeakHamiltonianEye::execute(void)
|
|||||||
<< "'." << std::endl;
|
<< "'." << std::endl;
|
||||||
|
|
||||||
CorrWriter writer(par().output);
|
CorrWriter writer(par().output);
|
||||||
SlicedPropagator &q1 = *env().template getObject<SlicedPropagator>(par().q1);
|
auto &q1 = envGet(SlicedPropagator, par().q1);
|
||||||
PropagatorField &q2 = *env().template getObject<PropagatorField>(par().q2);
|
auto &q2 = envGet(PropagatorField, par().q2);
|
||||||
PropagatorField &q3 = *env().template getObject<PropagatorField>(par().q3);
|
auto &q3 = envGet(PropagatorField, par().q3);
|
||||||
PropagatorField &q4 = *env().template getObject<PropagatorField>(par().q4);
|
auto &q4 = envGet(PropagatorField, par().q4);
|
||||||
Gamma g5 = Gamma(Gamma::Algebra::Gamma5);
|
Gamma g5 = Gamma(Gamma::Algebra::Gamma5);
|
||||||
LatticeComplex expbuf(env().getGrid());
|
|
||||||
std::vector<TComplex> corrbuf;
|
std::vector<TComplex> corrbuf;
|
||||||
std::vector<Result> result(n_eye_diag);
|
std::vector<Result> result(n_eye_diag);
|
||||||
unsigned int ndim = env().getNd();
|
unsigned int ndim = env().getNd();
|
||||||
|
|
||||||
PropagatorField tmp1(env().getGrid());
|
envGetTmp(LatticeComplex, expbuf);
|
||||||
LatticeComplex tmp2(env().getGrid());
|
envGetTmp(PropagatorField, tmp1);
|
||||||
std::vector<PropagatorField> S_body(ndim, tmp1);
|
envGetTmp(LatticeComplex, tmp2);
|
||||||
std::vector<PropagatorField> S_loop(ndim, tmp1);
|
envGetTmp(std::vector<PropagatorField>, S_body);
|
||||||
std::vector<LatticeComplex> E_body(ndim, tmp2);
|
envGetTmp(std::vector<PropagatorField>, S_loop);
|
||||||
std::vector<LatticeComplex> E_loop(ndim, tmp2);
|
envGetTmp(std::vector<LatticeComplex>, E_body);
|
||||||
|
envGetTmp(std::vector<LatticeComplex>, E_loop);
|
||||||
|
|
||||||
// Get sink timeslice of q1.
|
// Get sink timeslice of q1.
|
||||||
SitePropagator q1Snk = q1[par().tSnk];
|
SitePropagator q1Snk = q1[par().tSnk];
|
||||||
|
@ -74,9 +74,15 @@ std::vector<std::string> TWeakHamiltonianNonEye::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> TWeakHamiltonianNonEye::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> out = {};
|
||||||
|
|
||||||
|
return out;
|
||||||
|
}
|
||||||
std::vector<std::string> TWeakHamiltonianNonEye::getOutput(void)
|
std::vector<std::string> TWeakHamiltonianNonEye::getOutput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> out = {getName()};
|
std::vector<std::string> out = {};
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
@ -84,7 +90,15 @@ std::vector<std::string> TWeakHamiltonianNonEye::getOutput(void)
|
|||||||
// setup ///////////////////////////////////////////////////////////////////////
|
// setup ///////////////////////////////////////////////////////////////////////
|
||||||
void TWeakHamiltonianNonEye::setup(void)
|
void TWeakHamiltonianNonEye::setup(void)
|
||||||
{
|
{
|
||||||
|
unsigned int ndim = env().getNd();
|
||||||
|
|
||||||
|
envTmpLat(LatticeComplex, "expbuf");
|
||||||
|
envTmpLat(PropagatorField, "tmp1");
|
||||||
|
envTmpLat(LatticeComplex, "tmp2");
|
||||||
|
envTmp(std::vector<PropagatorField>, "C_i_side_loop", 1, ndim, PropagatorField(env().getGrid()));
|
||||||
|
envTmp(std::vector<PropagatorField>, "C_f_side_loop", 1, ndim, PropagatorField(env().getGrid()));
|
||||||
|
envTmp(std::vector<LatticeComplex>, "W_i_side_loop", 1, ndim, LatticeComplex(env().getGrid()));
|
||||||
|
envTmp(std::vector<LatticeComplex>, "W_f_side_loop", 1, ndim, LatticeComplex(env().getGrid()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -96,22 +110,22 @@ void TWeakHamiltonianNonEye::execute(void)
|
|||||||
<< "'." << std::endl;
|
<< "'." << std::endl;
|
||||||
|
|
||||||
CorrWriter writer(par().output);
|
CorrWriter writer(par().output);
|
||||||
PropagatorField &q1 = *env().template getObject<PropagatorField>(par().q1);
|
auto &q1 = envGet(PropagatorField, par().q1);
|
||||||
PropagatorField &q2 = *env().template getObject<PropagatorField>(par().q2);
|
auto &q2 = envGet(PropagatorField, par().q2);
|
||||||
PropagatorField &q3 = *env().template getObject<PropagatorField>(par().q3);
|
auto &q3 = envGet(PropagatorField, par().q3);
|
||||||
PropagatorField &q4 = *env().template getObject<PropagatorField>(par().q4);
|
auto &q4 = envGet(PropagatorField, par().q4);
|
||||||
Gamma g5 = Gamma(Gamma::Algebra::Gamma5);
|
Gamma g5 = Gamma(Gamma::Algebra::Gamma5);
|
||||||
LatticeComplex expbuf(env().getGrid());
|
|
||||||
std::vector<TComplex> corrbuf;
|
std::vector<TComplex> corrbuf;
|
||||||
std::vector<Result> result(n_noneye_diag);
|
std::vector<Result> result(n_noneye_diag);
|
||||||
unsigned int ndim = env().getNd();
|
unsigned int ndim = env().getNd();
|
||||||
|
|
||||||
PropagatorField tmp1(env().getGrid());
|
envGetTmp(LatticeComplex, expbuf);
|
||||||
LatticeComplex tmp2(env().getGrid());
|
envGetTmp(PropagatorField, tmp1);
|
||||||
std::vector<PropagatorField> C_i_side_loop(ndim, tmp1);
|
envGetTmp(LatticeComplex, tmp2);
|
||||||
std::vector<PropagatorField> C_f_side_loop(ndim, tmp1);
|
envGetTmp(std::vector<PropagatorField>, C_i_side_loop);
|
||||||
std::vector<LatticeComplex> W_i_side_loop(ndim, tmp2);
|
envGetTmp(std::vector<PropagatorField>, C_f_side_loop);
|
||||||
std::vector<LatticeComplex> W_f_side_loop(ndim, tmp2);
|
envGetTmp(std::vector<LatticeComplex>, W_i_side_loop);
|
||||||
|
envGetTmp(std::vector<LatticeComplex>, W_f_side_loop);
|
||||||
|
|
||||||
// Setup for C-type contractions.
|
// Setup for C-type contractions.
|
||||||
for (int mu = 0; mu < ndim; ++mu)
|
for (int mu = 0; mu < ndim; ++mu)
|
||||||
|
@ -76,9 +76,16 @@ std::vector<std::string> TWeakNeutral4ptDisc::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> TWeakNeutral4ptDisc::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<std::string> TWeakNeutral4ptDisc::getOutput(void)
|
std::vector<std::string> TWeakNeutral4ptDisc::getOutput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> out = {getName()};
|
std::vector<std::string> out = {};
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
@ -86,7 +93,13 @@ std::vector<std::string> TWeakNeutral4ptDisc::getOutput(void)
|
|||||||
// setup ///////////////////////////////////////////////////////////////////////
|
// setup ///////////////////////////////////////////////////////////////////////
|
||||||
void TWeakNeutral4ptDisc::setup(void)
|
void TWeakNeutral4ptDisc::setup(void)
|
||||||
{
|
{
|
||||||
|
unsigned int ndim = env().getNd();
|
||||||
|
|
||||||
|
envTmpLat(LatticeComplex, "expbuf");
|
||||||
|
envTmpLat(PropagatorField, "tmp");
|
||||||
|
envTmpLat(LatticeComplex, "curr");
|
||||||
|
envTmp(std::vector<PropagatorField>, "meson", 1, ndim, PropagatorField(env().getGrid()));
|
||||||
|
envTmp(std::vector<PropagatorField>, "loop", 1, ndim, PropagatorField(env().getGrid()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -98,20 +111,20 @@ void TWeakNeutral4ptDisc::execute(void)
|
|||||||
<< "'." << std::endl;
|
<< "'." << std::endl;
|
||||||
|
|
||||||
CorrWriter writer(par().output);
|
CorrWriter writer(par().output);
|
||||||
PropagatorField &q1 = *env().template getObject<PropagatorField>(par().q1);
|
auto &q1 = envGet(PropagatorField, par().q1);
|
||||||
PropagatorField &q2 = *env().template getObject<PropagatorField>(par().q2);
|
auto &q2 = envGet(PropagatorField, par().q2);
|
||||||
PropagatorField &q3 = *env().template getObject<PropagatorField>(par().q3);
|
auto &q3 = envGet(PropagatorField, par().q3);
|
||||||
PropagatorField &q4 = *env().template getObject<PropagatorField>(par().q4);
|
auto &q4 = envGet(PropagatorField, par().q4);
|
||||||
Gamma g5 = Gamma(Gamma::Algebra::Gamma5);
|
Gamma g5 = Gamma(Gamma::Algebra::Gamma5);
|
||||||
LatticeComplex expbuf(env().getGrid());
|
|
||||||
std::vector<TComplex> corrbuf;
|
std::vector<TComplex> corrbuf;
|
||||||
std::vector<Result> result(n_neut_disc_diag);
|
std::vector<Result> result(n_neut_disc_diag);
|
||||||
unsigned int ndim = env().getNd();
|
unsigned int ndim = env().getNd();
|
||||||
|
|
||||||
PropagatorField tmp(env().getGrid());
|
envGetTmp(LatticeComplex, expbuf);
|
||||||
std::vector<PropagatorField> meson(ndim, tmp);
|
envGetTmp(PropagatorField, tmp);
|
||||||
std::vector<PropagatorField> loop(ndim, tmp);
|
envGetTmp(LatticeComplex, curr);
|
||||||
LatticeComplex curr(env().getGrid());
|
envGetTmp(std::vector<PropagatorField>, meson);
|
||||||
|
envGetTmp(std::vector<PropagatorField>, loop);
|
||||||
|
|
||||||
// Setup for type 1 contractions.
|
// Setup for type 1 contractions.
|
||||||
for (int mu = 0; mu < ndim; ++mu)
|
for (int mu = 0; mu < ndim; ++mu)
|
||||||
|
@ -154,14 +154,14 @@ void TGaugeProp<FImpl>::execute(void)
|
|||||||
LOG(Message) << "Computing quark propagator '" << getName() << "'"
|
LOG(Message) << "Computing quark propagator '" << getName() << "'"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
FermionField &source = envGetTmp(FermionField, "source");
|
|
||||||
FermionField &sol = envGetTmp(FermionField, "sol");
|
|
||||||
FermionField &tmp = envGetTmp(FermionField, "tmp");
|
|
||||||
std::string propName = (Ls_ == 1) ? getName() : (getName() + "_5d");
|
std::string propName = (Ls_ == 1) ? getName() : (getName() + "_5d");
|
||||||
PropagatorField &prop = envGet(PropagatorField, propName);
|
auto &prop = envGet(PropagatorField, propName);
|
||||||
PropagatorField &fullSrc = envGet(PropagatorField, par().source);
|
auto &fullSrc = envGet(PropagatorField, par().source);
|
||||||
SolverFn &solver = envGet(SolverFn, par().solver);
|
auto &solver = envGet(SolverFn, par().solver);
|
||||||
|
|
||||||
|
envGetTmp(FermionField, source);
|
||||||
|
envGetTmp(FermionField, sol);
|
||||||
|
envGetTmp(FermionField, tmp);
|
||||||
LOG(Message) << "Inverting using solver '" << par().solver
|
LOG(Message) << "Inverting using solver '" << par().solver
|
||||||
<< "' on source '" << par().source << "'" << std::endl;
|
<< "' on source '" << par().source << "'" << std::endl;
|
||||||
for (unsigned int s = 0; s < Ns; ++s)
|
for (unsigned int s = 0; s < Ns; ++s)
|
||||||
|
@ -49,6 +49,13 @@ std::vector<std::string> TLoad::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> TLoad::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref;
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<std::string> TLoad::getOutput(void)
|
std::vector<std::string> TLoad::getOutput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> out = {getName()};
|
std::vector<std::string> out = {getName()};
|
||||||
@ -59,7 +66,7 @@ std::vector<std::string> TLoad::getOutput(void)
|
|||||||
// setup ///////////////////////////////////////////////////////////////////////
|
// setup ///////////////////////////////////////////////////////////////////////
|
||||||
void TLoad::setup(void)
|
void TLoad::setup(void)
|
||||||
{
|
{
|
||||||
env().registerLattice<LatticeGaugeField>(getName());
|
envCreateLat(LatticeGaugeField, getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -67,11 +74,11 @@ void TLoad::execute(void)
|
|||||||
{
|
{
|
||||||
FieldMetaData header;
|
FieldMetaData header;
|
||||||
std::string fileName = par().file + "."
|
std::string fileName = par().file + "."
|
||||||
+ std::to_string(env().getTrajectory());
|
+ std::to_string(vm().getTrajectory());
|
||||||
|
|
||||||
LOG(Message) << "Loading NERSC configuration from file '" << fileName
|
LOG(Message) << "Loading NERSC configuration from file '" << fileName
|
||||||
<< "'" << std::endl;
|
<< "'" << std::endl;
|
||||||
LatticeGaugeField &U = *env().createLattice<LatticeGaugeField>(getName());
|
|
||||||
|
auto &U = envGet(LatticeGaugeField, getName());
|
||||||
NerscIO::readConfiguration(U, header, fileName);
|
NerscIO::readConfiguration(U, header, fileName);
|
||||||
LOG(Message) << "NERSC header:" << std::endl;
|
LOG(Message) << "NERSC header:" << std::endl;
|
||||||
dump_meta_data(header, LOG(Message));
|
dump_meta_data(header, LOG(Message));
|
||||||
|
@ -57,6 +57,7 @@ public:
|
|||||||
virtual ~TLoad(void) = default;
|
virtual ~TLoad(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
|
@ -44,7 +44,16 @@ TRandom::TRandom(const std::string name)
|
|||||||
// dependencies/products ///////////////////////////////////////////////////////
|
// dependencies/products ///////////////////////////////////////////////////////
|
||||||
std::vector<std::string> TRandom::getInput(void)
|
std::vector<std::string> TRandom::getInput(void)
|
||||||
{
|
{
|
||||||
return std::vector<std::string>();
|
std::vector<std::string> in;
|
||||||
|
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> TRandom::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref;
|
||||||
|
|
||||||
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> TRandom::getOutput(void)
|
std::vector<std::string> TRandom::getOutput(void)
|
||||||
@ -57,13 +66,14 @@ std::vector<std::string> TRandom::getOutput(void)
|
|||||||
// setup ///////////////////////////////////////////////////////////////////////
|
// setup ///////////////////////////////////////////////////////////////////////
|
||||||
void TRandom::setup(void)
|
void TRandom::setup(void)
|
||||||
{
|
{
|
||||||
env().registerLattice<LatticeGaugeField>(getName());
|
envCreateLat(LatticeGaugeField, getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
void TRandom::execute(void)
|
void TRandom::execute(void)
|
||||||
{
|
{
|
||||||
LOG(Message) << "Generating random gauge configuration" << std::endl;
|
LOG(Message) << "Generating random gauge configuration" << std::endl;
|
||||||
LatticeGaugeField &U = *env().createLattice<LatticeGaugeField>(getName());
|
|
||||||
|
auto &U = envGet(LatticeGaugeField, getName());
|
||||||
SU3::HotConfiguration(*env().get4dRng(), U);
|
SU3::HotConfiguration(*env().get4dRng(), U);
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,7 @@ public:
|
|||||||
virtual ~TRandom(void) = default;
|
virtual ~TRandom(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
|
@ -47,6 +47,13 @@ std::vector<std::string> TStochEm::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> TStochEm::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<std::string> TStochEm::getOutput(void)
|
std::vector<std::string> TStochEm::getOutput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> out = {getName()};
|
std::vector<std::string> out = {getName()};
|
||||||
@ -57,32 +64,28 @@ std::vector<std::string> TStochEm::getOutput(void)
|
|||||||
// setup ///////////////////////////////////////////////////////////////////////
|
// setup ///////////////////////////////////////////////////////////////////////
|
||||||
void TStochEm::setup(void)
|
void TStochEm::setup(void)
|
||||||
{
|
{
|
||||||
if (!env().hasRegisteredObject("_" + getName() + "_weight"))
|
if (!env().hasCreatedObject("_" + getName() + "_weight"))
|
||||||
{
|
{
|
||||||
env().registerLattice<EmComp>("_" + getName() + "_weight");
|
envCacheLat(EmComp, "_" + getName() + "_weight");
|
||||||
}
|
}
|
||||||
env().registerLattice<EmField>(getName());
|
envCreateLat(EmField, getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
void TStochEm::execute(void)
|
void TStochEm::execute(void)
|
||||||
{
|
{
|
||||||
|
LOG(Message) << "Generating stochatic EM potential..." << std::endl;
|
||||||
|
|
||||||
PhotonR photon(par().gauge, par().zmScheme);
|
PhotonR photon(par().gauge, par().zmScheme);
|
||||||
EmField &a = *env().createLattice<EmField>(getName());
|
auto &a = envGet(EmField, getName());
|
||||||
EmComp *w;
|
auto &w = envGet(EmComp, "_" + getName() + "_weight");
|
||||||
|
|
||||||
if (!env().hasCreatedObject("_" + getName() + "_weight"))
|
if (!env().hasCreatedObject("_" + getName() + "_weight"))
|
||||||
{
|
{
|
||||||
LOG(Message) << "Caching stochatic EM potential weight (gauge: "
|
LOG(Message) << "Caching stochatic EM potential weight (gauge: "
|
||||||
<< par().gauge << ", zero-mode scheme: "
|
<< par().gauge << ", zero-mode scheme: "
|
||||||
<< par().zmScheme << ")..." << std::endl;
|
<< par().zmScheme << ")..." << std::endl;
|
||||||
w = env().createLattice<EmComp>("_" + getName() + "_weight");
|
photon.StochasticWeight(w);
|
||||||
photon.StochasticWeight(*w);
|
|
||||||
}
|
}
|
||||||
else
|
photon.StochasticField(a, *env().get4dRng(), w);
|
||||||
{
|
|
||||||
w = env().getObject<EmComp>("_" + getName() + "_weight");
|
|
||||||
}
|
|
||||||
LOG(Message) << "Generating stochatic EM potential..." << std::endl;
|
|
||||||
photon.StochasticField(a, *env().get4dRng(), *w);
|
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,7 @@ public:
|
|||||||
virtual ~TStochEm(void) = default;
|
virtual ~TStochEm(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
|
@ -71,6 +71,7 @@ void TUnit::setup(void)
|
|||||||
void TUnit::execute(void)
|
void TUnit::execute(void)
|
||||||
{
|
{
|
||||||
LOG(Message) << "Creating unit gauge configuration" << std::endl;
|
LOG(Message) << "Creating unit gauge configuration" << std::endl;
|
||||||
|
|
||||||
auto &U = envGet(LatticeGaugeField, getName());
|
auto &U = envGet(LatticeGaugeField, getName());
|
||||||
SU3::ColdConfiguration(*env().get4dRng(), U);
|
SU3::ColdConfiguration(*env().get4dRng(), U);
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,7 @@ public:
|
|||||||
virtual ~TNoiseLoop(void) = default;
|
virtual ~TNoiseLoop(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
@ -101,6 +102,15 @@ std::vector<std::string> TNoiseLoop<FImpl>::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <typename FImpl>
|
||||||
|
std::vector<std::string> TNoiseLoop<FImpl>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> out = {};
|
||||||
|
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TNoiseLoop<FImpl>::getOutput(void)
|
std::vector<std::string> TNoiseLoop<FImpl>::getOutput(void)
|
||||||
{
|
{
|
||||||
@ -113,16 +123,16 @@ std::vector<std::string> TNoiseLoop<FImpl>::getOutput(void)
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TNoiseLoop<FImpl>::setup(void)
|
void TNoiseLoop<FImpl>::setup(void)
|
||||||
{
|
{
|
||||||
env().template registerLattice<PropagatorField>(getName());
|
envCreateLat(PropagatorField, getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TNoiseLoop<FImpl>::execute(void)
|
void TNoiseLoop<FImpl>::execute(void)
|
||||||
{
|
{
|
||||||
PropagatorField &loop = *env().template createLattice<PropagatorField>(getName());
|
auto &loop = envGet(PropagatorField, getName());
|
||||||
PropagatorField &q = *env().template getObject<PropagatorField>(par().q);
|
auto &q = envGet(PropagatorField, par().q);
|
||||||
PropagatorField &eta = *env().template getObject<PropagatorField>(par().eta);
|
auto &eta = envGet(PropagatorField, par().eta);
|
||||||
loop = q*adj(eta);
|
loop = q*adj(eta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,17 +123,18 @@ void TPoint<FImpl>::setup(void)
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TPoint<FImpl>::execute(void)
|
void TPoint<FImpl>::execute(void)
|
||||||
{
|
{
|
||||||
std::vector<Real> p = strToVec<Real>(par().mom);
|
|
||||||
LatticeComplex &ph = envGet(LatticeComplex, momphName_);
|
|
||||||
Complex i(0.0,1.0);
|
|
||||||
|
|
||||||
LOG(Message) << "Setting up point sink function for momentum ["
|
LOG(Message) << "Setting up point sink function for momentum ["
|
||||||
<< par().mom << "]" << std::endl;
|
<< par().mom << "]" << std::endl;
|
||||||
|
|
||||||
|
auto &ph = envGet(LatticeComplex, momphName_);
|
||||||
|
|
||||||
if (!hasPhase_)
|
if (!hasPhase_)
|
||||||
{
|
{
|
||||||
LatticeComplex &coor = envGetTmp(LatticeComplex, "coor");
|
Complex i(0.0,1.0);
|
||||||
|
std::vector<Real> p;
|
||||||
|
|
||||||
|
envGetTmp(LatticeComplex, coor);
|
||||||
|
p = strToVec<Real>(par().mom);
|
||||||
ph = zero;
|
ph = zero;
|
||||||
for(unsigned int mu = 0; mu < env().getNd(); mu++)
|
for(unsigned int mu = 0; mu < env().getNd(); mu++)
|
||||||
{
|
{
|
||||||
|
@ -61,6 +61,7 @@ public:
|
|||||||
virtual ~TSmear(void) = default;
|
virtual ~TSmear(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
@ -89,6 +90,14 @@ std::vector<std::string> TSmear<FImpl>::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename FImpl>
|
||||||
|
std::vector<std::string> TSmear<FImpl>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TSmear<FImpl>::getOutput(void)
|
std::vector<std::string> TSmear<FImpl>::getOutput(void)
|
||||||
{
|
{
|
||||||
@ -101,9 +110,7 @@ std::vector<std::string> TSmear<FImpl>::getOutput(void)
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TSmear<FImpl>::setup(void)
|
void TSmear<FImpl>::setup(void)
|
||||||
{
|
{
|
||||||
unsigned int nt = env().getDim(Tp);
|
envCreate(SlicedPropagator, getName(), 1, env().getDim(Tp));
|
||||||
unsigned int size = nt * sizeof(SitePropagator);
|
|
||||||
env().registerObject(getName(), size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -114,11 +121,11 @@ void TSmear<FImpl>::execute(void)
|
|||||||
<< "' using sink function '" << par().sink << "'."
|
<< "' using sink function '" << par().sink << "'."
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
SinkFn &sink = *env().template getObject<SinkFn>(par().sink);
|
auto &sink = envGet(SinkFn, par().sink);
|
||||||
PropagatorField &q = *env().template getObject<PropagatorField>(par().q);
|
auto &q = envGet(PropagatorField, par().q);
|
||||||
SlicedPropagator *out = new SlicedPropagator(env().getDim(Tp));
|
auto &out = envGet(SlicedPropagator, getName());
|
||||||
*out = sink(q);
|
|
||||||
env().setObject(getName(), out);
|
out = sink(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
END_MODULE_NAMESPACE
|
END_MODULE_NAMESPACE
|
||||||
|
@ -128,12 +128,13 @@ void TPoint<FImpl>::setup(void)
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TPoint<FImpl>::execute(void)
|
void TPoint<FImpl>::execute(void)
|
||||||
{
|
{
|
||||||
std::vector<int> position = strToVec<int>(par().position);
|
|
||||||
SitePropagator id;
|
|
||||||
|
|
||||||
LOG(Message) << "Creating point source at position [" << par().position
|
LOG(Message) << "Creating point source at position [" << par().position
|
||||||
<< "]" << std::endl;
|
<< "]" << std::endl;
|
||||||
PropagatorField &src = envGet(PropagatorField, getName());
|
|
||||||
|
std::vector<int> position = strToVec<int>(par().position);
|
||||||
|
auto &src = envGet(PropagatorField, getName());
|
||||||
|
SitePropagator id;
|
||||||
|
|
||||||
id = 1.;
|
id = 1.;
|
||||||
src = zero;
|
src = zero;
|
||||||
pokeSite(id, src, position);
|
pokeSite(id, src, position);
|
||||||
|
@ -82,6 +82,7 @@ public:
|
|||||||
virtual ~TSeqConserved(void) = default;
|
virtual ~TSeqConserved(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
@ -110,6 +111,14 @@ std::vector<std::string> TSeqConserved<FImpl>::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename FImpl>
|
||||||
|
std::vector<std::string> TSeqConserved<FImpl>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TSeqConserved<FImpl>::getOutput(void)
|
std::vector<std::string> TSeqConserved<FImpl>::getOutput(void)
|
||||||
{
|
{
|
||||||
@ -123,7 +132,7 @@ template <typename FImpl>
|
|||||||
void TSeqConserved<FImpl>::setup(void)
|
void TSeqConserved<FImpl>::setup(void)
|
||||||
{
|
{
|
||||||
auto Ls_ = env().getObjectLs(par().action);
|
auto Ls_ = env().getObjectLs(par().action);
|
||||||
env().template registerLattice<PropagatorField>(getName(), Ls_);
|
envCreateLat(PropagatorField, getName(), Ls_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -143,9 +152,9 @@ void TSeqConserved<FImpl>::execute(void)
|
|||||||
<< par().mu << ") for " << par().tA << " <= t <= "
|
<< par().mu << ") for " << par().tA << " <= t <= "
|
||||||
<< par().tB << std::endl;
|
<< par().tB << std::endl;
|
||||||
}
|
}
|
||||||
PropagatorField &src = *env().template createLattice<PropagatorField>(getName());
|
auto &src = envGet(PropagatorField, getName());
|
||||||
PropagatorField &q = *env().template getObject<PropagatorField>(par().q);
|
auto &q = envGet(PropagatorField, par().q);
|
||||||
FMat &mat = *(env().template getObject<FMat>(par().action));
|
auto &mat = envGet(FMat, par().action);
|
||||||
|
|
||||||
std::vector<Real> mom = strToVec<Real>(par().mom);
|
std::vector<Real> mom = strToVec<Real>(par().mom);
|
||||||
mat.SeqConservedCurrent(q, src, par().curr_type, par().mu,
|
mat.SeqConservedCurrent(q, src, par().curr_type, par().mu,
|
||||||
|
@ -80,12 +80,16 @@ public:
|
|||||||
virtual ~TSeqGamma(void) = default;
|
virtual ~TSeqGamma(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
virtual void setup(void);
|
virtual void setup(void);
|
||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
|
private:
|
||||||
|
bool hasPhase_{false};
|
||||||
|
std::string momphName_, tName_;
|
||||||
};
|
};
|
||||||
|
|
||||||
MODULE_REGISTER_NS(SeqGamma, TSeqGamma<FIMPL>, MSource);
|
MODULE_REGISTER_NS(SeqGamma, TSeqGamma<FIMPL>, MSource);
|
||||||
@ -97,6 +101,8 @@ MODULE_REGISTER_NS(SeqGamma, TSeqGamma<FIMPL>, MSource);
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
TSeqGamma<FImpl>::TSeqGamma(const std::string name)
|
TSeqGamma<FImpl>::TSeqGamma(const std::string name)
|
||||||
: Module<SeqGammaPar>(name)
|
: Module<SeqGammaPar>(name)
|
||||||
|
, momphName_ (name + "_momph")
|
||||||
|
, tName_ (name + "_t")
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// dependencies/products ///////////////////////////////////////////////////////
|
// dependencies/products ///////////////////////////////////////////////////////
|
||||||
@ -108,6 +114,14 @@ std::vector<std::string> TSeqGamma<FImpl>::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename FImpl>
|
||||||
|
std::vector<std::string> TSeqGamma<FImpl>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TSeqGamma<FImpl>::getOutput(void)
|
std::vector<std::string> TSeqGamma<FImpl>::getOutput(void)
|
||||||
{
|
{
|
||||||
@ -120,7 +134,10 @@ std::vector<std::string> TSeqGamma<FImpl>::getOutput(void)
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TSeqGamma<FImpl>::setup(void)
|
void TSeqGamma<FImpl>::setup(void)
|
||||||
{
|
{
|
||||||
env().template registerLattice<PropagatorField>(getName());
|
envCreateLat(PropagatorField, getName());
|
||||||
|
envCacheLat(Lattice<iScalar<vInteger>>, tName_);
|
||||||
|
envCacheLat(LatticeComplex, momphName_);
|
||||||
|
envTmpLat(LatticeComplex, "coor");
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -138,23 +155,29 @@ void TSeqGamma<FImpl>::execute(void)
|
|||||||
<< " sequential source for "
|
<< " sequential source for "
|
||||||
<< par().tA << " <= t <= " << par().tB << std::endl;
|
<< par().tA << " <= t <= " << par().tB << std::endl;
|
||||||
}
|
}
|
||||||
PropagatorField &src = *env().template createLattice<PropagatorField>(getName());
|
auto &src = envGet(PropagatorField, getName());
|
||||||
PropagatorField &q = *env().template getObject<PropagatorField>(par().q);
|
auto &q = envGet(PropagatorField, par().q);
|
||||||
Lattice<iScalar<vInteger>> t(env().getGrid());
|
auto &ph = envGet(LatticeComplex, momphName_);
|
||||||
LatticeComplex ph(env().getGrid()), coor(env().getGrid());
|
auto &t = envGet(Lattice<iScalar<vInteger>>, tName_);
|
||||||
Gamma g(par().gamma);
|
Gamma g(par().gamma);
|
||||||
std::vector<Real> p;
|
|
||||||
Complex i(0.0,1.0);
|
|
||||||
|
|
||||||
|
if (!hasPhase_)
|
||||||
|
{
|
||||||
|
Complex i(0.0,1.0);
|
||||||
|
std::vector<Real> p;
|
||||||
|
|
||||||
|
envGetTmp(LatticeComplex, coor);
|
||||||
p = strToVec<Real>(par().mom);
|
p = strToVec<Real>(par().mom);
|
||||||
ph = zero;
|
ph = zero;
|
||||||
for(unsigned int mu = 0; mu < env().getNd(); mu++)
|
for(unsigned int mu = 0; mu < env().getNd(); mu++)
|
||||||
{
|
{
|
||||||
LatticeCoordinate(coor, mu);
|
LatticeCoordinate(coor, mu);
|
||||||
ph = ph + p[mu]*coor*((1./(env().getGrid()->_fdimensions[mu])));
|
ph = ph + (p[mu]/env().getGrid()->_fdimensions[mu])*coor;
|
||||||
}
|
}
|
||||||
ph = exp((Real)(2*M_PI)*i*ph);
|
ph = exp((Real)(2*M_PI)*i*ph);
|
||||||
LatticeCoordinate(t, Tp);
|
LatticeCoordinate(t, Tp);
|
||||||
|
hasPhase_ = true;
|
||||||
|
}
|
||||||
src = where((t >= par().tA) and (t <= par().tB), ph*(g*q), 0.*q);
|
src = where((t >= par().tA) and (t <= par().tB), ph*(g*q), 0.*q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,12 +72,16 @@ public:
|
|||||||
virtual ~TWall(void) = default;
|
virtual ~TWall(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
virtual void setup(void);
|
virtual void setup(void);
|
||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
|
private:
|
||||||
|
bool hasPhase_{false};
|
||||||
|
std::string momphName_, tName_;
|
||||||
};
|
};
|
||||||
|
|
||||||
MODULE_REGISTER_NS(Wall, TWall<FIMPL>, MSource);
|
MODULE_REGISTER_NS(Wall, TWall<FIMPL>, MSource);
|
||||||
@ -89,17 +93,27 @@ MODULE_REGISTER_NS(Wall, TWall<FIMPL>, MSource);
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
TWall<FImpl>::TWall(const std::string name)
|
TWall<FImpl>::TWall(const std::string name)
|
||||||
: Module<WallPar>(name)
|
: Module<WallPar>(name)
|
||||||
|
, momphName_ (name + "_momph")
|
||||||
|
, tName_ (name + "_t")
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// dependencies/products ///////////////////////////////////////////////////////
|
// dependencies/products ///////////////////////////////////////////////////////
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TWall<FImpl>::getInput(void)
|
std::vector<std::string> TWall<FImpl>::getInput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> in;
|
std::vector<std::string> in = {};
|
||||||
|
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename FImpl>
|
||||||
|
std::vector<std::string> TWall<FImpl>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TWall<FImpl>::getOutput(void)
|
std::vector<std::string> TWall<FImpl>::getOutput(void)
|
||||||
{
|
{
|
||||||
@ -112,7 +126,7 @@ std::vector<std::string> TWall<FImpl>::getOutput(void)
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TWall<FImpl>::setup(void)
|
void TWall<FImpl>::setup(void)
|
||||||
{
|
{
|
||||||
env().template registerLattice<PropagatorField>(getName());
|
envCreateLat(PropagatorField, getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
@ -122,21 +136,28 @@ void TWall<FImpl>::execute(void)
|
|||||||
LOG(Message) << "Generating wall source at t = " << par().tW
|
LOG(Message) << "Generating wall source at t = " << par().tW
|
||||||
<< " with momentum " << par().mom << std::endl;
|
<< " with momentum " << par().mom << std::endl;
|
||||||
|
|
||||||
PropagatorField &src = *env().template createLattice<PropagatorField>(getName());
|
auto &src = envGet(PropagatorField, getName());
|
||||||
Lattice<iScalar<vInteger>> t(env().getGrid());
|
auto &ph = envGet(LatticeComplex, momphName_);
|
||||||
LatticeComplex ph(env().getGrid()), coor(env().getGrid());
|
auto &t = envGet(Lattice<iScalar<vInteger>>, tName_);
|
||||||
std::vector<Real> p;
|
|
||||||
Complex i(0.0,1.0);
|
|
||||||
|
|
||||||
|
if (!hasPhase_)
|
||||||
|
{
|
||||||
|
Complex i(0.0,1.0);
|
||||||
|
std::vector<Real> p;
|
||||||
|
|
||||||
|
envGetTmp(LatticeComplex, coor);
|
||||||
p = strToVec<Real>(par().mom);
|
p = strToVec<Real>(par().mom);
|
||||||
ph = zero;
|
ph = zero;
|
||||||
for(unsigned int mu = 0; mu < Nd; mu++)
|
for(unsigned int mu = 0; mu < env().getNd(); mu++)
|
||||||
{
|
{
|
||||||
LatticeCoordinate(coor, mu);
|
LatticeCoordinate(coor, mu);
|
||||||
ph = ph + p[mu]*coor*((1./(env().getGrid()->_fdimensions[mu])));
|
ph = ph + (p[mu]/env().getGrid()->_fdimensions[mu])*coor;
|
||||||
}
|
}
|
||||||
ph = exp((Real)(2*M_PI)*i*ph);
|
ph = exp((Real)(2*M_PI)*i*ph);
|
||||||
LatticeCoordinate(t, Tp);
|
LatticeCoordinate(t, Tp);
|
||||||
|
hasPhase_ = true;
|
||||||
|
}
|
||||||
|
|
||||||
src = 1.;
|
src = 1.;
|
||||||
src = where((t == par().tW), src*ph, 0.*src);
|
src = where((t == par().tW), src*ph, 0.*src);
|
||||||
}
|
}
|
||||||
|
@ -75,12 +75,16 @@ public:
|
|||||||
virtual ~TZ2(void) = default;
|
virtual ~TZ2(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
virtual void setup(void);
|
virtual void setup(void);
|
||||||
// execution
|
// execution
|
||||||
virtual void execute(void);
|
virtual void execute(void);
|
||||||
|
private:
|
||||||
|
bool hasT_{false};
|
||||||
|
std::string tName_;
|
||||||
};
|
};
|
||||||
|
|
||||||
MODULE_REGISTER_NS(Z2, TZ2<FIMPL>, MSource);
|
MODULE_REGISTER_NS(Z2, TZ2<FIMPL>, MSource);
|
||||||
@ -93,6 +97,7 @@ MODULE_REGISTER_NS(ScalarZ2, TZ2<ScalarImplCR>, MSource);
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
TZ2<FImpl>::TZ2(const std::string name)
|
TZ2<FImpl>::TZ2(const std::string name)
|
||||||
: Module<Z2Par>(name)
|
: Module<Z2Par>(name)
|
||||||
|
, tName_ (name + "_t")
|
||||||
{}
|
{}
|
||||||
|
|
||||||
// dependencies/products ///////////////////////////////////////////////////////
|
// dependencies/products ///////////////////////////////////////////////////////
|
||||||
@ -104,6 +109,14 @@ std::vector<std::string> TZ2<FImpl>::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename FImpl>
|
||||||
|
std::vector<std::string> TZ2<FImpl>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TZ2<FImpl>::getOutput(void)
|
std::vector<std::string> TZ2<FImpl>::getOutput(void)
|
||||||
{
|
{
|
||||||
@ -116,17 +129,15 @@ std::vector<std::string> TZ2<FImpl>::getOutput(void)
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TZ2<FImpl>::setup(void)
|
void TZ2<FImpl>::setup(void)
|
||||||
{
|
{
|
||||||
env().template registerLattice<PropagatorField>(getName());
|
envCreateLat(PropagatorField, getName());
|
||||||
|
envCacheLat(Lattice<iScalar<vInteger>>, tName_);
|
||||||
|
envTmpLat(LatticeComplex, "eta");
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TZ2<FImpl>::execute(void)
|
void TZ2<FImpl>::execute(void)
|
||||||
{
|
{
|
||||||
Lattice<iScalar<vInteger>> t(env().getGrid());
|
|
||||||
LatticeComplex eta(env().getGrid());
|
|
||||||
Complex shift(1., 1.);
|
|
||||||
|
|
||||||
if (par().tA == par().tB)
|
if (par().tA == par().tB)
|
||||||
{
|
{
|
||||||
LOG(Message) << "Generating Z_2 wall source at t= " << par().tA
|
LOG(Message) << "Generating Z_2 wall source at t= " << par().tA
|
||||||
@ -137,8 +148,17 @@ void TZ2<FImpl>::execute(void)
|
|||||||
LOG(Message) << "Generating Z_2 band for " << par().tA << " <= t <= "
|
LOG(Message) << "Generating Z_2 band for " << par().tA << " <= t <= "
|
||||||
<< par().tB << std::endl;
|
<< par().tB << std::endl;
|
||||||
}
|
}
|
||||||
PropagatorField &src = *env().template createLattice<PropagatorField>(getName());
|
|
||||||
|
auto &src = envGet(PropagatorField, getName());
|
||||||
|
auto &t = envGet(Lattice<iScalar<vInteger>>, getName());
|
||||||
|
Complex shift(1., 1.);
|
||||||
|
|
||||||
|
if (!hasT_)
|
||||||
|
{
|
||||||
LatticeCoordinate(t, Tp);
|
LatticeCoordinate(t, Tp);
|
||||||
|
hasT_ = true;
|
||||||
|
}
|
||||||
|
envGetTmp(LatticeComplex, eta);
|
||||||
bernoulli(*env().get4dRng(), eta);
|
bernoulli(*env().get4dRng(), eta);
|
||||||
eta = (2.*eta - shift)*(1./::sqrt(2.));
|
eta = (2.*eta - shift)*(1./::sqrt(2.));
|
||||||
eta = where((t >= par().tA) and (t <= par().tB), eta, 0.*eta);
|
eta = where((t >= par().tA) and (t <= par().tB), eta, 0.*eta);
|
||||||
|
@ -79,6 +79,7 @@ public:
|
|||||||
virtual ~TTestSeqConserved(void) = default;
|
virtual ~TTestSeqConserved(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
@ -107,6 +108,14 @@ std::vector<std::string> TTestSeqConserved<FImpl>::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename FImpl>
|
||||||
|
std::vector<std::string> TTestSeqConserved<FImpl>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TTestSeqConserved<FImpl>::getOutput(void)
|
std::vector<std::string> TTestSeqConserved<FImpl>::getOutput(void)
|
||||||
{
|
{
|
||||||
@ -124,16 +133,20 @@ void TTestSeqConserved<FImpl>::setup(void)
|
|||||||
{
|
{
|
||||||
HADRON_ERROR(Size, "Ls mismatch between quark action and propagator");
|
HADRON_ERROR(Size, "Ls mismatch between quark action and propagator");
|
||||||
}
|
}
|
||||||
|
envTmpLat(PropagatorField, "tmp");
|
||||||
|
envTmpLat(LatticeComplex, "c");
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TTestSeqConserved<FImpl>::execute(void)
|
void TTestSeqConserved<FImpl>::execute(void)
|
||||||
{
|
{
|
||||||
PropagatorField tmp(env().getGrid());
|
// Check sequential insertion of current gives same result as conserved
|
||||||
PropagatorField &q = *env().template getObject<PropagatorField>(par().q);
|
// current sink upon contraction. Assume q uses a point source.
|
||||||
PropagatorField &qSeq = *env().template getObject<PropagatorField>(par().qSeq);
|
|
||||||
FMat &act = *(env().template getObject<FMat>(par().action));
|
auto &q = envGet(PropagatorField, par().q);
|
||||||
|
auto &qSeq = envGet(PropagatorField, par().qSeq);
|
||||||
|
auto &act = envGet(FMat, par().action);
|
||||||
Gamma g5(Gamma::Algebra::Gamma5);
|
Gamma g5(Gamma::Algebra::Gamma5);
|
||||||
Gamma::Algebra gA = (par().curr == Current::Axial) ?
|
Gamma::Algebra gA = (par().curr == Current::Axial) ?
|
||||||
Gamma::Algebra::Gamma5 :
|
Gamma::Algebra::Gamma5 :
|
||||||
@ -142,18 +155,15 @@ void TTestSeqConserved<FImpl>::execute(void)
|
|||||||
SitePropagator qSite;
|
SitePropagator qSite;
|
||||||
Complex test_S, test_V, check_S, check_V;
|
Complex test_S, test_V, check_S, check_V;
|
||||||
std::vector<TComplex> check_buf;
|
std::vector<TComplex> check_buf;
|
||||||
LatticeComplex c(env().getGrid());
|
|
||||||
|
|
||||||
// Check sequential insertion of current gives same result as conserved
|
|
||||||
// current sink upon contraction. Assume q uses a point source.
|
|
||||||
std::vector<int> siteCoord;
|
std::vector<int> siteCoord;
|
||||||
|
|
||||||
|
envGetTmp(PropagatorField, tmp);
|
||||||
|
envGetTmp(LatticeComplex, c);
|
||||||
siteCoord = strToVec<int>(par().origin);
|
siteCoord = strToVec<int>(par().origin);
|
||||||
peekSite(qSite, qSeq, siteCoord);
|
peekSite(qSite, qSeq, siteCoord);
|
||||||
test_S = trace(qSite*g);
|
test_S = trace(qSite*g);
|
||||||
test_V = trace(qSite*g*Gamma::gmu[par().mu]);
|
test_V = trace(qSite*g*Gamma::gmu[par().mu]);
|
||||||
|
|
||||||
act.ContractConservedCurrent(q, q, tmp, par().curr, par().mu);
|
act.ContractConservedCurrent(q, q, tmp, par().curr, par().mu);
|
||||||
|
|
||||||
c = trace(tmp*g);
|
c = trace(tmp*g);
|
||||||
sliceSum(c, check_buf, Tp);
|
sliceSum(c, check_buf, Tp);
|
||||||
check_S = TensorRemove(check_buf[par().t_J]);
|
check_S = TensorRemove(check_buf[par().t_J]);
|
||||||
|
@ -63,6 +63,7 @@ public:
|
|||||||
virtual ~TTestSeqGamma(void) = default;
|
virtual ~TTestSeqGamma(void) = default;
|
||||||
// dependency relation
|
// dependency relation
|
||||||
virtual std::vector<std::string> getInput(void);
|
virtual std::vector<std::string> getInput(void);
|
||||||
|
virtual std::vector<std::string> getReference(void);
|
||||||
virtual std::vector<std::string> getOutput(void);
|
virtual std::vector<std::string> getOutput(void);
|
||||||
protected:
|
protected:
|
||||||
// setup
|
// setup
|
||||||
@ -91,6 +92,14 @@ std::vector<std::string> TTestSeqGamma<FImpl>::getInput(void)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename FImpl>
|
||||||
|
std::vector<std::string> TTestSeqGamma<FImpl>::getReference(void)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ref = {};
|
||||||
|
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TTestSeqGamma<FImpl>::getOutput(void)
|
std::vector<std::string> TTestSeqGamma<FImpl>::getOutput(void)
|
||||||
{
|
{
|
||||||
@ -103,26 +112,27 @@ std::vector<std::string> TTestSeqGamma<FImpl>::getOutput(void)
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TTestSeqGamma<FImpl>::setup(void)
|
void TTestSeqGamma<FImpl>::setup(void)
|
||||||
{
|
{
|
||||||
|
envTmpLat(LatticeComplex, "c");
|
||||||
}
|
}
|
||||||
|
|
||||||
// execution ///////////////////////////////////////////////////////////////////
|
// execution ///////////////////////////////////////////////////////////////////
|
||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TTestSeqGamma<FImpl>::execute(void)
|
void TTestSeqGamma<FImpl>::execute(void)
|
||||||
{
|
{
|
||||||
PropagatorField &q = *env().template getObject<PropagatorField>(par().q);
|
auto &q = envGet(PropagatorField, par().q);
|
||||||
PropagatorField &qSeq = *env().template getObject<PropagatorField>(par().qSeq);
|
auto &qSeq = envGet(PropagatorField, par().qSeq);
|
||||||
LatticeComplex c(env().getGrid());
|
|
||||||
Gamma g5(Gamma::Algebra::Gamma5);
|
Gamma g5(Gamma::Algebra::Gamma5);
|
||||||
Gamma g(par().gamma);
|
Gamma g(par().gamma);
|
||||||
SitePropagator qSite;
|
SitePropagator qSite;
|
||||||
Complex test, check;
|
Complex test, check;
|
||||||
std::vector<TComplex> check_buf;
|
std::vector<TComplex> check_buf;
|
||||||
|
std::vector<int> siteCoord;
|
||||||
|
|
||||||
// Check sequential insertion of gamma matrix gives same result as
|
// Check sequential insertion of gamma matrix gives same result as
|
||||||
// insertion of gamma at sink upon contraction. Assume q uses a point
|
// insertion of gamma at sink upon contraction. Assume q uses a point
|
||||||
// source.
|
// source.
|
||||||
std::vector<int> siteCoord;
|
|
||||||
|
envGetTmp(LatticeComplex, c);
|
||||||
siteCoord = strToVec<int>(par().origin);
|
siteCoord = strToVec<int>(par().origin);
|
||||||
peekSite(qSite, qSeq, siteCoord);
|
peekSite(qSite, qSeq, siteCoord);
|
||||||
test = trace(g*qSite);
|
test = trace(g*qSite);
|
||||||
|
@ -1,45 +1,38 @@
|
|||||||
modules_cc =\
|
modules_cc =\
|
||||||
Modules/MGauge/Unit.cc
|
Modules/MGauge/Unit.cc \
|
||||||
# Modules/MContraction/WeakHamiltonianEye.cc \
|
Modules/MContraction/WeakHamiltonianEye.cc \
|
||||||
# Modules/MContraction/WeakHamiltonianNonEye.cc \
|
Modules/MContraction/WeakHamiltonianNonEye.cc \
|
||||||
# Modules/MContraction/WeakNeutral4ptDisc.cc \
|
Modules/MContraction/WeakNeutral4ptDisc.cc \
|
||||||
# Modules/MGauge/Load.cc \
|
Modules/MGauge/Load.cc \
|
||||||
# Modules/MGauge/Random.cc \
|
Modules/MGauge/Random.cc \
|
||||||
# Modules/MGauge/StochEm.cc \
|
Modules/MGauge/StochEm.cc
|
||||||
# Modules/MScalar/ChargedProp.cc \
|
|
||||||
# Modules/MScalar/FreeProp.cc
|
|
||||||
|
|
||||||
modules_hpp =\
|
modules_hpp =\
|
||||||
Modules/MAction/DWF.hpp \
|
Modules/MAction/DWF.hpp \
|
||||||
Modules/MAction/Wilson.hpp \
|
Modules/MAction/Wilson.hpp \
|
||||||
Modules/MSink/Point.hpp \
|
Modules/MSink/Point.hpp \
|
||||||
Modules/MSource/Point.hpp \
|
Modules/MSource/Point.hpp \
|
||||||
|
Modules/MGauge/Load.hpp \
|
||||||
|
Modules/MGauge/Random.hpp \
|
||||||
|
Modules/MGauge/StochEm.hpp \
|
||||||
Modules/MGauge/Unit.hpp \
|
Modules/MGauge/Unit.hpp \
|
||||||
Modules/MSolver/RBPrecCG.hpp \
|
Modules/MSolver/RBPrecCG.hpp \
|
||||||
Modules/MFermion/GaugeProp.hpp \
|
Modules/MFermion/GaugeProp.hpp \
|
||||||
Modules/MContraction/Meson.hpp
|
Modules/MContraction/Baryon.hpp \
|
||||||
|
Modules/MContraction/DiscLoop.hpp \
|
||||||
# Modules/MContraction/Baryon.hpp \
|
Modules/MContraction/Gamma3pt.hpp \
|
||||||
# Modules/MContraction/DiscLoop.hpp \
|
Modules/MContraction/Meson.hpp \
|
||||||
# Modules/MContraction/Gamma3pt.hpp \
|
Modules/MContraction/WardIdentity.hpp \
|
||||||
# Modules/MContraction/WardIdentity.hpp \
|
Modules/MContraction/WeakHamiltonian.hpp \
|
||||||
# Modules/MContraction/WeakHamiltonian.hpp \
|
Modules/MContraction/WeakHamiltonianEye.hpp \
|
||||||
# Modules/MContraction/WeakHamiltonianEye.hpp \
|
Modules/MContraction/WeakHamiltonianNonEye.hpp \
|
||||||
# Modules/MContraction/WeakHamiltonianNonEye.hpp \
|
Modules/MContraction/WeakNeutral4ptDisc.hpp \
|
||||||
# Modules/MContraction/WeakNeutral4ptDisc.hpp \
|
Modules/MLoop/NoiseLoop.hpp \
|
||||||
# Modules/MFermion/GaugeProp.hpp \
|
Modules/MSink/Smear.hpp \
|
||||||
# Modules/MGauge/Load.hpp \
|
Modules/MSolver/RBPrecCG.hpp \
|
||||||
# Modules/MGauge/Random.hpp \
|
Modules/MSource/SeqConserved.hpp \
|
||||||
# Modules/MGauge/StochEm.hpp \
|
Modules/MSource/SeqGamma.hpp \
|
||||||
# Modules/MLoop/NoiseLoop.hpp \
|
Modules/MSource/Wall.hpp \
|
||||||
# Modules/MScalar/ChargedProp.hpp \
|
Modules/MSource/Z2.hpp \
|
||||||
# Modules/MScalar/FreeProp.hpp \
|
Modules/MUtilities/TestSeqConserved.hpp \
|
||||||
# Modules/MScalar/Scalar.hpp \
|
Modules/MUtilities/TestSeqGamma.hpp
|
||||||
# Modules/MSink/Smear.hpp \
|
|
||||||
# Modules/MSolver/RBPrecCG.hpp \
|
|
||||||
# Modules/MSource/SeqConserved.hpp \
|
|
||||||
# Modules/MSource/SeqGamma.hpp \
|
|
||||||
# Modules/MSource/Wall.hpp \
|
|
||||||
# Modules/MSource/Z2.hpp \
|
|
||||||
# Modules/MUtilities/TestSeqConserved.hpp \
|
|
||||||
# Modules/MUtilities/TestSeqGamma.hpp
|
|
||||||
|
@ -118,7 +118,7 @@ inline void makeWilsonAction(Application &application, std::string actionName,
|
|||||||
std::string &gaugeField, double mass,
|
std::string &gaugeField, double mass,
|
||||||
std::string boundary = "1 1 1 -1")
|
std::string boundary = "1 1 1 -1")
|
||||||
{
|
{
|
||||||
if (!(Environment::getInstance().hasModule(actionName)))
|
if (!(VirtualMachine::getInstance().hasModule(actionName)))
|
||||||
{
|
{
|
||||||
MAction::Wilson::Par actionPar;
|
MAction::Wilson::Par actionPar;
|
||||||
actionPar.gauge = gaugeField;
|
actionPar.gauge = gaugeField;
|
||||||
@ -144,7 +144,7 @@ inline void makeDWFAction(Application &application, std::string actionName,
|
|||||||
std::string &gaugeField, double mass, double M5,
|
std::string &gaugeField, double mass, double M5,
|
||||||
unsigned int Ls, std::string boundary = "1 1 1 -1")
|
unsigned int Ls, std::string boundary = "1 1 1 -1")
|
||||||
{
|
{
|
||||||
if (!(Environment::getInstance().hasModule(actionName)))
|
if (!(VirtualMachine::getInstance().hasModule(actionName)))
|
||||||
{
|
{
|
||||||
MAction::DWF::Par actionPar;
|
MAction::DWF::Par actionPar;
|
||||||
actionPar.gauge = gaugeField;
|
actionPar.gauge = gaugeField;
|
||||||
@ -173,7 +173,7 @@ inline void makeDWFAction(Application &application, std::string actionName,
|
|||||||
inline void makeRBPrecCGSolver(Application &application, std::string &solverName,
|
inline void makeRBPrecCGSolver(Application &application, std::string &solverName,
|
||||||
std::string &actionName, double residual = 1e-8)
|
std::string &actionName, double residual = 1e-8)
|
||||||
{
|
{
|
||||||
if (!(Environment::getInstance().hasModule(solverName)))
|
if (!(VirtualMachine::getInstance().hasModule(solverName)))
|
||||||
{
|
{
|
||||||
MSolver::RBPrecCG::Par solverPar;
|
MSolver::RBPrecCG::Par solverPar;
|
||||||
solverPar.action = actionName;
|
solverPar.action = actionName;
|
||||||
@ -195,7 +195,7 @@ inline void makePointSource(Application &application, std::string srcName,
|
|||||||
std::string pos)
|
std::string pos)
|
||||||
{
|
{
|
||||||
// If the source already exists, don't make the module again.
|
// If the source already exists, don't make the module again.
|
||||||
if (!(Environment::getInstance().hasModule(srcName)))
|
if (!(VirtualMachine::getInstance().hasModule(srcName)))
|
||||||
{
|
{
|
||||||
MSource::Point::Par pointPar;
|
MSource::Point::Par pointPar;
|
||||||
pointPar.position = pos;
|
pointPar.position = pos;
|
||||||
@ -219,7 +219,7 @@ inline void makeSequentialSource(Application &application, std::string srcName,
|
|||||||
std::string mom = ZERO_MOM)
|
std::string mom = ZERO_MOM)
|
||||||
{
|
{
|
||||||
// If the source already exists, don't make the module again.
|
// If the source already exists, don't make the module again.
|
||||||
if (!(Environment::getInstance().hasModule(srcName)))
|
if (!(VirtualMachine::getInstance().hasModule(srcName)))
|
||||||
{
|
{
|
||||||
MSource::SeqGamma::Par seqPar;
|
MSource::SeqGamma::Par seqPar;
|
||||||
seqPar.q = qSrc;
|
seqPar.q = qSrc;
|
||||||
@ -255,7 +255,7 @@ inline void makeConservedSequentialSource(Application &application,
|
|||||||
std::string mom = ZERO_MOM)
|
std::string mom = ZERO_MOM)
|
||||||
{
|
{
|
||||||
// If the source already exists, don't make the module again.
|
// If the source already exists, don't make the module again.
|
||||||
if (!(Environment::getInstance().hasModule(srcName)))
|
if (!(VirtualMachine::getInstance().hasModule(srcName)))
|
||||||
{
|
{
|
||||||
MSource::SeqConserved::Par seqPar;
|
MSource::SeqConserved::Par seqPar;
|
||||||
seqPar.q = qSrc;
|
seqPar.q = qSrc;
|
||||||
@ -280,7 +280,7 @@ inline void makeConservedSequentialSource(Application &application,
|
|||||||
inline void makeNoiseSource(Application &application, std::string &srcName,
|
inline void makeNoiseSource(Application &application, std::string &srcName,
|
||||||
unsigned int tA, unsigned int tB)
|
unsigned int tA, unsigned int tB)
|
||||||
{
|
{
|
||||||
if (!(Environment::getInstance().hasModule(srcName)))
|
if (!(VirtualMachine::getInstance().hasModule(srcName)))
|
||||||
{
|
{
|
||||||
MSource::Z2::Par noisePar;
|
MSource::Z2::Par noisePar;
|
||||||
noisePar.tA = tA;
|
noisePar.tA = tA;
|
||||||
@ -302,7 +302,7 @@ inline void makeWallSource(Application &application, std::string &srcName,
|
|||||||
unsigned int tW, std::string mom = ZERO_MOM)
|
unsigned int tW, std::string mom = ZERO_MOM)
|
||||||
{
|
{
|
||||||
// If the source already exists, don't make the module again.
|
// If the source already exists, don't make the module again.
|
||||||
if (!(Environment::getInstance().hasModule(srcName)))
|
if (!(VirtualMachine::getInstance().hasModule(srcName)))
|
||||||
{
|
{
|
||||||
MSource::Wall::Par wallPar;
|
MSource::Wall::Par wallPar;
|
||||||
wallPar.tW = tW;
|
wallPar.tW = tW;
|
||||||
@ -324,7 +324,7 @@ inline void makePointSink(Application &application, std::string &sinkFnct,
|
|||||||
std::string mom = ZERO_MOM)
|
std::string mom = ZERO_MOM)
|
||||||
{
|
{
|
||||||
// If the sink function already exists, don't make it again.
|
// If the sink function already exists, don't make it again.
|
||||||
if (!(Environment::getInstance().hasModule(sinkFnct)))
|
if (!(VirtualMachine::getInstance().hasModule(sinkFnct)))
|
||||||
{
|
{
|
||||||
MSink::Point::Par pointPar;
|
MSink::Point::Par pointPar;
|
||||||
pointPar.mom = mom;
|
pointPar.mom = mom;
|
||||||
@ -345,7 +345,7 @@ inline void sinkSmear(Application &application, std::string &sinkFnct,
|
|||||||
std::string &propName, std::string &smearedProp)
|
std::string &propName, std::string &smearedProp)
|
||||||
{
|
{
|
||||||
// If the propagator has already been smeared, don't smear it again.
|
// If the propagator has already been smeared, don't smear it again.
|
||||||
if (!(Environment::getInstance().hasModule(smearedProp)))
|
if (!(VirtualMachine::getInstance().hasModule(smearedProp)))
|
||||||
{
|
{
|
||||||
MSink::Smear::Par smearPar;
|
MSink::Smear::Par smearPar;
|
||||||
smearPar.q = propName;
|
smearPar.q = propName;
|
||||||
@ -367,7 +367,7 @@ inline void makePropagator(Application &application, std::string &propName,
|
|||||||
std::string &srcName, std::string &solver)
|
std::string &srcName, std::string &solver)
|
||||||
{
|
{
|
||||||
// If the propagator already exists, don't make the module again.
|
// If the propagator already exists, don't make the module again.
|
||||||
if (!(Environment::getInstance().hasModule(propName)))
|
if (!(VirtualMachine::getInstance().hasModule(propName)))
|
||||||
{
|
{
|
||||||
MFermion::GaugeProp::Par quarkPar;
|
MFermion::GaugeProp::Par quarkPar;
|
||||||
quarkPar.source = srcName;
|
quarkPar.source = srcName;
|
||||||
@ -390,7 +390,7 @@ inline void makeLoop(Application &application, std::string &propName,
|
|||||||
std::string &srcName, std::string &resName)
|
std::string &srcName, std::string &resName)
|
||||||
{
|
{
|
||||||
// If the loop propagator already exists, don't make the module again.
|
// If the loop propagator already exists, don't make the module again.
|
||||||
if (!(Environment::getInstance().hasModule(propName)))
|
if (!(VirtualMachine::getInstance().hasModule(propName)))
|
||||||
{
|
{
|
||||||
MLoop::NoiseLoop::Par loopPar;
|
MLoop::NoiseLoop::Par loopPar;
|
||||||
loopPar.q = resName;
|
loopPar.q = resName;
|
||||||
@ -421,7 +421,7 @@ inline void mesonContraction(Application &application,
|
|||||||
std::string &sink,
|
std::string &sink,
|
||||||
std::string gammas = "<Gamma5 Gamma5>")
|
std::string gammas = "<Gamma5 Gamma5>")
|
||||||
{
|
{
|
||||||
if (!(Environment::getInstance().hasModule(modName)))
|
if (!(VirtualMachine::getInstance().hasModule(modName)))
|
||||||
{
|
{
|
||||||
MContraction::Meson::Par mesPar;
|
MContraction::Meson::Par mesPar;
|
||||||
mesPar.output = output;
|
mesPar.output = output;
|
||||||
@ -453,7 +453,7 @@ inline void gamma3ptContraction(Application &application, unsigned int npt,
|
|||||||
Gamma::Algebra gamma = Gamma::Algebra::Identity)
|
Gamma::Algebra gamma = Gamma::Algebra::Identity)
|
||||||
{
|
{
|
||||||
std::string modName = std::to_string(npt) + "pt_" + label;
|
std::string modName = std::to_string(npt) + "pt_" + label;
|
||||||
if (!(Environment::getInstance().hasModule(modName)))
|
if (!(VirtualMachine::getInstance().hasModule(modName)))
|
||||||
{
|
{
|
||||||
MContraction::Gamma3pt::Par gamma3ptPar;
|
MContraction::Gamma3pt::Par gamma3ptPar;
|
||||||
gamma3ptPar.output = std::to_string(npt) + "pt/" + label;
|
gamma3ptPar.output = std::to_string(npt) + "pt/" + label;
|
||||||
@ -487,7 +487,7 @@ inline void weakContraction##top(Application &application, unsigned int npt,\
|
|||||||
std::string &label, unsigned int tSnk = 0)\
|
std::string &label, unsigned int tSnk = 0)\
|
||||||
{\
|
{\
|
||||||
std::string modName = std::to_string(npt) + "pt_" + label;\
|
std::string modName = std::to_string(npt) + "pt_" + label;\
|
||||||
if (!(Environment::getInstance().hasModule(modName)))\
|
if (!(VirtualMachine::getInstance().hasModule(modName)))\
|
||||||
{\
|
{\
|
||||||
MContraction::WeakHamiltonian##top::Par weakPar;\
|
MContraction::WeakHamiltonian##top::Par weakPar;\
|
||||||
weakPar.output = std::to_string(npt) + "pt/" + label;\
|
weakPar.output = std::to_string(npt) + "pt/" + label;\
|
||||||
@ -521,7 +521,7 @@ inline void disc0Contraction(Application &application,
|
|||||||
std::string &label)
|
std::string &label)
|
||||||
{
|
{
|
||||||
std::string modName = "4pt_" + label;
|
std::string modName = "4pt_" + label;
|
||||||
if (!(Environment::getInstance().hasModule(modName)))
|
if (!(VirtualMachine::getInstance().hasModule(modName)))
|
||||||
{
|
{
|
||||||
MContraction::WeakNeutral4ptDisc::Par disc0Par;
|
MContraction::WeakNeutral4ptDisc::Par disc0Par;
|
||||||
disc0Par.output = "4pt/" + label;
|
disc0Par.output = "4pt/" + label;
|
||||||
@ -547,7 +547,7 @@ inline void discLoopContraction(Application &application,
|
|||||||
std::string &q_loop, std::string &modName,
|
std::string &q_loop, std::string &modName,
|
||||||
Gamma::Algebra gamma = Gamma::Algebra::Identity)
|
Gamma::Algebra gamma = Gamma::Algebra::Identity)
|
||||||
{
|
{
|
||||||
if (!(Environment::getInstance().hasModule(modName)))
|
if (!(VirtualMachine::getInstance().hasModule(modName)))
|
||||||
{
|
{
|
||||||
MContraction::DiscLoop::Par discPar;
|
MContraction::DiscLoop::Par discPar;
|
||||||
discPar.output = "disc/" + modName;
|
discPar.output = "disc/" + modName;
|
||||||
@ -574,7 +574,7 @@ inline void makeWITest(Application &application, std::string &modName,
|
|||||||
std::string &propName, std::string &actionName,
|
std::string &propName, std::string &actionName,
|
||||||
double mass, unsigned int Ls = 1, bool test_axial = false)
|
double mass, unsigned int Ls = 1, bool test_axial = false)
|
||||||
{
|
{
|
||||||
if (!(Environment::getInstance().hasModule(modName)))
|
if (!(VirtualMachine::getInstance().hasModule(modName)))
|
||||||
{
|
{
|
||||||
MContraction::WardIdentity::Par wiPar;
|
MContraction::WardIdentity::Par wiPar;
|
||||||
if (Ls > 1)
|
if (Ls > 1)
|
||||||
@ -613,7 +613,7 @@ inline void makeSeqCurrComparison(Application &application, std::string &modName
|
|||||||
std::string &actionName, std::string &origin,
|
std::string &actionName, std::string &origin,
|
||||||
unsigned int t_J, unsigned int mu, Current curr)
|
unsigned int t_J, unsigned int mu, Current curr)
|
||||||
{
|
{
|
||||||
if (!(Environment::getInstance().hasModule(modName)))
|
if (!(VirtualMachine::getInstance().hasModule(modName)))
|
||||||
{
|
{
|
||||||
MUtilities::TestSeqConserved::Par seqPar;
|
MUtilities::TestSeqConserved::Par seqPar;
|
||||||
seqPar.q = propName;
|
seqPar.q = propName;
|
||||||
@ -646,7 +646,7 @@ inline void makeSeqGamComparison(Application &application, std::string &modName,
|
|||||||
std::string &origin, Gamma::Algebra gamma,
|
std::string &origin, Gamma::Algebra gamma,
|
||||||
unsigned int t_g)
|
unsigned int t_g)
|
||||||
{
|
{
|
||||||
if (!(Environment::getInstance().hasModule(modName)))
|
if (!(VirtualMachine::getInstance().hasModule(modName)))
|
||||||
{
|
{
|
||||||
MUtilities::TestSeqGamma::Par seqPar;
|
MUtilities::TestSeqGamma::Par seqPar;
|
||||||
seqPar.q = propName;
|
seqPar.q = propName;
|
||||||
|
Loading…
Reference in New Issue
Block a user