I'm using Python scipy.integrate.ode, and I want to stop my integration at a certain condition. So I use the integrator dopri5 and use the method set_solout to specify a function for my stop condition.Unfortunately, in some cases, the program says my problem is stiff, and exits. (The message is UserWarning: dopri5: problem is probably stiff (interrupted)). So I try another integrator. The documentation mentions 3 other integrators (vode, zvode and lsoda) which might be suitable for stiff problems. (There is also dop853, but that exits in the same way as dopri5).Here's my problem: none of these integrators support the set_selout method. So: is there another way to stop any of these integrators on a condition?EDIT (a few hours later): I got around this with repeated calls of the integrate method (with integrator set to lsoda) with a short time step; and checking my end condition after each call. Ugly, but gets the job done. I'd still like to know if there's a better way to do this.
stop condition in scipy.integrate.ode for stiff system
python;scipy;stiffness