From 9da8ac113f97e68e91e3a1ef26467f9814eb4312 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 8 Apr 2019 17:23:59 +0000 Subject: pgf revert to previous release (r49607, committed 5jan19) git-svn-id: svn://tug.org/texlive/trunk@50867 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/generic/pgf/math/pgfmathode.code.tex | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Master/texmf-dist/tex/generic/pgf/math/pgfmathode.code.tex') diff --git a/Master/texmf-dist/tex/generic/pgf/math/pgfmathode.code.tex b/Master/texmf-dist/tex/generic/pgf/math/pgfmathode.code.tex index cb3d0d26ca8..d8837897558 100644 --- a/Master/texmf-dist/tex/generic/pgf/math/pgfmathode.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/math/pgfmathode.code.tex @@ -36,12 +36,12 @@ %********************************************************************** % Numerically solve a differential system with 1st order Runge-Kutta -% (Euler method) +% (Euler method) % dq1/dt = f1(t,q1,q2,...,qN) % dq2/dt = f2(t,q1,q2,...,qN) % ... % dqN/dt = fN(t,q1,q2,...,qN) -% +% % #1: A pgf array where the solution will be stored. % At the end: % #1 -> {{t(0),q1(t(0)),q2(t(0)),...,qN(t(0))}, @@ -58,7 +58,7 @@ % * First order example: dq/dt = -q + 5 with IC=(t=0,q(0)=0) % \pgfmathodeRKI{\Sol}{{-\Sol[1]+5}}{{0,0}}{3.5}{100} % * Second order example: {dq1/dt=q2, dq2/dt=-q2/2-sin(q1)} (damped -% pendulum) +% pendulum) % \pgfmathodeRKI{\Sol}{{\Sol[2],-\Sol[2]/2-sin(deg(\Sol[1]))}}% % {{0,-1,5}}{15}{50} @@ -71,8 +71,8 @@ % The set of rhs {f1(t,q1,q2,...,qN),...,fN(t,q1,q2,...,qN)} is % given in terms of #1[0],#1[1],...,#1[N]. We need to transform to % #1[\pgfmathode@timeindex][0],...,#1[\pgfmathode@timeindex][N], that is - % add [\pgfmathode@timeindex] after every occurrence of #1 in #2. - % No need to brace #2 since it is already surrounded by braces. The + % add [\pgfmathode@timeindex] after every occurence of #1 in #2. + % No need to brace #2 since it is already surounded by braces. The % result is stored in \pgfmathode@func \pgfmathode@addindextofunc[#1]#2% % Set time step. Actually the number of time steps is #5-1, so we @@ -93,9 +93,9 @@ \foreach \pgfmathode@funcindex in {1,...,\pgfmathode@dimfunc} {% % The RKI algorithm % qk[t(i)] = Deltat*fk(t(i-1),q1(t(i-1)),...qN(t(i-1))) + - % qk[t(i-1)] - % Note: this part can be really slow due to array management in - % pgfmath. + % qk[t(i-1)] + % Note: this part can be really slow due to array managment in + % pgfmath. % TODO: find a better way (at least inside this loop) \pgfmathparse{% \pgfmathode@Deltat*(\pgfmathode@func[\pgfmathode@funcindex-1])+ @@ -132,7 +132,7 @@ % Start the function loop \foreach \pgfmathode@funcindex in {1,...,\pgfmathode@dimfunc} {% % The RKIV algorithm - % qk[t(i)] = qk[t(i-1)] + + % qk[t(i)] = qk[t(i-1)] + % (1/6) * (j1k + 2j2k + 2j3k + j4k) % where j1k = fk(t(i-1),q1(t(i-1)),...qN(t(i-1))) * Deltat % j2k = fk(t(i-1)+.5*Deltat, @@ -175,4 +175,4 @@ \endgroup} -\endinput +\endinput \ No newline at end of file -- cgit v1.2.3