OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::OctantRecT< T > Class Template Reference

Templated octree cell containing data of T type. More...

#include <octreelocalizert.h>

+ Collaboration diagram for oofem::OctantRecT< T >:

Public Types

typedef OctreeSpatialLocalizerT< T > * LocalizerPtrType
 
typedef OctantRecT< T > * CellPtrType
 
typedef std::list< T >::iterator listIteratorType
 

Public Member Functions

 OctantRecT (LocalizerPtrType loc, CellPtrType parent, FloatArray &origin, double size)
 Constructor. More...
 
 ~OctantRecT ()
 Destructor. More...
 
CellPtrType giveParent ()
 
void giveOrigin (FloatArray &answer)
 Gives the cell origin. More...
 
double giveSize ()
 Gives the size of the cell. More...
 
int containsPoint (const FloatArray &coords)
 Gives 1 if a given point is contained in the cell, 0 otherwise. More...
 
CellPtrType giveChild (int xi, int yi, int zi)
 Gives the Child at given local indices. More...
 
int giveChildContainingPoint (CellPtrType *child, const FloatArray &coords)
 Returns the child containing given point. More...
 
int isTerminalOctant ()
 
int divideLocally (int level, const IntArray &octantMask)
 Divide receiver further, creating corresponding children. More...
 
OctantRec::BoundingBoxStatus testBoundingBox (BoundingBox &testedBBX)
 Tests the position of a bounding box in relation to the octant cell. More...
 
boundingSphereStatus testBoundingSphere (const FloatArray &coords, double radius)
 Tests the position of a bounding spere in relation to the octant cell. More...
 
std::list< T > * giveDataList ()
 Return reference to member List. More...
 
void deleteDataList ()
 Removes the data list. More...
 
listIteratorType addMember (T &member)
 Adds the object in to the data list returning iterator position to the object in the list. More...
 
void removeMember (T &member)
 Removes member from data list. More...
 

Protected Attributes

LocalizerPtrType localizer
 Octree localizer whose part of is the cell. More...
 
CellPtrType parent
 Parent octree cell. More...
 
CellPtrType child [2][2][2]
 Child cells. More...
 
FloatArray origin
 Origin of the cell. More...
 
double size
 Size of the cell. More...
 
std::list< T > * dataList
 Octant cell member list. More...
 

Friends

class OctreeSpatialLocalizerT< T >
 

Detailed Description

template<class T>
class oofem::OctantRecT< T >

Templated octree cell containing data of T type.

Author
David Krybus

Definition at line 154 of file octreelocalizert.h.

Member Typedef Documentation

template<class T>
typedef OctantRecT< T >* oofem::OctantRecT< T >::CellPtrType

Definition at line 158 of file octreelocalizert.h.

template<class T>
typedef std :: list< T >:: iterator oofem::OctantRecT< T >::listIteratorType

Definition at line 159 of file octreelocalizert.h.

template<class T>
typedef OctreeSpatialLocalizerT< T >* oofem::OctantRecT< T >::LocalizerPtrType

Definition at line 157 of file octreelocalizert.h.

Constructor & Destructor Documentation

template<class T>
oofem::OctantRecT< T >::OctantRecT ( LocalizerPtrType  loc,
CellPtrType  parent,
FloatArray origin,
double  size 
)
inline

Constructor.

Definition at line 179 of file octreelocalizert.h.

template<class T>
oofem::OctantRecT< T >::~OctantRecT ( )
inline

Destructor.

Definition at line 197 of file octreelocalizert.h.

Member Function Documentation

template<class T>
listIteratorType oofem::OctantRecT< T >::addMember ( T &  member)
inline

Adds the object in to the data list returning iterator position to the object in the list.

Definition at line 471 of file octreelocalizert.h.

Referenced by oofem::OctreeSpatialLocalizerT< oofem::UnstructuredGridField::Cell >::insertMemberIntoCell().

template<class T>
int oofem::OctantRecT< T >::containsPoint ( const FloatArray coords)
inline

Gives 1 if a given point is contained in the cell, 0 otherwise.

Parameters
coordscoordinates of tested point.

Definition at line 227 of file octreelocalizert.h.

Referenced by oofem::InsertNode::evaluate(), and oofem::OctreeSpatialLocalizerT< oofem::UnstructuredGridField::Cell >::findTerminalContaining().

template<class T>
void oofem::OctantRecT< T >::deleteDataList ( )
inline
template<class T>
int oofem::OctantRecT< T >::divideLocally ( int  level,
const IntArray octantMask 
)
inline

Divide receiver further, creating corresponding children.

Parameters
levelDepth of tree.
octantMaskMasking of dimensions.

Definition at line 307 of file octreelocalizert.h.

Referenced by oofem::OctantRecT< oofem::UnstructuredGridField::Cell >::divideLocally(), oofem::OctreeSpatialLocalizerT< oofem::UnstructuredGridField::Cell >::init(), and oofem::OctreeSpatialLocalizerT< oofem::UnstructuredGridField::Cell >::insertMemberIntoCell().

template<class T>
int oofem::OctantRecT< T >::giveChildContainingPoint ( CellPtrType child,
const FloatArray coords 
)
inline

Returns the child containing given point.

If not full 3d coordinates are provided, then only provided coordinates are taken into account, assuming remaining to be same as origin. If point is contained by receiver, corresponding child is set, otherwise. child is set to NULL.

Parameters
child
coordsCoordinate which child should contain.
Returns
Child status.

Definition at line 268 of file octreelocalizert.h.

Referenced by oofem::OctreeSpatialLocalizerT< oofem::UnstructuredGridField::Cell >::findTerminalContaining().

template<class T>
void oofem::OctantRecT< T >::giveOrigin ( FloatArray answer)
inline

Gives the cell origin.

Parameters
answerCell origin.

Definition at line 220 of file octreelocalizert.h.

template<class T>
CellPtrType oofem::OctantRecT< T >::giveParent ( )
inline
Returns
Reference to parent; NULL if root.

Definition at line 215 of file octreelocalizert.h.

template<class T>
double oofem::OctantRecT< T >::giveSize ( )
inline

Gives the size of the cell.

Definition at line 222 of file octreelocalizert.h.

Referenced by oofem::OctreeSpatialLocalizerT< oofem::UnstructuredGridField::Cell >::giveCellDepth().

template<class T>
void oofem::OctantRecT< T >::removeMember ( T &  member)
inline

Removes member from data list.

Definition at line 478 of file octreelocalizert.h.

Referenced by oofem::OctreeSpatialLocalizerT< oofem::UnstructuredGridField::Cell >::removeMemberFromCell().

template<class T>
OctantRec :: BoundingBoxStatus oofem::OctantRecT< T >::testBoundingBox ( BoundingBox testedBBX)
inline

Tests the position of a bounding box in relation to the octant cell.

Parameters
testedBBXTested bounding box
Returns
BoundingBoxStatus status

Definition at line 351 of file octreelocalizert.h.

Referenced by oofem::UnstructuredGridField::CellInsertionFunctor::evaluate(), oofem::OctreeSpatialLocalizerT< oofem::UnstructuredGridField::Cell >::giveDataOnFilter(), and oofem::OctreeSpatialLocalizerT< oofem::UnstructuredGridField::Cell >::giveListOfTerminalCellsInBoundingBox().

template<class T>
boundingSphereStatus oofem::OctantRecT< T >::testBoundingSphere ( const FloatArray coords,
double  radius 
)
inline

Tests the position of a bounding spere in relation to the octant cell.

Parameters
coordsCoordinates of the spere center
radiusRadius of the sphere
Returns
boundingSpereStatus status

Definition at line 396 of file octreelocalizert.h.

Referenced by oofem::InsertTriangleBasedOnCircumcircle::evaluate().

Friends And Related Function Documentation

template<class T>
friend class OctreeSpatialLocalizerT< T >
friend

Definition at line 480 of file octreelocalizert.h.

Member Data Documentation

template<class T>
CellPtrType oofem::OctantRecT< T >::child[2][2][2]
protected

Child cells.

Definition at line 167 of file octreelocalizert.h.

template<class T>
std :: list< T >* oofem::OctantRecT< T >::dataList
protected

Octant cell member list.

Definition at line 174 of file octreelocalizert.h.

template<class T>
LocalizerPtrType oofem::OctantRecT< T >::localizer
protected

Octree localizer whose part of is the cell.

Definition at line 163 of file octreelocalizert.h.

template<class T>
FloatArray oofem::OctantRecT< T >::origin
protected

Origin of the cell.

Definition at line 169 of file octreelocalizert.h.

template<class T>
CellPtrType oofem::OctantRecT< T >::parent
protected

Parent octree cell.

Definition at line 165 of file octreelocalizert.h.

template<class T>
double oofem::OctantRecT< T >::size
protected

Size of the cell.

Definition at line 171 of file octreelocalizert.h.


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:39 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011