#include <quadtree.h>
Public Member Functions | |
QuadTreeForest () | |
Default constructor (empty and broken) More... | |
QuadTreeForest (Vector< TreeRoot * > &trees_pt) | |
Constructor: Pass vector of pointers to the roots of the constituent QuadTrees. More... | |
QuadTreeForest (const QuadTreeForest &dummy) | |
Broken copy constructor. More... | |
void | operator= (const QuadTreeForest &) |
Broken assignment operator. More... | |
virtual | ~QuadTreeForest () |
Destructor: Delete the constituent quadtrees (and thus the objects associated with its non-leaf nodes!) More... | |
void | check_all_neighbours (DocInfo &doc_info) |
Document and check all the neighbours of all the nodes in the forest. DocInfo object specifies the output directory and file numbers for the various files. If doc_info.disable_doc() has been called no output is created. More... | |
void | open_hanging_node_files (DocInfo &doc_info, Vector< std::ofstream *> &output_stream) |
Open output files that will store any hanging nodes in the forest and return a vector of the streams. More... | |
unsigned | self_test () |
Self-test: Check all neighbours. Return success (0) if the max. distance between corresponding points in the neighbours is less than the tolerance specified in the static value QuadTree::Max_neighbour_finding_tolerance. More... | |
![]() | |
TreeForest (Vector< TreeRoot *> &trees_pt) | |
Constructor for Tree forest: Pass Vector of (pointers to) constituents trees. More... | |
TreeForest () | |
Default constructor (empty and broken) More... | |
TreeForest (const TreeForest &dummy) | |
Broken copy constructor. More... | |
void | operator= (const TreeForest &) |
Broken assignment operator. More... | |
virtual | ~TreeForest () |
Destructor: Delete the constituent trees (and thus the objects associated with its non-leaf nodes!) More... | |
void | stick_leaves_into_vector (Vector< Tree * > &forest_nodes) |
Traverse forst and stick pointers to leaf "nodes" into Vector. More... | |
void | stick_all_tree_nodes_into_vector (Vector< Tree * > &all_forest_nodes) |
Traverse forest and stick pointers to all "nodes" into Vector. More... | |
void | close_hanging_node_files (DocInfo &doc_info, Vector< std::ofstream *> &output_stream) |
Close output files that will store any hanging nodes in the forest and delete any associated storage. This can be performed genercially in this base class. More... | |
unsigned | ntree () |
Number of trees in forest. More... | |
TreeRoot * | tree_pt (const unsigned &i) const |
Return pointer to i-th tree in forest. More... | |
void | flush_trees () |
Flush trees from forest. More... | |
Private Member Functions | |
void | construct_north_equivalents () |
Construct the rotation schemes. More... | |
void | find_neighbours () |
Construct the neighbour lookup scheme. More... | |
QuadTreeRoot * | quadtree_pt (const unsigned &i) |
QuadTreeRoot * | quad_neigh_pt (const unsigned &i, const int &direction) |
Given the number i of the root quadtree in this forest, return pointer to its neighbour in the specified direction. NULL if neighbour doesn't exist. (This does the dynamic cast from a TreeRoot to a QuadTreeRoot internally). More... | |
Additional Inherited Members | |
![]() | |
Vector< TreeRoot * > | Trees_pt |
Vector containing the pointers to the trees. More... | |
A QuadTreeForest consists of a collection of QuadTreeRoots. Each member tree can have neighbours to its S/W/N/E and the orientation of their compasses can differ, allowing for complex, unstructured meshes.
Definition at line 406 of file quadtree.h.
|
inline |
Default constructor (empty and broken)
Definition at line 411 of file quadtree.h.
Constructor: Pass vector of pointers to the roots of the constituent QuadTrees.
Constructor for QuadTreeForest:
Pass:
Note that the pointers to the neighbour's of each tree must have been allocated before the constructor is called, otherwise the relative rotation scheme will not be constructed correctly.
Definition at line 846 of file quadtree.cc.
References construct_north_equivalents(), find_neighbours(), and oomph::LeakCheckNames::QuadTreeForest_build.
|
inline |
Broken copy constructor.
Definition at line 424 of file quadtree.h.
References oomph::BrokenCopy::broken_copy().
|
inlinevirtual |
Destructor: Delete the constituent quadtrees (and thus the objects associated with its non-leaf nodes!)
Definition at line 437 of file quadtree.h.
References oomph::self_test().
|
virtual |
Document and check all the neighbours of all the nodes in the forest. DocInfo object specifies the output directory and file numbers for the various files. If doc_info.disable_doc()
has been called no output is created.
Document and check all the neighbours in all the nodes in the forest
Implements oomph::TreeForest.
Definition at line 1227 of file quadtree.cc.
References oomph::DocInfo::directory(), oomph::QuadTree::doc_neighbours(), oomph::DocInfo::is_doc_enabled(), oomph::Tree::max_neighbour_finding_tolerance(), oomph::DocInfo::number(), oomph::oomph_info, and oomph::TreeForest::stick_all_tree_nodes_into_vector().
|
private |
Construct the rotation schemes.
Construct the rotation scheme for the quadtree forest. Note that all pointers to neighbours must have been allocated for this to work.
Definition at line 1049 of file quadtree.cc.
References oomph::QuadTreeRoot::direction_of_neighbour(), oomph::QuadTreeNames::E, i, oomph::QuadTreeNames::N, oomph::QuadTreeRoot::north_equivalent(), oomph::TreeForest::ntree(), quad_neigh_pt(), quadtree_pt(), oomph::QuadTreeNames::S, and oomph::QuadTreeNames::W.
Referenced by QuadTreeForest().
|
private |
Construct the neighbour lookup scheme.
Setup the neighbour lookup schemes for all constituent quadtrees.
Definition at line 874 of file quadtree.cc.
References oomph::QuadTreeNames::E, i, oomph::QuadTreeNames::N, oomph::TreeForest::ntree(), oomph::QuadTreeNames::S, oomph::TreeForest::Trees_pt, and oomph::QuadTreeNames::W.
Referenced by QuadTreeForest().
|
virtual |
Open output files that will store any hanging nodes in the forest and return a vector of the streams.
Open output files that will stored any hanging nodes that are
Implements oomph::TreeForest.
Definition at line 1300 of file quadtree.cc.
References oomph::DocInfo::directory(), i, oomph::DocInfo::is_doc_enabled(), and oomph::DocInfo::number().
|
inline |
Broken assignment operator.
Definition at line 430 of file quadtree.h.
References oomph::BrokenCopy::broken_assign().
|
inlineprivate |
Given the number i of the root quadtree in this forest, return pointer to its neighbour in the specified direction. NULL if neighbour doesn't exist. (This does the dynamic cast from a TreeRoot to a QuadTreeRoot internally).
Definition at line 474 of file quadtree.h.
References i.
Referenced by construct_north_equivalents().
|
inlineprivate |
Return pointer to i-th root quadtree in this forest. (Performs a dynamic cast from the TreeRoot to a QuadTreeRoot).
Definition at line 467 of file quadtree.h.
References i.
Referenced by construct_north_equivalents().
unsigned oomph::QuadTreeForest::self_test | ( | ) |
Self-test: Check all neighbours. Return success (0) if the max. distance between corresponding points in the neighbours is less than the tolerance specified in the static value QuadTree::Max_neighbour_finding_tolerance.
Self test: Check neighbour finding routine. For each element in the tree and for each vertex, determine the distance between the vertex and its position in the neigbour. If the difference is less than Tree::Max_neighbour_finding_tolerance. return success (0), otherwise failure (1)
Definition at line 1338 of file quadtree.cc.
References oomph::QuadTree::doc_neighbours(), i, oomph::Tree::max_neighbour_finding_tolerance(), oomph::oomph_info, and oomph::TreeForest::stick_all_tree_nodes_into_vector().