[SciPy-User] Easy way to detect data boundary in integrate.odeint?

Bridgman, William T. William.T.Bridgman at nasa.gov
Thu Jun 2 08:17:55 EDT 2011


Hello,

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?

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.

Is there any flag or sentinel value I can wrap around my data cube  
that would tell odeint to terminate when the integration hits the data  
boundary?  I can't find any in the scipy docs and I've found a few  
queries on the discussion list which are close to the topic but  
apparently never actually implemented.

Thanks,
Tom
--
Dr. William T."Tom" Bridgman               Scientific Visualization  
Studio
Global Science & Technology, Inc.          NASA/Goddard Space Flight  
Center
Email: William.T.Bridgman at nasa.gov         Code 610.3
Phone: 301-286-1346                        Greenbelt, MD 20771
FAX:   301-286-1634                        http://svs.gsfc.nasa.gov/







More information about the SciPy-User mailing list