mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-13 01:05:36 +00:00
ChargedProp: remove ScalarField fs
This commit is contained in:
parent
161ed102a5
commit
ee93f0218b
@ -169,19 +169,12 @@ void TChargedProp::execute(void)
|
|||||||
void TChargedProp::momD1(ScalarField &s, FFT &fft)
|
void TChargedProp::momD1(ScalarField &s, FFT &fft)
|
||||||
{
|
{
|
||||||
EmField &A = *env().getObject<EmField>(par().emField);
|
EmField &A = *env().getObject<EmField>(par().emField);
|
||||||
ScalarField buf(env().getGrid()), fs(env().getGrid()), result(env().getGrid()), Amu(env().getGrid());
|
ScalarField buf(env().getGrid()), result(env().getGrid()),
|
||||||
|
Amu(env().getGrid());
|
||||||
Complex ci(0.0,1.0);
|
Complex ci(0.0,1.0);
|
||||||
|
|
||||||
result = zero;
|
result = zero;
|
||||||
|
|
||||||
fft.FFT_all_dim(fs, s, FFT::backward);
|
|
||||||
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
|
||||||
{
|
|
||||||
Amu = peekLorentz(A, mu);
|
|
||||||
buf = Amu*fs;
|
|
||||||
fft.FFT_all_dim(buf, buf, FFT::forward);
|
|
||||||
result = result + ci*adj(*phase_[mu])*buf;
|
|
||||||
}
|
|
||||||
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
||||||
{
|
{
|
||||||
Amu = peekLorentz(A, mu);
|
Amu = peekLorentz(A, mu);
|
||||||
@ -191,6 +184,14 @@ void TChargedProp::momD1(ScalarField &s, FFT &fft)
|
|||||||
fft.FFT_all_dim(buf, buf, FFT::forward);
|
fft.FFT_all_dim(buf, buf, FFT::forward);
|
||||||
result = result - ci*buf;
|
result = result - ci*buf;
|
||||||
}
|
}
|
||||||
|
fft.FFT_all_dim(s, s, FFT::backward);
|
||||||
|
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
||||||
|
{
|
||||||
|
Amu = peekLorentz(A, mu);
|
||||||
|
buf = Amu*s;
|
||||||
|
fft.FFT_all_dim(buf, buf, FFT::forward);
|
||||||
|
result = result + ci*adj(*phase_[mu])*buf;
|
||||||
|
}
|
||||||
|
|
||||||
s = result;
|
s = result;
|
||||||
}
|
}
|
||||||
@ -198,18 +199,11 @@ void TChargedProp::momD1(ScalarField &s, FFT &fft)
|
|||||||
void TChargedProp::momD2(ScalarField &s, FFT &fft)
|
void TChargedProp::momD2(ScalarField &s, FFT &fft)
|
||||||
{
|
{
|
||||||
EmField &A = *env().getObject<EmField>(par().emField);
|
EmField &A = *env().getObject<EmField>(par().emField);
|
||||||
ScalarField buf(env().getGrid()), fs(env().getGrid()), result(env().getGrid()), Amu(env().getGrid());
|
ScalarField buf(env().getGrid()), result(env().getGrid()),
|
||||||
|
Amu(env().getGrid());
|
||||||
|
|
||||||
result = zero;
|
result = zero;
|
||||||
|
|
||||||
fft.FFT_all_dim(fs, s, FFT::backward);
|
|
||||||
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
|
||||||
{
|
|
||||||
Amu = peekLorentz(A, mu);
|
|
||||||
buf = Amu*Amu*fs;
|
|
||||||
fft.FFT_all_dim(buf, buf, FFT::forward);
|
|
||||||
result = result + .5*adj(*phase_[mu])*buf;
|
|
||||||
}
|
|
||||||
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
||||||
{
|
{
|
||||||
Amu = peekLorentz(A, mu);
|
Amu = peekLorentz(A, mu);
|
||||||
@ -219,6 +213,14 @@ void TChargedProp::momD2(ScalarField &s, FFT &fft)
|
|||||||
fft.FFT_all_dim(buf, buf, FFT::forward);
|
fft.FFT_all_dim(buf, buf, FFT::forward);
|
||||||
result = result + .5*buf;
|
result = result + .5*buf;
|
||||||
}
|
}
|
||||||
|
fft.FFT_all_dim(s, s, FFT::backward);
|
||||||
|
for (unsigned int mu = 0; mu < env().getNd(); ++mu)
|
||||||
|
{
|
||||||
|
Amu = peekLorentz(A, mu);
|
||||||
|
buf = Amu*Amu*s;
|
||||||
|
fft.FFT_all_dim(buf, buf, FFT::forward);
|
||||||
|
result = result + .5*adj(*phase_[mu])*buf;
|
||||||
|
}
|
||||||
|
|
||||||
s = result;
|
s = result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user