using momentum changes now works.
This commit is contained in:
parent
26acc9802d
commit
be0e67e954
|
@ -38,8 +38,8 @@ class BrownIterator(object):
|
||||||
return self.x, self.y
|
return self.x, self.y
|
||||||
|
|
||||||
delta_px, delta_py = self._interaction(self.x, self.y)
|
delta_px, delta_py = self._interaction(self.x, self.y)
|
||||||
self.px += delta_px
|
self.px = delta_px + self.px
|
||||||
self.py += delta_py
|
self.py = delta_py + self.py
|
||||||
# XXX: We need the (-1)**i to make the problem
|
# XXX: We need the (-1)**i to make the problem
|
||||||
# symmetric.
|
# symmetric.
|
||||||
self.px[np.isnan(self.px)] = self.speed_of_light * (-1)**self._i
|
self.px[np.isnan(self.px)] = self.speed_of_light * (-1)**self._i
|
||||||
|
|
Loading…
Reference in New Issue
Block a user