optimad / bitpit

Open source library for scientific HPC
http://optimad.github.io/bitpit/
GNU Lesser General Public License v3.0
117 stars 33 forks source link

patchkernel: reduce memory usage of Skd-Tree cache #306

Closed andrea-iob closed 2 years ago

andrea-iob commented 2 years ago

Cell centroids were only used to detect element ordering. For this purpose, the centroid of the element's bounding box can be used.

In order to recover the performances lost due to the computation of the cell bounding box centroid, I've also optimized the generation of the Skd-Tree. The splitting between left and right elements can be done evaluating only the position of the element along the direction of the splitting rather than evaluating the whole bounding box of the element.