OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
Functor for closest node search. More...
#include <octreelocalizert.h>
Public Member Functions | |
ClosestNode (FloatArray *pos, Domain *d) | |
Constructor. More... | |
~ClosestNode () | |
Destructor. More... | |
void | giveStartingPosition (FloatArray &position) |
Gives the starting position of the search. More... | |
bool | evaluate (int &nodeNr) |
Evaluates a node. More... | |
void | giveResult (std::list< int > &answer) |
Gives the closest nodes. More... | |
bool | isBBXStage1Defined (BoundingBox &BBXStage1) |
Stage1 means, we are looking for objects in a distance given by some boundingBox (e.g. More... | |
bool | isBBXStage2Defined (BoundingBox &BBXStage2) |
Stage2BBX is given by results of a prior search. More... | |
Protected Attributes | |
FloatArray * | startingPosition |
Domain * | domain |
int | CNindex |
double | distanceToClosestNode |
bool | initFlag |
std::list< int > | closestNodeIndices |
Functor for closest node search.
Definition at line 650 of file octreelocalizert.h.
|
inline |
Constructor.
pos | Starting position of the search |
d | Domain containing nodes |
Definition at line 667 of file octreelocalizert.h.
|
inline |
Destructor.
Definition at line 673 of file octreelocalizert.h.
|
inlinevirtual |
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.
nodeNr | Number of the node in the domain list |
Implements oofem::SL_Evaluation_Functor< int >.
Definition at line 690 of file octreelocalizert.h.
References oofem::FloatArray::distance(), oofem::Node::giveCoordinates(), and oofem::Domain::giveNode().
|
inlinevirtual |
Gives the closest nodes.
answer | List containing numbers of the closest nodes |
Implements oofem::SL_Evaluation_Functor< int >.
Definition at line 717 of file octreelocalizert.h.
|
inlinevirtual |
Gives the starting position of the search.
position | startingPosition |
Implements oofem::SL_Evaluation_Functor< int >.
Definition at line 679 of file octreelocalizert.h.
|
inlinevirtual |
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 721 of file octreelocalizert.h.
|
inlinevirtual |
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 726 of file octreelocalizert.h.
References oofem::BoundingBox::setOrigin(), and oofem::BoundingBox::setSize().
|
protected |
Definition at line 659 of file octreelocalizert.h.
|
protected |
Definition at line 655 of file octreelocalizert.h.
|
protected |
Definition at line 656 of file octreelocalizert.h.
|
protected |
Definition at line 654 of file octreelocalizert.h.
|
protected |
Definition at line 657 of file octreelocalizert.h.
|
protected |
Definition at line 653 of file octreelocalizert.h.