Public Member Functions | Private Member Functions | List of all members
oomph::OcTreeForest Class Reference

#include <octree.h>

+ Inheritance diagram for oomph::OcTreeForest:

Public Member Functions

 OcTreeForest (Vector< TreeRoot * > &trees_pt)
 Constructor for OcTree forest: Pass Vector of (pointers to) trees. More...
 
 OcTreeForest ()
 Default constructor (empty and broken) More...
 
 OcTreeForest (const OcTreeForest &dummy)
 Broken copy constructor. More...
 
void operator= (const OcTreeForest &)
 Broken assignment operator. More...
 
virtual ~OcTreeForest ()
 Destructor: Delete the constituent octrees (and thus the associated objects!) 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. 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 Tree::Max_neighbour_finding_tolerance. More...
 
OcTreeRootoctree_pt (const unsigned &i) const
 Return pointer to i-th OcTree in forest (Performs a dynamic cast from the TreeRoot to a OcTreeRoot). More...
 
OcTreeRootoc_face_neigh_pt (const unsigned &i, const int &direction)
 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). More...
 
Vector< TreeRoot * > oc_edge_neigh_pt (const unsigned &i, const int &direction)
 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. More...
 
- Public Member Functions inherited from oomph::TreeForest
 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...
 
TreeRoottree_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_up_right_equivalents ()
 Construct the rotation schemes. More...
 
void find_neighbours ()
 Construct the neighbour scheme. More...
 

Additional Inherited Members

- Protected Attributes inherited from oomph::TreeForest
Vector< TreeRoot * > Trees_pt
 Vector containing the pointers to the trees. More...
 

Detailed Description

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.

Definition at line 887 of file octree.h.

Constructor & Destructor Documentation

oomph::OcTreeForest::OcTreeForest ( Vector< TreeRoot * > &  trees_pt)

Constructor for OcTree forest: Pass Vector of (pointers to) trees.

Constructor for OcTreeForest:

Pass:

  • trees_pt[], the Vector of pointers to the constituent trees (OcTreeRoot objects)

Definition at line 4654 of file octree.cc.

References construct_up_right_equivalents(), find_neighbours(), and oomph::LeakCheckNames::OcTreeForest_build.

oomph::OcTreeForest::OcTreeForest ( )
inline

Default constructor (empty and broken)

Definition at line 897 of file octree.h.

oomph::OcTreeForest::OcTreeForest ( const OcTreeForest dummy)
inline

Broken copy constructor.

Definition at line 905 of file octree.h.

References oomph::BrokenCopy::broken_copy().

virtual oomph::OcTreeForest::~OcTreeForest ( )
inlinevirtual

Destructor: Delete the constituent octrees (and thus the associated objects!)

Definition at line 918 of file octree.h.

Member Function Documentation

void oomph::OcTreeForest::check_all_neighbours ( DocInfo doc_info)
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.

Definition at line 5549 of file octree.cc.

References oomph::DocInfo::directory(), oomph::OcTree::doc_face_neighbours(), oomph::OcTree::doc_true_edge_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().

void oomph::OcTreeForest::construct_up_right_equivalents ( )
private
void oomph::OcTreeForest::find_neighbours ( )
private
Vector<TreeRoot*> oomph::OcTreeForest::oc_edge_neigh_pt ( const unsigned &  i,
const int &  direction 
)
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.

Definition at line 972 of file octree.h.

References oomph::OcTreeRoot::edge_neighbour_pt(), and i.

Referenced by construct_up_right_equivalents().

OcTreeRoot* oomph::OcTreeForest::oc_face_neigh_pt ( const unsigned &  i,
const int &  direction 
)
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).

Definition at line 949 of file octree.h.

References oomph::OcTreeNames::B, oomph::OcTreeNames::D, oomph::OcTree::Direct_string, oomph::OcTreeNames::F, i, oomph::OcTreeNames::L, oomph::OcTreeNames::R, and oomph::OcTreeNames::U.

Referenced by construct_up_right_equivalents().

OcTreeRoot* oomph::OcTreeForest::octree_pt ( const unsigned &  i) const
inline

Return pointer to i-th OcTree in forest (Performs a dynamic cast from the TreeRoot to a OcTreeRoot).

Definition at line 942 of file octree.h.

References i.

Referenced by construct_up_right_equivalents().

void oomph::OcTreeForest::open_hanging_node_files ( DocInfo doc_info,
Vector< std::ofstream * > &  output_stream 
)
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

created in the mesh refinement process.

Implements oomph::TreeForest.

Definition at line 5694 of file octree.cc.

References oomph::DocInfo::directory(), i, oomph::DocInfo::is_doc_enabled(), and oomph::DocInfo::number().

void oomph::OcTreeForest::operator= ( const OcTreeForest )
inline

Broken assignment operator.

Definition at line 911 of file octree.h.

References oomph::BrokenCopy::broken_assign().

unsigned oomph::OcTreeForest::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 Tree::Max_neighbour_finding_tolerance.

Self test: Check neighbour finding routine.

Definition at line 5479 of file octree.cc.

References oomph::OcTree::doc_face_neighbours(), oomph::OcTree::doc_true_edge_neighbours(), i, oomph::Tree::max_neighbour_finding_tolerance(), oomph::oomph_info, and oomph::TreeForest::stick_all_tree_nodes_into_vector().


The documentation for this class was generated from the following files: