Create bounding box tree for the midpoints of a subset of entities. Args: mesh: The mesh. dim: Topological dimension of the entities. entities: Indices of mesh entities to include. Returns: Bounding box tree for midpoints of cell entities.
(
mesh: Mesh[Real], dim: int, entities: npt.NDArray[np.int32]
)
| 213 | |
| 214 | |
| 215 | def create_midpoint_tree( |
| 216 | mesh: Mesh[Real], dim: int, entities: npt.NDArray[np.int32] |
| 217 | ) -> BoundingBoxTree[Real]: |
| 218 | """Create bounding box tree for the midpoints of a subset of entities. |
| 219 | |
| 220 | Args: |
| 221 | mesh: The mesh. |
| 222 | dim: Topological dimension of the entities. |
| 223 | entities: Indices of mesh entities to include. |
| 224 | |
| 225 | Returns: |
| 226 | Bounding box tree for midpoints of cell entities. |
| 227 | """ |
| 228 | return BoundingBoxTree(_cpp.geometry.create_midpoint_tree(mesh._cpp_object, dim, entities)) |
| 229 | |
| 230 | |
| 231 | def compute_colliding_cells( |