Lagrangian Particle Code for The Simulation of 2D/3D Fluid Dynamics
|
An abstract class for the family of classes that performs the task of nearest neighbour search for particles. More...
#include <neighbour_searcher.h>
Public Member Functions | |
virtual | ~NeighbourSearcher () |
Destructor. | |
virtual int | buildSearchStructure (const double *x, const double *y, const double *z, size_t numParticles)=0 |
Build the data structure for the nearest neighbour search, based on the input particle location ayyays in the x, y, and z-coordinates and the number of particles. More... | |
virtual int | buildSearchStructure (const double *x, const double *y, const double *z, size_t begin, size_t numParticles)=0 |
Build the data structure for the nearest neighbour search, based on the input particle location arrays in the x, y, and z-coordinates, the starting point in the arrays and the number of particles. More... | |
virtual int | searchNeighbour (const double x, const double y, const double z, const double radius, int *result, double *distance, size_t &result_length, int index=-1)=0 |
Searches the nearest neighbours for a particle on the built search data structure. More... | |
An abstract class for the family of classes that performs the task of nearest neighbour search for particles.
Created on: 2014/8/22
|
pure virtual |
Build the data structure for the nearest neighbour search, based on the input particle location ayyays in the x, y, and z-coordinates and the number of particles.
The function uses the information of the input arrays in the range [0,numParticles)
[in] | x | The particle location array in the x-coordinate |
[in] | y | The particle location array in the y-coordinate |
[in] | z | The particle location array in the z-coordinate |
[in] | numParticles | The number of particles used in the particle location arrays |
Implemented in OctreeSearcher.
|
pure virtual |
Build the data structure for the nearest neighbour search, based on the input particle location arrays in the x, y, and z-coordinates, the starting point in the arrays and the number of particles.
The function uses the information of the input arrays in the range [begin,numParticles)
[in] | x | The particle location array in the x-coordinate |
[in] | y | The particle location array in the y-coordinate |
[in] | z | The particle location array in the z-coordinate |
[in] | begin | The starting point in the particle array to use to build the search structure |
[in] | numParticles | The number of particles used in the particle location arrays |
Implemented in OctreeSearcher.
|
pure virtual |
Searches the nearest neighbours for a particle on the built search data structure.
[in] | x | The location in the x-coordinate of the target particle |
[in] | y | The location in the y-coordinate of the target particle |
[in] | z | The location in the z-coordinate of the target particle |
[in] | radius | The neighbour search radius |
[out] | result | An array saving the results of neighbour search (the neighbour list), which is sorted based on the the distance (in the ascending order of distance) |
[out] | distance | An array saving the distance between the target particle and its neighbours |
[out] | result_length | The number of neighbours obtained for the target particle |
[in] | index | The index of target particle; this index is used to remove the target particle itself from its own neighbour list. The default argument is -1, which should only be used when the target particle itself is not in the search structure |
Implemented in OctreeSearcher.