20 #ifndef LIBMESH_TREE_H 21 #define LIBMESH_TREE_H 24 #include "libmesh/tree_node.h" 25 #include "libmesh/tree_base.h" 43 template <
unsigned int N>
51 unsigned int target_bin_size,
79 {
return root.n_active_bins(); }
87 const std::set<subdomain_id_type> * allowed_subdomains =
nullptr,
97 std::set<const Elem *> & candidate_elements,
98 const std::set<subdomain_id_type> * allowed_subdomains =
nullptr,
107 const std::set<subdomain_id_type> * allowed_subdomains =
nullptr,
152 #endif // LIBMESH_TREE_H TreeNode< N > root
The tree root.
virtual void print_nodes(std::ostream &my_out=libMesh::out) const override
Prints the nodes.
BuildType
enum defining how to build the tree.
const Elem * operator()(const Point &p, const std::set< subdomain_id_type > *allowed_subdomains=nullptr, Real relative_tol=TOLERANCE) const
virtual unsigned int n_active_bins() const override
~Tree()=default
Destructor.
virtual const Elem * find_element(const Point &p, const std::set< subdomain_id_type > *allowed_subdomains=nullptr, Real relative_tol=TOLERANCE) const override
This class defines a tree that may be used for fast point location in space.
static constexpr Real TOLERANCE
Tree< 8 > OctTree
An OctTree is a tree appropriate for 3D meshes.
This is the base class from which all geometric element types are derived.
The libMesh namespace provides an interface to certain functionality in the library.
This is the MeshBase class.
virtual void find_elements(const Point &p, std::set< const Elem *> &candidate_elements, const std::set< subdomain_id_type > *allowed_subdomains=nullptr, Real relative_tol=TOLERANCE) const override
Fills candidate_elements with any elements containing the specified point p, optionally restricted to...
Tree< 4 > QuadTree
A QuadTree is a tree appropriate for 2D meshes.
virtual void print_elements(std::ostream &my_out=libMesh::out) const override
Prints the nodes.
This class defines a node on a tree.
Tree(const MeshBase &m, unsigned int target_bin_size, Trees::BuildType bt=Trees::NODES)
Constructor.
This is the base class for trees, it allows pointer usage of trees.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
A Point defines a location in LIBMESH_DIM dimensional Real space.
Tree< 2 > BinaryTree
A BinaryTree is a tree appropriate for 1D meshes.
const Trees::BuildType build_type
How the tree is built.