... | ... | @@ -8,11 +8,12 @@ Before thinking about the reader implementation, lets start by imagining the kin |
|
|
with logger.Reader(basename) as f:
|
|
|
|
|
|
# Create a logger.ParticleSet of the particles we want to track.
|
|
|
# This function loops over all the index files and get all the particles
|
|
|
# contain cache for the particle set (for later)
|
|
|
particle_set = f.get_particles(type="Gas", cache=True)
|
|
|
particle_set -= f.get_particles(ids=[...])
|
|
|
# remove the use of the cache
|
|
|
particle_set.cache(False)
|
|
|
particle_set.cache_enabled(False)
|
|
|
|
|
|
# Read some fields for some particles. This generates a new ParticleSet that
|
|
|
# contains the particles from `particle_set` that exist at time `time`, and
|
... | ... | |