1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 09:15:38 +01:00

MSource::Gauss and MSource::Convolution: change LatticeComplex to ComplexField

This commit is contained in:
Nils Asmussen 2019-05-29 16:25:45 +01:00
parent 0b3f40ce16
commit de1a1dccb3
2 changed files with 8 additions and 7 deletions

View File

@ -84,7 +84,7 @@ void TConvolution<FImpl>::setup(void)
}
envCreateLat(PropagatorField, getName());
envTmpLat(LatticeComplex, "momfield1");
envTmpLat(ComplexField, "momfield1");
envTmp(FFT, "fft", 1, env().getGrid());
}
@ -92,10 +92,10 @@ void TConvolution<FImpl>::setup(void)
template <typename FImpl>
void TConvolution<FImpl>::execute(void)
{
auto &field1 = envGet(LatticeComplex, par().field1);
auto &field1 = envGet(ComplexField, par().field1);
auto &field2 = envGet(PropagatorField, par().field2);
auto &out = envGet(PropagatorField, getName());
envGetTmp(LatticeComplex, momfield1);
envGetTmp(ComplexField, momfield1);
envGetTmp(FFT, fft);
std::vector<int> mask(env().getNd(), 1);

View File

@ -28,6 +28,7 @@ public:
template <typename FImpl>
class TGauss: public Module<GaussPar>
{
BASIC_TYPE_ALIASES(FImpl,);
public:
// constructor
TGauss(const std::string name);
@ -83,16 +84,16 @@ void TGauss<FImpl>::setup(void)
+ std::to_string(env().getNd()-1) + " components");
}
envCreateLat(LatticeComplex, getName());
envTmpLat(LatticeComplex, "component");
envCreateLat(ComplexField, getName());
envTmpLat(ComplexField, "component");
}
// execution ///////////////////////////////////////////////////////////////////
template <typename FImpl>
void TGauss<FImpl>::execute(void)
{
auto &rho = envGet(LatticeComplex, getName());
envGetTmp(LatticeComplex, component);
auto &rho = envGet(ComplexField, getName());
envGetTmp(ComplexField, component);
const int dim=env().getNd()-1;
const double fact=-0.5/std::pow(par().width,2);
const Complex i(0.0, 1.0);