Commit 756e57b9 authored by Ahmad Reza Cheraghi's avatar Ahmad Reza Cheraghi
Browse files

Update particle.py

parent a7b329b6
......@@ -134,8 +134,9 @@ class Particle(matter.Matter):
del self.sim.particle_map_coords[self.coords]
except KeyError:
pass
self.coords = dir_coord
if not self.coords in self.sim.particle_map_coords:
if not dir_coord in self.sim.particle_map_coords:
self.coords = dir_coord
self.sim.particle_map_coords[self.coords] = self
logging.info("particle %s successfully moved to %s", str(self.get_id()), dir)
self.sim.csv_round_writer.update_metrics( steps=1)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment