Open Qmin  0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
Functions
model Kernels

CUDA kernels and callers for model classes. More...

Functions

__global__ void gpu_set_random_spins_kernel (dVec *pos, curandState *rngs, int N)
 
bool gpu_set_random_spins (dVec *d_pos, curandState *rngs, int blockSize, int nBlocks, int N)
 set spins to be random points on d-sphere More...
 
__global__ void gpu_update_spins_kernel (dVec *d_disp, dVec *d_pos, scalar scale, int N, bool normalize)
 
__global__ void gpu_update_spins_simple_kernel (dVec *d_disp, dVec *d_pos, int N)
 
bool gpu_update_spins (dVec *d_disp, dVec *d_pos, scalar scale, int N, bool normalize)
 move spins More...
 
__global__ void gpu_copy_boundary_object_kernel (dVec *pos, int *sites, int *neighbors, pair< int, dVec > *assistStructure, int *types, Index2D neighborIndex, int motionDirection, bool resetLattice, int Nsites)
 
bool gpu_copy_boundary_object (dVec *pos, int *sites, int *neighbors, pair< int, dVec > *assistStructure, int *types, Index2D neighborIndex, int motionDirection, bool resetLattice, int Nsites)
 copy a boundary or surface to an assist array More...
 
__global__ void gpu_move_boundary_object_kernel (dVec *pos, int *sites, pair< int, dVec > *assistStructure, int *types, int newTypeValue, int Nsites)
 
bool gpu_move_boundary_object (dVec *pos, int *sites, pair< int, dVec > *assistStructure, int *types, int newTypeValue, int Nsites)
 Move a boundary or surface via an assist structure. More...
 
__device__ int inferDirectionFromIndex (int i, int3 latticeSites, int &startIdx)
 
__device__ void getBufferInt3 (int idx, int3 &pos, int directionType, int startIndex, int3 latticeSites)
 
__global__ void gpu_prepareSendingBuffer_kernel (int *type, dVec *position, int *iBuf, scalar *dBuf, int3 latticeSites, Index3D latticeIndex, int maxIndex)
 
bool gpu_prepareSendingBuffer (int *type, dVec *position, int *iBuf, scalar *dBuf, int3 latticeSites, Index3D latticeIndex, int maxIndex, int blockSize)
 
__global__ void gpu_copyReceivingBuffer_kernel (int *type, dVec *position, int *iBuf, scalar *dBuf, int N, int maxIndex)
 
bool gpu_copyReceivingBuffer (int *type, dVec *position, int *iBuf, scalar *dBuf, int N, int maxIndex, int blockSize)
 
__global__ void gpu_largestEigenvalue_kernel (dVec *Q, scalar *defects, int *t, int N)
 
__global__ void gpu_computeDeterminant_kernel (dVec *Q, scalar *defects, int *t, int N)
 
__global__ void gpu_degenerateEigenvalue_kernel (dVec *Q, scalar *defects, int *t, int N)
 
__global__ void gpu_set_random_nematic_qTensors_kernel (dVec *pos, int *type, curandState *rngs, scalar amplitude, bool globallyAligned, scalar globalTheta, scalar globalPhi, int N)
 
__global__ void gpu_update_qTensor_simple_kernel (dVec *d_disp, dVec *d_pos, scalar scale, int N)
 
__global__ void gpu_update_qTensor_simple_kernel (dVec *d_disp, dVec *d_pos, int N)
 
bool gpu_update_qTensor (dVec *d_disp, dVec *Q, scalar scale, int N, int blockSize)
 move a qTensor by a scaled amount, keeping the components within the allowed range More...
 
bool gpu_update_qTensor (dVec *d_disp, dVec *Q, int N, int blockSize)
 move a qTensor, keep the components within the allowed range More...
 
bool gpu_set_random_nematic_qTensors (dVec *d_pos, int *d_types, curandState *rngs, scalar amplitude, int blockSize, int nBlocks, bool globallyAligned, scalar theta, scalar phi, int N)
 set 5-d spins to be random nematic Q tensors with a given amplitude More...
 
bool gpu_get_qtensor_DefectMeasures (dVec *Q, scalar *defects, int *t, int defectType, int N)
 GPU analog of function in cpp file. More...
 
__global__ void gpu_move_particles_kernel (dVec *d_pos, dVec *d_disp, periodicBoundaryConditions Box, scalar scale, int N)
 
bool gpu_move_particles (dVec *d_pos, dVec *d_disp, periodicBoundaryConditions &Box, scalar scale, int N)
 pos += (scale)*disp, then put in box... done per thread More...
 

Detailed Description

CUDA kernels and callers for model classes.

Function Documentation

◆ gpu_set_random_spins_kernel()

__global__ void gpu_set_random_spins_kernel ( dVec *  pos,
curandState *  rngs,
int  N 
)

References dot(), idx, and scalar.

◆ gpu_set_random_spins()

bool gpu_set_random_spins ( dVec *  d_pos,
curandState *  rngs,
int  blockSize,
int  nBlocks,
int  N 
)

set spins to be random points on d-sphere

References HANDLE_ERROR.

Referenced by cubicLattice::setSpinsRandomly().

◆ gpu_update_spins_kernel()

__global__ void gpu_update_spins_kernel ( dVec *  d_disp,
dVec *  d_pos,
scalar  scale,
int  N,
bool  normalize 
)

References idx, norm(), and scalar.

◆ gpu_update_spins_simple_kernel()

__global__ void gpu_update_spins_simple_kernel ( dVec *  d_disp,
dVec *  d_pos,
int  N 
)

References idx.

◆ gpu_update_spins()

bool gpu_update_spins ( dVec *  d_disp,
dVec *  d_pos,
scalar  scale,
int  N,
bool  normalize 
)

move spins

References HANDLE_ERROR.

Referenced by cubicLattice::moveParticles().

◆ gpu_copy_boundary_object_kernel()

__global__ void gpu_copy_boundary_object_kernel ( dVec *  pos,
int *  sites,
int *  neighbors,
pair< int, dVec > *  assistStructure,
int *  types,
Index2D  neighborIndex,
int  motionDirection,
bool  resetLattice,
int  Nsites 
)

References idx.

◆ gpu_copy_boundary_object()

bool gpu_copy_boundary_object ( dVec *  pos,
int *  sites,
int *  neighbors,
pair< int, dVec > *  assistStructure,
int *  types,
Index2D  neighborIndex,
int  motionDirection,
bool  resetLattice,
int  Nsites 
)

copy a boundary or surface to an assist array

References HANDLE_ERROR.

Referenced by cubicLattice::displaceBoundaryObject().

◆ gpu_move_boundary_object_kernel()

__global__ void gpu_move_boundary_object_kernel ( dVec *  pos,
int *  sites,
pair< int, dVec > *  assistStructure,
int *  types,
int  newTypeValue,
int  Nsites 
)

References idx.

◆ gpu_move_boundary_object()

bool gpu_move_boundary_object ( dVec *  pos,
int *  sites,
pair< int, dVec > *  assistStructure,
int *  types,
int  newTypeValue,
int  Nsites 
)

Move a boundary or surface via an assist structure.

References HANDLE_ERROR.

Referenced by cubicLattice::displaceBoundaryObject().

◆ inferDirectionFromIndex()

__device__ int inferDirectionFromIndex ( int  i,
int3  latticeSites,
int &  startIdx 
)

◆ getBufferInt3()

__device__ void getBufferInt3 ( int  idx,
int3 &  pos,
int  directionType,
int  startIndex,
int3  latticeSites 
)

References idx, and index.

Referenced by gpu_prepareSendingBuffer_kernel().

◆ gpu_prepareSendingBuffer_kernel()

__global__ void gpu_prepareSendingBuffer_kernel ( int *  type,
dVec *  position,
int *  iBuf,
scalar dBuf,
int3  latticeSites,
Index3D  latticeIndex,
int  maxIndex 
)

◆ gpu_prepareSendingBuffer()

bool gpu_prepareSendingBuffer ( int *  type,
dVec *  position,
int *  iBuf,
scalar dBuf,
int3  latticeSites,
Index3D  latticeIndex,
int  maxIndex,
int  blockSize 
)

◆ gpu_copyReceivingBuffer_kernel()

__global__ void gpu_copyReceivingBuffer_kernel ( int *  type,
dVec *  position,
int *  iBuf,
scalar dBuf,
int  N,
int  maxIndex 
)

References idx.

◆ gpu_copyReceivingBuffer()

bool gpu_copyReceivingBuffer ( int *  type,
dVec *  position,
int *  iBuf,
scalar dBuf,
int  N,
int  maxIndex,
int  blockSize 
)

◆ gpu_largestEigenvalue_kernel()

__global__ void gpu_largestEigenvalue_kernel ( dVec *  Q,
scalar defects,
int *  t,
int  N 
)

References eigenvaluesOfQ(), idx, and scalar.

◆ gpu_computeDeterminant_kernel()

__global__ void gpu_computeDeterminant_kernel ( dVec *  Q,
scalar defects,
int *  t,
int  N 
)

References determinantOfQ(), and idx.

◆ gpu_degenerateEigenvalue_kernel()

__global__ void gpu_degenerateEigenvalue_kernel ( dVec *  Q,
scalar defects,
int *  t,
int  N 
)

References determinantOfQ(), idx, scalar, and TrQ2().

◆ gpu_set_random_nematic_qTensors_kernel()

__global__ void gpu_set_random_nematic_qTensors_kernel ( dVec *  pos,
int *  type,
curandState *  rngs,
scalar  amplitude,
bool  globallyAligned,
scalar  globalTheta,
scalar  globalPhi,
int  N 
)

References idx, n, PI, qTensorFromDirector(), scalar, and scalar3.

◆ gpu_update_qTensor_simple_kernel() [1/2]

__global__ void gpu_update_qTensor_simple_kernel ( dVec *  d_disp,
dVec *  d_pos,
scalar  scale,
int  N 
)

References idx.

◆ gpu_update_qTensor_simple_kernel() [2/2]

__global__ void gpu_update_qTensor_simple_kernel ( dVec *  d_disp,
dVec *  d_pos,
int  N 
)

References idx.

◆ gpu_update_qTensor() [1/2]

bool gpu_update_qTensor ( dVec *  d_disp,
dVec *  Q,
scalar  scale,
int  N,
int  blockSize 
)

move a qTensor by a scaled amount, keeping the components within the allowed range

References HANDLE_ERROR.

Referenced by qTensorLatticeModel::moveParticles().

◆ gpu_update_qTensor() [2/2]

bool gpu_update_qTensor ( dVec *  d_disp,
dVec *  Q,
int  N,
int  blockSize 
)

move a qTensor, keep the components within the allowed range

References HANDLE_ERROR.

◆ gpu_set_random_nematic_qTensors()

bool gpu_set_random_nematic_qTensors ( dVec *  d_pos,
int *  d_types,
curandState *  rngs,
scalar  amplitude,
int  blockSize,
int  nBlocks,
bool  globallyAligned,
scalar  theta,
scalar  phi,
int  N 
)

set 5-d spins to be random nematic Q tensors with a given amplitude

References HANDLE_ERROR.

Referenced by qTensorLatticeModel::setNematicQTensorRandomly().

◆ gpu_get_qtensor_DefectMeasures()

bool gpu_get_qtensor_DefectMeasures ( dVec *  Q,
scalar defects,
int *  t,
int  defectType,
int  N 
)

GPU analog of function in cpp file.

References HANDLE_ERROR.

Referenced by qTensorLatticeModel::computeDefectMeasures().

◆ gpu_move_particles_kernel()

__global__ void gpu_move_particles_kernel ( dVec *  d_pos,
dVec *  d_disp,
periodicBoundaryConditions  Box,
scalar  scale,
int  N 
)

◆ gpu_move_particles()

bool gpu_move_particles ( dVec *  d_pos,
dVec *  d_disp,
periodicBoundaryConditions Box,
scalar  scale,
int  N 
)

pos += (scale)*disp, then put in box... done per thread

References HANDLE_ERROR.

Referenced by simpleModel::moveParticles().