|
SpECTRE
v2025.08.19
|
Search tree for efficiently looking up elements by their bounding boxes in block-logical coordinates. More...
#include <ElementSearchTree.hpp>
Public Member Functions | |
| ElementSearchTree (ElementSearchTree &&) | |
| ElementSearchTree & | operator= (ElementSearchTree &&) |
| ElementSearchTree (const ElementSearchTree &)=delete | |
| ElementSearchTree & | operator= (const ElementSearchTree &)=delete |
| template<typename Iter > | |
| ElementSearchTree (Iter begin, const Iter end) | |
Construct a search tree containing the ids in [begin, end). | |
| size_t | size () const |
| bool | empty () const |
| void | clear () |
| void | insert (const ElementId< Dim > &id) |
| template<typename Iter > | |
| void | insert (Iter begin, const Iter end) |
Insert the ids in [begin, end). | |
| ElementSearchTreeIterator< Dim > | begin_covers (const tnsr::I< double, Dim, Frame::BlockLogical > &coords) const |
| ElementSearchTreeIterator< Dim > | end_covers () const |
Search tree for efficiently looking up elements by their bounding boxes in block-logical coordinates.
The search tree is constructed from a list of ElementIds, which define bounding boxes in block-logical coordinates. All ElementIds must be in the same block. Then, the search tree can be used to efficiently search for the element that contains a given block-logical coordinate (see e.g. element_logical_coordinates).
Example usage:
Use domain::index_element_ids() to create one search tree for each block in the domain given the full list of ElementIds.
The search tree is a boost::geometry::rtree with a choice of quadratic splitting algorithm and a maximum of 16 elements per node. These choices work well, but haven't been extensively tuned.