texlive[69296] Master/texmf-dist: pst-ode (4jan24)

commits+karl at tug.org commits+karl at tug.org
Thu Jan 4 21:33:02 CET 2024


Revision: 69296
          https://tug.org/svn/texlive?view=revision&revision=69296
Author:   karl
Date:     2024-01-04 21:33:01 +0100 (Thu, 04 Jan 2024)
Log Message:
-----------
pst-ode (4jan24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pst-ode/ChangeLog
    trunk/Master/texmf-dist/doc/generic/pst-ode/examples/ode.tex
    trunk/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.pdf
    trunk/Master/texmf-dist/dvips/pst-ode/pst-ode.pro
    trunk/Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex

Modified: trunk/Master/texmf-dist/doc/generic/pst-ode/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-ode/ChangeLog	2024-01-04 06:37:54 UTC (rev 69295)
+++ trunk/Master/texmf-dist/doc/generic/pst-ode/ChangeLog	2024-01-04 20:33:01 UTC (rev 69296)
@@ -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)

Modified: trunk/Master/texmf-dist/doc/generic/pst-ode/examples/ode.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-ode/examples/ode.tex	2024-01-04 06:37:54 UTC (rev 69295)
+++ trunk/Master/texmf-dist/doc/generic/pst-ode/examples/ode.tex	2024-01-04 20:33:01 UTC (rev 69296)
@@ -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}

Modified: trunk/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/dvips/pst-ode/pst-ode.pro
===================================================================
--- trunk/Master/texmf-dist/dvips/pst-ode/pst-ode.pro	2024-01-04 06:37:54 UTC (rev 69295)
+++ trunk/Master/texmf-dist/dvips/pst-ode/pst-ode.pro	2024-01-04 20:33:01 UTC (rev 69296)
@@ -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 @@
 %[state vector x(t)] RKF45 => [x(t)] [x(t+ddt) by RKF4] errmax
 /RKF45 {
   dup
-  ode at dict tcur end /t exch def
+  /t ode at dict tcur end def
   ODESET
   ode at dict
     ddt mulvect /k1 exch def
@@ -174,7 +174,7 @@
       %failed step -> reduce step size
       ode at dict
         exch pop pshrink exp 0.1 max sfty mul ddt mul /ddt exch def
-        ode at 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

Modified: trunk/Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex	2024-01-04 06:37:54 UTC (rev 69295)
+++ trunk/Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex	2024-01-04 20:33:01 UTC (rev 69296)
@@ -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 at Dict begin (\expandafter\ode at zapspace\ode at ta\@nil)
         AlgParser cvx exec end ode at dict /tStart exch def end
       tx at Dict begin (\expandafter\ode at zapspace\ode at tb\@nil)
-        AlgParser cvx exec end ode at dict /tEnd   exch def end
+        AlgParser cvx exec end ode at dict /tEnd exch def end
     \else
       tx at Dict begin 1 dict begin #3 end end ode at dict /tStart exch def end
       tx at Dict begin 1 dict begin #4 end end ode at dict /tEnd   exch def end
@@ -164,23 +164,34 @@
     ode at dict /xlength ode at laststate length def end % number of equations
     ode at dict /xlength1 xlength 1 add def end % number of equations plus 1
     \ifPst at algebraic
-      /ode at rpn tx at Dict begin (\expandafter\ode at zapspace\ode at arg\@nil) AlgParser end cvx bind def
-      /ODESET {%system of ODEs
-        ode at dict /x exch def /y x def end tx at Dict begin ode at dict ode at rpn end end ode at dict xlength end array astore
-      } bind def
+      /ODESET [% system of ODEs
+        10 array aload pop
+        (\expandafter\ode at zapspace\ode at arg\@nil) AlgParser aload pop
+        7 array aload pop
+      ]
+      dup 0 {tx at 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 at dict xlength end array astore} putinterval
+      cvx bind def
     \else
       /ODESET {
         aload pop tx at Dict begin 4 begin #7 end end ode at 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 at algebraicOutputFormat
-      /ode at fmtrpn tx at Dict begin (\expandafter\ode at zapspace\ode at fmt\@nil) AlgParser end cvx bind def
-      /formatoutput {%
-        ode at dict ode at laststate /x exch def /y x def /t tcur def end
-        tx at Dict begin ode at dict ode at fmtrpn end end
-      } bind def
+      /formatoutput [
+        13 array aload pop
+        (\expandafter\ode at zapspace\ode at fmt\@nil) AlgParser aload pop
+        /end cvx
+      ]
+      dup 0 {
+        /x ode at laststate def /y x def
+        /t ode at dict tcur end def
+        tx at Dict begin
+      } putinterval
+      cvx bind def
     \else /formatoutput {[#2] assembleresult} def \fi
     %perform ode integration
     rk4 {



More information about the tex-live-commits mailing list.