diff options
author | Karl Berry <karl@freefriends.org> | 2017-06-16 22:08:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-06-16 22:08:52 +0000 |
commit | 69064adb2c2586ea61da9dc8d907081f7a084651 (patch) | |
tree | 3cc310ad05ef74212e17ff8ed949e09de175db63 /Master | |
parent | d76ab792119d600283d06a1b9e6a2b39b9e24928 (diff) |
pst-ode (16jun17)
git-svn-id: svn://tug.org/texlive/trunk@44618 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-ode/ChangeLog | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.pdf | bin | 128140 -> 128408 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pst-ode/pst-ode.pro | 27 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex | 11 |
5 files changed, 24 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-ode/ChangeLog b/Master/texmf-dist/doc/generic/pst-ode/ChangeLog index a8e8ba8eba0..eeefa106add 100644 --- a/Master/texmf-dist/doc/generic/pst-ode/ChangeLog +++ b/Master/texmf-dist/doc/generic/pst-ode/ChangeLog @@ -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) diff --git a/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.pdf b/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.pdf Binary files differindex 05a448042ac..235fc7d3f54 100644 --- a/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.tex b/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.tex index be4749a9968..ec8e564189f 100644 --- a/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-ode/pst-ode-doc.tex @@ -149,7 +149,7 @@ Option \Lkeyword{silent} suppresses the terminal output of stepping information. 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} diff --git a/Master/texmf-dist/dvips/pst-ode/pst-ode.pro b/Master/texmf-dist/dvips/pst-ode/pst-ode.pro index df404a2de86..28d0550dda2 100644 --- a/Master/texmf-dist/dvips/pst-ode/pst-ode.pro +++ b/Master/texmf-dist/dvips/pst-ode/pst-ode.pro @@ -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 @@ end %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,18 +136,17 @@ end exch pop pshrink exp 0.1 max sfty mul ddt mul /ddt exch def ode@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 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 @@ end }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 { diff --git a/Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex b/Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex index d5da5351236..d8f4e9eccca 100644 --- a/Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex +++ b/Master/texmf-dist/tex/generic/pst-ode/pst-ode.tex @@ -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@odeDict begin \ifPstODE@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@tol \ode@varsteptol\space def % rel. tolerance for step size adjustment %process arguments @@ -149,7 +150,7 @@ } bind def \else /ODESET { - aload pop tx@Dict begin ode@foo begin #7 end end ode@dict xlength end array astore + 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 |