22 #ifndef __NEIGHBOUR_SEARCHER_H__
23 #define __NEIGHBOUR_SEARCHER_H__
28 typedef __int32 int32_t;
29 typedef unsigned __int32 uint32_t;
30 typedef __int64 int64_t;
31 typedef unsigned __int64 uint64_t;
83 virtual int buildSearchStructure(
const double* x,
const double* y,
const double* z,
size_t numParticles) = 0;
99 virtual int buildSearchStructure(
const double* x,
const double* y,
const double* z,
size_t begin,
size_t numParticles) = 0;
124 virtual int searchNeighbour(
const double x,
const double y,
const double z,
const double radius,
int* result,
double* distance,
size_t& result_length,
int tid,
int index = -1) = 0;
147 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;
199 OctreeSearcher(
size_t maxParticleNum,
size_t maxNeighbourNum,
int treedepth);
213 for(
int i=0 ; i<m_iTheadNum ; i++) {
214 delete[] m_pSearchResult[i];
216 delete[] m_pSearchResult;
218 delete[] m_pSearchResult;
255 virtual int buildSearchStructure(
const double* x,
const double* y,
const double* z,
size_t begin,
size_t numParticles);
281 virtual int searchNeighbour(
const double x,
const double y,
const double z,
const double radius,
int* result,
double* distance,
size_t& result_length,
int tid,
int index = -1);
304 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);
311 size_t m_iMaxParticleNum;
312 size_t m_iMaxNeighborNum;
OctreeSearcher(const Initializer &init)
Constructor.
Definition: neighbour_searcher.cpp:21
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)
Searches the nearest neighbours for a particle on the built Octree object.
Definition: neighbour_searcher.cpp:131
An abstract class for the family of classes that performs the task of nearest neighbour search for pa...
Definition: neighbour_searcher.h:64
This class contains the Octree data structure and algorithm for nearest neighbour search of particles...
Definition: octree.h:94
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 ayyay...
virtual ~OctreeSearcher()
Destructor.
Definition: neighbour_searcher.h:210
This class initializes the simulation.
Definition: initializer.h:227
This header file contains classes for the Octree data structure and nearest neighbour search algorith...
A simple struct for the neighbour search result.
Definition: octree.h:52
A class that searches nearest neighbours of particles based on the Octree data structure and algorith...
Definition: neighbour_searcher.h:174
virtual ~NeighbourSearcher()
Destructor.
Definition: neighbour_searcher.h:69
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.
virtual int buildSearchStructure(const double *x, const double *y, const double *z, size_t numParticles)
Build an Octree object for the nearest neighbour search, based on the input particle location ayyays ...
Definition: neighbour_searcher.h:236