summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2015-09-30 15:06:07 +0200
committerErich Eckner <git@eckner.net>2015-09-30 15:06:07 +0200
commite605478afe8b226e1452680152bd92d2758188d0 (patch)
treee2539ff21a6ec82667e06a3027a444b39690d32e
parent5edd975607b8b0824995b7c44674a535686a60c8 (diff)
downloadPlasmapropagation-e605478afe8b226e1452680152bd92d2758188d0.tar.xz
FFT multipliziert nun mit richtigem Faktor für Ableitung
-rw-r--r--Physikunit.pas12
1 files changed, 6 insertions, 6 deletions
diff --git a/Physikunit.pas b/Physikunit.pas
index 736df34..e5057e7 100644
--- a/Physikunit.pas
+++ b/Physikunit.pas
@@ -884,10 +884,10 @@ begin
pruefeArrayEnden('Vorwärts-FFT ('+inttostr(i)+',0) schreibt beim Ausführen über das Ende hinaus!');
for j:=0 to aX div 2 do
- for k:=0 to aP-1 do begin // *i*k*2*pi;
+ for k:=0 to aP-1 do begin // *-i*k*2*pi;
tmp:=(fftTmp+j+k*(aX div 2 + 1))^.re;
- (fftTmp+j+k*(aX div 2 + 1))^.re:=- 2*pi/dX/aX * j * (fftTmp+j+k*(aX div 2 + 1))^.im/aX * byte(2*j<ax);
- (fftTmp+j+k*(aX div 2 + 1))^.im:= 2*pi/dX/aX * j * tmp/aX * byte(2*j<ax);
+ (fftTmp+j+k*(aX div 2 + 1))^.re:= 2*pi/dX/aX * j * (fftTmp+j+k*(aX div 2 + 1))^.im/aX * byte(3*j<aX);
+ (fftTmp+j+k*(aX div 2 + 1))^.im:=- 2*pi/dX/aX * j * tmp/aX * byte(3*j<aX);
end;
fftw_execute(ffts[i,0,true]);
@@ -897,10 +897,10 @@ begin
pruefeArrayEnden('Vorwärts-FFT ('+inttostr(i)+',1) schreibt beim Ausführen über das Ende hinaus!');
for j:=0 to aX-1 do
- for k:=0 to aP div 2 do begin // *i*k*2*pi;
+ for k:=0 to aP div 2 do begin // *-i*k*2*pi;
tmp:=(fftTmp+j+k*aX)^.re;
- (fftTmp+j+k*aX)^.re:=- 2*pi/dP/aP * k * (fftTmp+j+k*aX)^.im/aP * byte(2*k < aP);
- (fftTmp+j+k*aX)^.im:= 2*pi/dP/aP * k * tmp/aP * byte(2*k < aP);
+ (fftTmp+j+k*aX)^.re:= 2*pi/dP/aP * k * (fftTmp+j+k*aX)^.im/aP * byte(3*k < aP);
+ (fftTmp+j+k*aX)^.im:=- 2*pi/dP/aP * k * tmp/aP * byte(3*k < aP);
end;
fftw_execute(ffts[i,1,true]);