diff options
author | dos-reis <gdr@axiomatics.org> | 2010-06-13 16:37:27 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-06-13 16:37:27 +0000 |
commit | 701073966d9aba091a99aa3cbef48fe3df226dfe (patch) | |
tree | ed595066e9e5e307fa4b86c9eb3852145965ac3f /src/algebra/numode.spad.pamphlet | |
parent | 9a4759f38f13d4bf79133846eb5fd2aff58b2235 (diff) | |
download | open-axiom-701073966d9aba091a99aa3cbef48fe3df226dfe.tar.gz |
* algebra/array1.spad.pamphlet (IndexedFlexibleArray) [merge!]: Tidy.
* algebra/intfact.spad.pamphlet (IntegerRoots) [perfectNthRoot]:
Likewise.
* algebra/numode.spad.pamphlet
(NumericalOrdinaryDifferentialEquations) [rf4a]: Likewise.
* algebra/solvelin.spad.pamphlet (LinearSystemMatrixPackage)
[aSolution]: Likewise.
Diffstat (limited to 'src/algebra/numode.spad.pamphlet')
-rw-r--r-- | src/algebra/numode.spad.pamphlet | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/algebra/numode.spad.pamphlet b/src/algebra/numode.spad.pamphlet index e2cdf52f..6e6be9bd 100644 --- a/src/algebra/numode.spad.pamphlet +++ b/src/algebra/numode.spad.pamphlet @@ -194,12 +194,12 @@ NumericalOrdinaryDifferentialEquations(): Exports == Implementation where m : I := nvar outlist : L OFORM := [x::E,x::E,x::E] i : I - iter : I eps := 1.0/eps for i in 1..m repeat y(i) := ystart(i) - for iter in 1..nstep repeat + iter : I := 1 + while iter <= nstep repeat --compute the derivative derivs(dydx,y,x) --if overshoot, the set h accordingly @@ -212,15 +212,12 @@ NumericalOrdinaryDifferentialEquations(): Exports == Implementation where rk4qclocal(y,dydx,nvar,x,step,eps,yscal,derivs ,t1,t2,t3,t4,t5,t6) x := x + step.did --- outlist.0 := x::E --- outlist.1 := y(0)::E --- outlist.2 := y(1)::E --- output(blankSeparate(outlist)::E) --check to see if done if (x-x2) >= 0.0 then leave --next stepsize to use step.try := step.next + iter := iter + 1 --end nstep repeat if iter = (nstep+1) then output("ode: ERROR ") |