Open Qmin
0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
|
take a set of positions, sort those positions according to a cellList, and create data structures of possible neighbors of each particle More...
#include <neighborList.h>
Public Member Functions | |
neighborList (scalar range, BoxPtr _box, int subGridReduction=1) | |
basic constructor has a box and a range More... | |
void | computeNeighborLists (GPUArray< dVec > &points) |
computethe neighborlist of the set of points passed in More... | |
virtual void | setGPU (bool _useGPU=true) |
Enforce GPU operation. More... | |
void | setBox (BoxPtr _bx) |
Public Attributes | |
bool | useGPU |
whether the updater does its work on the GPU or not More... | |
BoxPtr | Box |
The Box used to compute periodic distances. More... | |
Index2D | neighborIndexer |
indexes the neighbors of each particle More... | |
GPUArray< unsigned int > | neighborsPerParticle |
An array containing the number of elements in each neighborhood. More... | |
GPUArray< int > | particleIndices |
An array containing the indices of neighbors of each particle. So, partilceIndices[neighborIndexer(nn,pp)] gives the index of the nth particle in the neighborhood of particle pp. More... | |
GPUArray< dVec > | neighborVectors |
An array saving the displacement data associated with each neighbor pair. distances[neighborIndexer(nn,pp)]. More... | |
GPUArray< scalar > | neighborDistances |
An array saving the distance data associated with each neighbor pair. distances[neighborIndexer(nn,pp)]. More... | |
int | computations |
An internal counter. More... | |
scalar | maxRange |
maximum range that neighbors need to be kept at More... | |
shared_ptr< hyperrectangularCellList > | cellList |
The cell list that will help out. More... | |
int | Nmax |
the maximum number of particles found in any neighborhood More... | |
shared_ptr< kernelTuner > | nlistTuner |
kernelTuner object More... | |
Protected Member Functions | |
void | computeGPU (GPUArray< dVec > &points) |
compute via GPU More... | |
void | computeCPU (GPUArray< dVec > &points) |
compute via CPU More... | |
void | resetNeighborsCPU (int size, int _nmax) |
Initialization and helper without using the GPU. More... | |
void | resetNeighborsGPU (int size, int _nmax) |
Initialization and helper. More... | |
Protected Attributes | |
bool | saveDistanceData |
Save the displacement and distances associated with neihgbors? More... | |
GPUArray< int > | assist |
first index is Nmax, second is whether to recompute More... | |
take a set of positions, sort those positions according to a cellList, and create data structures of possible neighbors of each particle
basic constructor has a box and a range
References Box, cellList, maxRange, nlistTuner, Nmax, saveDistanceData, scalar, and useGPU.
|
inline |
computethe neighborlist of the set of points passed in
References computeCPU(), computeGPU(), and useGPU.
|
inlinevirtual |
|
protected |
compute via GPU
points | the set of points to find neighbors for |
call gpu function
References assist, Box, cellList, ArrayHandle< T >::data, access_location::device, GPUArray< T >::getNumElements(), gpu_compute_neighbor_list(), access_location::host, indices, maxRange, neighborIndexer, neighborsPerParticle, neighborVectors, nlistTuner, Nmax, NVTXPOP, NVTXPUSH, access_mode::overwrite, particleIndices, access_mode::read, access_mode::readwrite, and resetNeighborsGPU().
Referenced by computeNeighborLists().
|
protected |
compute via CPU
points | the set of points to find neighbors for |
References Box, cellList, computations, ArrayHandle< T >::data, GPUArray< T >::getNumElements(), access_location::host, indices, maxRange, neighborDistances, neighborIndexer, neighborsPerParticle, neighborVectors, Nmax, norm(), particleIndices, access_mode::read, resetNeighborsCPU(), saveDistanceData, and scalar.
Referenced by computeNeighborLists().
|
protected |
Initialization and helper without using the GPU.
References assist, ArrayHandle< T >::data, Index2D::getNumElements(), GPUArray< T >::getNumElements(), access_location::host, make_dVec(), neighborDistances, neighborIndexer, neighborsPerParticle, neighborVectors, Nmax, access_mode::overwrite, particleIndices, GPUArray< T >::resize(), and saveDistanceData.
Referenced by computeCPU().
|
protected |
Initialization and helper.
References assist, ArrayHandle< T >::data, access_location::device, Index2D::getNumElements(), GPUArray< T >::getNumElements(), gpu_set_array(), access_location::host, neighborDistances, neighborIndexer, neighborsPerParticle, neighborVectors, Nmax, NVTXPOP, NVTXPUSH, access_mode::overwrite, particleIndices, GPUArray< T >::resize(), and saveDistanceData.
Referenced by computeGPU().
bool neighborList::useGPU |
whether the updater does its work on the GPU or not
Referenced by computeNeighborLists(), neighborList(), and setGPU().
BoxPtr neighborList::Box |
The Box used to compute periodic distances.
Referenced by computeCPU(), computeGPU(), neighborList(), and setBox().
Index2D neighborList::neighborIndexer |
indexes the neighbors of each particle
Referenced by computeCPU(), computeGPU(), resetNeighborsCPU(), and resetNeighborsGPU().
GPUArray<unsigned int> neighborList::neighborsPerParticle |
An array containing the number of elements in each neighborhood.
Referenced by computeCPU(), computeGPU(), resetNeighborsCPU(), and resetNeighborsGPU().
GPUArray<int> neighborList::particleIndices |
An array containing the indices of neighbors of each particle. So, partilceIndices[neighborIndexer(nn,pp)] gives the index of the nth particle in the neighborhood of particle pp.
Referenced by computeCPU(), computeGPU(), resetNeighborsCPU(), and resetNeighborsGPU().
GPUArray<dVec> neighborList::neighborVectors |
An array saving the displacement data associated with each neighbor pair. distances[neighborIndexer(nn,pp)].
Referenced by computeCPU(), computeGPU(), resetNeighborsCPU(), and resetNeighborsGPU().
An array saving the distance data associated with each neighbor pair. distances[neighborIndexer(nn,pp)].
Referenced by computeCPU(), resetNeighborsCPU(), and resetNeighborsGPU().
int neighborList::computations |
An internal counter.
Referenced by computeCPU().
scalar neighborList::maxRange |
maximum range that neighbors need to be kept at
Referenced by computeCPU(), computeGPU(), and neighborList().
shared_ptr<hyperrectangularCellList> neighborList::cellList |
The cell list that will help out.
Referenced by computeCPU(), computeGPU(), neighborList(), and setGPU().
int neighborList::Nmax |
the maximum number of particles found in any neighborhood
Referenced by computeCPU(), computeGPU(), neighborList(), resetNeighborsCPU(), and resetNeighborsGPU().
shared_ptr<kernelTuner> neighborList::nlistTuner |
kernelTuner object
Referenced by computeGPU(), and neighborList().
|
protected |
Save the displacement and distances associated with neihgbors?
Referenced by computeCPU(), neighborList(), resetNeighborsCPU(), and resetNeighborsGPU().
|
protected |
first index is Nmax, second is whether to recompute
Referenced by computeGPU(), resetNeighborsCPU(), and resetNeighborsGPU().