Merge branch 'master' into use_momentum_changes

This commit is contained in:
2019-07-16 21:22:22 +02:00
4 changed files with 24 additions and 2 deletions

View File

@@ -42,8 +42,10 @@ class BrownIterator(object):
self.py = delta_py + self.py
# XXX: We need the (-1)**i to make the problem
# symmetric.
# FIXME: is this necessary?
self.px[np.isnan(self.px)] = self.speed_of_light * (-1)**self._i
self.py[np.isnan(self.py)] = self.speed_of_light * (-1)**self._i
self._reflect_at_borders()
self.x += self.dt * self.px