mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-17 07:17:06 +01:00
Hadrons: most modules ported to the new interface, compiles but untested
This commit is contained in:
@ -73,6 +73,7 @@ public:
|
||||
virtual ~TWardIdentity(void) = default;
|
||||
// dependency relation
|
||||
virtual std::vector<std::string> getInput(void);
|
||||
virtual std::vector<std::string> getReference(void);
|
||||
virtual std::vector<std::string> getOutput(void);
|
||||
protected:
|
||||
// setup
|
||||
@ -103,10 +104,18 @@ std::vector<std::string> TWardIdentity<FImpl>::getInput(void)
|
||||
return in;
|
||||
}
|
||||
|
||||
template <typename FImpl>
|
||||
std::vector<std::string> TWardIdentity<FImpl>::getReference(void)
|
||||
{
|
||||
std::vector<std::string> ref = {};
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
template <typename FImpl>
|
||||
std::vector<std::string> TWardIdentity<FImpl>::getOutput(void)
|
||||
{
|
||||
std::vector<std::string> out = {getName()};
|
||||
std::vector<std::string> out = {};
|
||||
|
||||
return out;
|
||||
}
|
||||
@ -120,6 +129,15 @@ void TWardIdentity<FImpl>::setup(void)
|
||||
{
|
||||
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 ///////////////////////////////////////////////////////////////////
|
||||
@ -129,12 +147,13 @@ void TWardIdentity<FImpl>::execute(void)
|
||||
LOG(Message) << "Performing Ward Identity checks for quark '" << par().q
|
||||
<< "'." << std::endl;
|
||||
|
||||
PropagatorField tmp(env().getGrid()), vector_WI(env().getGrid());
|
||||
PropagatorField &q = *env().template getObject<PropagatorField>(par().q);
|
||||
FMat &act = *(env().template getObject<FMat>(par().action));
|
||||
Gamma g5(Gamma::Algebra::Gamma5);
|
||||
auto &q = envGet(PropagatorField, par().q);
|
||||
auto &act = envGet(FMat, par().action);
|
||||
Gamma g5(Gamma::Algebra::Gamma5);
|
||||
|
||||
// Compute D_mu V_mu, D here is backward derivative.
|
||||
envGetTmp(PropagatorField, tmp);
|
||||
envGetTmp(PropagatorField, vector_WI);
|
||||
vector_WI = zero;
|
||||
for (unsigned int mu = 0; mu < Nd; ++mu)
|
||||
{
|
||||
@ -149,9 +168,10 @@ void TWardIdentity<FImpl>::execute(void)
|
||||
|
||||
if (par().test_axial)
|
||||
{
|
||||
PropagatorField psi(env().getGrid());
|
||||
LatticeComplex PP(env().getGrid()), axial_defect(env().getGrid()),
|
||||
PJ5q(env().getGrid());
|
||||
envGetTmp(PropagatorField, psi);
|
||||
envGetTmp(LatticeComplex, PP);
|
||||
envGetTmp(LatticeComplex, axial_defect);
|
||||
envGetTmp(LatticeComplex, PJ5q);
|
||||
std::vector<TComplex> axial_buf;
|
||||
|
||||
// Compute <P|D_mu A_mu>, D is backwards derivative.
|
||||
|
Reference in New Issue
Block a user