OOFEM 3.0
Loading...
Searching...
No Matches
oofem::DummySpatialLocalizer Class Reference

#include <dummylocalizer.h>

Inheritance diagram for oofem::DummySpatialLocalizer:
Collaboration diagram for oofem::DummySpatialLocalizer:

Public Member Functions

 DummySpatialLocalizer (Domain *d)
 Constructor.
virtual ~DummySpatialLocalizer ()
 Destructor.
int init (bool force=false) override
ElementgiveElementContainingPoint (const FloatArray &coords, const IntArray *regionList=nullptr) override
ElementgiveElementClosestToPoint (FloatArray &lcoords, FloatArray &closest, const FloatArray &coords, int region=0) override
GaussPointgiveClosestIP (const FloatArray &coords, int region, bool iCohesiveZoneGP=false) override
void giveAllElementsWithIpWithinBox (elementContainerType &elemSet, const FloatArray &coords, const double radius) override
void giveAllNodesWithinBox (nodeContainerType &nodeList, const FloatArray &coords, const double radius) override
NodegiveNodeClosestToPoint (const FloatArray &coords, double maxDist) override
const char * giveClassName () const override
Public Member Functions inherited from oofem::SpatialLocalizer
 SpatialLocalizer (Domain *d)
 Constructor.
virtual ~SpatialLocalizer ()
DomaingiveDomain ()
 Returns the domain that localizer acts on.
virtual ElementgiveElementContainingPoint (const FloatArray &coords, const Set &eset)=0
virtual GaussPointgiveClosestIP (const FloatArray &coords, Set &elemSet, bool iCohesiveZoneGP=false)=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)
std::string errorInfo (const char *func) const
 Error printing helper.

Protected Attributes

std ::vector< IntArrayregion_elements
bool initialized
Protected Attributes inherited from oofem::SpatialLocalizer
Domaindomain
 Link to domain object.

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.
typedef std ::list< int > nodeContainerType
 Typedefs to introduce the container type for nodal numbers, returned by some services.

Detailed Description

The dummy implementation of spatial localizer based on traversing the whole domain. 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 51 of file dummylocalizer.h.

Constructor & Destructor Documentation

◆ DummySpatialLocalizer()

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

Constructor.

Definition at line 59 of file dummylocalizer.h.

References initialized, region_elements, and oofem::SpatialLocalizer::SpatialLocalizer().

◆ ~DummySpatialLocalizer()

virtual oofem::DummySpatialLocalizer::~DummySpatialLocalizer ( )
inlinevirtual

Destructor.

Definition at line 61 of file dummylocalizer.h.

Member Function Documentation

◆ giveAllElementsWithIpWithinBox()

void oofem::DummySpatialLocalizer::giveAllElementsWithIpWithinBox ( elementContainerType & elemSet,
const FloatArray & coords,
const double radius )
overridevirtual

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.

Implements oofem::SpatialLocalizer.

Definition at line 185 of file dummylocalizer.C.

References oofem::Element::computeGlobalCoordinates(), oofem::distance(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::SpatialLocalizer::giveDomain(), and oofem::IntArray::insertSortedOnce().

◆ giveAllNodesWithinBox()

void oofem::DummySpatialLocalizer::giveAllNodesWithinBox ( nodeContainerType & nodeList,
const FloatArray & coords,
const double radius )
overridevirtual

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.

Implements oofem::SpatialLocalizer.

Definition at line 206 of file dummylocalizer.C.

References oofem::distance(), oofem::DofManager::giveCoordinates(), and oofem::SpatialLocalizer::giveDomain().

◆ giveClassName()

const char * oofem::DummySpatialLocalizer::giveClassName ( ) const
inlineoverridevirtual

Implements oofem::SpatialLocalizer.

Definition at line 72 of file dummylocalizer.h.

◆ giveClosestIP()

GaussPoint * oofem::DummySpatialLocalizer::giveClosestIP ( const FloatArray & coords,
int region,
bool iCohesiveZoneGP = false )
overridevirtual

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

Implements oofem::SpatialLocalizer.

Definition at line 160 of file dummylocalizer.C.

References oofem::distance(), and oofem::SpatialLocalizer::giveDomain().

◆ giveElementClosestToPoint()

Element * oofem::DummySpatialLocalizer::giveElementClosestToPoint ( FloatArray & lcoords,
FloatArray & closest,
const FloatArray & coords,
int region = 0 )
overridevirtual

Returns the element closest to a given point.

Parameters
[out]lcoordsLocal coordinates in element found.
[out]closestGlobal coordinates for found point.
coordsGlobal problem coordinates of point of interest.
regionOnly elements within given region are considered, if 0 all regions are considered.
Returns
The element belonging to associated domain, close to given point, NULL otherwise.

Implements oofem::SpatialLocalizer.

Definition at line 104 of file dummylocalizer.C.

References oofem::IntArray::at(), oofem::FloatArray::clear(), oofem::SpatialLocalizer::domain, oofem::SpatialLocalizer::giveDomain(), oofem::FEMComponent::giveInterface(), oofem::Element::giveRegionNumber(), oofem::IntArray::giveSize(), region_elements, and oofem::SpatialLocalizerInterfaceType.

◆ giveElementContainingPoint()

Element * oofem::DummySpatialLocalizer::giveElementContainingPoint ( const FloatArray & coords,
const IntArray * regionList = nullptr )
overridevirtual

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.

Implements oofem::SpatialLocalizer.

Definition at line 80 of file dummylocalizer.C.

References oofem::SpatialLocalizer::domain, oofem::IntArray::findFirstIndexOf(), and oofem::SpatialLocalizerInterfaceType.

◆ giveNodeClosestToPoint()

Node * oofem::DummySpatialLocalizer::giveNodeClosestToPoint ( const FloatArray & coords,
double maxDist )
overridevirtual

Returns the node closest to the given coordinate.

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

Implements oofem::SpatialLocalizer.

Definition at line 222 of file dummylocalizer.C.

References oofem::distance(), oofem::DofManager::giveCoordinates(), and oofem::SpatialLocalizer::giveDomain().

◆ init()

int oofem::DummySpatialLocalizer::init ( bool force = false)
overridevirtual

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 from oofem::SpatialLocalizer.

Definition at line 44 of file dummylocalizer.C.

References oofem::IntArray::at(), oofem::SpatialLocalizer::domain, oofem::Element::giveRegionNumber(), initialized, region_elements, and oofem::IntArray::zero().

Member Data Documentation

◆ initialized

bool oofem::DummySpatialLocalizer::initialized
protected

Definition at line 55 of file dummylocalizer.h.

Referenced by DummySpatialLocalizer(), and init().

◆ region_elements

std :: vector< IntArray > oofem::DummySpatialLocalizer::region_elements
protected

Definition at line 54 of file dummylocalizer.h.

Referenced by DummySpatialLocalizer(), giveElementClosestToPoint(), and init().


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