![]() |
|
#include <octree.h>
Public Member Functions | |
OcTreeForest (Vector< TreeRoot * > &trees_pt) | |
OcTreeForest () | |
Default constructor (empty and broken) More... | |
OcTreeForest (const OcTreeForest &dummy)=delete | |
Broken copy constructor. More... | |
void | operator= (const OcTreeForest &)=delete |
Broken assignment operator. More... | |
virtual | ~OcTreeForest () |
void | check_all_neighbours (DocInfo &doc_info) |
void | open_hanging_node_files (DocInfo &doc_info, Vector< std::ofstream * > &output_stream) |
unsigned | self_test () |
Self test: Check neighbour finding routine. More... | |
OcTreeRoot * | octree_pt (const unsigned &i) const |
OcTreeRoot * | oc_face_neigh_pt (const unsigned &i, const int &direction) |
Vector< TreeRoot * > | oc_edge_neigh_pt (const unsigned &i, const int &direction) |
void | construct_up_right_equivalents () |
Construct the rotation schemes. More... | |
![]() | |
TreeForest (Vector< TreeRoot * > &trees_pt) | |
TreeForest () | |
Default constructor (empty and broken) More... | |
TreeForest (const TreeForest &dummy)=delete | |
Broken copy constructor. More... | |
void | operator= (const TreeForest &)=delete |
Broken assignment operator. More... | |
virtual | ~TreeForest () |
Kill tree forest: Delete the constituent trees. 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) |
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 | find_neighbours () |
Construct the neighbour scheme. More... | |
Additional Inherited Members | |
![]() | |
Vector< TreeRoot * > | Trees_pt |
Vector containing the pointers to the trees. More... | |
/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// An OcTreeForest consists of a collection of OcTreeRoots. Each member tree can have neighbours to its L/R/U/D/F/B and DB/UP/... and the orientation of their compasses can differ, allowing for complex, unstructured meshes.
Constructor for OcTree forest: Pass Vector of (pointers to) trees.
/////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// Constructor for OcTreeForest:
Pass:
References construct_up_right_equivalents(), and find_neighbours().
|
inline |
Default constructor (empty and broken)
References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.
|
delete |
Broken copy constructor.
|
inlinevirtual |
|
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 of all the nodes in the forest. DocInfo object specifies the output directory and file numbers for the various files. If doc_info.is_doc_enabled()=false
no output is created.
Implements oomph::TreeForest.
References oomph::DocInfo::directory(), oomph::OcTree::doc_face_neighbours(), oomph::OcTree::doc_true_edge_neighbours(), oomph::DocInfo::is_doc_enabled(), MeshRefinement::max_error, oomph::Tree::max_neighbour_finding_tolerance(), oomph::DocInfo::number(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::oomph_info, and oomph::TreeForest::stick_all_tree_nodes_into_vector().
void oomph::OcTreeForest::construct_up_right_equivalents | ( | ) |
Construct the rotation schemes.
Construct the rotation scheme for the octree forest. Note that all pointers to neighbours must have been allocated for this to work.
References D, oomph::OcTreeRoot::direction_of_neighbour(), e(), oomph::OcTreeNames::F, oomph::FiniteElement::get_node_number(), oomph::OcTree::get_the_other_face(), i, L, oomph::OcTreeNames::LB, oomph::OcTree::node_number_to_vertex(), oomph::TreeForest::ntree(), oomph::Tree::object_pt(), oc_edge_neigh_pt(), oc_face_neigh_pt(), octree_pt(), oomph::Tree::OMEGA, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, R, oomph::OcTree::Reflect_face, oomph::OcTreeRoot::set_right_equivalent(), oomph::OcTreeRoot::set_up_equivalent(), oomph::TreeForest::Trees_pt, RachelsAdvectionDiffusion::U, oomph::OcTreeNames::UF, oomph::OcTree::Up_and_right_equivalent_for_pairs_of_vertices, oomph::OcTree::Vertex_at_end_of_edge, and oomph::OcTree::vertex_to_node_number().
Referenced by OcTreeForest().
|
private |
Construct the neighbour scheme.
setup the neighbour scheme : tells to each element in the forest which (if any) element is its {R,L,U,D,B,F} face neighbour and which is its {LB,RB,...,UF} edge neighbour.
References oomph::OcTreeRoot::add_edge_neighbour_pt(), D, oomph::OcTreeNames::DB, oomph::OcTreeNames::DF, oomph::OcTreeNames::F, i, j, L, oomph::OcTreeNames::LB, oomph::OcTreeNames::LD, oomph::OcTreeNames::LF, oomph::OcTreeNames::LU, n, oomph::TreeForest::ntree(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, R, oomph::OcTreeNames::RB, oomph::OcTreeNames::RD, oomph::OcTreeNames::RF, oomph::OcTreeNames::RU, oomph::TreeForest::Trees_pt, RachelsAdvectionDiffusion::U, oomph::OcTreeNames::UB, and oomph::OcTreeNames::UF.
Referenced by OcTreeForest().
|
inline |
Given the number i of the root octree in this forest, return the vector of pointers to the true edge neighbours in the specified (edge) direction.
References oomph::OcTreeRoot::edge_neighbour_pt(), and i.
Referenced by construct_up_right_equivalents().
|
inline |
Given the number i of the root octree in this forest, return pointer to its face neighbour in the specified direction. NULL if neighbour doesn't exist. (This does the dynamic cast from a TreeRoot to a OcTreeRoot internally).
References oomph::OcTreeNames::D, oomph::OcTree::Direct_string, oomph::OcTreeNames::F, i, L, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, R, and oomph::OcTreeNames::U.
Referenced by construct_up_right_equivalents().
|
inline |
Return pointer to i-th OcTree in forest (Performs a dynamic cast from the TreeRoot to a OcTreeRoot).
References i.
Referenced by construct_up_right_equivalents().
|
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.
References oomph::DocInfo::directory(), i, oomph::DocInfo::is_doc_enabled(), and oomph::DocInfo::number().
|
delete |
Broken assignment operator.
unsigned oomph::OcTreeForest::self_test | ( | ) |
Self test: Check neighbour finding routine.
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 Tree::Max_neighbour_finding_tolerance.
References oomph::OcTree::doc_face_neighbours(), oomph::OcTree::doc_true_edge_neighbours(), i, MeshRefinement::max_error, oomph::Tree::max_neighbour_finding_tolerance(), oomph::oomph_info, and oomph::TreeForest::stick_all_tree_nodes_into_vector().