[Tutor] hi

Vick vick1975 at orange.mu
Mon Aug 12 22:32:50 CEST 2013



> -----Original Message-----
> From: Oscar Benjamin [mailto:oscar.j.benjamin at gmail.com]
> Sent: Monday, 12 August, 2013 20:42

> Are you able to access this paper (link at the bottom)?
> 

[Vick] yes. But the formula seems unfamiliar to me. And I really can't
understand what with the compact writing and small letters.

> 
> I believe this is the original source for the coefficients you are using.
They
> describe constructing a system of linear rational equations for the
> coefficients of the method. I think that the equations must be satisfied
for
> any 13-stage explicit RK method that has an 8th-order with embedded 7th-
> order method. Solving the equations leads to a solution space with 10
> degrees of freedom. 

[Vick] You are telling only half the story...it looks like we have to write
up over 230 equations or so.

> 
> As a simpler example, imagine constructing the 4th order RK method which
> has Butcher table:
> 
> 0   |
> 1/2 | 1/2
> 1/2 | 0   1/2
> 1   | 0   0   1
> ----|----------------
>     | 1/6 1/3 1/3 1/6
> 

[Vick] Yeah I know about the butcher table, I've actually coded my copy of
DOPRI8 from its butcher tableau. However I still don't understand how the
coefficients are derived.
> 
> This gives us 8 equations for the 15 coefficients:
> 
> a1 |
> a2 | b21
> a3 | b31 b32
> a4 | b41 b42 b43
> ---|-----------------
>    | c1  c2  c3  c4
> 
> 
> Much as I would love to see those coefficients, for your own sake it would
be
> a lot easier to just use an Adams-Bashforth integrator.
> Here's a stripped down script that can compute the exact coefficients for
any
> arbitrary order:
> 
 [Vick] It looks as though your code is using some form of polynomial and if
I'm not mistaken is it the legendre polynomial?

I'm not sure what your code is really doing as I'm not an expert programmer.
What I need is to get an explanation with example of what some things are
supposed to be doing and then if I have understood correctly I will try to
code it on my own using my own coding capabilities. I think it's better if I
start work with the standard rk4 method as it has the same properties as the
dopri8. You make heavy use of scipy and numpy and the other modules in
python, so I guess you are a seasoned programmer in python so we are really
not on the same page with regard to understanding coding. My code shows that
I have done the rk4 and dopri8 from scratch without using the modules in
python except of course for mpmath. It would do me no good if I have to use
a function in coding which I really don't understand. 

It seems that I got you interested in DOPRI8 after all. You said you have a
collection of integrators. What are they, just to compare notes! Actually
the best or most efficient and most accurate I know about for ODEs is the
Gauss Jackson 8th order method (GJ8), but I don't have it. The second most
powerful is the RKN12 this is the runge kutta Nystrom 12th order but it is
useful only for 2nd order ODEs and as I haven't any use for it I haven't
completed its coding, but I do have its rational coefficients. Then the
third most efficient is the DOPRI8(7)13, the one you just got interested in.
With regard to integration (area under a curve) the best I know is the
tanh-sinh quadrature and I have it coded. Anyway it is also built in mpmath.
The second best is Gauss-Konrod but I don't have it and the third one is the
Gauss-legendre which I have also. And then there are the lesser orders like
Boole rule, Simpson's rule etc, even in their adaptive forms.

Well just send me some tutorial on how to build and obtain the coefficients
for the butcher tableau for the RK4 as an example, and after I've mastered
it, I'd give the dopri8 a shot.

Vick





More information about the Tutor mailing list