Using adaptive step sizes with scipy.integrate.ode

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2012-10-17T02:52:46Z Indexed on 2012/10/17 5:01 UTC
Read the original article Hit count: 175

Filed under:
|
|

The (brief) documentation for scipy.integrate.ode says that two methods (dopri5 and dop853) have stepsize control and dense output. Looking at the examples and the code itself, I can only see a very simple way to get output from an integrator. Namely, it looks like you just step the integrator forward by some fixed dt, get the function value(s) at that time, and repeat.

My problem has pretty variable timescales, so I'd like to just get the values at whatever time steps it needs to evaluate to achieve the required tolerances. That is, early on, things are changing slowly, so the output time steps can be big. But as things get interesting, the output time steps have to be smaller. I don't actually want dense output at equal intervals, I just want the time steps the adaptive function uses.

© Stack Overflow or respective owner

Related posts about python

Related posts about scipy