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

#include <octreelocalizertutil.h>

Inheritance diagram for oofem::ClosestNode:
Collaboration diagram for oofem::ClosestNode:

Public Member Functions

 ClosestNode (const FloatArray &pos, Domain *d)
 ~ClosestNode ()
 Destructor.
void giveStartingPosition (FloatArray &position) override
bool evaluate (int &nodeNr) override
void giveResult (std ::list< int > &answer) override
bool isBBXStage1Defined (BoundingBox &BBXStage1) override
bool isBBXStage2Defined (BoundingBox &BBXStage2) override

Protected Attributes

FloatArray startingPosition
Domaindomain
int CNindex
double distanceToClosestNode
bool initFlag
std ::list< int > closestNodeIndices

Detailed Description

Functor for closest node search

Author
David Krybus

Definition at line 161 of file octreelocalizertutil.h.

Constructor & Destructor Documentation

◆ ClosestNode()

oofem::ClosestNode::ClosestNode ( const FloatArray & pos,
Domain * d )
inline

Constructor

Parameters
posStarting position of the search
dDomain containing nodes

Definition at line 178 of file octreelocalizertutil.h.

References domain, initFlag, and startingPosition.

◆ ~ClosestNode()

oofem::ClosestNode::~ClosestNode ( )
inline

Destructor.

Definition at line 184 of file octreelocalizertutil.h.

Member Function Documentation

◆ evaluate()

bool oofem::ClosestNode::evaluate ( int & nodeNr)
inlineoverridevirtual

Evaluates a node. The closest nodes are stored in a container, if their distance to starting position is the same. Is the distance smaller than previous one, the container is emptied and new node is added.

Parameters
nodeNrNumber of the node in the domain list
Returns
true after evaluation is processed.

Implements oofem::SL_Evaluation_Functor< int >.

Definition at line 201 of file octreelocalizertutil.h.

References closestNodeIndices, oofem::distance(), distanceToClosestNode, oofem::DofManager::giveCoordinates(), oofem::Domain::giveNode(), initFlag, and startingPosition.

◆ giveResult()

void oofem::ClosestNode::giveResult ( std ::list< int > & answer)
inlineoverridevirtual

Gives the closest nodes

Parameters
answerList containing numbers of the closest nodes

Implements oofem::SL_Evaluation_Functor< int >.

Definition at line 228 of file octreelocalizertutil.h.

References closestNodeIndices.

◆ giveStartingPosition()

void oofem::ClosestNode::giveStartingPosition ( FloatArray & position)
inlineoverridevirtual

Gives the starting position of the search

Parameters
positionstartingPosition

Implements oofem::SL_Evaluation_Functor< int >.

Definition at line 190 of file octreelocalizertutil.h.

References startingPosition.

◆ isBBXStage1Defined()

bool oofem::ClosestNode::isBBXStage1Defined ( BoundingBox & BBXStage1)
inlineoverridevirtual

Stage1 means, we are looking for objects in a distance given by some boundingBox (e.g. IPs around some given coordinates)

Implements oofem::SL_Evaluation_Functor< int >.

Definition at line 232 of file octreelocalizertutil.h.

◆ isBBXStage2Defined()

bool oofem::ClosestNode::isBBXStage2Defined ( BoundingBox & BBXStage2)
inlineoverridevirtual

Stage2BBX is given by results of a prior search. e.g. We found a closest point to another point in an octant, BBX is defined by the distance from each other and the found closest point. Now we have to check surrounding octants whithin this bounding, which may contain points closer to starting point.

Implements oofem::SL_Evaluation_Functor< int >.

Definition at line 237 of file octreelocalizertutil.h.

References distanceToClosestNode, initFlag, oofem::BoundingBox::setOrigin(), oofem::BoundingBox::setSize(), and startingPosition.

Member Data Documentation

◆ closestNodeIndices

std :: list< int > oofem::ClosestNode::closestNodeIndices
protected

Definition at line 170 of file octreelocalizertutil.h.

Referenced by evaluate(), and giveResult().

◆ CNindex

int oofem::ClosestNode::CNindex
protected

Definition at line 166 of file octreelocalizertutil.h.

◆ distanceToClosestNode

double oofem::ClosestNode::distanceToClosestNode
protected

Definition at line 167 of file octreelocalizertutil.h.

Referenced by evaluate(), and isBBXStage2Defined().

◆ domain

Domain* oofem::ClosestNode::domain
protected

Definition at line 165 of file octreelocalizertutil.h.

Referenced by ClosestNode().

◆ initFlag

bool oofem::ClosestNode::initFlag
protected

Definition at line 168 of file octreelocalizertutil.h.

Referenced by ClosestNode(), evaluate(), and isBBXStage2Defined().

◆ startingPosition

FloatArray oofem::ClosestNode::startingPosition
protected

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

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