... | ... | @@ -20,10 +20,13 @@ with logger.Reader(basename) as f: |
|
|
time=time,
|
|
|
interpolation="linear")
|
|
|
|
|
|
# Extract the particle positions as an Nx3 matrix.
|
|
|
positions = particles_at_time_t["Coordinates"]
|
|
|
|
|
|
# Move a set of particles forward in time.
|
|
|
# here we should be fast thanks to the cache.
|
|
|
positions = f.get_particle_data(
|
|
|
particles=particle_set,
|
|
|
particles_at_time_t_plus_one = f.get_particle_data(
|
|
|
particles=particles_at_time_t,
|
|
|
fields=["Coordinates"],
|
|
|
time=time + 1)
|
|
|
|
... | ... | |