#include <octreelocalizer.h>

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 | |
| oofemOctantRec * | giveParent () |
| 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. | |
| oofemOctantRec * | giveChild (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 | |
| OctreeSpatialLocalizer * | localizer |
| link to octree class | |
| oofemOctantRec * | parent |
| link to parent cell record | |
| oofemOctantRec * | child [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 | |
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.
Definition at line 88 of file octreelocalizer.h.
| 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.
| oofemOctantRec* oofemOctantRec::giveParent | ( | ) | [inline] |
returns reference to parent; NULL if root
Definition at line 96 of file octreelocalizer.h.
References parent.
Referenced by OctreeSpatialLocalizer::giveAllElementsWithIpWithinBox(), OctreeSpatialLocalizer::giveAllNodesWithinBox(), OctreeSpatialLocalizer::giveClosestIP(), OctreeSpatialLocalizer::giveElementCloseToPoint(), and OctreeSpatialLocalizer::giveElementContainingPoint().
| void oofemOctantRec::giveOrigin | ( | FloatArray & | answer | ) | [inline] |
| double oofemOctantRec::giveSize | ( | ) | [inline] |
returns cell size
Definition at line 100 of file octreelocalizer.h.
References size.
Referenced by OctreeSpatialLocalizer::giveCellDepth(), OctreeSpatialLocalizer::giveClosestIP(), and OctreeSpatialLocalizer::giveElementCloseToPoint().
| 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 | |||
| ) |
returns the child cell with given local cell coordinates
Definition at line 114 of file octreelocalizer.C.
References child, and OOFEM_ERROR4.
Referenced by OctreeSpatialLocalizer::giveClosestIPWithinOctant(), OctreeSpatialLocalizer::giveElementCloseToPointWithinOctant(), OctreeSpatialLocalizer::giveElementContainingPoint(), OctreeSpatialLocalizer::giveElementsWithIPWithinBox(), OctreeSpatialLocalizer::giveListOfTerminalCellsInBoundingBox(), OctreeSpatialLocalizer::giveMaxTreeDepthFrom(), OctreeSpatialLocalizer::giveNodesWithinBox(), and OctreeSpatialLocalizer::insertElementsUsingNodalConnectivitiesIntoOctree().
| 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.
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 | ( | ) |
Returns nonzero if octant is terminal one (no children).
Definition at line 177 of file octreelocalizer.C.
References child.
Referenced by divideLocally(), OctreeSpatialLocalizer::findTerminalContaining(), giveChildContainingPoint(), OctreeSpatialLocalizer::giveClosestIPWithinOctant(), OctreeSpatialLocalizer::giveElementCloseToPointWithinOctant(), OctreeSpatialLocalizer::giveElementContainingPoint(), OctreeSpatialLocalizer::giveElementsWithIPWithinBox(), OctreeSpatialLocalizer::giveListOfTerminalCellsInBoundingBox(), OctreeSpatialLocalizer::giveNodesWithinBox(), and OctreeSpatialLocalizer::insertElementsUsingNodalConnectivitiesIntoOctree().
| std::list< int > * oofemOctantRec::giveNodeList | ( | ) |
Return reference to node List.
Definition at line 94 of file octreelocalizer.C.
References nodeList.
Referenced by addNode(), OctreeSpatialLocalizer::giveNodesWithinBox(), OctreeSpatialLocalizer::insertElementsUsingNodalConnectivitiesIntoOctree(), and OctreeSpatialLocalizer::insertNodeIntoOctree().
| std::set< int > * oofemOctantRec::giveIPElementList | ( | ) |
Return reference to IPelement set.
Definition at line 103 of file octreelocalizer.C.
References elementList.
Referenced by addElementIP(), OctreeSpatialLocalizer::giveClosestIP(), OctreeSpatialLocalizer::giveClosestIPWithinOctant(), OctreeSpatialLocalizer::giveElementCloseToPoint(), OctreeSpatialLocalizer::giveElementCloseToPointWithinOctant(), OctreeSpatialLocalizer::giveElementContainingPoint(), and OctreeSpatialLocalizer::giveElementsWithIPWithinBox().
| int oofemOctantRec::divideLocally | ( | int | level, | |
| const IntArray & | octantMask | |||
| ) |
Divide receiver further, creating corresponding childs.
Definition at line 188 of file octreelocalizer.C.
References FloatArray::at(), IntArray::at(), child, divideLocally(), isTerminalOctant(), localizer, oofemOctantRec(), origin, and size.
Referenced by OctreeSpatialLocalizer::buildOctreeDataStructure(), divideLocally(), and OctreeSpatialLocalizer::insertNodeIntoOctree().
| oofemOctantRec::boundingBoxStatus oofemOctantRec::testBoundingBox | ( | const FloatArray & | coords, | |
| double | radius | |||
| ) |
Test if receiver within bounding box (sphere).
Definition at line 229 of file octreelocalizer.C.
References FloatArray::at(), BBS_CONTAINSCELL, BBS_INSIDECELL, BBS_OUTSIDECELL, containsPoint(), OctreeSpatialLocalizer::giveOctreeMaskValue(), FloatArray::giveSize(), localizer, origin, and size.
Referenced by OctreeSpatialLocalizer::giveAllElementsWithIpWithinBox(), OctreeSpatialLocalizer::giveAllNodesWithinBox(), OctreeSpatialLocalizer::giveClosestIP(), OctreeSpatialLocalizer::giveClosestIPWithinOctant(), OctreeSpatialLocalizer::giveElementCloseToPoint(), OctreeSpatialLocalizer::giveElementCloseToPointWithinOctant(), OctreeSpatialLocalizer::giveElementsWithIPWithinBox(), OctreeSpatialLocalizer::giveListOfTerminalCellsInBoundingBox(), and OctreeSpatialLocalizer::giveNodesWithinBox().
| 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().
OctreeSpatialLocalizer* oofemOctantRec::localizer [protected] |
link to octree class
Definition at line 72 of file octreelocalizer.h.
Referenced by containsPoint(), divideLocally(), giveChildContainingPoint(), oofemOctantRec(), and testBoundingBox().
oofemOctantRec* oofemOctantRec::parent [protected] |
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().
FloatArray oofemOctantRec::origin [protected] |
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().
1.5.5 written by Dimitri van Heesch,
© 1997-2001