From bdaeca6a7889d6f0804fb51bff453b9824b0c687 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 5 Oct 2015 13:51:39 +0200 Subject: Phasenraumdump eingefügt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Physikunit.pas | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Physikunit.pas b/Physikunit.pas index abe066a..7dddb8c 100644 --- a/Physikunit.pas +++ b/Physikunit.pas @@ -132,6 +132,7 @@ type {$DEFINE LiKoInterface} {$INCLUDE linearkombinationen.inc} {$UNDEF LiKoInterface} + procedure schreibePhasenraum(tlc: longint; datNam: string); end; { tGitter } @@ -1048,6 +1049,23 @@ end; {$INCLUDE linearkombinationen.inc} {$UNDEF LiKoImplementation} +procedure tFelder.schreibePhasenraum(tlc: longint; datNam: string); +var + f: textfile; + i,j: longint; +begin + assignfile(f,datNam); + rewrite(f); + for i:=0 to aP-1 do begin + for j:=0 to aX-1 do begin + if j>0 then write(f,#9); + write(f,(impulsraum[tlc,false]+i+j*aP)^); + end; + writeln(f); + end; + closefile(f); +end; + // tGitter ********************************************************************* constructor tGitter.create(derBesitzer: tSimulation; aX,aP: longint; deltaX,deltaP: double; bekannteWerte: tKnownValues; teilchen: array of tTeilchenSpezies; lichter: tMyStringlist; zv: tZeitverfahren; name: string); @@ -1107,9 +1125,10 @@ procedure tGitter.abbrechen; var i: longint; begin + if not abbruch then + for i:=0 to length(felders[aktuelleFelder].matFelder)-1 do + felders[aktuelleFelder].schreibePhasenraum(i,extractfilepath(paramstr(0))+'phasenraum_'+inttostr(i+1)+'.dump'); abbruch:=true; - for i:=0 to length(felders)-1 do - felders[i].setzeNull; end; procedure tGitter.iteriereSchritt(dT: double); -- cgit v1.2.3-54-g00ecf