Completed eggs out of domain indicator

parent 3c9ca876
......@@ -117,7 +117,6 @@ class Results(ABC):
int
Number of particles
"""
return int(self._configuration["num_eggs"])
@abstractmethod
......@@ -304,6 +303,9 @@ class FullResults(Results):
particles_in_domain = positions_at_time[:, 0] <= self._domain_length
new_config = self.configuration()
new_config['num_eggs'] = sum(x for x in particles_in_domain)
if np.any(particles_in_domain):
cls = self.__class__
res = cls.__new__(cls)
......@@ -311,7 +313,7 @@ class FullResults(Results):
res._depth = self._depth[:, particles_in_domain]
res._width = self._width[:, particles_in_domain]
res._domain_length = self._domain_length
res._configuration = self.configuration()
res._configuration = new_config
res._time = self._time.copy()
else:
res = None
......
Markdown is supported
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