Axis-Aligned bounding box binary tree. It is used to find entities in a collection (often a mesh::Mesh).
More...
#include <BoundingBoxTree.h>
|
| BoundingBoxTree (const mesh::Mesh &mesh, int tdim, const std::vector< std::int32_t > &entity_indices, double padding=0) |
| Constructor. More...
|
|
| BoundingBoxTree (const mesh::Mesh &mesh, int tdim, double padding=0) |
| Constructor. More...
|
|
| BoundingBoxTree (const std::vector< Eigen::Vector3d > &points) |
| Constructor. More...
|
|
| BoundingBoxTree (BoundingBoxTree &&tree)=default |
| Move constructor.
|
|
| BoundingBoxTree (const BoundingBoxTree &tree)=delete |
| Copy constructor.
|
|
BoundingBoxTree & | operator= (BoundingBoxTree &&other)=default |
| Move assignment.
|
|
| ~BoundingBoxTree ()=default |
| Destructor.
|
|
Eigen::Array< double, 2, 3, Eigen::RowMajor > | get_bbox (int node) const |
| Return bounding box coordinates for a given node in the tree. More...
|
|
BoundingBoxTree | compute_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 might have a collision with. More...
|
|
int | num_bboxes () const |
| Return number of bounding boxes.
|
|
int | tdim () const |
| Topological dimension of leaf entities.
|
|
std::string | str () const |
| Print out for debugging.
|
|
std::array< int, 2 > | bbox (int node) const |
| Get bounding box child nodes. More...
|
|
void | remap_entity_indices (const std::vector< std::int32_t > &entity_indices) |
| Remap entity indices for bounding box trees that does not span a whole mesh. Each leaf node should contain the actual entity index, not a reference to the index of the entity_indices list. More...
|
|
Axis-Aligned bounding box binary tree. It is used to find entities in a collection (often a mesh::Mesh).
◆ BoundingBoxTree() [1/3]
BoundingBoxTree::BoundingBoxTree |
( |
const mesh::Mesh & |
mesh, |
|
|
int |
tdim, |
|
|
const std::vector< std::int32_t > & |
entity_indices, |
|
|
double |
padding = 0 |
|
) |
| |
Constructor.
- Parameters
-
[in] | mesh | The mesh for building the bounding box tree |
[in] | tdim | The topological dimension of the mesh entities to build the bounding box tree for |
[in] | entity_indices | List of entity indices (local to process) to compute the bounding box for (may be empty, if none). |
[in] | padding | A float perscribing how much the bounding box of each entity should be padded |
◆ BoundingBoxTree() [2/3]
BoundingBoxTree::BoundingBoxTree |
( |
const mesh::Mesh & |
mesh, |
|
|
int |
tdim, |
|
|
double |
padding = 0 |
|
) |
| |
Constructor.
- Parameters
-
[in] | mesh | The mesh for building the bounding box tree |
[in] | tdim | The topological dimension of the mesh entities to build the bounding box tree for |
[in] | padding | A float perscribing how much the bounding box of each entity should be padded |
◆ BoundingBoxTree() [3/3]
BoundingBoxTree::BoundingBoxTree |
( |
const std::vector< Eigen::Vector3d > & |
points | ) |
|
Constructor.
- Parameters
-
[in] | points | Cloud of points to build the bounding box tree around |
◆ bbox()
std::array<int, 2> dolfinx::geometry::BoundingBoxTree::bbox |
( |
int |
node | ) |
const |
|
inline |
Get bounding box child nodes.
- Parameters
-
[in] | node | The bounding box node index |
- Returns
- The indices of the two child nodes. For leaf nodes, index 0 is equal to the node index and index 1 is equal to the index of the entity that the leaf box bounds, e.g. the index of the cell that it bounds,
◆ compute_global_tree()
BoundingBoxTree BoundingBoxTree::compute_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 might have a collision with.
- Parameters
-
[in] | comm | MPI Communicator for collective communication |
- Returns
- BoundingBoxTree where each node represents a process
◆ get_bbox()
Eigen::Array< double, 2, 3, Eigen::RowMajor > BoundingBoxTree::get_bbox |
( |
int |
node | ) |
const |
Return bounding box coordinates for a given node in the tree.
- Parameters
-
[in] | node | The bounding box node index |
- Returns
- The bounding box where row(0) is the lower corner and row(1) is the upper corner
◆ remap_entity_indices()
void BoundingBoxTree::remap_entity_indices |
( |
const std::vector< std::int32_t > & |
entity_indices | ) |
|
Remap entity indices for bounding box trees that does not span a whole mesh. Each leaf node should contain the actual entity index, not a reference to the index of the entity_indices list.
- Parameters
-
[in] | entity_indices | The list of entities (local to process) used to build the bounding box tree. They should be in the same order as the input to the bounding box tree constructor. |
The documentation for this class was generated from the following files:
- /build/dolfinx-e7oKss/dolfinx-2019.2.0~git20210130.c14cb0a/cpp/dolfinx/geometry/BoundingBoxTree.h
- /build/dolfinx-e7oKss/dolfinx-2019.2.0~git20210130.c14cb0a/cpp/dolfinx/geometry/BoundingBoxTree.cpp