OOFEM 3.0
Loading...
Searching...
No Matches
oofem::SpatialLocalizer Class Referenceabstract

#include <spatiallocalizer.h>

Inheritance diagram for oofem::SpatialLocalizer:
Collaboration diagram for oofem::SpatialLocalizer:

Public Types

typedef IntArray elementContainerType
 Typedefs to introduce the container type for element numbers, returned by some services.
typedef std ::list< int > nodeContainerType
 Typedefs to introduce the container type for nodal numbers, returned by some services.

Public Member Functions

 SpatialLocalizer (Domain *d)
 Constructor.
virtual ~SpatialLocalizer ()
DomaingiveDomain ()
 Returns the domain that localizer acts on.
virtual ElementgiveElementContainingPoint (const FloatArray &coords, const IntArray *regionList=nullptr)=0
virtual ElementgiveElementContainingPoint (const FloatArray &coords, const Set &eset)=0
virtual ElementgiveElementClosestToPoint (FloatArray &lcoords, FloatArray &closest, const FloatArray &coords, int region=0)=0
virtual GaussPointgiveClosestIP (const FloatArray &coords, int region, bool iCohesiveZoneGP=false)=0
virtual GaussPointgiveClosestIP (const FloatArray &coords, Set &elemSet, bool iCohesiveZoneGP=false)=0
virtual void giveAllElementsWithIpWithinBox (elementContainerType &elemSet, const FloatArray &coords, const double radius)=0
virtual void giveAllElementsWithIpWithinBox_EvenIfEmpty (elementContainerType &elemSet, const FloatArray &coords, const double radius)=0
virtual void giveAllElementsWithNodesWithinBox (elementContainerType &elemSet, const FloatArray &coords, const double radius)
virtual void giveAllNodesWithinBox (nodeContainerType &nodeList, const FloatArray &coords, const double radius)=0
virtual NodegiveNodeClosestToPoint (const FloatArray &coords, double maxDist)=0
virtual int init (bool force=false)
virtual const char * giveClassName () const =0
std::string errorInfo (const char *func) const
 Error printing helper.

Protected Attributes

Domaindomain
 Link to domain object.

Detailed Description

The base class for all spatial localizers. The basic task is to provide spatial information and localization for domain, to which receiver is associated. 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 110 of file spatiallocalizer.h.

Member Typedef Documentation

◆ elementContainerType

Typedefs to introduce the container type for element numbers, returned by some services.

Definition at line 118 of file spatiallocalizer.h.

◆ nodeContainerType

typedef std :: list< int > oofem::SpatialLocalizer::nodeContainerType

Typedefs to introduce the container type for nodal numbers, returned by some services.

Definition at line 120 of file spatiallocalizer.h.

Constructor & Destructor Documentation

◆ SpatialLocalizer()

oofem::SpatialLocalizer::SpatialLocalizer ( Domain * d)
inline

◆ ~SpatialLocalizer()

virtual oofem::SpatialLocalizer::~SpatialLocalizer ( )
inlinevirtual

Definition at line 125 of file spatiallocalizer.h.

Member Function Documentation

◆ errorInfo()

std::string oofem::SpatialLocalizer::errorInfo ( const char * func) const
inline

Error printing helper.

Definition at line 229 of file spatiallocalizer.h.

References giveClassName().

◆ giveAllElementsWithIpWithinBox()

virtual void oofem::SpatialLocalizer::giveAllElementsWithIpWithinBox ( elementContainerType & elemSet,
const FloatArray & coords,
const double radius )
pure virtual

Returns container (set) of all domain elements having integration point within given box.

Parameters
elemSetAnswer containing the list of elements meeting the criteria.
coordsCenter of box of interest.
radiusRadius of bounding sphere.

Implemented in oofem::DummySpatialLocalizer, and oofem::OctreeSpatialLocalizer.

Referenced by oofem::PLHoopStressCirc::propagateInterface(), and oofem::PLPrincipalStrain::propagateInterface().

◆ giveAllElementsWithIpWithinBox_EvenIfEmpty()

virtual void oofem::SpatialLocalizer::giveAllElementsWithIpWithinBox_EvenIfEmpty ( elementContainerType & elemSet,
const FloatArray & coords,
const double radius )
pure virtual

Returns container (set) of all domain elements having integration point within given box, even if this set is empty.

Parameters
elemSetAnswer containing the list of elements meeting the criteria.
coordsCenter of box of interest.
radiusRadius of bounding sphere.

Implemented in oofem::OctreeSpatialLocalizer.

References giveAllElementsWithNodesWithinBox().

◆ giveAllElementsWithNodesWithinBox()

void oofem::SpatialLocalizer::giveAllElementsWithNodesWithinBox ( elementContainerType & elemSet,
const FloatArray & coords,
const double radius )
virtual

Returns container (set) of all domain elements having node within given box.

Parameters
elemSetAnswer containing the list of elements meeting the criteria.
coordsCenter of box of interest.
radiusRadius of bounding sphere.

Definition at line 101 of file spatiallocalizer.C.

References oofem::IntArray::at(), oofem::IntArray::clear(), domain, giveAllNodesWithinBox(), oofem::ConnectivityTable::giveDofManConnectivityArray(), oofem::IntArray::giveSize(), and oofem::IntArray::insertSortedOnce().

Referenced by oofem::MaterialForceEvaluator::computeMaterialForce(), giveAllElementsWithIpWithinBox_EvenIfEmpty(), and oofem::GeometryBasedEI::updateNodeEnrMarker().

◆ giveAllNodesWithinBox()

virtual void oofem::SpatialLocalizer::giveAllNodesWithinBox ( nodeContainerType & nodeList,
const FloatArray & coords,
const double radius )
pure virtual

Returns container (list) of all domain nodes within given box.

Parameters
nodeListAnswer containing the list of nodes meeting the criteria.
coordsCenter of box of interest.
radiusRadius of bounding sphere.

Implemented in oofem::DummySpatialLocalizer, and oofem::OctreeSpatialLocalizer.

Referenced by oofem::Delamination::findInitiationFronts(), giveAllElementsWithNodesWithinBox(), oofem::PLCZdamageRadius::propagateInterface(), oofem::PLnodeRadius::propagateInterface(), and oofem::GeometryBasedEI::updateLevelSets().

◆ giveClassName()

virtual const char * oofem::SpatialLocalizer::giveClassName ( ) const
pure virtual

◆ giveClosestIP() [1/2]

virtual GaussPoint * oofem::SpatialLocalizer::giveClosestIP ( const FloatArray & coords,
int region,
bool iCohesiveZoneGP = false )
pure 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.

Note
{Only the gp belonging to the given region are taken into account.}
Parameters
coordsGlobal problem coordinates of point of interest
regionIf value > 0 then only closet point from given region will be considered, if value < 0 all regions will be valid
Returns
The IP belonging to associated domain (only those provided by elements in default integration rule are taken into account), NULL otherwise
Note
: regions are deprecated, use sets instaed

Implemented in oofem::DummySpatialLocalizer, and oofem::OctreeSpatialLocalizer.

Referenced by oofem::MMAClosestIPTransfer::__init(), oofem::MMALeastSquareProjection::__init(), oofem::PLHoopStressCirc::propagateInterface(), and oofem::PLPrincipalStrain::propagateInterface().

◆ giveClosestIP() [2/2]

virtual GaussPoint * oofem::SpatialLocalizer::giveClosestIP ( const FloatArray & coords,
Set & elemSet,
bool iCohesiveZoneGP = false )
pure 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.

Note
{Only the gp belonging to the given set are taken into account.}
Parameters
coordsGlobal problem coordinates of point of interest
regionOnly closet point from given region will be considered
Returns
The IP belonging to associated domain (only those provided by elements in default integration rule are taken into account), NULL otherwise

Implemented in oofem::OctreeSpatialLocalizer.

◆ giveDomain()

◆ giveElementClosestToPoint()

virtual Element * oofem::SpatialLocalizer::giveElementClosestToPoint ( FloatArray & lcoords,
FloatArray & closest,
const FloatArray & coords,
int region = 0 )
pure virtual

◆ giveElementContainingPoint() [1/2]

virtual Element * oofem::SpatialLocalizer::giveElementContainingPoint ( const FloatArray & coords,
const IntArray * regionList = nullptr )
pure virtual

Returns the element, containing given point and belonging to one of the region in region list.

Parameters
coordsGlobal problem coordinates of point of interest.
regionListOnly elements within given regions are considered, if NULL all regions are considered.
Returns
The element belonging to associated domain, containing given point, NULL otherwise.

Implemented in oofem::DummySpatialLocalizer, and oofem::OctreeSpatialLocalizer.

Referenced by oofem::PrimaryField::__evaluateAt(), oofem::MMAContainingElementProjection::__init(), oofem::MMALeastSquareProjection::__init(), oofem::GeometryBasedEI::evaluateEnrFuncJumps(), oofem::EnrichmentFront::MarkTipElementNodesAsFront(), oofem::NCPrincipalStrain::nucleateEnrichmentItems(), oofem::NCPrincipalStress::nucleateEnrichmentItems(), oofem::PLCrackPrescribedDir::propagateInterface(), oofem::PLHoopStressCirc::propagateInterface(), oofem::PLPrincipalStrain::propagateInterface(), oofem::REGISTER_EnrichmentFront(), and oofem::EnrichmentItem::tipIsTouchingEI().

◆ giveElementContainingPoint() [2/2]

virtual Element * oofem::SpatialLocalizer::giveElementContainingPoint ( const FloatArray & coords,
const Set & eset )
pure virtual

Returns the element, containing given point and belonging to one of the region in region list.

Parameters
coordsGlobal problem coordinates of point of interest.
elementset Only elements within given set are considered.
Returns
The element belonging to associated domain, containing given point, NULL otherwise.

Implemented in oofem::OctreeSpatialLocalizer.

◆ giveNodeClosestToPoint()

virtual Node * oofem::SpatialLocalizer::giveNodeClosestToPoint ( const FloatArray & coords,
double maxDist )
pure virtual

Returns the node closest to the given coordinate.

Parameters
coordsGlobal coordinate.
Returns
Closest node, or NULL or none exists.

Implemented in oofem::DummySpatialLocalizer, and oofem::OctreeSpatialLocalizer.

Referenced by oofem::PrescribedGradientBCWeak::createTractionMesh(), oofem::PrescribedGradientBCPeriodic::findSlaveToMasterMap(), and oofem::TransportGradientPeriodic::findSlaveToMasterMap().

◆ init()

virtual int oofem::SpatialLocalizer::init ( bool force = false)
inlinevirtual

Initialize receiver data structure if not done previously If force is set to true, the initialization is enforced (useful if domain geometry has changed)

Returns
Nonzero if successful.

Reimplemented in oofem::DummySpatialLocalizer, and oofem::OctreeSpatialLocalizer.

Definition at line 225 of file spatiallocalizer.h.

Referenced by oofem::SolutionbasedShapeFunction::computeBaseFunctionValueAt(), oofem::FreeWarping::computeResultAtCenterOfGravity(), oofem::HangingNode::postInitialize(), and oofem::qcNode::postInitializeAsHangingNode().

Member Data Documentation

◆ domain


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011