I am using boost::numeric::odeint
ODE solvers and have a question about them. The instructions says bulirsch_stoer
is a Stepper with step size and order control. Besides, the order is a variable the user could change. I look at the header file but didn't get a idea? Does anyone have any solution?
Asked
Active
Viewed 410 times
3
1 Answers
2
both, the order and the stepsize, are adjusted by the bulirsch-stoer method internally by a rather complicated algorithm. The user has no way to influence the order manually.
If you want a stepper with a specific order, you should consider a multi-step method like Adams-Bashforth, where you specify the order up-front. However, there the order can not be changed during the integration.

mariomulansky
- 963
- 5
- 7
-
Thank you very much! And so as you said, what the user could change is the 4 parameters in the constructor. I understand the first two parameters are absolutely and relative errors. What the last two mean? The instruction says they are "Factor for the weight of the derivative/state", I am not so clear about this. How this two values will affect the accuracy? What we should consider when we set this two values? Finally, not a smart question, which solver in odeint has the highest accuracy? Thank you again mariomulansky! – XYZ Jul 26 '13 at 19:23
-
1Those are also parameters of the error control, namely a_x and a_dxdt. the formula for the maximal acceptable error that is used in odeint is: eps_abs + eps_rel * ( a_x * |x| + a_dxdt * dt * |dxdt| ) - this formula can be found in the odeint docs, but is quite hidden I admint (http://headmyshoulder.github.io/odeint-v2/doc/boost_numeric_odeint/tutorial/harmonic_oscillator.html). For most problems the default values a_x=a_dxdt=1 are fine. – mariomulansky Jul 26 '13 at 20:27
-
As for your last question: if you use stepper with error control, then the accuracy is ensured by the epsilons you provide - independent on the stepper you choose. However - different steppers will have different numerical efficiency, but this depends on your problem. As rule of thumb: the higher the accuracy you ask for, the higher the order of your method should be. – mariomulansky Jul 26 '13 at 20:34