DOLFINx
0.1.0
DOLFINx C++ interface
|
10 #include <dolfinx/common/MPI.h>
11 #include <xtl/xspan.hpp>
42 const xtl::span<const std::int32_t>& entities,
56 std::vector<std::pair<std::array<double, 3>, std::int32_t>> points);
77 std::array<std::array<double, 3>, 2>
get_bbox(std::size_t node)
const;
93 std::string
str()
const;
102 std::array<int, 2>
bbox(std::size_t node)
const
104 assert(2 * node + 1 < _bboxes.size());
105 return {_bboxes[2 * node], _bboxes[2 * node + 1]};
111 std::vector<double>&& bbox_coords);
117 void tree_print(std::stringstream& s,
int i)
const;
120 std::vector<std::int32_t> _bboxes;
123 std::vector<double> _bbox_coordinates;
std::int32_t num_bboxes() const
Return number of bounding boxes.
Definition: BoundingBoxTree.cpp:332
BoundingBoxTree(const mesh::Mesh &mesh, int tdim, const xtl::span< const std::int32_t > &entities, double padding=0)
Constructor.
Definition: BoundingBoxTree.cpp:231
~BoundingBoxTree()=default
Destructor.
BoundingBoxTree & operator=(BoundingBoxTree &&other)=default
Move assignment.
Axis-Aligned bounding box binary tree. It is used to find entities in a collection (often a mesh::Mes...
Definition: BoundingBoxTree.h:29
A Mesh consists of a set of connected and numbered mesh topological entities, and geometry data.
Definition: Mesh.h:55
std::array< int, 2 > bbox(std::size_t node) const
Get bounding box child nodes.
Definition: BoundingBoxTree.h:102
std::string str() const
Print out for debugging.
Definition: BoundingBoxTree.cpp:334
std::array< std::array< double, 3 >, 2 > get_bbox(std::size_t node) const
Return bounding box coordinates for a given node in the tree.
Definition: BoundingBoxTree.cpp:369
BoundingBoxTree create_global_tree(const MPI_Comm &comm) const
Compute a global bounding tree (collective on comm) This can be used to find which process a point mi...
Definition: BoundingBoxTree.cpp:298
int tdim() const
Topological dimension of leaf entities.
Definition: BoundingBoxTree.cpp:341