From 88699eb92b33f51062b19105aded78ac7c3e2bf8 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 5 Oct 2015 13:58:58 +0200 Subject: negativeDichtenüberwachung geändert und aktiviert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Physikunit.pas | 51 ++++++++++----------------------------------------- 1 file changed, 10 insertions(+), 41 deletions(-) diff --git a/Physikunit.pas b/Physikunit.pas index 4b73d8b..0e8075b 100644 --- a/Physikunit.pas +++ b/Physikunit.pas @@ -8,7 +8,7 @@ unit Physikunit; {$DEFINE Zeitschrittueberwachung} {$DEFINE Dichteueberwachung} -{ $DEFINE negativeDichteueberwachung} +{$DEFINE negativeDichteueberwachung} interface @@ -1194,46 +1194,15 @@ begin aktuelleFelder:=1-aktuelleFelder; {$IFDEF negativeDichteueberwachung} - for i:=0 to length(felders[aktuelleFelder].inhalt)-1 do - for j:=0 to felders[aktuelleFelder].matAnz-1 do - if felders[aktuelleFelder].inhalt[i].matWerte[j,mfN,false]<0 then begin - pro:=tProtokollant.create(prot,'iteriereSchritt'); - pro.schreibe('n<0 bei:',true); - pro.schreibe(' t = ' +floattostr(t)+',',true); - pro.schreibe(' i = ' +inttostr(i)+' (x = '+floattostr(xl+i*dX)+'),',true); - pro.schreibe(' alte Werte:',true); - with felders[1-aktuelleFelder] do begin - pro.schreibe(' v_l = ' +floattostr(inhalt[i-1].matWerte[j,mfDPsiDX,false]* - inhalt[i-1].matWerte[j,mfIGamma,false])+',',true); - pro.schreibe(' n_l = ' +floattostr(inhalt[i-1].matWerte[j,mfN,false])+',',true); - pro.schreibe(' n_l'' = '+floattostr(inhalt[i-1].matWerte[j,mfN,true])+',',true); - pro.schreibe(' v = ' +floattostr(inhalt[i].matWerte[j,mfDPsiDX,false]* - inhalt[i].matWerte[j,mfIGamma,false])+',',true); - pro.schreibe(' n = ' +floattostr(inhalt[i].matWerte[j,mfN,false])+',',true); - pro.schreibe(' n'' = '+floattostr(inhalt[i].matWerte[j,mfN,true])+',',true); - pro.schreibe(' v_r = ' +floattostr(inhalt[i+1].matWerte[j,mfDPsiDX,false]* - inhalt[i+1].matWerte[j,mfIGamma,false])+',',true); - pro.schreibe(' n_r = ' +floattostr(inhalt[i+1].matWerte[j,mfN,false])+',',true); - pro.schreibe(' n_r'' = '+floattostr(inhalt[i+1].matWerte[j,mfN,true]),true); - end; - pro.schreibe(' neue Werte:',true); - with felders[aktuelleFelder] do begin - pro.schreibe(' v_l = ' +floattostr(inhalt[i-1].matWerte[j,mfDPsiDX,false]* - inhalt[i-1].matWerte[j,mfIGamma,false])+',',true); - pro.schreibe(' n_l = ' +floattostr(inhalt[i-1].matWerte[j,mfN,false])+',',true); - pro.schreibe(' n_l'' = '+floattostr(inhalt[i-1].matWerte[j,mfN,true])+',',true); - pro.schreibe(' v = ' +floattostr(inhalt[i].matWerte[j,mfDPsiDX,false]* - inhalt[i].matWerte[j,mfIGamma,false])+',',true); - pro.schreibe(' n = ' +floattostr(inhalt[i].matWerte[j,mfN,false])+',',true); - pro.schreibe(' n'' = '+floattostr(inhalt[i].matWerte[j,mfN,true])+',',true); - pro.schreibe(' v_r = ' +floattostr(inhalt[i+1].matWerte[j,mfDPsiDX,false]* - inhalt[i+1].matWerte[j,mfIGamma,false])+',',true); - pro.schreibe(' n_r = ' +floattostr(inhalt[i+1].matWerte[j,mfN,false])+',',true); - pro.schreibe(' n_r'' = '+floattostr(inhalt[i+1].matWerte[j,mfN,true]),true); - end; - pro.free; - abbrechen; - end; + for i:=0 to length(felders[aktuelleFelder].impulsraum)-1 do + for j:=0 to felders[aktuelleFelder].aX*felders[aktuelleFelder].aP-1 do + if (felders[aktuelleFelder].impulsraum[i,false]+j)^<0 then begin + pro:=tProtokollant.create(prot,'iteriereSchritt'); + pro.schreibe('n<0 bei:',true); + pro.schreibe(' t = ' +floattostr(t)+',',true); + pro.schreibe(' i = ' +inttostr(i)+' (x = '+floattostr(xl+i*dX)+'),',true); + abbrechen; + end; {$ENDIF} t:=t+dT; end; -- cgit v1.2.3-54-g00ecf