[SciPy-User] Easy way to detect data boundary in integrate.odeint?
Rob Clewley
rob.clewley at gmail.com
Thu Jun 2 15:35:02 EDT 2011
William,
> I'm building streamlines from a 3-D vector array and keep having the
> problem that if the point I'm propagating reaches the boundary of the
> data it will sometimes reverse, re-traversing the dataset (really
> bad), or just repeatedly add points at the boundary (annoying).
>
> Is there an easy way to terminate this behavior?
No, this feature is not present in scipy's odeint wrapper.
> I've implemented a version calling odeint in a loop where I check if
> the output position is still in my data volume with each integration
> step, but this is notoriously slow.
If speed has become a major issue for you, I recommend my PyDSTool
package for faster integration with easily set up event detection.
Both will take place at the level of the C code the package creates
automatically from your specifications. So it will be very fast. Feel
free to contact me about setting up if you get stuck with the limited
documentation online (just google it).
Best,
Rob
--
Robert Clewley, Ph.D.
Assistant Professor
Neuroscience Institute and
Department of Mathematics and Statistics
Georgia State University
PO Box 5030
Atlanta, GA 30302, USA
tel: 404-413-6420 fax: 404-413-5446
http://www2.gsu.edu/~matrhc
http://neuroscience.gsu.edu/rclewley.html
More information about the SciPy-User
mailing list