using momentum changes now works.

This commit is contained in:
Daniel Knüttel 2019-07-16 21:22:11 +02:00
parent 26acc9802d
commit be0e67e954
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ class BrownIterator(object):
return self.x, self.y
delta_px, delta_py = self._interaction(self.x, self.y)
self.px += delta_px
self.py += delta_py
self.px = delta_px + self.px
self.py = delta_py + self.py
# XXX: We need the (-1)**i to make the problem
# symmetric.
self.px[np.isnan(self.px)] = self.speed_of_light * (-1)**self._i