1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-13 20:57:06 +01:00

Hadrons: big update for getGrid, grids are now created automatically

This commit is contained in:
2018-09-29 17:55:19 +01:00
parent 57f899d79c
commit d0ca7c3fe6
30 changed files with 159 additions and 116 deletions

View File

@ -187,7 +187,7 @@ void TSeqConserved<FImpl>::execute(void)
for(unsigned int mu = 0; mu < env().getNd(); mu++)
{
LatticeCoordinate(coor, mu);
mom_phase = mom_phase + (mom[mu]/env().getGrid()->_fdimensions[mu])*coor;
mom_phase = mom_phase + (mom[mu]/env().getDim(mu))*coor;
}
mom_phase = exp((Real)(2*M_PI)*i*mom_phase);
SeqhasPhase_ = true;

View File

@ -125,7 +125,7 @@ template <typename FImpl>
void TSeqGamma<FImpl>::setup(void)
{
envCreateLat(PropagatorField, getName());
envCache(Lattice<iScalar<vInteger>>, tName_, 1, env().getGrid());
envCache(Lattice<iScalar<vInteger>>, tName_, 1, envGetGrid(LatticeComplex));
envCacheLat(LatticeComplex, momphName_);
envTmpLat(LatticeComplex, "coor");
}
@ -162,7 +162,7 @@ void TSeqGamma<FImpl>::execute(void)
for(unsigned int mu = 0; mu < env().getNd(); mu++)
{
LatticeCoordinate(coor, mu);
ph = ph + (p[mu]/env().getGrid()->_fdimensions[mu])*coor;
ph = ph + (p[mu]/env().getDim(mu))*coor;
}
ph = exp((Real)(2*M_PI)*i*ph);
LatticeCoordinate(t, Tp);

View File

@ -143,7 +143,7 @@ void TWall<FImpl>::execute(void)
for(unsigned int mu = 0; mu < env().getNd(); mu++)
{
LatticeCoordinate(coor, mu);
ph = ph + (p[mu]/env().getGrid()->_fdimensions[mu])*coor;
ph = ph + (p[mu]/env().getDim(mu))*coor;
}
ph = exp((Real)(2*M_PI)*i*ph);
LatticeCoordinate(t, Tp);

View File

@ -120,7 +120,7 @@ template <typename FImpl>
void TZ2<FImpl>::setup(void)
{
envCreateLat(PropagatorField, getName());
envCache(Lattice<iScalar<vInteger>>, tName_, 1, env().getGrid());
envCache(Lattice<iScalar<vInteger>>, tName_, 1, envGetGrid(LatticeComplex));
envTmpLat(LatticeComplex, "eta");
}