Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic leapfrog stepsize choice hangs in Python version #336

Closed
jobovy opened this issue Apr 11, 2018 · 2 comments
Closed

Automatic leapfrog stepsize choice hangs in Python version #336

jobovy opened this issue Apr 11, 2018 · 2 comments

Comments

@jobovy
Copy link
Owner

jobovy commented Apr 11, 2018

The Python version of the leapfrog integrators stepsize setter can go into an infinite loop, making the step smaller and smaller. Seems to be a particular problem for 1D orbits starting at x=0 (example to come).

@jobovy jobovy added the bug label Apr 11, 2018
@jobovy jobovy self-assigned this Apr 11, 2018
@jobovy
Copy link
Owner Author

jobovy commented Jul 3, 2018

Example:

from galpy.potential import MWPotential2014, RZToverticalPotential
from galpy.orbit import Orbit
mwp= RZToverticalPotential(MWPotential2014,1.)
o= Orbit([0.,1.])
o.integrate(numpy.array([0.,0.1]),mwp)

@jobovy
Copy link
Owner Author

jobovy commented Jul 3, 2018

Turned out to mostly be caused by the default atol=0 in the Python leapfrog integrator. Not sure why I ever set this to zero (it's 1e-12 in C)...

@jobovy jobovy closed this as completed in 3c38e68 Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant