oofemOctantRec Class Reference

Class representing the octant of octree. More...

#include <octreelocalizer.h>

Collaboration diagram for oofemOctantRec:

Collaboration graph
[legend]

List of all members.

Public Types

enum  boundingBoxStatus { BBS_OUTSIDECELL, BBS_INSIDECELL, BBS_CONTAINSCELL }

Public Member Functions

 oofemOctantRec (OctreeSpatialLocalizer *loc, oofemOctantRec *parent, FloatArray &origin, double size)
 constructor
 ~oofemOctantRec ()
 destructor
oofemOctantRecgiveParent ()
 returns reference to parent; NULL if root
void giveOrigin (FloatArray &answer)
 returns the cell origin
double giveSize ()
 returns cell size
int containsPoint (const FloatArray &coords)
 Returns nonzero if octant contains given point.
oofemOctantRecgiveChild (int xi, int yi, int zi)
 returns the child cell with given local cell coordinates
int giveChildContainingPoint (oofemOctantRec **child, const FloatArray &coords)
 Returns the child containing given point.
int isTerminalOctant ()
 Returns nonzero if octant is terminal one (no children).
std::list< int > * giveNodeList ()
 Return reference to node List.
std::set< int > * giveIPElementList ()
 Return reference to IPelement set.
int divideLocally (int level, const IntArray &octantMask)
 Divide receiver further, creating corresponding childs.
boundingBoxStatus testBoundingBox (const FloatArray &coords, double radius)
 Test if receiver within bounding box (sphere).
void addElementIP (int elementNum)
 Adds given element to cell list of elements having IP within this cell.
void addNode (int nodeNum)
 Adds given Node to node list of nodes contained by receiver.
void deleteNodeList ()
 Clears and deletes the nodeList.

Protected Attributes

OctreeSpatialLocalizerlocalizer
 link to octree class
oofemOctantRecparent
 link to parent cell record
oofemOctantRecchild [2][2][2]
 link to octant childs
FloatArray origin
 octant origin coordinates
double size
 octant size
std::list< int > * nodeList
 octant node list
std::set< int > * elementList
 element list, containing all elements having ip in cell


Detailed Description

Class representing the octant of octree.

It maintains the link to parent cell or if it it the root cell, this link pointer is set to NULL. Maintains links to possible child octree cells as well as its position and size. Also list of node numbers contained in given octree cell can be maintained if cell is terminal cell.

Definition at line 67 of file octreelocalizer.h.


Member Enumeration Documentation

Enumerator:
BBS_OUTSIDECELL 
BBS_INSIDECELL 
BBS_CONTAINSCELL 

Definition at line 88 of file octreelocalizer.h.


Constructor & Destructor Documentation

oofemOctantRec::oofemOctantRec ( OctreeSpatialLocalizer loc,
oofemOctantRec parent,
FloatArray origin,
double  size 
)

constructor

Definition at line 49 of file octreelocalizer.C.

References child, elementList, localizer, and nodeList.

Referenced by divideLocally().

oofemOctantRec::~oofemOctantRec (  ) 

destructor

Definition at line 69 of file octreelocalizer.C.

References child, elementList, and nodeList.


Member Function Documentation

oofemOctantRec* oofemOctantRec::giveParent (  )  [inline]

void oofemOctantRec::giveOrigin ( FloatArray answer  )  [inline]

returns the cell origin

Definition at line 98 of file octreelocalizer.h.

References origin.

double oofemOctantRec::giveSize (  )  [inline]

int oofemOctantRec::containsPoint ( const FloatArray coords  ) 

Returns nonzero if octant contains given point.

If not 3-coordinates are given, then missing coordinates are not included in test

Definition at line 127 of file octreelocalizer.C.

References FloatArray::at(), OctreeSpatialLocalizer::giveOctreeMaskValue(), FloatArray::giveSize(), localizer, origin, and size.

Referenced by OctreeSpatialLocalizer::findTerminalContaining(), giveChildContainingPoint(), and testBoundingBox().

oofemOctantRec * oofemOctantRec::giveChild ( int  xi,
int  yi,
int  zi 
)

int oofemOctantRec::giveChildContainingPoint ( oofemOctantRec **  child,
const FloatArray coords 
)

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, coressponding child is set, otherwise child is set to NULL.

Returns:
1 if o.k, -1 if no childs exists (receiver is terminal octant), -2 point out of receiver volume

Definition at line 148 of file octreelocalizer.C.

References IntArray::at(), FloatArray::at(), containsPoint(), OctreeSpatialLocalizer::giveOctreeMaskValue(), FloatArray::giveSize(), isTerminalOctant(), localizer, origin, and size.

Referenced by OctreeSpatialLocalizer::findTerminalContaining(), and OctreeSpatialLocalizer::insertNodeIntoOctree().

int oofemOctantRec::isTerminalOctant (  ) 

std::list< int > * oofemOctantRec::giveNodeList (  ) 

std::set< int > * oofemOctantRec::giveIPElementList (  ) 

int oofemOctantRec::divideLocally ( int  level,
const IntArray octantMask 
)

oofemOctantRec::boundingBoxStatus oofemOctantRec::testBoundingBox ( const FloatArray coords,
double  radius 
)

void oofemOctantRec::addElementIP ( int  elementNum  )  [inline]

Adds given element to cell list of elements having IP within this cell.

Definition at line 135 of file octreelocalizer.h.

References giveIPElementList().

Referenced by OctreeSpatialLocalizer::insertElementsUsingNodalConnectivitiesIntoOctree(), and OctreeSpatialLocalizer::insertIPElementIntoOctree().

void oofemOctantRec::addNode ( int  nodeNum  )  [inline]

Adds given Node to node list of nodes contained by receiver.

Definition at line 139 of file octreelocalizer.h.

References giveNodeList().

Referenced by OctreeSpatialLocalizer::insertNodeIntoOctree().

void oofemOctantRec::deleteNodeList (  )  [inline]

Clears and deletes the nodeList.

Definition at line 143 of file octreelocalizer.h.

References elementList.

Referenced by OctreeSpatialLocalizer::insertNodeIntoOctree().


Member Data Documentation

link to octree class

Definition at line 72 of file octreelocalizer.h.

Referenced by containsPoint(), divideLocally(), giveChildContainingPoint(), oofemOctantRec(), and testBoundingBox().

link to parent cell record

Definition at line 74 of file octreelocalizer.h.

Referenced by giveParent().

oofemOctantRec* oofemOctantRec::child[2][2][2] [protected]

link to octant childs

Definition at line 76 of file octreelocalizer.h.

Referenced by divideLocally(), giveChild(), isTerminalOctant(), oofemOctantRec(), and ~oofemOctantRec().

octant origin coordinates

Definition at line 78 of file octreelocalizer.h.

Referenced by containsPoint(), divideLocally(), giveChildContainingPoint(), giveOrigin(), and testBoundingBox().

double oofemOctantRec::size [protected]

octant size

Definition at line 80 of file octreelocalizer.h.

Referenced by containsPoint(), divideLocally(), giveChildContainingPoint(), giveSize(), and testBoundingBox().

std :: list< int >* oofemOctantRec::nodeList [protected]

octant node list

Definition at line 83 of file octreelocalizer.h.

Referenced by giveNodeList(), oofemOctantRec(), and ~oofemOctantRec().

std :: set< int >* oofemOctantRec::elementList [protected]

element list, containing all elements having ip in cell

Definition at line 85 of file octreelocalizer.h.

Referenced by deleteNodeList(), giveIPElementList(), oofemOctantRec(), and ~oofemOctantRec().


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

This page is part of the OOFEM documentation. Copyright (c) 2003 Borek Patzak
Project e-mail: info@oofem.org
Generated at Mon Aug 24 11:53:31 2009 for OOFEM by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2001