Skip to content

modifies q_next update in leapfrog integrator#89

Open
cablanc wants to merge 1 commit intoCampusAI:masterfrom
cablanc:leapfrog
Open

modifies q_next update in leapfrog integrator#89
cablanc wants to merge 1 commit intoCampusAI:masterfrom
cablanc:leapfrog

Conversation

@cablanc
Copy link

@cablanc cablanc commented Aug 22, 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

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

Successfully merging this pull request may close these issues.

2 participants