Skip to content

[bugfix][gridgeometry] Always construct bboxtree and element map

Timo Koch requested to merge fix/grid-geom-thread-safe into master

A thread-safe implementation with double-checked lock needs atomic load/store operations to update the pointer to be thread-safe. Alternatively, a lock has to be acquired every time when the function is called. Both implementations impair the scalability of the multihreaded assembly (in the case of tpfa, or any simulation that uses element maps or bounding box tree on an element level).

This changes the beahviour to always build the tree and the element map. This usually occurs little runtime overhead in cases where the features are unused. It is the most performant version as soon as one of the features is used. There is however some memory overhead in the order of one or more ints per element (seeds) and a bounding box hierarchy.

Fixes #1151 (closed)

Edited by Timo Koch

Merge request reports