Open Qmin  0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
neighborList Class Reference

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>

Collaboration diagram for neighborList:
Collaboration graph
[legend]

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< scalarneighborDistances
 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< hyperrectangularCellListcellList
 The cell list that will help out. More...
 
int Nmax
 the maximum number of particles found in any neighborhood More...
 
shared_ptr< kernelTunernlistTuner
 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...
 

Detailed Description

take a set of positions, sort those positions according to a cellList, and create data structures of possible neighbors of each particle

Constructor & Destructor Documentation

◆ neighborList()

neighborList::neighborList ( scalar  range,
BoxPtr  _box,
int  subGridReduction = 1 
)

basic constructor has a box and a range

References Box, cellList, maxRange, nlistTuner, Nmax, saveDistanceData, scalar, and useGPU.

Member Function Documentation

◆ computeNeighborLists()

void neighborList::computeNeighborLists ( GPUArray< dVec > &  points)
inline

computethe neighborlist of the set of points passed in

References computeCPU(), computeGPU(), and useGPU.

◆ setGPU()

virtual void neighborList::setGPU ( bool  _useGPU = true)
inlinevirtual

Enforce GPU operation.

References cellList, and useGPU.

◆ setBox()

void neighborList::setBox ( BoxPtr  _bx)
inline

References Box.

◆ computeGPU()

void neighborList::computeGPU ( GPUArray< dVec > &  points)
protected

◆ computeCPU()

void neighborList::computeCPU ( GPUArray< dVec > &  points)
protected

◆ resetNeighborsCPU()

void neighborList::resetNeighborsCPU ( int  size,
int  _nmax 
)
protected

◆ resetNeighborsGPU()

void neighborList::resetNeighborsGPU ( int  size,
int  _nmax 
)
protected

Member Data Documentation

◆ useGPU

bool neighborList::useGPU

whether the updater does its work on the GPU or not

Referenced by computeNeighborLists(), neighborList(), and setGPU().

◆ Box

BoxPtr neighborList::Box

The Box used to compute periodic distances.

Referenced by computeCPU(), computeGPU(), neighborList(), and setBox().

◆ neighborIndexer

Index2D neighborList::neighborIndexer

indexes the neighbors of each particle

Referenced by computeCPU(), computeGPU(), resetNeighborsCPU(), and resetNeighborsGPU().

◆ neighborsPerParticle

GPUArray<unsigned int> neighborList::neighborsPerParticle

An array containing the number of elements in each neighborhood.

Referenced by computeCPU(), computeGPU(), resetNeighborsCPU(), and resetNeighborsGPU().

◆ particleIndices

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().

◆ neighborVectors

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().

◆ neighborDistances

GPUArray<scalar> neighborList::neighborDistances

An array saving the distance data associated with each neighbor pair. distances[neighborIndexer(nn,pp)].

Referenced by computeCPU(), resetNeighborsCPU(), and resetNeighborsGPU().

◆ computations

int neighborList::computations

An internal counter.

Referenced by computeCPU().

◆ maxRange

scalar neighborList::maxRange

maximum range that neighbors need to be kept at

Referenced by computeCPU(), computeGPU(), and neighborList().

◆ cellList

shared_ptr<hyperrectangularCellList> neighborList::cellList

The cell list that will help out.

Referenced by computeCPU(), computeGPU(), neighborList(), and setGPU().

◆ Nmax

int neighborList::Nmax

the maximum number of particles found in any neighborhood

Referenced by computeCPU(), computeGPU(), neighborList(), resetNeighborsCPU(), and resetNeighborsGPU().

◆ nlistTuner

shared_ptr<kernelTuner> neighborList::nlistTuner

kernelTuner object

Referenced by computeGPU(), and neighborList().

◆ saveDistanceData

bool neighborList::saveDistanceData
protected

Save the displacement and distances associated with neihgbors?

Referenced by computeCPU(), neighborList(), resetNeighborsCPU(), and resetNeighborsGPU().

◆ assist

GPUArray<int> neighborList::assist
protected

first index is Nmax, second is whether to recompute

Referenced by computeGPU(), resetNeighborsCPU(), and resetNeighborsGPU().


The documentation for this class was generated from the following files: