summaryrefslogtreecommitdiff
path: root/graphics/pstricks/contrib/pst-ode/pst-ode.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-01-05 03:02:50 +0000
committerNorbert Preining <norbert@preining.info>2024-01-05 03:02:50 +0000
commit387961768f65ec00d171b3781d4b87ea94bb19f5 (patch)
treeb3280b963f8e2b3d3f9f0b1f940912069d6f27c9 /graphics/pstricks/contrib/pst-ode/pst-ode.tex
parentc45a0e15a3f74b963e3c2be142de33c8c8f12588 (diff)
CTAN sync 202401050302
Diffstat (limited to 'graphics/pstricks/contrib/pst-ode/pst-ode.tex')
-rw-r--r--graphics/pstricks/contrib/pst-ode/pst-ode.tex37
1 files changed, 24 insertions, 13 deletions
diff --git a/graphics/pstricks/contrib/pst-ode/pst-ode.tex b/graphics/pstricks/contrib/pst-ode/pst-ode.tex
index 3ab38399c3..498ea7b923 100644
--- a/graphics/pstricks/contrib/pst-ode/pst-ode.tex
+++ b/graphics/pstricks/contrib/pst-ode/pst-ode.tex
@@ -12,8 +12,8 @@
%% ODEs using the Runge-Kutta-Fehlberg (RKF45) method with automatic
%% step size adjustment
%%
-\def\fileversion{0.18}
-\def\filedate{2022/11/24}
+\def\fileversion{0.19}
+\def\filedate{2024/01/04}
\csname PSTODELoaded\endcsname
\let\PSTODELoaded\endinput
@@ -137,7 +137,7 @@
tx@Dict begin (\expandafter\ode@zapspace\ode@ta\@nil)
AlgParser cvx exec end ode@dict /tStart exch def end
tx@Dict begin (\expandafter\ode@zapspace\ode@tb\@nil)
- AlgParser cvx exec end ode@dict /tEnd exch def end
+ AlgParser cvx exec end ode@dict /tEnd exch def end
\else
tx@Dict begin 1 dict begin #3 end end ode@dict /tStart exch def end
tx@Dict begin 1 dict begin #4 end end ode@dict /tEnd exch def end
@@ -164,23 +164,34 @@
ode@dict /xlength ode@laststate length def end % number of equations
ode@dict /xlength1 xlength 1 add def end % number of equations plus 1
\ifPst@algebraic
- /ode@rpn tx@Dict begin (\expandafter\ode@zapspace\ode@arg\@nil) AlgParser end cvx bind def
- /ODESET {%system of ODEs
- ode@dict /x exch def /y x def end tx@Dict begin ode@dict ode@rpn end end ode@dict xlength end array astore
- } bind def
+ /ODESET [% system of ODEs
+ 10 array aload pop
+ (\expandafter\ode@zapspace\ode@arg\@nil) AlgParser aload pop
+ 7 array aload pop
+ ]
+ dup 0 {tx@Dict begin 2 begin /x exch def /y x def} putinterval
+ % ensure local scope of user defined variables in #7, from BlueBook, p. 133
+ dup 2 1 dict put
+ dup dup length 7 sub {end end ode@dict xlength end array astore} putinterval
+ cvx bind def
\else
/ODESET {
aload pop tx@Dict begin 4 begin #7 end end ode@dict xlength end array astore
} bind def
- %ensure local scope of user defined variables in #7, from BlueBook, p. 133
/ODESET load 4 1 dict put
\fi
\ifPstODE@algebraicOutputFormat
- /ode@fmtrpn tx@Dict begin (\expandafter\ode@zapspace\ode@fmt\@nil) AlgParser end cvx bind def
- /formatoutput {%
- ode@dict ode@laststate /x exch def /y x def /t tcur def end
- tx@Dict begin ode@dict ode@fmtrpn end end
- } bind def
+ /formatoutput [
+ 13 array aload pop
+ (\expandafter\ode@zapspace\ode@fmt\@nil) AlgParser aload pop
+ /end cvx
+ ]
+ dup 0 {
+ /x ode@laststate def /y x def
+ /t ode@dict tcur end def
+ tx@Dict begin
+ } putinterval
+ cvx bind def
\else /formatoutput {[#2] assembleresult} def \fi
%perform ode integration
rk4 {