LBIBCell
|
The fastneighborlist class is a class template putting objects of type T into a celllist data structur for efficient range queries. More...
#include <FastNeighborList.hpp>
Public Member Functions | |
fastneighborlist (const double LX, const double LY, const unsigned int NX, const unsigned int NY) | |
fastneighborlist Constructor More... | |
void | addElement (T element) |
addElement Adds an element into the fastneighborlist data structure. More... | |
bool | removeElement (T element) |
removeElement Removes an element from the fastneighborlist data structure. More... | |
void | reset (std::map< unsigned int, T > elementmap) |
Completely rebuilds the fastneighborlist. T must expose getXPos(), getYPos() More... | |
void | getGeometryNodesWithinRadius (std::vector< T > &queryresult, const double posx, const double posy, const double radius) const |
range query, returns all elements wich are within the radius. More... | |
void | getGeometryNodesWithinRadiusWithAvoidance (std::vector< T > &queryresult, const double posx, const double posy, const double radius, const unsigned int avoidDomainID) const |
range query, but only nodes with domainID different from avoidDomainID More... | |
void | getGeometryNodesWithinRadiusWithAvoidanceClosest (std::vector< T > &queryresult, const double posx, const double posy, const double radius, const unsigned int avoidDomainID) const |
return closest GeometryNode, but only nodes with domainID different from avoidDomainID More... | |
void | displayContent () const |
displayContent Displays all the content in form [xindex,yindex]: (posx,posy) ... | |
The fastneighborlist class is a class template putting objects of type T into a celllist data structur for efficient range queries.
Definition at line 76 of file FastNeighborList.hpp.
UtilLib::geometry::fastneighborlist< T >::fastneighborlist | ( | const double | LX, |
const double | LY, | ||
const unsigned int | NX, | ||
const unsigned int | NY | ||
) |
fastneighborlist Constructor
LX | The x domain size. |
LY | The y domain size. |
NX | The number of bins in x direction. |
NY | The number of bins in y direction. |
Definition at line 227 of file FastNeighborList.hpp.
void UtilLib::geometry::fastneighborlist< T >::addElement | ( | T | element | ) |
addElement Adds an element into the fastneighborlist data structure.
element | The element to add. |
Definition at line 245 of file FastNeighborList.hpp.
void UtilLib::geometry::fastneighborlist< T >::getGeometryNodesWithinRadius | ( | std::vector< T > & | queryresult, |
const double | posx, | ||
const double | posy, | ||
const double | radius | ||
) | const |
range query, returns all elements wich are within the radius.
queryresult | vector reference to store the result in. will be emptied beforehand. |
posx | The x coordinate. |
posy | The ycoordinate. |
radius | The radius to search within. |
Definition at line 404 of file FastNeighborList.hpp.
void UtilLib::geometry::fastneighborlist< T >::getGeometryNodesWithinRadiusWithAvoidance | ( | std::vector< T > & | queryresult, |
const double | posx, | ||
const double | posy, | ||
const double | radius, | ||
const unsigned int | avoidDomainID | ||
) | const |
range query, but only nodes with domainID different from avoidDomainID
queryresult | vector reference to store the result in. will be emptied beforehand. |
posx | The x coordinate. |
posy | The ycoordinate. |
radius | The radius to search within. |
avoidDomainID | The domainID to be avoided when returning *GeometryNode*s. |
Definition at line 426 of file FastNeighborList.hpp.
void UtilLib::geometry::fastneighborlist< T >::getGeometryNodesWithinRadiusWithAvoidanceClosest | ( | std::vector< T > & | queryresult, |
const double | posx, | ||
const double | posy, | ||
const double | radius, | ||
const unsigned int | avoidDomainID | ||
) | const |
return closest GeometryNode, but only nodes with domainID different from avoidDomainID
queryresult | vector reference to store the result in. will be emptied beforehand. |
posx | The x coordinate. |
posy | The ycoordinate. |
radius | The radius to search within. |
avoidDomainID | The domainID to be avoided when returning *GeometryNode*s. |
Definition at line 447 of file FastNeighborList.hpp.
bool UtilLib::geometry::fastneighborlist< T >::removeElement | ( | T | element | ) |
removeElement Removes an element from the fastneighborlist data structure.
element | The element which shall be removed. |
Definition at line 254 of file FastNeighborList.hpp.
void UtilLib::geometry::fastneighborlist< T >::reset | ( | std::map< unsigned int, T > | elementmap | ) |
Completely rebuilds the fastneighborlist. T must expose getXPos(), getYPos()
elementmap | The map containing the elements{GeometryNodeID, std::shared_ptr<nodes::GeometryNode>} |
Definition at line 394 of file FastNeighborList.hpp.