|
OOFEM 3.0
|
#include <octreelocalizer.h>
Public Types | |
| enum | BoundingBoxStatus { BBS_OutsideCell , BBS_InsideCell , BBS_ContainsCell } |
| enum | ChildStatus { CS_ChildFound , CS_NoChild } |
Public Member Functions | |
| OctantRec (OctantRec *parent, FloatArray origin, double halfWidth) | |
| Constructor. | |
| ~OctantRec () | |
| Destructor. | |
| OctantRec * | giveParent () |
| const FloatArray & | giveOrigin () |
| double | giveWidth () |
| int | giveCellDepth () |
| OctantRec * | giveChild (int xi, int yi, int zi) |
| ChildStatus | giveChildContainingPoint (OctantRec *&child, const FloatArray &coords, const IntArray &mask) |
| bool | isTerminalOctant () |
| std ::list< int > & | giveNodeList () |
| IntArray & | giveIPElementList () |
| std ::list< int > & | giveElementList (int region) |
| void | divideLocally (int level, const IntArray &octantMask) |
| BoundingBoxStatus | testBoundingBox (const FloatArray &coords, double radius, const IntArray &mask) |
| void | addElementIP (int elementNum) |
| void | addElement (int region, int elementNum) |
| void | addNode (int nodeNum) |
| void | deleteNodeList () |
| void | printYourself () |
| Recursively prints structure. | |
| std::string | errorInfo (const char *func) const |
| Error printing helper. | |
Protected Attributes | |
| OctantRec * | parent |
| Link to parent cell record. | |
| std::unique_ptr< OctantRec > | child [2][2][2] |
| Link to octant children. | |
| FloatArray | origin |
| Octant origin coordinates (lower corner). | |
| double | halfWidth |
| Octant size. | |
| int | depth |
| Tree depth. | |
| std ::list< int > | nodeList |
| Octant node list. | |
| IntArray | elementIPList |
| Element list, containing all elements having IP in cell. | |
| std ::vector< std ::list< int > > | elementList |
| Element list of all elements close to the cell. | |
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 69 of file octreelocalizer.h.
| Enumerator | |
|---|---|
| BBS_OutsideCell | |
| BBS_InsideCell | |
| BBS_ContainsCell | |
Definition at line 93 of file octreelocalizer.h.
| Enumerator | |
|---|---|
| CS_ChildFound | |
| CS_NoChild | |
Definition at line 94 of file octreelocalizer.h.
| oofem::OctantRec::OctantRec | ( | OctantRec * | parent, |
| FloatArray | origin, | ||
| double | halfWidth ) |
Constructor.
Definition at line 51 of file octreelocalizer.C.
References depth, halfWidth, OctantRec(), origin, and parent.
Referenced by giveChildContainingPoint(), giveParent(), and OctantRec().
|
inline |
Destructor.
Definition at line 99 of file octreelocalizer.h.
|
inline |
Adds given element to cell list of elements having IP within this cell.
Definition at line 165 of file octreelocalizer.h.
References giveElementList().
|
inline |
Adds given element to cell list of elements having IP within this cell.
| elementNum | Element number to add. |
Definition at line 159 of file octreelocalizer.h.
References giveIPElementList().
Referenced by oofem::OctreeSpatialLocalizer::insertElementsUsingNodalConnectivitiesIntoOctree(), and oofem::OctreeSpatialLocalizer::insertIPElementIntoOctree().
|
inline |
Adds given Node to node list of nodes contained by receiver.
| nodeNum | Node number to add. |
Definition at line 170 of file octreelocalizer.h.
References giveNodeList().
Referenced by oofem::OctreeSpatialLocalizer::insertNodeIntoOctree().
|
inline |
Clears and deletes the nodeList.
Definition at line 174 of file octreelocalizer.h.
References nodeList.
Referenced by oofem::OctreeSpatialLocalizer::insertNodeIntoOctree().
| void oofem::OctantRec::divideLocally | ( | int | level, |
| const IntArray & | octantMask ) |
Divide receiver further, creating corresponding children.
| level | Depth of tree. |
| octantMask | Masking of dimensions. |
Definition at line 124 of file octreelocalizer.C.
References oofem::IntArray::at(), child, halfWidth, isTerminalOctant(), origin, and oofem::Vec3().
Referenced by oofem::OctreeSpatialLocalizer::insertNodeIntoOctree().
|
inline |
Error printing helper.
Definition at line 180 of file octreelocalizer.h.
|
inline |
Definition at line 111 of file octreelocalizer.h.
Referenced by oofem::OctreeSpatialLocalizer::insertNodeIntoOctree().
| OctantRec * oofem::OctantRec::giveChild | ( | int | xi, |
| int | yi, | ||
| int | zi ) |
Gives the Child at given local indices.
| xi | First index. |
| yi | Second index. |
| zi | Third index. |
Definition at line 82 of file octreelocalizer.C.
References child, and OOFEM_ERROR.
Referenced by oofem::OctreeSpatialLocalizer::giveClosestIPWithinOctant(), oofem::OctreeSpatialLocalizer::giveClosestIPWithinOctant(), oofem::OctreeSpatialLocalizer::giveElementContainingPoint(), oofem::OctreeSpatialLocalizer::giveElementContainingPoint(), oofem::OctreeSpatialLocalizer::giveElementsWithIPWithinBox(), oofem::OctreeSpatialLocalizer::giveListOfTerminalCellsInBoundingBox(), oofem::OctreeSpatialLocalizer::giveMaxTreeDepthFrom(), oofem::OctreeSpatialLocalizer::giveNodesWithinBox(), and oofem::OctreeSpatialLocalizer::insertElementsUsingNodalConnectivitiesIntoOctree().
| OctantRec::ChildStatus oofem::OctantRec::giveChildContainingPoint | ( | OctantRec *& | child, |
| const FloatArray & | coords, | ||
| const IntArray & | mask ) |
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.
| child | |
| coords | Coordinate which child should contain. |
| mask | Mask for which dimensions are in used (size 3, 0 or 1 values) |
Definition at line 97 of file octreelocalizer.C.
References child, CS_ChildFound, CS_NoChild, oofem::FloatArray::giveSize(), isTerminalOctant(), OctantRec(), and origin.
Referenced by oofem::OctreeSpatialLocalizer::findTerminalContaining(), and oofem::OctreeSpatialLocalizer::insertNodeIntoOctree().
| std::list< int > & oofem::OctantRec::giveElementList | ( | int | region | ) |
Definition at line 72 of file octreelocalizer.C.
References elementList.
Referenced by addElement(), and oofem::OctreeSpatialLocalizer::giveElementClosestToPointWithinOctant().
| IntArray & oofem::OctantRec::giveIPElementList | ( | ) |
Definition at line 66 of file octreelocalizer.C.
References elementIPList.
Referenced by addElementIP(), oofem::OctreeSpatialLocalizer::giveClosestIP(), oofem::OctreeSpatialLocalizer::giveClosestIP(), oofem::OctreeSpatialLocalizer::giveClosestIPWithinOctant(), oofem::OctreeSpatialLocalizer::giveClosestIPWithinOctant(), oofem::OctreeSpatialLocalizer::giveElementContainingPoint(), oofem::OctreeSpatialLocalizer::giveElementContainingPoint(), and oofem::OctreeSpatialLocalizer::giveElementsWithIPWithinBox().
| std::list< int > & oofem::OctantRec::giveNodeList | ( | ) |
Definition at line 60 of file octreelocalizer.C.
References nodeList.
Referenced by addNode(), oofem::OctreeSpatialLocalizer::giveNodeClosestToPointWithinOctant(), oofem::OctreeSpatialLocalizer::giveNodesWithinBox(), oofem::OctreeSpatialLocalizer::insertElementsUsingNodalConnectivitiesIntoOctree(), and oofem::OctreeSpatialLocalizer::insertNodeIntoOctree().
|
inline |
Gives the cell origin.
| answer | Cell origin. |
Definition at line 107 of file octreelocalizer.h.
|
inline |
Definition at line 102 of file octreelocalizer.h.
References OctantRec().
Referenced by oofem::OctreeSpatialLocalizer::giveAllElementsWithIpWithinBox_EvenIfEmpty(), oofem::OctreeSpatialLocalizer::giveAllNodesWithinBox(), oofem::OctreeSpatialLocalizer::giveClosestIP(), oofem::OctreeSpatialLocalizer::giveClosestIP(), oofem::OctreeSpatialLocalizer::giveElementContainingPoint(), and oofem::OctreeSpatialLocalizer::giveElementContainingPoint().
|
inline |
Definition at line 109 of file octreelocalizer.h.
Referenced by oofem::OctreeSpatialLocalizer::giveElementClosestToPoint(), and oofem::OctreeSpatialLocalizer::giveNodeClosestToPoint().
| bool oofem::OctantRec::isTerminalOctant | ( | ) |
Definition at line 115 of file octreelocalizer.C.
References child.
Referenced by divideLocally(), oofem::OctreeSpatialLocalizer::findTerminalContaining(), giveChildContainingPoint(), oofem::OctreeSpatialLocalizer::giveClosestIPWithinOctant(), oofem::OctreeSpatialLocalizer::giveClosestIPWithinOctant(), oofem::OctreeSpatialLocalizer::giveElementContainingPoint(), oofem::OctreeSpatialLocalizer::giveElementContainingPoint(), oofem::OctreeSpatialLocalizer::giveElementsWithIPWithinBox(), oofem::OctreeSpatialLocalizer::giveListOfTerminalCellsInBoundingBox(), oofem::OctreeSpatialLocalizer::giveNodesWithinBox(), oofem::OctreeSpatialLocalizer::insertElementsUsingNodalConnectivitiesIntoOctree(), and printYourself().
| void oofem::OctantRec::printYourself | ( | ) |
Recursively prints structure.
Definition at line 181 of file octreelocalizer.C.
References child, depth, elementIPList, halfWidth, isTerminalOctant(), nodeList, and origin.
| OctantRec::BoundingBoxStatus oofem::OctantRec::testBoundingBox | ( | const FloatArray & | coords, |
| double | radius, | ||
| const IntArray & | mask ) |
Test if receiver within bounding box (sphere).
| coords | Center of sphere. |
| radius | Radius of sphere. |
| mask | Mask for which dimensions are in used (size 3, 0 or 1 values) |
Definition at line 159 of file octreelocalizer.C.
References oofem::FloatArray::at(), oofem::IntArray::at(), BBS_ContainsCell, BBS_InsideCell, BBS_OutsideCell, oofem::FloatArray::giveSize(), halfWidth, and origin.
Referenced by oofem::OctreeSpatialLocalizer::giveAllElementsWithIpWithinBox_EvenIfEmpty(), oofem::OctreeSpatialLocalizer::giveAllNodesWithinBox(), oofem::OctreeSpatialLocalizer::giveClosestIP(), oofem::OctreeSpatialLocalizer::giveClosestIP(), oofem::OctreeSpatialLocalizer::giveClosestIPWithinOctant(), oofem::OctreeSpatialLocalizer::giveClosestIPWithinOctant(), and oofem::OctreeSpatialLocalizer::giveListOfTerminalCellsInBoundingBox().
|
protected |
Link to octant children.
Definition at line 75 of file octreelocalizer.h.
Referenced by divideLocally(), giveChild(), giveChildContainingPoint(), isTerminalOctant(), and printYourself().
|
protected |
Tree depth.
Definition at line 82 of file octreelocalizer.h.
Referenced by OctantRec(), and printYourself().
|
protected |
Element list, containing all elements having IP in cell.
Definition at line 87 of file octreelocalizer.h.
Referenced by giveIPElementList(), and printYourself().
|
protected |
Element list of all elements close to the cell.
Definition at line 89 of file octreelocalizer.h.
Referenced by giveElementList().
|
protected |
Octant size.
Definition at line 80 of file octreelocalizer.h.
Referenced by divideLocally(), OctantRec(), printYourself(), and testBoundingBox().
|
protected |
Octant node list.
Definition at line 85 of file octreelocalizer.h.
Referenced by deleteNodeList(), giveNodeList(), and printYourself().
|
protected |
Octant origin coordinates (lower corner).
Definition at line 78 of file octreelocalizer.h.
Referenced by divideLocally(), giveChildContainingPoint(), OctantRec(), printYourself(), and testBoundingBox().
|
protected |
Link to parent cell record.
Definition at line 73 of file octreelocalizer.h.
Referenced by OctantRec().