GenericBoundingBoxTree.h¶
Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
-
class
GenericBoundingBoxTree
¶ Base class for bounding box implementations (envelope-letter design)
-
GenericBoundingBoxTree
()¶ Constructor
-
static std::shared_ptr<GenericBoundingBoxTree>
create
(unsigned int dim)¶ Factory function returning (empty) tree of appropriate dimension
-
void
build
(const Mesh &mesh, std::size_t tdim)¶ Build bounding box tree for mesh entities of given dimension
-
std::vector<unsigned int>
compute_collisions
(const Point &point) const¶ Compute all collisions between bounding boxes and
Point
-
std::pair<std::vector<unsigned int>, std::vector<unsigned int>>
compute_collisions
(const GenericBoundingBoxTree &tree) const¶ Compute all collisions between bounding boxes and
BoundingBoxTree
-
std::vector<unsigned int>
compute_entity_collisions
(const Point &point, const Mesh &mesh) const¶ Compute all collisions between entities and
Point
-
std::vector<unsigned int>
compute_process_collisions
(const Point &point) const¶ Compute all collisions between processes and
Point
-
std::pair<std::vector<unsigned int>, std::vector<unsigned int>>
compute_entity_collisions
(const GenericBoundingBoxTree &tree, const Mesh &mesh_A, const Mesh &mesh_B) const¶ Compute all collisions between entities and
BoundingBoxTree
-
unsigned int
compute_first_collision
(const Point &point) const¶ Compute first collision between bounding boxes and
Point
-
unsigned int
compute_first_entity_collision
(const Point &point, const Mesh &mesh) const¶ Compute first collision between entities and
Point
-
std::pair<unsigned int, double>
compute_closest_entity
(const Point &point, const Mesh &mesh) const¶ Compute closest entity and distance to
Point
-
std::pair<unsigned int, double>
compute_closest_point
(const Point &point) const¶ Compute closest point and distance to
Point
-
std::string
str
(bool verbose = false)¶ Print out for debugging
-
void
clear
()¶ Clear existing data if any
-
unsigned int
_build
(const std::vector<double> &leaf_bboxes, const std::vector<unsigned int>::iterator &begin, const std::vector<unsigned int>::iterator &end, std::size_t gdim)¶ Build bounding box tree for entities (recursive)
-
unsigned int
_build
(const std::vector<Point> &points, const std::vector<unsigned int>::iterator &begin, const std::vector<unsigned int>::iterator &end, std::size_t gdim)¶ Build bounding box tree for points (recursive)
-
void
compute_bbox_of_entity
(double *b, const MeshEntity &entity, std::size_t gdim) const¶ Compute bounding box of mesh entity
-
void
sort_points
(std::size_t axis, const std::vector<Point> &points, const std::vector<unsigned int>::iterator &begin, const std::vector<unsigned int>::iterator &middle, const std::vector<unsigned int>::iterator &end)¶ Sort points along given axis
-
unsigned int
add_bbox
(const BBox &bbox, const double *b, std::size_t gdim)¶ Add bounding box and coordinates
-
const BBox &
get_bbox
(unsigned int node) const¶ Return bounding box for given node
-
unsigned int
num_bboxes
() const¶ Return number of bounding boxes
-
unsigned int
add_point
(const BBox &bbox, const Point &point, std::size_t gdim)¶ Add bounding box and point coordinates
-
bool
is_leaf
(const BBox &bbox, unsigned int node) const¶ Check whether bounding box is a leaf node
-
bool
operator()
(unsigned int i, unsigned int j)¶ Comparison operator
-
bool
operator()
(unsigned int i, unsigned int j)¶ Comparison operator
-
bool
operator()
(unsigned int i, unsigned int j) Comparison operator
-
std::size_t
gdim
() const = 0¶ Return geometric dimension
-
const double *
get_bbox_coordinates
(unsigned int node) const = 0¶ Return bounding box coordinates for node
-
bool
point_in_bbox
(const double *x, unsigned int node) const = 0¶ Check whether point (x) is in bounding box (node)
-
bool
bbox_in_bbox
(const double *a, unsigned int node) const = 0¶ Check whether bounding box (a) collides with bounding box (node)
-
double
compute_squared_distance_bbox
(const double *x, unsigned int node) const = 0¶ Compute squared distance between point and bounding box
-
double
compute_squared_distance_point
(const double *x, unsigned int node) const = 0¶ Compute squared distance between point and point
-
void
compute_bbox_of_bboxes
(double *bbox, std::size_t &axis, const std::vector<double> &leaf_bboxes, const std::vector<unsigned int>::iterator &begin, const std::vector<unsigned int>::iterator &end) = 0¶ Compute bounding box of bounding boxes
-
void
compute_bbox_of_points
(double *bbox, std::size_t &axis, const std::vector<Point> &points, const std::vector<unsigned int>::iterator &begin, const std::vector<unsigned int>::iterator &end) = 0¶ Compute bounding box of points
-
void
sort_bboxes
(std::size_t axis, const std::vector<double> &leaf_bboxes, const std::vector<unsigned int>::iterator &begin, const std::vector<unsigned int>::iterator &middle, const std::vector<unsigned int>::iterator &end) = 0¶ Sort leaf bounding boxes along given axis
-
void
tree_print
(std::stringstream &s, unsigned int i)¶ Print out recursively, for debugging
-