summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2015-11-11 16:32:00 +0100
committerErich Eckner <git@eckner.net>2015-11-11 16:32:00 +0100
commitcdd2a11a20c2bbee890741e5d1ec3656f6d4c41b (patch)
tree69952eedfdbfdcdef5616158d44600b044ca7c1b
parent16e405acf54dabf5e75646a0f1a5c2789625566c (diff)
downloadPlasmapropagation-cdd2a11a20c2bbee890741e5d1ec3656f6d4c41b.tar.xz
Schleifen umsortiert
-rw-r--r--Physikunit.pas8
1 files changed, 4 insertions, 4 deletions
diff --git a/Physikunit.pas b/Physikunit.pas
index f2d8605..595401a 100644
--- a/Physikunit.pas
+++ b/Physikunit.pas
@@ -893,8 +893,8 @@ begin
fftw_execute(ffts[i,0,false]); // FFT in x
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
+ for j:=0 to aX div 2 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(3*j<aX);
(fftTmp+j+k*(aX div 2 + 1))^.im:=- 2*pi/dX/aX * j * tmp/aX * byte(3*j<aX);
@@ -906,8 +906,8 @@ begin
fftw_execute(ffts[i,1,false]); // FFT in p
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
+ for j:=0 to aX-1 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(4*k < aP);
(fftTmp+j+k*aX)^.im:=- 2*pi/dP/aP * k * tmp/aP * byte(4*k < aP);