mesh::Octant< NodeType > Class Template Reference

#include <octant.h>

Collaboration diagram for mesh::Octant< NodeType >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Octant (const Vector3 &center, double length)
 Octant (Octant *parent, int idx)
 ~Octant ()
int get_child_index_for_point (const Vector3 &node_center)
void add_node (NodeType *node)
void dump (std::ostream &str)

Public Attributes

Vector3 _center
double _length
Octant_parent
Octant_children [8]
std::vector< NodeType * > _nodes

Detailed Description

template<typename NodeType>
class mesh::Octant< NodeType >

An octant in a LooseOctree
Author:
Roman Geus

Definition at line 33 of file octant.h.


Constructor & Destructor Documentation

template<typename NodeType>
mesh::Octant< NodeType >::Octant ( const Vector3 center,
double  length 
)

Constructor for the root Octant

Definition at line 67 of file octant.h.

References mesh::Octant< NodeType >::_center, mesh::Octant< NodeType >::_children, and mesh::Octant< NodeType >::_length.

template<typename NodeType>
mesh::Octant< NodeType >::Octant ( Octant< NodeType > *  parent,
int  idx 
)

Constructor for non-root Octants

Definition at line 79 of file octant.h.

References mesh::Octant< NodeType >::_center, mesh::Octant< NodeType >::_children, and mesh::Octant< NodeType >::_length.

template<typename NodeType>
mesh::Octant< NodeType >::~Octant (  ) 

Destructor: deallocates children Octants

Definition at line 95 of file octant.h.

References mesh::Octant< NodeType >::_children, and mesh::Octant< NodeType >::_parent.


Member Function Documentation

template<typename NodeType>
void mesh::Octant< NodeType >::add_node ( NodeType *  node  ) 

Add node to this octant

Definition at line 115 of file octant.h.

References mesh::Octant< NodeType >::_nodes.

Referenced by mesh::LooseOctree< NodeType >::add_node().

template<typename NodeType>
void mesh::Octant< NodeType >::dump ( std::ostream &  str  ) 

Dump octant info including ancestor info

Definition at line 120 of file octant.h.

References mesh::Octant< NodeType >::_center, mesh::Octant< NodeType >::_length, mesh::Octant< NodeType >::_parent, mesh::Vector3::x, mesh::Vector3::y, and mesh::Vector3::z.

template<typename NodeType>
int mesh::Octant< NodeType >::get_child_index_for_point ( const Vector3 node_center  ) 

Return child octant index corresponding to "node_center"

Definition at line 102 of file octant.h.

References mesh::Octant< NodeType >::_center, mesh::Vector3::x, mesh::Vector3::y, and mesh::Vector3::z.

Referenced by mesh::LooseOctree< NodeType >::add_node().


Member Data Documentation

template<typename NodeType>
Vector3 mesh::Octant< NodeType >::_center

center of octant, x-, y- and z-coordinates

Definition at line 55 of file octant.h.

Referenced by mesh::Octant< NodeType >::dump(), mesh::Octant< NodeType >::get_child_index_for_point(), and mesh::Octant< NodeType >::Octant().

template<typename NodeType>
Octant* mesh::Octant< NodeType >::_children[8]

8 child octants

Definition at line 61 of file octant.h.

Referenced by mesh::LooseOctree< NodeType >::add_node(), mesh::LooseOctree< NodeType >::export_vtk_recursive(), mesh::LooseOctree< NodeType >::get_statistics_recursive(), mesh::Octant< NodeType >::Octant(), and mesh::Octant< NodeType >::~Octant().

template<typename NodeType>
double mesh::Octant< NodeType >::_length

half of the side length of the octant

Definition at line 57 of file octant.h.

Referenced by mesh::LooseOctree< NodeType >::add_node(), mesh::Octant< NodeType >::dump(), and mesh::Octant< NodeType >::Octant().

template<typename NodeType>
std::vector<NodeType *> mesh::Octant< NodeType >::_nodes

Nodes stored in the octant

Definition at line 63 of file octant.h.

Referenced by mesh::Octant< NodeType >::add_node(), and mesh::LooseOctree< NodeType >::get_statistics_recursive().

template<typename NodeType>
Octant* mesh::Octant< NodeType >::_parent

Parent node

Definition at line 59 of file octant.h.

Referenced by mesh::Octant< NodeType >::dump(), and mesh::Octant< NodeType >::~Octant().


The documentation for this class was generated from the following file:
Generated on Fri Oct 26 13:35:17 2007 for FEMAXX (Finite Element Maxwell Eigensolver) by  doxygen 1.4.7