Repository metrics
- Stars
- (556 stars)
- PR merge metrics
- (PR metrics pending)
Description
In some AMR codes (such as RAMSES) the particles are read by yt in the order they appear in memory. This means that consecutive particles are likely to reside in the same oct (or in neighboring octs).
Using this, we could easily optimize the particle deposition scheme, so that when deposing a bunch of particles from the same oct, only one tree traversal is required.
This could either be done in particle_deposity.pyx https://github.com/yt-project/yt/blob/95f6c5dd1d06cb088f9369a15d478d6824090663/yt/geometry/particle_deposit.pyx#L89 or in the get method of the OctreeContainer object https://github.com/yt-project/yt/blob/a209a67f2977571925bc297739003254130ef9b3/yt/geometry/oct_container.pyx#L203
For instance, one could check that two consecutive particles leave in the same cell.