[Tutor] hi
Oscar Benjamin
oscar.j.benjamin at gmail.com
Mon Aug 12 18:52:48 CEST 2013
On 12 August 2013 16:11, Vick <vick1975 at orange.mu> wrote:
>
> [Vick] That's the whole point! I had to wait for about 40 minutes to get
> very high accuracy which the method was not designed to obtain.
> Whereas the DOPRI8 got the result with 1e-13 error in less than a second.
> (Before when I said 2 or less seconds, it is obvious I didn't time them
> really; but it just printed the result as soon as I pressed F5)
With a smaller stepsize my rk4 integrator can get an error of 1e-15
(1e-13%) in 20 milliseconds:
$ ./ode.py
dt : 9.76562e-04 error : 2.83e-15
$ vim ode.py # This is to comment out the print line
$ python -m timeit -s 'from ode import check_errors' 'check_errors()'
10 loops, best of 3: 20.5 msec per loop
Oscar
More information about the Tutor
mailing list