OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
The dummy implementation of spatial localizer based on traversing the whole domain. More...
#include <dummylocalizer.h>
Public Member Functions | |
DummySpatialLocalizer (Domain *d) | |
Constructor. More... | |
virtual | ~DummySpatialLocalizer () |
Destructor. 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 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 * | giveElementClosestToPoint (FloatArray &lcoords, FloatArray &closest, const FloatArray &coords, int region=0) |
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 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 | 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 Element * | giveElementContainingPoint (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 GaussPoint * | giveClosestIP (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_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... | |
std::string | errorInfo (const char *func) const |
Error printing helper. More... | |
Protected Attributes | |
std::vector< IntArray > | region_elements |
bool | initialized |
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 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.
|
inline |
Constructor.
Definition at line 59 of file dummylocalizer.h.
|
inlinevirtual |
Destructor.
Definition at line 61 of file dummylocalizer.h.
|
virtual |
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 185 of file dummylocalizer.C.
References oofem::Element::computeGlobalCoordinates(), oofem::FloatArray::distance(), oofem::Element::giveDefaultIntegrationRulePtr(), oofem::SpatialLocalizer::giveDomain(), oofem::Domain::giveElement(), oofem::Domain::giveNumberOfElements(), and oofem::IntArray::insertSortedOnce().
|
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 206 of file dummylocalizer.C.
References oofem::FloatArray::distance(), oofem::Node::giveCoordinates(), oofem::Domain::giveDofManager(), oofem::SpatialLocalizer::giveDomain(), and oofem::Domain::giveNumberOfDofManagers().
|
inlinevirtual |
Implements oofem::SpatialLocalizer.
Definition at line 72 of file dummylocalizer.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 160 of file dummylocalizer.C.
References oofem::FloatArray::distance(), and oofem::SpatialLocalizer::giveDomain().
|
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 104 of file dummylocalizer.C.
References oofem::IntArray::at(), oofem::FloatArray::clear(), oofem::SpatialLocalizer::domain, oofem::SpatialLocalizer::giveDomain(), oofem::Domain::giveElement(), oofem::FEMComponent::giveInterface(), oofem::Domain::giveNumberOfElements(), oofem::Element::giveRegionNumber(), oofem::IntArray::giveSize(), region_elements, oofem::SpatialLocalizerInterface::SpatialLocalizerI_giveClosestPoint(), and oofem::SpatialLocalizerInterfaceType.
|
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 80 of file dummylocalizer.C.
References oofem::SpatialLocalizer::domain, oofem::IntArray::findFirstIndexOf(), oofem::Domain::giveElements(), and oofem::SpatialLocalizerInterfaceType.
|
virtual |
Returns the node closest to the given coordinate.
coords | Global coordinate. |
Implements oofem::SpatialLocalizer.
Definition at line 222 of file dummylocalizer.C.
References oofem::FloatArray::distance(), oofem::Node::giveCoordinates(), and oofem::SpatialLocalizer::giveDomain().
|
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)
Reimplemented from oofem::SpatialLocalizer.
Definition at line 44 of file dummylocalizer.C.
References oofem::IntArray::at(), oofem::SpatialLocalizer::domain, oofem::Domain::giveElement(), oofem::Domain::giveElements(), oofem::Domain::giveNumberOfElements(), oofem::Domain::giveNumberOfRegions(), oofem::Element::giveRegionNumber(), initialized, region_elements, and oofem::IntArray::zero().
|
protected |
Definition at line 55 of file dummylocalizer.h.
Referenced by init().
|
protected |
Definition at line 54 of file dummylocalizer.h.
Referenced by giveElementClosestToPoint(), and init().