27 #ifndef OOMPH_TREE_HEADER
28 #define OOMPH_TREE_HEADER
32 #include <oomph-lib-config.h>
48 class RefineableElement;
154 template<
class ELEMENT>
160 template<
class ELEMENT>
269 throw OomphLibError(
"Don't call an empty constructor for a Tree object",
386 for (std::map<int, TreeRoot*>::iterator it =
Neighbour_pt.begin();
420 "Don't call an empty constructor for a TreeForest object",
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Definition: oomph_utilities.h:499
Definition: oomph_definitions.h:222
Definition: refineable_elements.h:97
void operator=(const TreeForest &)=delete
Broken assignment operator.
virtual void check_all_neighbours(DocInfo &doc_info)=0
TreeForest(const TreeForest &dummy)=delete
Broken copy constructor.
void flush_trees()
Flush trees from forest.
Definition: tree.h:472
void stick_all_tree_nodes_into_vector(Vector< Tree * > &all_forest_nodes)
Traverse forest and stick pointers to all "nodes" into Vector.
Definition: tree.cc:405
virtual void open_hanging_node_files(DocInfo &doc_info, Vector< std::ofstream * > &output_stream)=0
unsigned ntree()
Number of trees in forest.
Definition: tree.h:460
void stick_leaves_into_vector(Vector< Tree * > &forest_nodes)
Traverse forst and stick pointers to leaf "nodes" into Vector.
Definition: tree.cc:379
Vector< TreeRoot * > Trees_pt
Vector containing the pointers to the trees.
Definition: tree.h:480
TreeRoot * tree_pt(const unsigned &i) const
Return pointer to i-th tree in forest.
Definition: tree.h:466
virtual ~TreeForest()
Kill tree forest: Delete the constituent trees.
Definition: tree.cc:364
TreeForest()
Default constructor (empty and broken)
Definition: tree.h:416
void close_hanging_node_files(DocInfo &doc_info, Vector< std::ofstream * > &output_stream)
Definition: tree.cc:432
std::map< int, bool > Neighbour_periodic
Definition: tree.h:338
void operator=(const TreeRoot &)=delete
Broken assignment operator.
bool is_neighbour_periodic(const int &direction)
Definition: tree.h:364
TreeRoot(const TreeRoot &dummy)=delete
Broken copy constructor.
unsigned nneighbour()
Return the number of neighbours.
Definition: tree.h:382
std::map< int, TreeRoot * > Neighbour_pt
Definition: tree.h:330
TreeRoot(RefineableElement *const &object_pt)
Constructor for the (empty) root tree.
Definition: tree.h:342
void set_neighbour_nonperiodic(const int &direction)
Set the neighbour in particular direction to be nonperiodic.
Definition: tree.h:376
void set_neighbour_periodic(const int &direction)
Set the neighbour in particular direction to be periodic.
Definition: tree.h:370
TreeRoot *& neighbour_pt(const int &direction)
Definition: tree.h:357
Tree * Father_pt
Pointer to the Father of the Tree.
Definition: tree.h:296
void traverse_leaves(Tree::VoidMemberFctPt member_function)
Definition: tree.cc:207
void stick_all_tree_nodes_into_vector(Vector< Tree * > &)
Traverse and stick pointers to all "nodes" into Vector.
Definition: tree.cc:277
RefineableElement * object_pt() const
Definition: tree.h:88
unsigned nsons() const
Return number of sons (zero if it's a leaf node)
Definition: tree.h:129
void flush_sons()
Flush the sons.
Definition: tree.h:135
void traverse_all(Tree::VoidMemberFctPt member_function)
Definition: tree.cc:145
TreeRoot * root_pt() const
Return pointer to root of the tree (const version)
Definition: tree.h:147
void(Tree::* VoidMeshPtArgumentMemberFctPt)(Mesh *&mesh_pt)
Definition: tree.h:182
Tree(const Tree &dummy)=delete
Broken copy constructor.
virtual Tree * construct_son(RefineableElement *const &object_pt, Tree *const &father_pt, const int &son_type)=0
Tree * father_pt() const
Return pointer to father: NULL if it's a root node.
Definition: tree.h:235
TreeRoot * Root_pt
Pointer to the root of the tree.
Definition: tree.h:292
RefineableElement * Object_pt
Pointer to the object represented by the tree.
Definition: tree.h:308
void p_refine_if_required(Mesh *&mesh_pt)
Definition: tree.template.cc:149
void(Tree::* VoidMemberFctPt)()
Function pointer to argument-free void Tree member function.
Definition: tree.h:178
void operator=(const Tree &)=delete
Broken assignment operator.
bool is_leaf()
Return true if the tree is a leaf node.
Definition: tree.h:220
int son_type() const
Return son type.
Definition: tree.h:214
int Son_type
Son type (e.g. SW/SE/NW/NE in a quadtree)
Definition: tree.h:305
void flush_object()
Flush the object represented by the tree.
Definition: tree.h:94
void split_if_required()
Definition: tree.template.cc:61
int Level
Level of the Tree (level 0 = root)
Definition: tree.h:302
static const int OMEGA
Default value for an unassigned neighbour.
Definition: tree.h:262
Tree * son_pt(const int &son_index) const
Definition: tree.h:103
unsigned level() const
Return the level of the Tree (root=0)
Definition: tree.h:247
void set_son_pt(const Vector< Tree * > &son_pt)
Definition: tree.h:123
void set_father_pt(Tree *const &father_pt)
Set the father.
Definition: tree.h:241
Vector< Tree * > Son_pt
Vector of pointers to the sons of the Tree.
Definition: tree.h:299
void stick_leaves_into_vector(Vector< Tree * > &)
Traverse tree and stick pointers to leaf "nodes" (only) into Vector.
Definition: tree.cc:255
virtual ~Tree()
Definition: tree.cc:122
Tree()
Default constructor (empty and broken)
Definition: tree.h:266
TreeRoot *& root_pt()
Return pointer to root of the tree.
Definition: tree.h:141
void deactivate_object()
Call the RefineableElement's deactivate_element() function.
Definition: tree.cc:341
void traverse_all_but_leaves(Tree::VoidMemberFctPt member_function)
Definition: tree.cc:184
static double Max_neighbour_finding_tolerance
Definition: tree.h:313
void merge_sons_if_required(Mesh *&mesh_pt)
Definition: tree.cc:302
static double & max_neighbour_finding_tolerance()
Definition: tree.h:255
Definition: oomph-lib/src/generic/Vector.h:58
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86