mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-24 20:55:55 +01:00
MSource::Convolution let mom argument be Nd dimensional
This commit is contained in:
parent
4bfe678218
commit
9c18638b24
@ -75,10 +75,10 @@ template <typename FImpl>
|
|||||||
void TConvolution<FImpl>::setup(void)
|
void TConvolution<FImpl>::setup(void)
|
||||||
{
|
{
|
||||||
mom_ = strToVec<int>(par().mom);
|
mom_ = strToVec<int>(par().mom);
|
||||||
if(mom_.size() != env().getNd()-1) {
|
if(mom_.size() != env().getNd()) {
|
||||||
HADRONS_ERROR(Size, std::string("momentum has ")
|
HADRONS_ERROR(Size, std::string("momentum has ")
|
||||||
+ std::to_string(mom_.size()) + " instead of "
|
+ std::to_string(mom_.size()) + " instead of "
|
||||||
+ std::to_string(env().getNd()-1) + " components");
|
+ std::to_string(env().getNd()) + " components");
|
||||||
}
|
}
|
||||||
|
|
||||||
envCreateLat(PropagatorField, getName());
|
envCreateLat(PropagatorField, getName());
|
||||||
@ -109,7 +109,7 @@ void TConvolution<FImpl>::execute(void)
|
|||||||
stopTimer("momentum-space multiplication");
|
stopTimer("momentum-space multiplication");
|
||||||
|
|
||||||
startTimer("inserting momentum");
|
startTimer("inserting momentum");
|
||||||
for(int mu=0; mu<env().getNd()-1; mu++)
|
for(int mu=0; mu<env().getNd(); mu++)
|
||||||
{
|
{
|
||||||
if(mom_[mu]!=0)
|
if(mom_[mu]!=0)
|
||||||
{
|
{
|
||||||
@ -121,6 +121,7 @@ void TConvolution<FImpl>::execute(void)
|
|||||||
startTimer("Fourier transform");
|
startTimer("Fourier transform");
|
||||||
fft.FFT_dim_mask(out, out, mask, FFT::backward);
|
fft.FFT_dim_mask(out, out, mask, FFT::backward);
|
||||||
stopTimer("Fourier transform");
|
stopTimer("Fourier transform");
|
||||||
|
{std::ofstream f("tmp_conv"); f << out;}
|
||||||
}
|
}
|
||||||
|
|
||||||
END_MODULE_NAMESPACE
|
END_MODULE_NAMESPACE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user