mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-25 13:15:55 +01:00
MSource::Convolution rename parameters
This commit is contained in:
parent
8d540a4e85
commit
4bca2c17ce
@ -16,8 +16,8 @@ class ConvolutionPar: Serializable
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GRID_SERIALIZABLE_CLASS_MEMBERS(ConvolutionPar,
|
GRID_SERIALIZABLE_CLASS_MEMBERS(ConvolutionPar,
|
||||||
std::string, field1,
|
std::string, field,
|
||||||
std::string, field2,
|
std::string, filter,
|
||||||
std::string, mom);
|
std::string, mom);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ TConvolution<FImpl>::TConvolution(const std::string name)
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
std::vector<std::string> TConvolution<FImpl>::getInput(void)
|
std::vector<std::string> TConvolution<FImpl>::getInput(void)
|
||||||
{
|
{
|
||||||
std::vector<std::string> in = {par().field1, par().field2};
|
std::vector<std::string> in = {par().field, par().filter};
|
||||||
|
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ void TConvolution<FImpl>::setup(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
envCreateLat(PropagatorField, getName());
|
envCreateLat(PropagatorField, getName());
|
||||||
envTmpLat(ComplexField, "momfield1");
|
envTmpLat(ComplexField, "momfield");
|
||||||
envTmp(FFT, "fft", 1, env().getGrid());
|
envTmp(FFT, "fft", 1, env().getGrid());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,22 +90,22 @@ void TConvolution<FImpl>::setup(void)
|
|||||||
template <typename FImpl>
|
template <typename FImpl>
|
||||||
void TConvolution<FImpl>::execute(void)
|
void TConvolution<FImpl>::execute(void)
|
||||||
{
|
{
|
||||||
auto &field1 = envGet(ComplexField, par().field1);
|
auto &filter = envGet(ComplexField, par().filter);
|
||||||
auto &field2 = envGet(PropagatorField, par().field2);
|
auto &field = envGet(PropagatorField, par().field);
|
||||||
auto &out = envGet(PropagatorField, getName());
|
auto &out = envGet(PropagatorField, getName());
|
||||||
envGetTmp(ComplexField, momfield1);
|
envGetTmp(ComplexField, momfield);
|
||||||
envGetTmp(FFT, fft);
|
envGetTmp(FFT, fft);
|
||||||
|
|
||||||
std::vector<int> mask(env().getNd(), 1);
|
std::vector<int> mask(env().getNd(), 1);
|
||||||
mask.back()=0; //transform only the spatial dimensions
|
mask.back()=0; //transform only the spatial dimensions
|
||||||
|
|
||||||
startTimer("Fourier transform");
|
startTimer("Fourier transform");
|
||||||
fft.FFT_dim_mask(momfield1, field1, mask, FFT::forward);
|
fft.FFT_dim_mask(momfield, filter, mask, FFT::forward);
|
||||||
fft.FFT_dim_mask(out, field2, mask, FFT::forward);
|
fft.FFT_dim_mask(out, field, mask, FFT::forward);
|
||||||
stopTimer("Fourier transform");
|
stopTimer("Fourier transform");
|
||||||
|
|
||||||
startTimer("momentum-space multiplication");
|
startTimer("momentum-space multiplication");
|
||||||
out=momfield1*out;
|
out=momfield*out;
|
||||||
stopTimer("momentum-space multiplication");
|
stopTimer("momentum-space multiplication");
|
||||||
|
|
||||||
startTimer("inserting momentum");
|
startTimer("inserting momentum");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user