texlive[44618] Master/texmf-dist: pst-ode (16jun17)
commits+karl at tug.org
commits+karl at tug.org
Sat Jun 17 00:08:53 CEST 2017
Revision: 44618
http://tug.org/svn/texlive?view=revision&revision=44618
Author: karl
Date: 2017-06-17 00:08:52 +0200 (Sat, 17 Jun 2017)
Log Message:
-----------
pst-ode (16jun17)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/generic/pst-ode/ChangeLog
trunk/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.pdf
trunk/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.tex
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 2017-06-16 22:08:39 UTC (rev 44617)
+++ trunk/Master/texmf-dist/doc/generic/pst-ode/ChangeLog 2017-06-16 22:08:52 UTC (rev 44618)
@@ -1,3 +1,7 @@
+2017-06-16
+ * version 0.10
+ * more diagnostic terminal output for stepsize underflow
+
2017-06-14
* version 0.9
* fix: occasional failure of the stepping routine (zero relative error)
Modified: trunk/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.tex 2017-06-16 22:08:39 UTC (rev 44617)
+++ trunk/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.tex 2017-06-16 22:08:52 UTC (rev 44618)
@@ -149,7 +149,7 @@
The tolerance for the automatic integration step size calculation can be set with \Lkeyword{varsteptol} \Lkeyword{=}\Larg{value}. The default value is \Lkeyword{1e-6}.
-In the case of integration step size underflow, which is indicated by writing `\Lkeyword{!}' to the terminal during PS to PDF conversion, the computation stops prematurely before reaching $t_\mathrm{e}$. This may happen for stiff ODEs at some point along the integration interval.\\[1ex]
+In the case of integration step size underflow, which is indicated by writing `\Lkeyword{!}' to the terminal during PS to PDF conversion, the computation stops prematurely before reaching $t_\mathrm{e}$. The current value of $t$ and the current state vector $\mathbf{x}$ are written to the terminal. Step size underflow may happen for stiff ODEs at some point along the integration interval $[t_0, t_\mathrm{e}]$.\\[1ex]
%It may be necessary to enlarge it using this option in cases that fail with `\Lkeyword{error: step size underflow in ODEINT}'.\\[1ex]
\begin{BDef}
Modified: trunk/Master/texmf-dist/dvips/pst-ode/pst-ode.pro
===================================================================
--- trunk/Master/texmf-dist/dvips/pst-ode/pst-ode.pro 2017-06-16 22:08:39 UTC (rev 44617)
+++ trunk/Master/texmf-dist/dvips/pst-ode/pst-ode.pro 2017-06-16 22:08:52 UTC (rev 44618)
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% PostScript prologue for pst-ode.tex.
-% Version 0.9, 2017/06/14
+% Version 0.10, 2017/06/16
%
% Alexander Grahn (C) 2012--today
%
@@ -117,11 +117,9 @@
%scaling vector for step size adjustment (Numerical Recipies)
eabsvect k1 eabsvect addvect {1e-30 add} forall xlength array astore
% => [x(t)] [x(t+ddt) by RKF4] [err] [xscale]
- /errmax 0 def %maximum rel. error
+ /errmax 1e-30 def %maximum rel. error
edivvect {abs dup errmax gt {/errmax exch def}{pop} ifelse} forall errmax
% => [x(t)] [x(t+ddt) by RKF4] errmax
- %Sometimes, the rel. error is zero (Why is that???). So we add 1e-30
- 1e-30 add
end
} bind def
/ODEINT { % performs integration over output step [t,t+dt]
@@ -138,7 +136,9 @@
exch pop pshrink exp 0.1 max sfty mul ddt mul /ddt exch def
ode at dict tcur ddt add tcur end eq {
% error: step size underflow in ODEINT
- (! t=) odeprint tcur 256 string cvs odeprint
+ (! t=) odeprint tcur odeprint
+ % print & remove previous state vector
+ (, x=[ ) odeprint {odeprint ( ) odeprint} forall (]) odeprint
true
}{
(-) odeprint
@@ -145,11 +145,8 @@
false
} ifelse
end
- % on step size underflow ...
- {
- pop % remove previous state vector and
- exit % leave loop over output steps (pst-ode.tex)
- } if
+ % on step size underflow, leave loop over output steps (pst-ode.tex)
+ {exit} if
ODEINT %repeat step with new ddt
}{
%success
@@ -168,12 +165,14 @@
}ifelse
} bind def
/writeresult { %write output vector to file
- {
- 256 string cvs statefile exch writestring
- statefile ( ) writestring
- } forall
+ /loopproc load forall
statefile (\n) writestring
} bind def
+/loopproc {
+ 0 cvs statefile exch writestring
+ statefile ( ) writestring
+} bind def
+/loopproc load 0 256 string put
/assembleresult { %assembles state vector for building table of results
{
dup (t) eq {
Modified: trunk/Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex 2017-06-16 22:08:39 UTC (rev 44617)
+++ trunk/Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex 2017-06-16 22:08:52 UTC (rev 44618)
@@ -11,8 +11,8 @@
%% ODEs using the Runge-Kutta-Fehlberg (RKF45) method with automatic
%% step size adjustment
%%
-\def\fileversion{0.9}
-\def\filedate{2017/06/14}
+\def\fileversion{0.10}
+\def\filedate{2017/06/16}
\csname PSTODELoaded\endcsname
\let\PSTODELoaded\endinput
@@ -111,9 +111,10 @@
\pstVerb{
tx at odeDict begin
\ifPstODE at silent
- userdict /odeprint systemdict /pop get put
+ /odeprint systemdict /pop get def
\else
- userdict /odeprint {print flush} put
+ /odeprint {0 cvs print flush} def
+ /odeprint load 0 256 string put
\fi
/ode at tol \ode at varsteptol\space def % rel. tolerance for step size adjustment
%process arguments
@@ -149,7 +150,7 @@
} bind def
\else
/ODESET {
- aload pop tx at Dict begin ode at foo begin #7 end end ode at dict xlength end array astore
+ 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
More information about the tex-live-commits
mailing list