N-BodyShop / changa

UIUC/PPL version of ChaNGa
http://hpcc.astro.washington.edu/tools/changa.html
GNU General Public License v2.0
42 stars 28 forks source link

Add TreePiece::sort() entry method to replace TreePiece::drift(0.0...) #182

Open trquinn opened 1 month ago

trquinn commented 1 month ago

There is at least 10 times in the code where we call treeProxy.drift(0.0...) when we just want to get the particles into tree order. This involves an unnecessary pass over the particles, a reduction, and a broadcast. I suggest adding a new entry method that performs the core of TreePiece::assignKeys(). Note that it must assume that nobody has messed with TreePieces::boundingBox, but I don't think that is an issue.