OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::SpatialLocalizer Class Referenceabstract

The base class for all spatial localizers. More...

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

Public Member Functions

 SpatialLocalizer (Domain *d)
 Constructor. More...
 
virtual ~SpatialLocalizer ()
 
DomaingiveDomain ()
 Returns the domain that localizer acts on. More...
 
virtual ElementgiveElementContainingPoint (const FloatArray &coords, const IntArray *regionList=NULL)=0
 Returns the element, containing given point and belonging to one of the region in region list. More...
 
virtual ElementgiveElementContainingPoint (const FloatArray &coords, const Set &eset)=0
 Returns the element, containing given point and belonging to one of the region in region list. More...
 
virtual ElementgiveElementClosestToPoint (FloatArray &lcoords, FloatArray &closest, const FloatArray &coords, int region=0)=0
 Returns the element closest to a given point. More...
 
virtual GaussPointgiveClosestIP (const FloatArray &coords, int region, bool iCohesiveZoneGP=false)=0
 Returns the integration point in associated domain, which is closest to given point. More...
 
virtual GaussPointgiveClosestIP (const FloatArray &coords, Set &elemSet, bool iCohesiveZoneGP=false)=0
 Returns the integration point in associated domain, which is closest to given point. More...
 
virtual void giveAllElementsWithIpWithinBox (elementContainerType &elemSet, const FloatArray &coords, const double radius)=0
 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)=0
 Returns container (set) of all domain elements having integration point within given box, even if this set is empty. 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...
 
virtual void giveAllNodesWithinBox (nodeContainerType &nodeList, const FloatArray &coords, const double radius)=0
 Returns container (list) of all domain nodes within given box. More...
 
virtual NodegiveNodeClosestToPoint (const FloatArray &coords, double maxDist)=0
 Returns the node closest to the given coordinate. More...
 
virtual int init (bool force=false)
 Initialize receiver data structure if not done previously If force is set to true, the initialization is enforced (useful if domain geometry has changed) More...
 
virtual const char * giveClassName () const =0
 
std::string errorInfo (const char *func) const
 Error printing helper. More...
 

Protected Attributes

Domaindomain
 Link to domain object. More...
 

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

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

Definition at line 118 of file spatiallocalizer.h.

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

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

Constructor.

Definition at line 123 of file spatiallocalizer.h.

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

Definition at line 125 of file spatiallocalizer.h.

Member Function Documentation

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

Error printing helper.

Definition at line 229 of file spatiallocalizer.h.

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::OctreeSpatialLocalizer, and oofem::DummySpatialLocalizer.

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

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.

Referenced by oofem::NonlocalMaterialExtensionInterface::buildNonlocalPointTable().

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(), oofem::ConnectivityTable::giveDofManConnectivityArray(), oofem::IntArray::giveSize(), and oofem::IntArray::insertSortedOnce().

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

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::OctreeSpatialLocalizer, and oofem::DummySpatialLocalizer.

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

virtual const char* oofem::SpatialLocalizer::giveClassName ( ) const
pure virtual
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::OctreeSpatialLocalizer, and oofem::DummySpatialLocalizer.

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

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.

virtual Element* oofem::SpatialLocalizer::giveElementClosestToPoint ( FloatArray lcoords,
FloatArray closest,
const FloatArray coords,
int  region = 0 
)
pure virtual
virtual Element* oofem::SpatialLocalizer::giveElementContainingPoint ( const FloatArray coords,
const IntArray regionList = NULL 
)
pure virtual
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.

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::OctreeSpatialLocalizer, and oofem::DummySpatialLocalizer.

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

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::OctreeSpatialLocalizer, and oofem::DummySpatialLocalizer.

Definition at line 225 of file spatiallocalizer.h.

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

Member Data Documentation


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:41 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011