summaryrefslogtreecommitdiff
path: root/graphics
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
parentc45a0e15a3f74b963e3c2be142de33c8c8f12588 (diff)
CTAN sync 202401050302
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pstricks/contrib/pst-ode/ChangeLog4
-rw-r--r--graphics/pstricks/contrib/pst-ode/examples/ode.tex2
-rw-r--r--graphics/pstricks/contrib/pst-ode/pst-ode-doc.pdfbin132361 -> 132595 bytes
-rw-r--r--graphics/pstricks/contrib/pst-ode/pst-ode.pro6
-rw-r--r--graphics/pstricks/contrib/pst-ode/pst-ode.tex37
5 files changed, 32 insertions, 17 deletions
diff --git a/graphics/pstricks/contrib/pst-ode/ChangeLog b/graphics/pstricks/contrib/pst-ode/ChangeLog
index abd4c1bb1a..f01e22a6c6 100644
--- a/graphics/pstricks/contrib/pst-ode/ChangeLog
+++ b/graphics/pstricks/contrib/pst-ode/ChangeLog
@@ -1,3 +1,7 @@
+2024-01-04
+ * version 0.19
+ * fix: PS dict issue
+
2022-11-24
* version 0.18
* new: option `rk4' added, classical RK4 method (no adaptive stepsize)
diff --git a/graphics/pstricks/contrib/pst-ode/examples/ode.tex b/graphics/pstricks/contrib/pst-ode/examples/ode.tex
index 2d2f52aa27..fdf6b670e0 100644
--- a/graphics/pstricks/contrib/pst-ode/examples/ode.tex
+++ b/graphics/pstricks/contrib/pst-ode/examples/ode.tex
@@ -10,7 +10,7 @@
\psset{xAxisLabel=$t$,xAxisLabelPos={c,-6ex},yAxisLabelPos={-3ex,c}}
\begin{psgraph}[axesstyle=frame,Ox=-1,](0,0)(0,0)(4,1){10cm}{2.5cm}
\rput(1,0){\psplot[algebraic]{-1}{3}{Euler^(-x^2)}}
- \pstODEsolve[rk4,algebraicIC,algebraic]{TY}{(t) 0}{-1}{3}{7}{1/Euler}{-2*t*y[0]}
+ \pstODEsolve[algebraicIC,algebraic]{TY}{(t) 0}{-1}{3}{5}{1/Euler}{-2*t*y[0]}
\rput(1,0){\listplot[plotstyle=dots,dotsize=0.05,linecolor=red]{TY}}
\end{psgraph}
\end{pspicture}
diff --git a/graphics/pstricks/contrib/pst-ode/pst-ode-doc.pdf b/graphics/pstricks/contrib/pst-ode/pst-ode-doc.pdf
index 9aaadf8ae1..383709d493 100644
--- a/graphics/pstricks/contrib/pst-ode/pst-ode-doc.pdf
+++ b/graphics/pstricks/contrib/pst-ode/pst-ode-doc.pdf
Binary files differ
diff --git a/graphics/pstricks/contrib/pst-ode/pst-ode.pro b/graphics/pstricks/contrib/pst-ode/pst-ode.pro
index 38cf998e9e..f9d8fdcf50 100644
--- a/graphics/pstricks/contrib/pst-ode/pst-ode.pro
+++ b/graphics/pstricks/contrib/pst-ode/pst-ode.pro
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% PostScript prologue for pst-ode.tex.
-% Version 0.18, 2022/11/24
+% Version 0.19, 2024/01/04
%
% Alexander Grahn (C) 2012--today
%
@@ -66,7 +66,7 @@ end
%[state vector x(t)] RKF45 => [x(t)] [x(t+ddt) by RKF4] errmax
/RKF45 {
dup
- ode@dict tcur end /t exch def
+ /t ode@dict tcur end def
ODESET
ode@dict
ddt mulvect /k1 exch def
@@ -174,7 +174,7 @@ end
%failed step -> reduce step size
ode@dict
exch pop pshrink exp 0.1 max sfty mul ddt mul /ddt exch def
- ode@dict tcur ddt add tcur end eq {
+ tcur ddt add tcur eq {
% error: step size underflow in ODEINT
(! t=) odeprint tcur odeprint
% print & remove previous state vector
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 {