diff --git a/Hadrons/Modules/MSource/Wall.hpp b/Hadrons/Modules/MSource/Wall.hpp index 3c974dee..d6a223cf 100644 --- a/Hadrons/Modules/MSource/Wall.hpp +++ b/Hadrons/Modules/MSource/Wall.hpp @@ -122,15 +122,6 @@ void TWall::setup(void) envCache(Lattice>, tName_, 1, envGetGrid(LatticeComplex)); envCacheLat(LatticeComplex, momphName_); envTmpLat(LatticeComplex, "coor"); - auto &src = envGet(PropagatorField, getName()); - const auto NumDims = src.Grid()->Dimensions(); - // Don't break existing scripts as long as they specified zero momentum in time dimension - std::vector p = strToVec(par().mom); - if (!(p.size() == NumDims - 1 || (p.size() == NumDims && p[NumDims - 1] == 0))) - { - HADRONS_ERROR(Size, "momentum has " + std::to_string(p.size()) - + " components (must have " + std::to_string(NumDims - 1) + ")"); - } } // execution /////////////////////////////////////////////////////////////////// @@ -152,8 +143,7 @@ void TWall::execute(void) envGetTmp(LatticeComplex, coor); p = strToVec(par().mom); ph = Zero(); - const auto NumDims = src.Grid()->Dimensions(); - for(unsigned int mu = 0; mu < NumDims - 1; mu++) + for(unsigned int mu = 0; mu < p.size(); mu++) { LatticeCoordinate(coor, mu); ph = ph + (p[mu]/env().getDim(mu))*coor;