I have a system of (first order) ODEs with fairly expensive to compute derivatives.
However, the derivatives can be computed considerably cheaper to within given error bounds, either because the derivatives are computed from a convergent series and bounds can be placed on the maximum contribution from dropped terms, or through use of precomputed range information stored in kd-tree/octree lookup tables.
Unfortunately, I haven’t been able to find any general ODE solvers which can benefit from this; they all seem to just give you coordinates and want an exact result back. (Mind you, I’m no expert on ODEs; I’m familiar with Runge-Kutta, the material in the Numerical Recipies book, LSODE and the Gnu Scientific Library’s solver).
ie for all the solvers I’ve seen, you provide a derivs callback function accepting a t and an array of x, and returning an array of dx/dt back; but ideally I’m looking for one which gives the callback t, xs, and an array of acceptable errors, and receives dx/dt_min and dx/dt_max arrays back, with the derivative range guaranteed to be within the required precision. (There are probably numerous equally useful variations possible).
Any pointers to solvers which are designed with this sort of thing in mind, or alternative approaches to the problem (I can’t believe I’m the first person wanting something like this) would be greatly appreciated.
Having thought about this some more, it occurred to me that interval arithmetic is probably key. My
derivsfunction basically returns intervals. An integrator using interval arithmetic would maintain x’s as intervals. All I’m interested in is obtaining a sufficiently small error bound on thexs at a finalt. An obvious approach would be to iteratively re-integrate, improving the quality of the sample introducing the most error each iteration until we finally get a result with acceptable bounds (although that sounds like it could be a ‘cure worse than the disease’ with regards to overall efficiency). I suspect adaptive step size control could fit in nicely in such a scheme, with step size chosen to keep the ‘implicit’ discretization error comparable with the ‘explicit error’ ie the interval range).Anyway, googling ‘ode solver interval arithmetic’ or just ‘interval ode’ turns up a load of interesting new and relevant stuff (VNODE and its references in particular).