SpatialLocalizer Class Reference

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

#include <spatiallocalizer.h>

Inheritance diagram for SpatialLocalizer:

Inheritance graph
[legend]
Collaboration diagram for SpatialLocalizer:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::set< int > 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 (int n, Domain *d)
 Constructor.
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.
virtual ElementgiveElementCloseToPoint (const FloatArray &coords, const IntArray *regionList=NULL)=0
 Returns the element close to point.
virtual GaussPointgiveClosestIP (const FloatArray &coords, int region)=0
 Returns the integration point in associated domain, which is closest to given point.
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.
virtual void giveAllElementsWithNodesWithinBox (elementContainerType &elemSet, const FloatArray &coords, const double radius)
 Returns container (set) of all domain elements having node within given box.
virtual void giveAllNodesWithinBox (nodeContainerType &nodeList, const FloatArray &coords, const double radius)=0
 Returns container (list) of all domain nodes within given box.
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) Returns nonzero if successful.
virtual IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver acording to object description stored in input record.
const char * giveClassName () const
 Returns class name of the receiver.
classType giveClassID () const
 Returns classType id of receiver.


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, serching of an element containing given point, etc. If special element algorithms required, these should be included using interface concept.

Definition at line 88 of file spatiallocalizer.h.


Member Typedef Documentation

typedef std :: set< int > SpatialLocalizer::elementContainerType

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

Definition at line 97 of file spatiallocalizer.h.

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

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

Definition at line 101 of file spatiallocalizer.h.


Constructor & Destructor Documentation

SpatialLocalizer::SpatialLocalizer ( int  n,
Domain d 
) [inline]

Constructor.

Definition at line 105 of file spatiallocalizer.h.


Member Function Documentation

virtual Element* SpatialLocalizer::giveElementContainingPoint ( const FloatArray coords,
const IntArray regionList = NULL 
) [pure virtual]

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

Parameters:
coords global problem coordinates of point of interest
regionList only 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 DummySpatialLocalizer, and OctreeSpatialLocalizer.

Referenced by MMALeastSquareProjection::__init(), MMAContainingElementProjection::__init(), MMAShapeFunctProjection::__mapVariable(), PrimaryField::evaluateAt(), EIPrimaryUnknownMapper::evaluateAt(), POIExportModule::exportPrimVarAs(), LevelSetPCS::giveMaterialMixtureAt(), and LEPlic::giveMaterialMixtureAt().

virtual Element* SpatialLocalizer::giveElementCloseToPoint ( const FloatArray coords,
const IntArray regionList = NULL 
) [pure virtual]

Returns the element close to point.

Parameters:
coords global problem coordinates of point of interest
regionList only elements within given regions are considered, if NULL all regions are considered.
Returns:
the element belonging to associated domain, close to given point, NULL otherwise

Implemented in DummySpatialLocalizer, and OctreeSpatialLocalizer.

Referenced by EIPrimaryUnknownMapper::evaluateAt().

virtual GaussPoint* SpatialLocalizer::giveClosestIP ( const FloatArray coords,
int  region 
) [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:
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
Returns:
the IP belonging to associated domain (only those provided by elements in default integration rule are taken into acount), NULL otherwise

Implemented in DummySpatialLocalizer, and OctreeSpatialLocalizer.

Referenced by MMALeastSquareProjection::__init(), and MMAClosestIPTransfer::__init().

virtual void 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:
elemSet answer containing the list of elements meeting the criteria
coords center of box of interest
radius radius of bounding sphere

Referenced by NonlocalMaterialExtensionInterface::buildNonlocalPointTable().

void SpatialLocalizer::giveAllElementsWithNodesWithinBox ( elementContainerType elemSet,
const FloatArray coords,
const double  radius 
) [virtual]

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

Parameters:
elemSet answer containing the list of elements meeting the criteria
coords center of box of interest
radius radius of bounding sphere

Definition at line 104 of file spatiallocalizer.C.

References IntArray::at(), FEMComponent::domain, giveAllNodesWithinBox(), Domain::giveConnectivityTable(), ConnectivityTable::giveDofManConnectivityArray(), and IntArray::giveSize().

Referenced by NonlocalMaterialExtensionInterface::buildNonlocalPointTable().

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

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

Parameters:
NODESet answer containing the list of nodes meeting the criteria
coords center of box of interest
radius radius of bounding sphere

Referenced by giveAllElementsWithNodesWithinBox().

virtual int SpatialLocalizer::init ( bool  force = false  )  [inline, virtual]

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 OctreeSpatialLocalizer.

Definition at line 164 of file spatiallocalizer.h.

Referenced by Domain::commitTransactions().

virtual IRResultType SpatialLocalizer::initializeFrom ( InputRecord ir  )  [inline, virtual]

Initializes receiver acording to object description stored in input record.

This function is called immediately after creating object using constructor. Input record can be imagined as data record in component database belonging to receiver. Receiver may use value-name extracting functions to extract particular field from record.

See also:
readInteger, readDouble and similar functions

Implements FEMComponent.

Definition at line 172 of file spatiallocalizer.h.

References IRRT_OK.

const char* SpatialLocalizer::giveClassName (  )  const [inline, virtual]

Returns class name of the receiver.

Implements FEMComponent.

Reimplemented in DummySpatialLocalizer, and OctreeSpatialLocalizer.

Definition at line 174 of file spatiallocalizer.h.

classType SpatialLocalizer::giveClassID (  )  const [inline, virtual]

Returns classType id of receiver.

See also:
FEMComponent::giveClassID

Reimplemented from FEMComponent.

Reimplemented in DummySpatialLocalizer, and OctreeSpatialLocalizer.

Definition at line 178 of file spatiallocalizer.h.

References SpatialLocalizerClass.


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

This page is part of the OOFEM documentation. Copyright (c) 2003 Borek Patzak
Project e-mail: info@oofem.org
Generated at Mon Aug 24 11:54:01 2009 for OOFEM by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2001