A generalised tree base class that abstracts the common functionality between the quad- and octrees used in mesh adaptation in two and three dimensions, respectively. More...
#include <tree.h>
Public Types | |
typedef void(Tree::* | VoidMemberFctPt) () |
Function pointer to argument-free void Tree member function. More... | |
typedef void(Tree::* | VoidMeshPtArgumentMemberFctPt) (Mesh *&mesh_pt) |
Function pointer to a void Tree member function that takes a pointer to a mesh as its argument. More... | |
Public Member Functions | |
virtual | ~Tree () |
Destructor. Note: Deleting a tree also deletes the objects associated with its non-leave nodes. More... | |
Tree (const Tree &dummy)=delete | |
Broken copy constructor. More... | |
void | operator= (const Tree &)=delete |
Broken assignment operator. More... | |
RefineableElement * | object_pt () const |
Return the pointer to the object (RefineableElement) represented by the tree. More... | |
void | flush_object () |
Flush the object represented by the tree. More... | |
Tree * | son_pt (const int &son_index) const |
Return pointer to the son for a given index. Note that to aid code readability specific enums have been defined for specific trees. However, these are simply aliases for ints and the general interface can be implemented once, here. More... | |
void | set_son_pt (const Vector< Tree * > &son_pt) |
Set vector of pointers to sons, indexed by the appropriate enum that identies son types. (To aid code readability specific enums have been defined for specific trees. However, these are simply aliases for ints and the general interface can be implemented once, here). More... | |
unsigned | nsons () const |
Return number of sons (zero if it's a leaf node) More... | |
void | flush_sons () |
Flush the sons. More... | |
TreeRoot *& | root_pt () |
Return pointer to root of the tree. More... | |
TreeRoot * | root_pt () const |
Return pointer to root of the tree (const version) More... | |
template<class ELEMENT > | |
void | split_if_required () |
If required, split the leaf and create its sons – criterion: bool object_pt()-> to_be_refined() = true. More... | |
template<class ELEMENT > | |
void | p_refine_if_required (Mesh *&mesh_pt) |
If required, p-refine the leaf – criterion: bool object_pt()-> to_be_p_refined() = true or bool object_pt()-> to_be_p_unrefined() = true. More... | |
void | merge_sons_if_required (Mesh *&mesh_pt) |
If required, merge the four sons for unrefinement – criterion: bool object_pt()-> sons_to_be_unrefined() = true. More... | |
void | deactivate_object () |
Call the RefineableElement's deactivate_element() function. More... | |
virtual Tree * | construct_son (RefineableElement *const &object_pt, Tree *const &father_pt, const int &son_type)=0 |
A function that constructs a specific type of tree. This MUST be overloaded for each specific tree type. The use of such a function allows the generic implementation of split_if_required(). More... | |
void | traverse_all (Tree::VoidMemberFctPt member_function) |
Traverse the tree and execute void Tree member function member_function() at all its "nodes". More... | |
void | traverse_all (Tree::VoidMeshPtArgumentMemberFctPt member_function, Mesh *&mesh_pt) |
Traverse the tree and excute void Tree member function that takes a pointer to a mesh as an argument. More... | |
void | traverse_all_but_leaves (Tree::VoidMemberFctPt member_function) |
Traverse the tree and execute void Tree member function member_function() at all its "nodes" aparat from the leaves. More... | |
void | traverse_leaves (Tree::VoidMemberFctPt member_function) |
Traverse the tree and execute void Tree member function member_function() only at its leaves. More... | |
void | traverse_leaves (Tree::VoidMeshPtArgumentMemberFctPt member_function, Mesh *&mesh_pt) |
Traverse the tree and execute void Tree member function that takes a pointer to a mesh as an argument only at its leaves. More... | |
void | stick_leaves_into_vector (Vector< Tree * > &) |
Traverse tree and stick pointers to leaf "nodes" (only) into Vector. More... | |
void | stick_all_tree_nodes_into_vector (Vector< Tree * > &) |
Traverse and stick pointers to all "nodes" into Vector. More... | |
int | son_type () const |
Return son type. More... | |
bool | is_leaf () |
Return true if the tree is a leaf node. More... | |
Tree * | father_pt () const |
Return pointer to father: NULL if it's a root node. More... | |
void | set_father_pt (Tree *const &father_pt) |
Set the father. More... | |
unsigned | level () const |
Return the level of the Tree (root=0) More... | |
Static Public Member Functions | |
static double & | max_neighbour_finding_tolerance () |
Max. allowed discrepancy in neighbour finding routine (distance between points when identified from two neighbouring elements) More... | |
Static Public Attributes | |
static const int | OMEGA = 26 |
Default value for an unassigned neighbour. More... | |
Protected Member Functions | |
Tree () | |
Default constructor (empty and broken) More... | |
Tree (RefineableElement *const &object_pt) | |
Default constructor for empty (root) tree: no father, no sons; just pass a pointer to its object Protected because Trees can only be created internally, during the split operation. Only TreeRoots can be created externally. More... | |
Tree (RefineableElement *const &object_pt, Tree *const &father_pt, const int &son_type) | |
Constructor for tree that has a father: Pass it the pointer to its object, the pointer to its father and tell it what type of son it is. Protected because Trees can only be created internally, during the split operation. Only TreeRoots can be created externally. More... | |
Protected Attributes | |
TreeRoot * | Root_pt |
Pointer to the root of the tree. More... | |
Tree * | Father_pt |
Pointer to the Father of the Tree. More... | |
Vector< Tree * > | Son_pt |
Vector of pointers to the sons of the Tree. More... | |
int | Level |
Level of the Tree (level 0 = root) More... | |
int | Son_type |
Son type (e.g. SW/SE/NW/NE in a quadtree) More... | |
RefineableElement * | Object_pt |
Pointer to the object represented by the tree. More... | |
Static Protected Attributes | |
static double | Max_neighbour_finding_tolerance = 1.0e-14 |
Max. allowed discrepancy in neighbour finding routine (distance between points when identified from two neighbouring elements) More... | |
A generalised tree base class that abstracts the common functionality between the quad- and octrees used in mesh adaptation in two and three dimensions, respectively.
The tree can also be part of a forest. If that is the case, the root of the tree will have pointers to the roots of neighbouring trees.
The objects contained in the tree must be RefineableElements.
The tree can be traversed and actions performed at all its "nodes" or only at the leaf "nodes" ("nodes" without sons).
Finally, the leaf "nodes" can be split depending on a criteria defined by the object.
Note that Trees are only generated by splitting existing Trees. Therefore, the constructors are protected. The only Tree that "Joe User" can create is the (derived) class TreeRoot.
typedef void(Tree::* oomph::Tree::VoidMemberFctPt) () |
typedef void(Tree::* oomph::Tree::VoidMeshPtArgumentMemberFctPt) (Mesh *&mesh_pt) |
|
virtual |
Destructor. Note: Deleting a tree also deletes the objects associated with its non-leave nodes.
Destructor for Tree: Recursively kill all sons and the associated objects of the non-leaf nodes. However, the objects of the leaf nodes are not destroyed. Their destruction is handled by the Mesh destructor.
|
delete |
Broken copy constructor.
|
inlineprotected |
|
protected |
Default constructor for empty (root) tree: no father, no sons; just pass a pointer to its object Protected because Trees can only be created internally, during the split operation. Only TreeRoots can be created externally.
Constructor for empty (root) Tree: No father, no sons. Pass pointer to the object that this tree (root) contains. Protected because Trees can only be created internally, during the split operation.
Definition at line 63 of file tree.cc.
References Father_pt, Level, object_pt(), OMEGA, Root_pt, oomph::RefineableElement::set_tree_pt(), Son_pt, and Son_type.
|
protected |
Constructor for tree that has a father: Pass it the pointer to its object, the pointer to its father and tell it what type of son it is. Protected because Trees can only be created internally, during the split operation. Only TreeRoots can be created externally.
Constructor for Tree: This one has a father and is a son of a certain type, but has no sons of its own (just yet), so it's a leaf node. Protected because Trees can only be created internally, during the split operation.
Definition at line 92 of file tree.cc.
References father_pt(), Father_pt, Level, object_pt(), Root_pt, oomph::RefineableElement::set_tree_pt(), Son_pt, son_type(), and Son_type.
|
pure virtual |
A function that constructs a specific type of tree. This MUST be overloaded for each specific tree type. The use of such a function allows the generic implementation of split_if_required().
Implemented in oomph::QuadTree, oomph::OcTree, and oomph::BinaryTree.
Referenced by split_if_required().
void oomph::Tree::deactivate_object | ( | ) |
Call the RefineableElement's deactivate_element() function.
Call the RefineableElement's deactivate_element() function that is used to perform any final changes to internal data storage of deactivated objects.
Definition at line 341 of file tree.cc.
References oomph::RefineableElement::deactivate_element(), and object_pt().
Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), and oomph::TreeBasedRefineableMeshBase::p_adapt_mesh().
|
inline |
Return pointer to father: NULL if it's a root node.
Definition at line 235 of file tree.h.
References Father_pt.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt(), oomph::BinaryTree::construct_son(), oomph::OcTree::construct_son(), oomph::QuadTree::construct_son(), oomph::RefineableElement::father_element_pt(), oomph::RefineableAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableGeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableLinearisedAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableLinearisedQCrouzeixRaviartElement::further_build(), oomph::RefineablePolarCrouzeixRaviartElement::further_build(), oomph::RefineableQSphericalCrouzeixRaviartElement::further_build(), oomph::RefineableElement::get_father_at_refinement_level(), oomph::TreeBasedRefineableMeshBase::refine_as_in_reference_mesh(), set_father_pt(), split_if_required(), and Tree().
|
inline |
Flush the object represented by the tree.
Definition at line 94 of file tree.h.
References Object_pt.
Referenced by oomph::Mesh::distribute(), and oomph::Mesh::prune_halo_elements_and_nodes().
|
inline |
Flush the sons.
Definition at line 135 of file tree.h.
References Son_pt.
Referenced by oomph::RefineableBrickMesh< ELEMENT >::setup_octree_forest(), and oomph::RefineableQuadMesh< ELEMENT >::setup_quadtree_forest().
|
inline |
Return true if the tree is a leaf node.
Definition at line 220 of file tree.h.
References Son_pt.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt(), oomph::Mesh::check_halo_schemes(), oomph::Mesh::doc_mesh_distribution(), oomph::OcTree::doc_true_edge_neighbours(), and oomph::TreeBasedRefineableMeshBase::refine_as_in_reference_mesh().
|
inline |
|
inlinestatic |
Max. allowed discrepancy in neighbour finding routine (distance between points when identified from two neighbouring elements)
Definition at line 255 of file tree.h.
References Max_neighbour_finding_tolerance.
Referenced by oomph::BinaryTreeForest::check_all_neighbours(), oomph::OcTreeForest::check_all_neighbours(), oomph::QuadTreeForest::check_all_neighbours(), oomph::BinaryTreeForest::self_test(), oomph::OcTreeForest::self_test(), and oomph::QuadTreeForest::self_test().
void oomph::Tree::merge_sons_if_required | ( | Mesh *& | mesh_pt | ) |
If required, merge the four sons for unrefinement – criterion: bool object_pt()-> sons_to_be_unrefined() = true.
If required, kill the sons to perform unrefinement.
Unrefinement is performed if
object_pt()->sons_to_be_unrefined()
returns true.
Definition at line 302 of file tree.cc.
References oomph::RefineableElement::deselect_sons_for_unrefinement(), nsons(), object_pt(), Object_pt, oomph::RefineableElement::rebuild_from_sons(), son_pt(), Son_pt, oomph::RefineableElement::sons_to_be_unrefined(), and oomph::RefineableElement::unbuild().
Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh().
|
inline |
Return number of sons (zero if it's a leaf node)
Definition at line 129 of file tree.h.
References Son_pt.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::check_integrity(), merge_sons_if_required(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::node_created_by_son_of_neighbour(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::node_created_by_son_of_neighbour(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::oc_hang_helper(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::quad_hang_helper(), oomph::TreeBasedRefineableMeshBase::refine_as_in_reference_mesh(), oomph::RefineableBrickMesh< ELEMENT >::setup_octree_forest(), oomph::RefineableQuadMesh< ELEMENT >::setup_quadtree_forest(), oomph::TreeForest::stick_all_tree_nodes_into_vector(), oomph::TreeForest::stick_leaves_into_vector(), and ~Tree().
|
inline |
Return the pointer to the object (RefineableElement) represented by the tree.
Definition at line 88 of file tree.h.
References Object_pt.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt(), oomph::RefineableQElement< 3 >::build(), oomph::RefineableQElement< 1 >::build(), oomph::RefineableQElement< 2 >::build(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::check_integrity(), oomph::RefineableQElement< 3 >::check_integrity(), oomph::RefineableQElement< 1 >::check_integrity(), oomph::RefineableQElement< 2 >::check_integrity(), oomph::BinaryTree::construct_son(), oomph::OcTree::construct_son(), oomph::QuadTree::construct_son(), oomph::OcTreeForest::construct_up_right_equivalents(), deactivate_object(), oomph::OcTree::doc_face_neighbours(), oomph::BinaryTree::doc_neighbours(), oomph::QuadTree::doc_neighbours(), oomph::OcTree::doc_true_edge_neighbours(), oomph::RefineableElement::father_element_pt(), oomph::RefineableAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableGeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableLinearisedAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableLinearisedQCrouzeixRaviartElement::further_build(), oomph::RefineablePolarCrouzeixRaviartElement::further_build(), oomph::RefineableQSphericalCrouzeixRaviartElement::further_build(), oomph::RefineableElement::get_father_at_refinement_level(), oomph::RefineablePolarTaylorHoodElement::get_interpolated_values(), oomph::RefineablePolarCrouzeixRaviartElement::get_interpolated_values(), oomph::PRefineableQElement< 1, INITIAL_NNODE_1D >::initial_setup(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::initial_setup(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::initial_setup(), merge_sons_if_required(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::node_created_by_neighbour(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::node_created_by_neighbour(), oomph::RefineableQElement< 3 >::node_created_by_neighbour(), oomph::RefineableQElement< 1 >::node_created_by_neighbour(), oomph::RefineableQElement< 2 >::node_created_by_neighbour(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::node_created_by_son_of_neighbour(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::node_created_by_son_of_neighbour(), oomph::RefineableQElement< 3 >::oc_hang_helper(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::oc_hang_helper(), p_refine_if_required(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::pre_build(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::pre_build(), oomph::Problem::prune_halo_elements_and_nodes(), oomph::Mesh::prune_halo_elements_and_nodes(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::quad_hang_helper(), oomph::RefineableQElement< 2 >::quad_hang_helper(), oomph::RefineableAxisymmetricQCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableGeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableLinearisedAxisymmetricQCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableLinearisedQCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineablePolarCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableQSphericalCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableElement::root_element_pt(), oomph::RefineableBrickMesh< ELEMENT >::setup_octree_forest(), oomph::RefineableQuadMesh< ELEMENT >::setup_quadtree_forest(), split_if_required(), and Tree().
|
delete |
Broken assignment operator.
void oomph::Tree::p_refine_if_required | ( | Mesh *& | mesh_pt | ) |
If required, p-refine the leaf – criterion: bool object_pt()-> to_be_p_refined() = true or bool object_pt()-> to_be_p_unrefined() = true.
If required, p-refine/unrefine the leaf element.
p-refinement is performed if
object_pt()->to_be_p_refined()
returns true. p-unrefinement is performed if
object_pt()->to_be_p_unrefined()
returns true.
If this is the case, then we execute
object_pt()->p_refine(+/-1,mesh_pt,clone_pt)
to p-refine the element, where mesh_pt is a pointer to the mesh that the element lives in, and clone_pt is a pointer to a GeneralisedElement that has all the information that would be needed from the father element during h-refinement.
Definition at line 149 of file tree.template.cc.
References Father_pt, i, oomph::Node::ndim(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), object_pt(), Object_pt, oomph::PRefineableElement::p_refine(), Son_pt, oomph::Global_string_for_annotation::string(), oomph::PRefineableElement::to_be_p_refined(), oomph::PRefineableElement::to_be_p_unrefined(), and oomph::Node::x().
|
inline |
Return pointer to root of the tree.
Definition at line 141 of file tree.h.
References Root_pt.
Referenced by oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::check_integrity(), oomph::RefineableQElement< 3 >::check_integrity(), oomph::RefineableQElement< 1 >::check_integrity(), oomph::RefineableQElement< 2 >::check_integrity(), oomph::OcTree::doc_face_neighbours(), oomph::BinaryTree::doc_neighbours(), oomph::QuadTree::doc_neighbours(), oomph::OcTree::doc_true_edge_neighbours(), oomph::RefineablePolarTaylorHoodElement::get_interpolated_values(), oomph::RefineablePolarCrouzeixRaviartElement::get_interpolated_values(), oomph::QuadTree::gteq_edge_neighbour(), oomph::RefineableQElement< 3 >::oc_hang_helper(), oomph::Problem::prune_halo_elements_and_nodes(), oomph::Mesh::prune_halo_elements_and_nodes(), oomph::RefineableQElement< 2 >::quad_hang_helper(), oomph::RefineableElement::root_element_pt(), oomph::RefineableBrickMesh< ELEMENT >::setup_octree_forest(), and oomph::RefineableQuadMesh< ELEMENT >::setup_quadtree_forest().
|
inline |
|
inline |
Set the father.
Definition at line 241 of file tree.h.
References father_pt(), and Father_pt.
Referenced by oomph::RefineableBrickMesh< ELEMENT >::setup_octree_forest(), and oomph::RefineableQuadMesh< ELEMENT >::setup_quadtree_forest().
Set vector of pointers to sons, indexed by the appropriate enum that identies son types. (To aid code readability specific enums have been defined for specific trees. However, these are simply aliases for ints and the general interface can be implemented once, here).
Definition at line 123 of file tree.h.
References son_pt(), and Son_pt.
Referenced by oomph::RefineableBrickMesh< ELEMENT >::setup_octree_forest(), and oomph::RefineableQuadMesh< ELEMENT >::setup_quadtree_forest().
|
inline |
Return pointer to the son for a given index. Note that to aid code readability specific enums have been defined for specific trees. However, these are simply aliases for ints and the general interface can be implemented once, here.
Definition at line 103 of file tree.h.
References Son_pt.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt(), merge_sons_if_required(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::node_created_by_son_of_neighbour(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::node_created_by_son_of_neighbour(), oomph::RefineableAxisymmetricQCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableGeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableLinearisedAxisymmetricQCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableLinearisedQCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineablePolarCrouzeixRaviartElement::rebuild_from_sons(), oomph::RefineableQSphericalCrouzeixRaviartElement::rebuild_from_sons(), oomph::TreeBasedRefineableMeshBase::refine_as_in_reference_mesh(), set_son_pt(), oomph::RefineableBrickMesh< ELEMENT >::setup_octree_forest(), oomph::RefineableQuadMesh< ELEMENT >::setup_quadtree_forest(), oomph::TreeForest::stick_all_tree_nodes_into_vector(), and oomph::TreeForest::stick_leaves_into_vector().
|
inline |
Return son type.
Definition at line 214 of file tree.h.
References Son_type.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt(), oomph::RefineableQElement< 3 >::build(), oomph::RefineableQElement< 1 >::build(), oomph::RefineableQElement< 2 >::build(), oomph::BinaryTree::construct_son(), oomph::OcTree::construct_son(), oomph::QuadTree::construct_son(), oomph::RefineableAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableGeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableLinearisedAxisymmetricQCrouzeixRaviartElement::further_build(), oomph::RefineableLinearisedQCrouzeixRaviartElement::further_build(), oomph::RefineablePolarCrouzeixRaviartElement::further_build(), oomph::RefineableQSphericalCrouzeixRaviartElement::further_build(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::pre_build(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::pre_build(), and Tree().
void oomph::Tree::split_if_required |
If required, split the leaf and create its sons – criterion: bool object_pt()-> to_be_refined() = true.
If required, split the leaf element and create its sons.
Split is performed if
object_pt()->to_be_refined()
returns true.
If this is the case, then we execute
object_pt()->split(new_elements_pt)
to create the sons. Pointers to the son objects are then inserted into the son pointers of the present element. This turns the present element into a "grey" (=non-leaf) node.
Definition at line 61 of file tree.template.cc.
References construct_son(), father_pt(), Father_pt, i, oomph::Node::ndim(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), object_pt(), Object_pt, Son_pt, oomph::RefineableElement::split(), oomph::Global_string_for_annotation::string(), oomph::RefineableElement::to_be_refined(), and oomph::Node::x().
Traverse and stick pointers to all "nodes" into Vector.
Traverse Tree: Preorder traverse and stick pointer to all nodes (incl. "grey"=non-leaf ones) into Vector.
Definition at line 277 of file tree.cc.
Referenced by oomph::Problem::get_flat_packed_refinement_pattern_for_load_balancing(), oomph::Problem::prune_halo_elements_and_nodes(), oomph::Mesh::prune_halo_elements_and_nodes(), oomph::BinaryTree::self_test(), oomph::OcTree::self_test(), oomph::QuadTree::self_test(), oomph::RefineableBrickMesh< ELEMENT >::setup_octree_forest(), oomph::RefineableQuadMesh< ELEMENT >::setup_quadtree_forest(), and oomph::TreeForest::stick_all_tree_nodes_into_vector().
Traverse tree and stick pointers to leaf "nodes" (only) into Vector.
Traverse Tree: Preorder traverse and stick pointers to leaf nodes (only) into Vector.
Definition at line 255 of file tree.cc.
Referenced by oomph::Mesh::get_all_halo_data(), oomph::Problem::get_data_to_be_sent_during_load_balancing(), oomph::Mesh::halo_element_pt(), oomph::Mesh::haloed_element_pt(), oomph::Problem::send_data_to_be_sent_during_load_balancing(), and oomph::TreeForest::stick_leaves_into_vector().
void oomph::Tree::traverse_all | ( | Tree::VoidMemberFctPt | member_function | ) |
Traverse the tree and execute void Tree member function member_function() at all its "nodes".
Preorder traverse the tree and execute void Tree member function at all nodes.
Definition at line 145 of file tree.cc.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), and oomph::TreeBasedRefineableMeshBase::p_adapt_mesh().
void oomph::Tree::traverse_all | ( | Tree::VoidMeshPtArgumentMemberFctPt | member_function, |
Mesh *& | mesh_pt | ||
) |
void oomph::Tree::traverse_all_but_leaves | ( | Tree::VoidMemberFctPt | member_function | ) |
Traverse the tree and execute void Tree member function member_function() at all its "nodes" aparat from the leaves.
Preorder traverse the tree and execute a void Tree member function for all elements that are not leaf elements.
Definition at line 184 of file tree.cc.
Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh().
void oomph::Tree::traverse_leaves | ( | Tree::VoidMemberFctPt | member_function | ) |
Traverse the tree and execute void Tree member function member_function() only at its leaves.
Preorder traverse the tree and execute void Tree member function at the leaves only (ignore "grey" = non-leaf nodes)
Definition at line 207 of file tree.cc.
Referenced by oomph::TreeBasedRefineableMesh< ELEMENT >::p_refine_elements_if_required(), and oomph::TreeBasedRefineableMesh< ELEMENT >::split_elements_if_required().
void oomph::Tree::traverse_leaves | ( | Tree::VoidMeshPtArgumentMemberFctPt | member_function, |
Mesh *& | mesh_pt | ||
) |
Traverse the tree and execute void Tree member function that takes a pointer to a mesh as an argument only at its leaves.
Preorder traverse the tree and execute void Tree member function that takes one argument at the leaves only (ignore "grey" = non-leaf nodes)
|
protected |
Pointer to the Father of the Tree.
Definition at line 296 of file tree.h.
Referenced by father_pt(), oomph::OcTree::gteq_edge_neighbour(), oomph::BinaryTree::gteq_edge_neighbour(), oomph::QuadTree::gteq_edge_neighbour(), oomph::OcTree::gteq_face_neighbour(), p_refine_if_required(), set_father_pt(), split_if_required(), and Tree().
|
protected |
Level of the Tree (level 0 = root)
Definition at line 302 of file tree.h.
Referenced by oomph::OcTree::gteq_edge_neighbour(), oomph::BinaryTree::gteq_edge_neighbour(), oomph::QuadTree::gteq_edge_neighbour(), oomph::OcTree::gteq_face_neighbour(), oomph::OcTree::gteq_true_edge_neighbour(), level(), and Tree().
|
staticprotected |
Max. allowed discrepancy in neighbour finding routine (distance between points when identified from two neighbouring elements)
Maximum tolerance for neighbour finding (distance between points when identified from the two neighbours)
Definition at line 313 of file tree.h.
Referenced by oomph::OcTree::doc_face_neighbours(), oomph::OcTree::doc_true_edge_neighbours(), max_neighbour_finding_tolerance(), oomph::BinaryTree::self_test(), oomph::OcTree::self_test(), and oomph::QuadTree::self_test().
|
protected |
Pointer to the object represented by the tree.
Definition at line 308 of file tree.h.
Referenced by flush_object(), merge_sons_if_required(), object_pt(), p_refine_if_required(), split_if_required(), and ~Tree().
|
static |
Default value for an unassigned neighbour.
Static value used to represent unassigned quantities. This has to remain consistent with the enumerations in the Octree and Quadtree namespaces!
Definition at line 262 of file tree.h.
Referenced by oomph::RefineableQElement< 3 >::build(), oomph::RefineableQElement< 2 >::build(), oomph::OcTreeForest::construct_up_right_equivalents(), oomph::BinaryTreeRoot::direction_of_neighbour(), oomph::QuadTreeRoot::direction_of_neighbour(), oomph::OcTreeRoot::direction_of_neighbour(), oomph::OcTree::doc_face_neighbours(), oomph::OcTree::doc_true_edge_neighbours(), oomph::OcTree::gteq_edge_neighbour(), oomph::MGSolver< DIM >::level_up_local_coord_of_node(), oomph::HelmholtzMGPreconditioner< DIM >::level_up_local_coord_of_node(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::p_refine(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::p_refine(), oomph::PRefineableQElement< 2, INITIAL_NNODE_1D >::rebuild_from_sons(), oomph::PRefineableQElement< 3, INITIAL_NNODE_1D >::rebuild_from_sons(), oomph::RefineableQSpectralElement< 3 >::rebuild_from_sons(), oomph::RefineableQSpectralElement< 2 >::rebuild_from_sons(), oomph::OcTreeRoot::right_equivalent(), oomph::RefineableQElement< 3 >::setup_father_bounds(), oomph::RefineableQElement< 1 >::setup_father_bounds(), oomph::RefineableQElement< 2 >::setup_father_bounds(), oomph::MGSolver< DIM >::setup_interpolation_matrices(), oomph::HelmholtzMGPreconditioner< DIM >::setup_interpolation_matrices(), oomph::BinaryTree::setup_static_data(), oomph::OcTree::setup_static_data(), oomph::QuadTree::setup_static_data(), Tree(), and oomph::OcTreeRoot::up_equivalent().
|
protected |
Pointer to the root of the tree.
Definition at line 292 of file tree.h.
Referenced by oomph::OcTree::gteq_edge_neighbour(), oomph::BinaryTree::gteq_edge_neighbour(), oomph::QuadTree::gteq_edge_neighbour(), oomph::OcTree::gteq_face_neighbour(), oomph::OcTree::gteq_true_edge_neighbour(), root_pt(), Tree(), and oomph::TreeRoot::TreeRoot().
Vector of pointers to the sons of the Tree.
Definition at line 299 of file tree.h.
Referenced by flush_sons(), oomph::OcTree::gteq_edge_neighbour(), oomph::BinaryTree::gteq_edge_neighbour(), oomph::QuadTree::gteq_edge_neighbour(), oomph::OcTree::gteq_face_neighbour(), is_leaf(), merge_sons_if_required(), nsons(), p_refine_if_required(), set_son_pt(), son_pt(), split_if_required(), stick_all_tree_nodes_into_vector(), stick_leaves_into_vector(), oomph::QuadTree::stick_neighbouring_leaves_into_vector(), traverse_all(), traverse_all_but_leaves(), traverse_leaves(), Tree(), and ~Tree().
|
protected |
Son type (e.g. SW/SE/NW/NE in a quadtree)
Definition at line 305 of file tree.h.
Referenced by oomph::OcTree::gteq_edge_neighbour(), oomph::BinaryTree::gteq_edge_neighbour(), oomph::QuadTree::gteq_edge_neighbour(), oomph::OcTree::gteq_face_neighbour(), son_type(), and Tree().