Public Member Functions | Protected Attributes | List of all members
oomph::TreeForest Class Referenceabstract

#include <tree.h>

+ Inheritance diagram for oomph::TreeForest:

Public Member Functions

 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...
 
virtual void check_all_neighbours (DocInfo &doc_info)=0
 Document/check the neighbours of all the nodes in the forest. This must be overloaded for different types of forest. More...
 
virtual void open_hanging_node_files (DocInfo &doc_info, Vector< std::ofstream * > &output_stream)=0
 Open output files that will store any hanging nodes in the forest. Return a vector of the output streams. This is included in the tree structure, so that we can use generic routines for mesh adaptation in two and three dimensions. The need for pointers to the output streams is because one cannot copy a stream! 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...
 

Protected Attributes

Vector< TreeRoot * > Trees_pt
 Vector containing the pointers to the trees. More...
 

Detailed Description

A TreeForest consists of a collection of TreeRoots. Each member tree can have neighbours in various enumerated directions (e.g. S/W/N/E for a QuadTreeForest) and the orientation of their compasses can differ, allowing for complex, unstructured meshes.

Definition at line 385 of file tree.h.

Constructor & Destructor Documentation

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

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

Constructor for TreeForest:

Pass:

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

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 356 of file tree.cc.

oomph::TreeForest::TreeForest ( )
inline

Default constructor (empty and broken)

Definition at line 394 of file tree.h.

oomph::TreeForest::TreeForest ( const TreeForest dummy)
inline

Broken copy constructor.

Definition at line 403 of file tree.h.

References oomph::BrokenCopy::broken_copy().

oomph::TreeForest::~TreeForest ( )
virtual

Destructor: Delete the constituent trees (and thus the objects associated with its non-leaf nodes!)

Kill tree forest: Delete the constituent trees.

Definition at line 362 of file tree.cc.

References i, and Trees_pt.

Member Function Documentation

virtual void oomph::TreeForest::check_all_neighbours ( DocInfo doc_info)
pure virtual

Document/check the neighbours of all the nodes in the forest. This must be overloaded for different types of forest.

Implemented in oomph::OcTreeForest, oomph::QuadTreeForest, and oomph::BinaryTreeForest.

Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), and oomph::TreeBasedRefineableMeshBase::p_adapt_mesh().

void oomph::TreeForest::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.

Close the hanging node output files and delete storage allocated at the pointers. This can be done generically at the base level

Definition at line 433 of file tree.cc.

References oomph::DocInfo::is_doc_enabled().

Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), and oomph::TreeBasedRefineableMeshBase::p_adapt_mesh().

void oomph::TreeForest::flush_trees ( )
inline
unsigned oomph::TreeForest::ntree ( )
inline
virtual void oomph::TreeForest::open_hanging_node_files ( DocInfo doc_info,
Vector< std::ofstream * > &  output_stream 
)
pure virtual

Open output files that will store any hanging nodes in the forest. Return a vector of the output streams. This is included in the tree structure, so that we can use generic routines for mesh adaptation in two and three dimensions. The need for pointers to the output streams is because one cannot copy a stream!

Implemented in oomph::OcTreeForest, oomph::QuadTreeForest, and oomph::BinaryTreeForest.

Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), and oomph::TreeBasedRefineableMeshBase::p_adapt_mesh().

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

Broken assignment operator.

Definition at line 409 of file tree.h.

References oomph::BrokenCopy::broken_assign().

void oomph::TreeForest::stick_all_tree_nodes_into_vector ( Vector< Tree * > &  all_forest_nodes)
void oomph::TreeForest::stick_leaves_into_vector ( Vector< Tree * > &  forest_nodes)

Traverse forst and stick pointers to leaf "nodes" into Vector.

Traverse TreeForest: Preorder traverse and stick pointers to leaf nodes (only) into Vector

Definition at line 377 of file tree.cc.

References i, oomph::Tree::nsons(), ntree(), oomph::Tree::son_pt(), oomph::Tree::stick_leaves_into_vector(), and tree_pt().

Referenced by oomph::TreeBasedRefineableMeshBase::adapt_mesh(), and oomph::TreeBasedRefineableMeshBase::p_adapt_mesh().

TreeRoot* oomph::TreeForest::tree_pt ( const unsigned &  i) const
inline

Member Data Documentation

Vector<TreeRoot*> oomph::TreeForest::Trees_pt
protected

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