some more useful comments

This commit is contained in:
Daniel Knüttel 2019-07-16 20:45:17 +02:00
parent da2fd89946
commit 48b8ce8c88
1 changed files with 2 additions and 0 deletions

View File

@ -40,8 +40,10 @@ class BrownIterator(object):
self.px, self.py = self._interaction(self.x, self.y, self.px, 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