OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
The implementation of spatial localizer based on octree technique. More...
#include <octreelocalizer.h>
Public Member Functions | |
OctreeSpatialLocalizer (Domain *d) | |
Constructor. More... | |
virtual | ~OctreeSpatialLocalizer () |
Destructor - deletes the octree tree. More... | |
int | giveOctreeMaskValue (int indx) |
Returns the octreeMask value given by the index. More... | |
virtual int | init (bool force=false) |
Initialize receiver data structure if not done previously. More... | |
virtual Element * | giveElementContainingPoint (const FloatArray &coords, const IntArray *regionList=NULL) |
Returns the element, containing given point and belonging to one of the region in region list. More... | |
virtual Element * | giveElementContainingPoint (const FloatArray &coords, const Set &eset) |
Returns the element, containing given point and belonging to one of the region in region list. More... | |
virtual Element * | giveElementClosestToPoint (FloatArray &lcoords, FloatArray &closest, const FloatArray &gcoords, int region) |
Returns the element closest to a given point. More... | |
virtual GaussPoint * | giveClosestIP (const FloatArray &coords, int region, bool iCohesiveZoneGP=false) |
Returns the integration point in associated domain, which is closest to given point. More... | |
virtual GaussPoint * | giveClosestIP (const FloatArray &coords, Set &elemSet, bool iCohesiveZoneGP=false) |
Returns the integration point in associated domain, which is closest to given point. More... | |
virtual void | giveAllElementsWithIpWithinBox_EvenIfEmpty (elementContainerType &elemSet, const FloatArray &coords, const double radius) |
Returns container (set) of all domain elements having integration point within given box, even if this set is empty. More... | |
virtual void | giveAllElementsWithIpWithinBox (elementContainerType &elemSet, const FloatArray &coords, const double radius) |
Returns container (set) of all domain elements having integration point within given box. More... | |
virtual void | giveAllElementsWithIpWithinBox_EvenIfEmpty (elementContainerType &elemSet, const FloatArray &coords, const double radius, bool iCohesiveZoneGP) |
virtual void | giveAllElementsWithIpWithinBox (elementContainerType &elemSet, const FloatArray &coords, const double radius, bool iCohesiveZoneGP) |
virtual void | giveAllNodesWithinBox (nodeContainerType &nodeList, const FloatArray &coords, const double radius) |
Returns container (list) of all domain nodes within given box. More... | |
virtual Node * | giveNodeClosestToPoint (const FloatArray &coords, double maxDist) |
Returns the node closest to the given coordinate. More... | |
virtual const char * | giveClassName () const |
Public Member Functions inherited from oofem::SpatialLocalizer | |
SpatialLocalizer (Domain *d) | |
Constructor. More... | |
virtual | ~SpatialLocalizer () |
Domain * | giveDomain () |
Returns the domain that localizer acts on. More... | |
virtual void | giveAllElementsWithNodesWithinBox (elementContainerType &elemSet, const FloatArray &coords, const double radius) |
Returns container (set) of all domain elements having node within given box. More... | |
std::string | errorInfo (const char *func) const |
Error printing helper. More... | |
Protected Member Functions | |
bool | buildOctreeDataStructure () |
Builds the underlying octree data structure. More... | |
void | initElementIPDataStructure () |
Insert IP records into tree (the tree topology is determined by nodes). More... | |
void | initElementDataStructure (int region=0) |
Insert element into tree (the tree topology is determined by nodes). More... | |
OctantRec * | findTerminalContaining (OctantRec *startCell, const FloatArray &coords) |
Finds the terminal octant containing the given point. More... | |
void | insertNodeIntoOctree (OctantRec *rootCell, int nodeNum, const FloatArray &coords) |
Inserts the given node (identified by its number and position) to the octree structure. More... | |
void | insertIPElementIntoOctree (OctantRec *rootCell, int elemNum, const FloatArray &coords) |
Inserts the given integration point (or more precisely the element owning it) to the octree data structure. More... | |
void | insertElementIntoOctree (OctantRec *rootCell, int region, int elemNum, const FloatArray &b0, const FloatArray &b1) |
Inserts an element with the given bounding box. More... | |
void | insertElementsUsingNodalConnectivitiesIntoOctree (OctantRec *rootCell) |
Initializes the element lists in octree data structure. More... | |
void | giveElementsWithIPWithinBox (elementContainerType &elemSet, OctantRec *currentCell, const FloatArray &coords, const double radius, bool iCohesiveZoneGP=false) |
Returns container (set) of elements having integration point within given box and given root cell. More... | |
void | giveNodesWithinBox (nodeContainerType &nodeList, OctantRec *currentCell, const FloatArray &coords, const double radius) |
Returns container (list) of nodes within given box and given root cell. More... | |
void | giveClosestIPWithinOctant (OctantRec *currentCell, const FloatArray &coords, int region, double &dist, GaussPoint **answer, bool iCohesiveZoneGP) |
Returns closest IP to given point contained within given octree cell. More... | |
void | giveClosestIPWithinOctant (OctantRec *currentCell, const FloatArray &coords, Set &elemSet, double &dist, GaussPoint **answer, bool iCohesiveZoneGP) |
Returns closest IP to given point contained within given octree cell. More... | |
Element * | giveElementContainingPoint (OctantRec *cell, const FloatArray &coords, OctantRec *scannedChild=NULL, const IntArray *regionList=NULL) |
Returns the element containing given point. More... | |
Element * | giveElementContainingPoint (OctantRec *cell, const FloatArray &coords, OctantRec *scannedChild=NULL, const Set *elset=NULL) |
Returns the element containing given point. More... | |
void | giveElementClosestToPointWithinOctant (OctantRec *currCell, const FloatArray &gcoords, double &minDist, FloatArray &lcoords, FloatArray &closest, Element *&answer, int region) |
Returns the element closest to the given point within the cell. More... | |
void | giveNodeClosestToPointWithinOctant (OctantRec *cell, const FloatArray &gcoords, double &minDist, Node *&answer) |
Returns the node closest to the given point within the cell. More... | |
void | giveMaxTreeDepthFrom (OctantRec *root, int &maxDepth) |
Determines the max tree depth computed for given tree cell and its children. More... | |
void | giveListOfTerminalCellsInBoundingBox (std::list< OctantRec * > &cellList, const FloatArray &coords, const double radius, double innerRadius, OctantRec *currentCell) |
Builds the list of terminal cells contained within given box (coords, radius), starting from given currentCell. More... | |
Protected Attributes | |
OctantRec * | rootCell |
Root cell of octree. More... | |
IntArray | octreeMask |
Octree degenerate mask. More... | |
bool | elementIPListsInitialized |
Flag indicating elementIP tables are initialized. More... | |
IntArray | elementListsInitialized |
Protected Attributes inherited from oofem::SpatialLocalizer | |
Domain * | domain |
Link to domain object. More... | |
Additional Inherited Members | |
Public Types inherited from oofem::SpatialLocalizer | |
typedef IntArray | elementContainerType |
Typedefs to introduce the container type for element numbers, returned by some services. More... | |
typedef std::list< int > | nodeContainerType |
Typedefs to introduce the container type for nodal numbers, returned by some services. More... | |
The implementation of spatial localizer based on octree technique.
The basic task is to provide spatial information and localization for domain, to which receiver is associated. The octree data structure is build over domain nodes, the element type searches are completed using nodal connectivity informations provided by ConTable. Typical services include searching the closes node to give position, searching of an element containing given point, etc. If special element algorithms required, these should be included using interface concept.
Definition at line 185 of file octreelocalizer.h.
oofem::OctreeSpatialLocalizer::OctreeSpatialLocalizer | ( | Domain * | d | ) |
Constructor.
Definition at line 240 of file octreelocalizer.C.
References oofem::IntArray::clear(), elementIPListsInitialized, elementListsInitialized, and rootCell.
|
virtual |
Destructor - deletes the octree tree.
Definition at line 248 of file octreelocalizer.C.
References rootCell.
|
protected |
Builds the underlying octree data structure.
The desired tree level is determined by following rules:
Definition at line 271 of file octreelocalizer.C.
References oofem::FloatArray::add(), oofem::IntArray::at(), oofem::FloatArray::at(), oofem::OctantRec::divideLocally(), oofem::SpatialLocalizer::domain, elementIPListsInitialized, elementListsInitialized, oofem::Timer::getUtime(), oofem::Node::giveCoordinates(), oofem::Domain::giveDofManager(), giveMaxTreeDepthFrom(), oofem::Domain::giveNumberOfDofManagers(), oofem::Domain::giveNumberOfRegions(), oofem::FloatArray::giveSize(), init(), insertNodeIntoOctree(), oofem::max(), oofem::min(), OCTREE_MAX_NODES_LIMIT, octreeMask, OOFEM_LOG_DEBUG, oofem::IntArray::resize(), rootCell, oofem::Timer::startTimer(), oofem::Timer::stopTimer(), oofem::FloatArray::times(), and oofem::IntArray::zero().
Referenced by init().
|
protected |
Finds the terminal octant containing the given point.
startCell | Cell used to start search. |
coords | Coordinates of point of interest. |
Definition at line 255 of file octreelocalizer.C.
References oofem::OctantRec::CS_NoChild, oofem::OctantRec::giveChildContainingPoint(), oofem::OctantRec::isTerminalOctant(), and OOFEM_ERROR.
Referenced by giveAllElementsWithIpWithinBox_EvenIfEmpty(), giveAllNodesWithinBox(), giveClosestIP(), giveElementClosestToPoint(), giveElementContainingPoint(), giveNodeClosestToPoint(), insertIPElementIntoOctree(), and insertNodeIntoOctree().
|
inlinevirtual |
Returns container (set) of all domain elements having integration point within given box.
elemSet | Answer containing the list of elements meeting the criteria. |
coords | Center of box of interest. |
radius | Radius of bounding sphere. |
Implements oofem::SpatialLocalizer.
Definition at line 221 of file octreelocalizer.h.
References giveAllElementsWithIpWithinBox().
Referenced by giveAllElementsWithIpWithinBox(), and giveClosestIP().
|
virtual |
Definition at line 1364 of file octreelocalizer.C.
References giveAllElementsWithIpWithinBox_EvenIfEmpty(), oofem::IntArray::isEmpty(), and OOFEM_ERROR.
|
inlinevirtual |
Returns container (set) of all domain elements having integration point within given box, even if this set is empty.
elemSet | Answer containing the list of elements meeting the criteria. |
coords | Center of box of interest. |
radius | Radius of bounding sphere. |
Implements oofem::SpatialLocalizer.
Definition at line 220 of file octreelocalizer.h.
References giveAllElementsWithIpWithinBox_EvenIfEmpty().
Referenced by giveAllElementsWithIpWithinBox(), and giveAllElementsWithIpWithinBox_EvenIfEmpty().
|
virtual |
Definition at line 1341 of file octreelocalizer.C.
References oofem::OctantRec::BBS_InsideCell, findTerminalContaining(), giveElementsWithIPWithinBox(), oofem::OctantRec::giveParent(), init(), initElementIPDataStructure(), rootCell, and oofem::OctantRec::testBoundingBox().
|
virtual |
Returns container (list) of all domain nodes within given box.
nodeList | Answer containing the list of nodes meeting the criteria. |
coords | Center of box of interest. |
radius | Radius of bounding sphere. |
Implements oofem::SpatialLocalizer.
Definition at line 1460 of file octreelocalizer.C.
References oofem::OctantRec::BBS_InsideCell, findTerminalContaining(), giveNodesWithinBox(), oofem::OctantRec::giveParent(), init(), rootCell, and oofem::OctantRec::testBoundingBox().
|
inlinevirtual |
Implements oofem::SpatialLocalizer.
Definition at line 227 of file octreelocalizer.h.
|
virtual |
Returns the integration point in associated domain, which is closest to given point.
Since IP holds the information about its element, the IP reference is containing all the information.
coords | Global problem coordinates of point of interest |
region | If value > 0 then only closet point from given region will be considered, if value < 0 all regions will be valid |
Implements oofem::SpatialLocalizer.
Definition at line 817 of file octreelocalizer.C.
References oofem::OctantRec::BBS_ContainsCell, oofem::OctantRec::BBS_InsideCell, oofem::Element::computeGlobalCoordinates(), oofem::FloatArray::distance(), oofem::SpatialLocalizer::domain, oofem::Element_remote, findTerminalContaining(), giveAllElementsWithIpWithinBox(), giveClosestIPWithinOctant(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::Domain::giveElement(), oofem::OctantRec::giveIPElementList(), giveListOfTerminalCellsInBoundingBox(), oofem::Element::giveParallelMode(), oofem::OctantRec::giveParent(), oofem::Element::giveRegionNumber(), oofem::OctantRec::giveWidth(), init(), initElementIPDataStructure(), oofem::XfemElementInterface::mpCZIntegrationRules, OOFEM_ERROR, oofem::FloatArray::printYourself(), rootCell, and oofem::OctantRec::testBoundingBox().
|
virtual |
Returns the integration point in associated domain, which is closest to given point.
Since IP holds the information about its element, the IP reference is containing all the information.
coords | Global problem coordinates of point of interest |
region | Only closet point from given region will be considered |
Implements oofem::SpatialLocalizer.
Definition at line 1080 of file octreelocalizer.C.
References oofem::OctantRec::BBS_ContainsCell, oofem::OctantRec::BBS_InsideCell, oofem::Element::computeGlobalCoordinates(), oofem::FloatArray::distance(), oofem::SpatialLocalizer::domain, oofem::Element_remote, findTerminalContaining(), giveAllElementsWithIpWithinBox(), giveClosestIPWithinOctant(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::Domain::giveElement(), oofem::OctantRec::giveIPElementList(), giveListOfTerminalCellsInBoundingBox(), oofem::FEMComponent::giveNumber(), oofem::Element::giveParallelMode(), oofem::OctantRec::giveParent(), oofem::Element::giveRegionNumber(), oofem::OctantRec::giveWidth(), oofem::Set::hasElement(), init(), initElementIPDataStructure(), oofem::XfemElementInterface::mpCZIntegrationRules, OOFEM_ERROR, oofem::FloatArray::printYourself(), rootCell, and oofem::OctantRec::testBoundingBox().
|
protected |
Returns closest IP to given point contained within given octree cell.
currentCell | Starting cell to search, all children will be searched too |
coords | Point coordinates. |
region | Region id of elements. |
dist | Threshold distance, only update answer param, if distance is smaller, distance is updated too. |
answer | Pointer to IP, which has the smallest distance "distance" from given point. |
Definition at line 988 of file octreelocalizer.C.
References oofem::IntArray::at(), oofem::OctantRec::BBS_ContainsCell, oofem::OctantRec::BBS_InsideCell, oofem::Element::computeGlobalCoordinates(), oofem::FloatArray::distance(), oofem::SpatialLocalizer::domain, oofem::Element_remote, oofem::OctantRec::giveChild(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::Domain::giveElement(), oofem::OctantRec::giveIPElementList(), oofem::Element::giveParallelMode(), oofem::Element::giveRegionNumber(), oofem::OctantRec::isTerminalOctant(), oofem::XfemElementInterface::mpCZIntegrationRules, octreeMask, OOFEM_ERROR, and oofem::OctantRec::testBoundingBox().
Referenced by giveClosestIP(), and giveClosestIPWithinOctant().
|
protected |
Returns closest IP to given point contained within given octree cell.
currentCell | Starting cell to search, all children will be searched too |
coords | Point coordinates. |
elemSet | set of considered elements. |
dist | Threshold distance, only update answer param, if distance is smaller, distance is updated too. |
answer | Pointer to IP, which has the smallest distance "distance" from given point. |
Definition at line 1249 of file octreelocalizer.C.
References oofem::IntArray::at(), oofem::OctantRec::BBS_ContainsCell, oofem::OctantRec::BBS_InsideCell, oofem::Element::computeGlobalCoordinates(), oofem::FloatArray::distance(), oofem::SpatialLocalizer::domain, oofem::Element_remote, oofem::OctantRec::giveChild(), giveClosestIPWithinOctant(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::Domain::giveElement(), oofem::OctantRec::giveIPElementList(), oofem::FEMComponent::giveNumber(), oofem::Element::giveParallelMode(), oofem::Set::hasElement(), oofem::OctantRec::isTerminalOctant(), oofem::XfemElementInterface::mpCZIntegrationRules, octreeMask, OOFEM_ERROR, and oofem::OctantRec::testBoundingBox().
|
virtual |
Returns the element closest to a given point.
[out] | lcoords | Local coordinates in element found. |
[out] | closest | Global coordinates for found point. |
coords | Global problem coordinates of point of interest. | |
region | Only elements within given region are considered, if 0 all regions are considered. |
Implements oofem::SpatialLocalizer.
Definition at line 746 of file octreelocalizer.C.
References oofem::FloatArray::distance(), findTerminalContaining(), giveElementClosestToPointWithinOctant(), giveListOfTerminalCellsInBoundingBox(), oofem::OctantRec::giveOrigin(), oofem::OctantRec::giveWidth(), initElementDataStructure(), and rootCell.
|
protected |
Returns the element closest to the given point within the cell.
currCell | Terminal cell to look in. | |
gcoords | Point coordinates. | |
lcoords | Local coordinates in closest element. | |
[in,out] | minDist | Distance from the center of returned element. |
closest | Coordinates in closest element. | |
answer | Requested element. | |
region | Region to consider. |
Definition at line 781 of file octreelocalizer.C.
References oofem::Element_remote, oofem::SpatialLocalizer::giveDomain(), oofem::Domain::giveElement(), oofem::OctantRec::giveElementList(), oofem::FEMComponent::giveInterface(), oofem::Element::giveParallelMode(), oofem::Element::giveRegionNumber(), oofem::SpatialLocalizerInterface::SpatialLocalizerI_giveClosestPoint(), and oofem::SpatialLocalizerInterfaceType.
Referenced by giveElementClosestToPoint().
|
virtual |
Returns the element, containing given point and belonging to one of the region in region list.
coords | Global problem coordinates of point of interest. |
regionList | Only elements within given regions are considered, if NULL all regions are considered. |
Implements oofem::SpatialLocalizer.
Definition at line 573 of file octreelocalizer.C.
References findTerminalContaining(), oofem::OctantRec::giveParent(), init(), initElementIPDataStructure(), and rootCell.
Referenced by giveElementContainingPoint().
|
virtual |
Returns the element, containing given point and belonging to one of the region in region list.
coords | Global problem coordinates of point of interest. |
element | set Only elements within given set are considered. |
Implements oofem::SpatialLocalizer.
Definition at line 601 of file octreelocalizer.C.
References findTerminalContaining(), giveElementContainingPoint(), oofem::OctantRec::giveParent(), init(), initElementIPDataStructure(), and rootCell.
|
protected |
Returns the element containing given point.
The search is done only for given cell and its children, skipping the given child from search
cell | Top level cell to search. |
coords | Point coordinates. |
scannedChild | Child pointer to exclude from search. |
regionList | Only elements within given regions are considered, if NULL all regions are considered. |
Definition at line 630 of file octreelocalizer.C.
References oofem::IntArray::at(), oofem::Element_remote, oofem::IntArray::findFirstIndexOf(), oofem::OctantRec::giveChild(), oofem::SpatialLocalizer::giveDomain(), oofem::Domain::giveElement(), giveElementContainingPoint(), oofem::FEMComponent::giveInterface(), oofem::OctantRec::giveIPElementList(), oofem::Element::giveParallelMode(), oofem::Element::giveRegionNumber(), oofem::IntArray::isEmpty(), oofem::OctantRec::isTerminalOctant(), octreeMask, and oofem::SpatialLocalizerInterfaceType.
|
protected |
Returns the element containing given point.
The search is done only for given cell and its children, skipping the given child from search
cell | Top level cell to search. |
coords | Point coordinates. |
scannedChild | Child pointer to exclude from search. |
elset | Only elements in gibven set are considered, if NULL all regions are considered. |
Definition at line 688 of file octreelocalizer.C.
References oofem::IntArray::at(), oofem::Element_remote, oofem::OctantRec::giveChild(), oofem::SpatialLocalizer::giveDomain(), oofem::Domain::giveElement(), giveElementContainingPoint(), oofem::FEMComponent::giveInterface(), oofem::OctantRec::giveIPElementList(), oofem::FEMComponent::giveNumber(), oofem::Element::giveParallelMode(), oofem::Set::hasElement(), oofem::IntArray::isEmpty(), oofem::OctantRec::isTerminalOctant(), octreeMask, and oofem::SpatialLocalizerInterfaceType.
|
protected |
Returns container (set) of elements having integration point within given box and given root cell.
elemSet | answer containing the list of elements meeting the criteria. |
currentCell | The starting cell to be transversed. |
coords | Center of box of interest. |
radius | Radius of bounding sphere. |
Definition at line 1375 of file octreelocalizer.C.
References oofem::IntArray::at(), oofem::OctantRec::BBS_ContainsCell, oofem::OctantRec::BBS_InsideCell, oofem::Element::computeGlobalCoordinates(), oofem::FloatArray::distance(), oofem::SpatialLocalizer::domain, oofem::IntArray::findSorted(), oofem::OctantRec::giveChild(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::Domain::giveElement(), oofem::OctantRec::giveIPElementList(), oofem::IntArray::insertSortedOnce(), oofem::OctantRec::isTerminalOctant(), oofem::XfemElementInterface::mpCZIntegrationRules, octreeMask, OOFEM_ERROR, and oofem::OctantRec::testBoundingBox().
Referenced by giveAllElementsWithIpWithinBox_EvenIfEmpty().
|
protected |
Builds the list of terminal cells contained within given box (coords, radius), starting from given currentCell.
cellList | List of terminal cell pointers contained by bounding box. |
coords | Center of box of interest. |
radius | Radius of bounding sphere. |
innerRadius | Inner radius of bounding sphere. |
currentCell | Starting cell. |
Definition at line 1588 of file octreelocalizer.C.
References oofem::IntArray::at(), oofem::OctantRec::BBS_OutsideCell, oofem::OctantRec::giveChild(), oofem::OctantRec::isTerminalOctant(), octreeMask, and oofem::OctantRec::testBoundingBox().
Referenced by giveClosestIP(), giveElementClosestToPoint(), and giveNodeClosestToPoint().
|
protected |
Determines the max tree depth computed for given tree cell and its children.
To obtain total tree depth, root cell should be supplied. The tree depth is always measured from the root cell. Before call, maxDepth should be set to zero.
root | Root of tree. |
maxDepth | The maximum depth in the tree. |
Definition at line 1570 of file octreelocalizer.C.
References oofem::IntArray::at(), oofem::OctantRec::giveCellDepth(), oofem::OctantRec::giveChild(), oofem::max(), and octreeMask.
Referenced by buildOctreeDataStructure().
|
virtual |
Returns the node closest to the given coordinate.
coords | Global coordinate. |
Implements oofem::SpatialLocalizer.
Definition at line 1481 of file octreelocalizer.C.
References findTerminalContaining(), giveListOfTerminalCellsInBoundingBox(), giveNodeClosestToPointWithinOctant(), oofem::OctantRec::giveWidth(), oofem::min(), and rootCell.
|
protected |
Returns the node closest to the given point within the cell.
currCell | Terminal cell to look in. | |
gcoords | Point coordinates. | |
[in,out] | minDist | Distance from the center of returned element. |
answer | Requested node. |
Definition at line 1511 of file octreelocalizer.C.
References oofem::FloatArray::distance_square(), oofem::SpatialLocalizer::domain, oofem::Node::giveCoordinates(), oofem::Domain::giveNode(), and oofem::OctantRec::giveNodeList().
Referenced by giveNodeClosestToPoint().
|
protected |
Returns container (list) of nodes within given box and given root cell.
nodeList | Answer containing the list of nodes meeting the criteria. |
currentCell | The starting cell to be transversed. |
coords | Center of box of interest. |
radius | Radius of bounding sphere. |
Definition at line 1530 of file octreelocalizer.C.
References oofem::IntArray::at(), oofem::OctantRec::BBS_ContainsCell, oofem::OctantRec::BBS_InsideCell, oofem::FloatArray::distance(), oofem::SpatialLocalizer::domain, oofem::OctantRec::giveChild(), oofem::Node::giveCoordinates(), oofem::Domain::giveNode(), oofem::OctantRec::giveNodeList(), oofem::OctantRec::isTerminalOctant(), octreeMask, oofem::FloatArray::push_back(), and oofem::OctantRec::testBoundingBox().
Referenced by giveAllNodesWithinBox().
|
inline |
Returns the octreeMask value given by the index.
indx | Index of mask. |
Definition at line 207 of file octreelocalizer.h.
References oofem::IntArray::at().
Referenced by oofem::OctantRec::giveChildContainingPoint(), and oofem::OctantRec::testBoundingBox().
|
virtual |
Initialize receiver data structure if not done previously.
Current implementation calls and returns the buildOctreeDataStructure service response.
Reimplemented from oofem::SpatialLocalizer.
Definition at line 1615 of file octreelocalizer.C.
References buildOctreeDataStructure(), elementIPListsInitialized, elementListsInitialized, rootCell, and oofem::IntArray::zero().
Referenced by buildOctreeDataStructure(), giveAllElementsWithIpWithinBox_EvenIfEmpty(), giveAllNodesWithinBox(), giveClosestIP(), giveElementContainingPoint(), and initElementDataStructure().
|
protected |
Insert element into tree (the tree topology is determined by nodes).
Definition at line 428 of file octreelocalizer.C.
References oofem::SpatialLocalizer::domain, elementListsInitialized, oofem::SpatialLocalizer::giveDomain(), oofem::Domain::giveElement(), oofem::FEMComponent::giveInterface(), oofem::Domain::giveNumberOfElements(), oofem::Element::giveRegionNumber(), oofem::IntArray::giveSize(), init(), insertElementIntoOctree(), rootCell, oofem::SpatialLocalizerInterface::SpatialLocalizerI_giveBBox(), and oofem::SpatialLocalizerInterfaceType.
Referenced by giveElementClosestToPoint().
|
protected |
Insert IP records into tree (the tree topology is determined by nodes).
Definition at line 367 of file octreelocalizer.C.
References oofem::Element::computeGlobalCoordinates(), oofem::SpatialLocalizer::domain, elementIPListsInitialized, oofem::Node::giveCoordinates(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::SpatialLocalizer::giveDomain(), oofem::Domain::giveElement(), oofem::Element::giveNode(), oofem::Domain::giveNumberOfElements(), oofem::Element::giveNumberOfIntegrationRules(), oofem::Element::giveNumberOfNodes(), insertIPElementIntoOctree(), OOFEM_ERROR, and rootCell.
Referenced by giveAllElementsWithIpWithinBox_EvenIfEmpty(), giveClosestIP(), and giveElementContainingPoint().
|
protected |
Inserts an element with the given bounding box.
rootCell | Starting cell for insertion. |
region | Element region number. |
elemNum | Element number. |
b0 | Lower bounding box. |
b1 | Upper bounding box. |
Definition at line 452 of file octreelocalizer.C.
References oofem::OctantRec::addElement(), oofem::IntArray::at(), oofem::FloatArray::at(), oofem::OctantRec::giveChild(), oofem::OctantRec::giveOrigin(), oofem::FloatArray::giveSize(), oofem::OctantRec::isTerminalOctant(), and octreeMask.
Referenced by initElementDataStructure().
|
protected |
Initializes the element lists in octree data structure.
This implementation requires that the list of nodes in terminate cells exists simply all shared elements to nodes in terminal cell are added. If this is added to existing implementation based on adding elements only if integration point is in the cell. this leads to more complete element list in terminal cell.
rootCell | Starting cell for octree transversal. |
Definition at line 496 of file octreelocalizer.C.
References oofem::OctantRec::addElementIP(), oofem::IntArray::at(), oofem::SpatialLocalizer::domain, oofem::OctantRec::giveChild(), oofem::Domain::giveConnectivityTable(), oofem::ConnectivityTable::giveDofManConnectivityArray(), oofem::OctantRec::giveNodeList(), oofem::OctantRec::isTerminalOctant(), and octreeMask.
|
protected |
Inserts the given integration point (or more precisely the element owning it) to the octree data structure.
The tree is traversed until terminal octant containing given position (ip coordinates) is found and corresponding entry is then inserted into corresponding octant list.
rootCell | Starting cell for insertion. |
elemNum | Element number. |
coords | Global IP coordinates. |
Definition at line 418 of file octreelocalizer.C.
References oofem::OctantRec::addElementIP(), and findTerminalContaining().
Referenced by initElementIPDataStructure().
|
protected |
Inserts the given node (identified by its number and position) to the octree structure.
The tree is traversed until terminal octant containing given position is found and node is then inserted into octant nodal list. If there is too much nodes per cell, this is subdivided further and its assigned nodes are propagated to children.
rootCell | Starting cell for insertion. |
nodeNum | Node number. |
coords | Corresponding node coordinates. |
Definition at line 523 of file octreelocalizer.C.
References oofem::OctantRec::addNode(), oofem::OctantRec::CS_ChildFound, oofem::OctantRec::deleteNodeList(), oofem::OctantRec::divideLocally(), oofem::SpatialLocalizer::domain, findTerminalContaining(), oofem::OctantRec::giveCellDepth(), oofem::OctantRec::giveChildContainingPoint(), oofem::Node::giveCoordinates(), oofem::Domain::giveNode(), oofem::OctantRec::giveNodeList(), OCTREE_MAX_DEPTH, OCTREE_MAX_NODES_LIMIT, octreeMask, and OOFEM_ERROR.
Referenced by buildOctreeDataStructure().
|
protected |
Flag indicating elementIP tables are initialized.
Definition at line 193 of file octreelocalizer.h.
Referenced by buildOctreeDataStructure(), init(), initElementIPDataStructure(), and OctreeSpatialLocalizer().
|
protected |
Definition at line 194 of file octreelocalizer.h.
Referenced by buildOctreeDataStructure(), init(), initElementDataStructure(), and OctreeSpatialLocalizer().
|
protected |
Octree degenerate mask.
Definition at line 191 of file octreelocalizer.h.
Referenced by buildOctreeDataStructure(), giveClosestIPWithinOctant(), giveElementContainingPoint(), giveElementsWithIPWithinBox(), giveListOfTerminalCellsInBoundingBox(), giveMaxTreeDepthFrom(), giveNodesWithinBox(), insertElementIntoOctree(), insertElementsUsingNodalConnectivitiesIntoOctree(), and insertNodeIntoOctree().
|
protected |
Root cell of octree.
Definition at line 189 of file octreelocalizer.h.
Referenced by buildOctreeDataStructure(), giveAllElementsWithIpWithinBox_EvenIfEmpty(), giveAllNodesWithinBox(), giveClosestIP(), giveElementClosestToPoint(), giveElementContainingPoint(), giveNodeClosestToPoint(), init(), initElementDataStructure(), initElementIPDataStructure(), OctreeSpatialLocalizer(), and ~OctreeSpatialLocalizer().