headmyshoulder / odeint-v2

odeint - solving ordinary differential equations in c++ v2
http://headmyshoulder.github.com/odeint-v2/
Other
337 stars 102 forks source link

stepper_rk78_fehlberg order and error order #223

Closed ghost closed 5 years ago

ghost commented 6 years ago

What is the order/error order of the Runge-Kutta 7(8) algorithm implemented in Odeint? The Odeint documentation states that the order is 8 and the error order is 7. However, the codeproject article https://www.codeproject.com/Articles/43607/Solving-ordinary-differential-equations-in-C states that the order is 7 and the error order is 8.

My understanding is that x refers to the order of the method and y refers to the order of the error in RKx(y).

Thank you for clarifying!

mariomulansky commented 5 years ago

For the runge_kutta_fehlberg78, the solution is 8th order and the error is 7th order. The article is incorrect for the current version of odeint. Note that odeint has tests verifying the order of the solution and test for the steppers: https://github.com/headmyshoulder/odeint-v2/blob/master/test/numeric/runge_kutta.cpp