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

Leapfrog integration #88

Open
cablanc opened this issue Aug 10, 2022 · 1 comment
Open

Leapfrog integration #88

cablanc opened this issue Aug 10, 2022 · 1 comment

Comments

@cablanc
Copy link

cablanc commented Aug 10, 2022

q_next = q + p_next_half * self.delta_t

I think there is an issue with the leapfrog step. The current implementation updates q using:

p_next_half = p + dp_dt * (self.delta_t) / 2
q_next = q + p_next_half * self.delta_t

I think it should be changed to:

p_next_half = p + dp_dt * (self.delta_t) / 2
dq_dt, _ = self._get_grads(q, p_next_half, hnn)
q_next = q + dq_dt * self.delta_t
@charlio23
Copy link
Collaborator

Thank you for the suggestion. Could you please create a PR with the suggested changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants