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

CUDA kernels and callers for force calculations. More...

Functions

__global__ void gpu_lattice_spin_force_nn_kernel (dVec *d_force, dVec *d_spins, Index3D latticeIndex, scalar J, int N, int L, bool zeroForce)
 
bool gpu_lattice_spin_force_nn (dVec *d_force, dVec *d_spins, Index3D latticeIndex, scalar J, int N, bool zeroForce, int maxBlockSize)
 
__device__ void gpu_get_six_neighbors (int3 &target, int &ixd, int &ixu, int &iyd, int &iyu, int &izd, int &izu, Index3D &latticeIndex, int3 &latticeSizes)
 
__device__ void gpu_phase_force (dVec &qCurrent, scalar &a, scalar &b, scalar &c, dVec &force)
 
__global__ void gpu_qTensor_computeBoundaryForcesGPU_kernel (dVec *d_force, dVec *d_spins, int *d_types, boundaryObject *d_bounds, Index3D latticeIndex, int N, bool zeroForce)
 
__global__ void gpu_qTensor_firstDerivatives_kernel (cubicLatticeDerivativeVector *d_derivatives, dVec *d_spins, int *d_types, int *latticeNeighbors, Index2D neighborIndex, int N)
 
__global__ void gpu_qTensor_computeObjectForceFromStresses_kernel (int *sites, int *latticeTypes, int *latticeNeighbors, Matrix3x3 *stress, scalar3 *objectForces, Index2D neighborIndex, int nSites)
 
__global__ void gpu_energyPerSite_kernel (scalar *energyPerSite, dVec *Qtensors, int *latticeTypes, boundaryObject *bounds, int *d_latticeNeighbors, Index2D neighborIndex, scalar a, scalar b, scalar c, scalar L1, scalar L2, scalar L3, scalar L4, scalar L6, bool computeEfieldContribution, bool computeHfieldContribution, scalar epsilon, scalar epsilon0, scalar deltaEpsilon, scalar3 Efield, scalar Chi, scalar mu0, scalar deltaChi, scalar3 Hfield, int N)
 
__global__ void gpu_qTensor_oneConstantForce_kernel (dVec *d_force, dVec *d_spins, int *d_types, int *d_latticeNeighbors, Index2D neighborIndex, scalar a, scalar b, scalar c, scalar L1, int N, bool zeroForce)
 
__global__ void gpu_qTensor_multiConstantForce_kernel (dVec *d_force, dVec *d_spins, int *d_types, cubicLatticeDerivativeVector *d_derivatives, int *d_latticeNeighbors, Index2D neighborIndex, scalar a, scalar b, scalar c, scalar L1, scalar L2, scalar L3, scalar L4, scalar L6, int N, bool zeroForce)
 
__global__ void gpu_qTensor_uniformFieldForcekernel (dVec *d_force, int *d_types, int N, scalar3 field, scalar anisotropicSusceptibility, scalar vacuumPermeability, bool zeroForce)
 
bool gpu_qTensor_computeObjectForceFromStresses (int *sites, int *latticeTypes, int *latticeNeighbors, Matrix3x3 *stress, scalar3 *objectForces, Index2D neighborIndex, int nSites, int maxBlockSize)
 
bool gpu_qTensor_computeBoundaryForcesGPU (dVec *d_force, dVec *d_spins, int *d_types, boundaryObject *d_bounds, Index3D latticeIndex, int N, bool zeroForce, int maxBlockSize)
 
bool gpu_qTensor_firstDerivatives (cubicLatticeDerivativeVector *d_derivatives, dVec *d_spins, int *d_types, int *latticeNeighbors, Index2D neighborIndex, int N, int maxBlockSize)
 
bool gpu_qTensor_oneConstantForce (dVec *d_force, dVec *d_spins, int *d_types, int *d_latticeNeighbors, Index2D neighborIndex, scalar A, scalar B, scalar C, scalar L, int N, bool zeroForce, int maxBlockSize)
 
bool gpu_qTensor_multiConstantForce (dVec *d_force, dVec *d_spins, int *d_types, cubicLatticeDerivativeVector *d_derivatives, int *d_latticeNeighbors, Index2D neighborIndex, scalar A, scalar B, scalar C, scalar L1, scalar L2, scalar L3, scalar L4, scalar L6, int N, bool zeroForce, int maxBlockSize)
 
bool gpu_qTensor_computeUniformFieldForcesGPU (dVec *d_force, int *d_types, int N, scalar3 field, scalar anisotropicSusceptibility, scalar vacuumPermeability, bool zeroOutForce, int maxBlockSize)
 
bool gpu_computeAllEnergyTerms (scalar *energyPerSite, dVec *Qtensors, int *latticeTypes, boundaryObject *bounds, int *d_latticeNeighbors, Index2D neighborIndex, scalar a, scalar b, scalar c, scalar L1, scalar L2, scalar L3, scalar L4, scalar L6, bool computeEfieldContribution, bool computeHfieldContribution, scalar epsilon, scalar epsilon0, scalar deltaEpsilon, scalar3 Efield, scalar Chi, scalar mu0, scalar deltaChi, scalar3 Hfield, int N)
 

Detailed Description

CUDA kernels and callers for force calculations.

Function Documentation

◆ gpu_lattice_spin_force_nn_kernel()

__global__ void gpu_lattice_spin_force_nn_kernel ( dVec *  d_force,
dVec *  d_spins,
Index3D  latticeIndex,
scalar  J,
int  N,
int  L,
bool  zeroForce 
)

◆ gpu_lattice_spin_force_nn()

bool gpu_lattice_spin_force_nn ( dVec *  d_force,
dVec *  d_spins,
Index3D  latticeIndex,
scalar  J,
int  N,
bool  zeroForce,
int  maxBlockSize 
)

◆ gpu_get_six_neighbors()

__device__ void gpu_get_six_neighbors ( int3 &  target,
int &  ixd,
int &  ixu,
int &  iyd,
int &  iyu,
int &  izd,
int &  izu,
Index3D latticeIndex,
int3 &  latticeSizes 
)

◆ gpu_phase_force()

__device__ void gpu_phase_force ( dVec &  qCurrent,
scalar a,
scalar b,
scalar c,
dVec &  force 
)

◆ gpu_qTensor_computeBoundaryForcesGPU_kernel()

__global__ void gpu_qTensor_computeBoundaryForcesGPU_kernel ( dVec *  d_force,
dVec *  d_spins,
int *  d_types,
boundaryObject d_bounds,
Index3D  latticeIndex,
int  N,
bool  zeroForce 
)

◆ gpu_qTensor_firstDerivatives_kernel()

__global__ void gpu_qTensor_firstDerivatives_kernel ( cubicLatticeDerivativeVector d_derivatives,
dVec *  d_spins,
int *  d_types,
int *  latticeNeighbors,
Index2D  neighborIndex,
int  N 
)

◆ gpu_qTensor_computeObjectForceFromStresses_kernel()

__global__ void gpu_qTensor_computeObjectForceFromStresses_kernel ( int *  sites,
int *  latticeTypes,
int *  latticeNeighbors,
Matrix3x3 stress,
scalar3 objectForces,
Index2D  neighborIndex,
int  nSites 
)

References idx, make_scalar3(), and scalar3.

◆ gpu_energyPerSite_kernel()

__global__ void gpu_energyPerSite_kernel ( scalar energyPerSite,
dVec *  Qtensors,
int *  latticeTypes,
boundaryObject bounds,
int *  d_latticeNeighbors,
Index2D  neighborIndex,
scalar  a,
scalar  b,
scalar  c,
scalar  L1,
scalar  L2,
scalar  L3,
scalar  L4,
scalar  L6,
bool  computeEfieldContribution,
bool  computeHfieldContribution,
scalar  epsilon,
scalar  epsilon0,
scalar  deltaEpsilon,
scalar3  Efield,
scalar  Chi,
scalar  mu0,
scalar  deltaChi,
scalar3  Hfield,
int  N 
)

◆ gpu_qTensor_oneConstantForce_kernel()

__global__ void gpu_qTensor_oneConstantForce_kernel ( dVec *  d_force,
dVec *  d_spins,
int *  d_types,
int *  d_latticeNeighbors,
Index2D  neighborIndex,
scalar  a,
scalar  b,
scalar  c,
scalar  L1,
int  N,
bool  zeroForce 
)

◆ gpu_qTensor_multiConstantForce_kernel()

__global__ void gpu_qTensor_multiConstantForce_kernel ( dVec *  d_force,
dVec *  d_spins,
int *  d_types,
cubicLatticeDerivativeVector d_derivatives,
int *  d_latticeNeighbors,
Index2D  neighborIndex,
scalar  a,
scalar  b,
scalar  c,
scalar  L1,
scalar  L2,
scalar  L3,
scalar  L4,
scalar  L6,
int  N,
bool  zeroForce 
)

◆ gpu_qTensor_uniformFieldForcekernel()

__global__ void gpu_qTensor_uniformFieldForcekernel ( dVec *  d_force,
int *  d_types,
int  N,
scalar3  field,
scalar  anisotropicSusceptibility,
scalar  vacuumPermeability,
bool  zeroForce 
)

References idx, and scalar.

◆ gpu_qTensor_computeObjectForceFromStresses()

bool gpu_qTensor_computeObjectForceFromStresses ( int *  sites,
int *  latticeTypes,
int *  latticeNeighbors,
Matrix3x3 stress,
scalar3 objectForces,
Index2D  neighborIndex,
int  nSites,
int  maxBlockSize 
)

◆ gpu_qTensor_computeBoundaryForcesGPU()

bool gpu_qTensor_computeBoundaryForcesGPU ( dVec *  d_force,
dVec *  d_spins,
int *  d_types,
boundaryObject d_bounds,
Index3D  latticeIndex,
int  N,
bool  zeroForce,
int  maxBlockSize 
)

◆ gpu_qTensor_firstDerivatives()

bool gpu_qTensor_firstDerivatives ( cubicLatticeDerivativeVector d_derivatives,
dVec *  d_spins,
int *  d_types,
int *  latticeNeighbors,
Index2D  neighborIndex,
int  N,
int  maxBlockSize 
)

◆ gpu_qTensor_oneConstantForce()

bool gpu_qTensor_oneConstantForce ( dVec *  d_force,
dVec *  d_spins,
int *  d_types,
int *  d_latticeNeighbors,
Index2D  neighborIndex,
scalar  A,
scalar  B,
scalar  C,
scalar  L,
int  N,
bool  zeroForce,
int  maxBlockSize 
)

References HANDLE_ERROR, and scalar.

Referenced by landauDeGennesLC::computeForceGPU().

◆ gpu_qTensor_multiConstantForce()

bool gpu_qTensor_multiConstantForce ( dVec *  d_force,
dVec *  d_spins,
int *  d_types,
cubicLatticeDerivativeVector d_derivatives,
int *  d_latticeNeighbors,
Index2D  neighborIndex,
scalar  A,
scalar  B,
scalar  C,
scalar  L1,
scalar  L2,
scalar  L3,
scalar  L4,
scalar  L6,
int  N,
bool  zeroForce,
int  maxBlockSize 
)

References HANDLE_ERROR, and scalar.

Referenced by landauDeGennesLC::computeForceGPU().

◆ gpu_qTensor_computeUniformFieldForcesGPU()

bool gpu_qTensor_computeUniformFieldForcesGPU ( dVec *  d_force,
int *  d_types,
int  N,
scalar3  field,
scalar  anisotropicSusceptibility,
scalar  vacuumPermeability,
bool  zeroOutForce,
int  maxBlockSize 
)

◆ gpu_computeAllEnergyTerms()

bool gpu_computeAllEnergyTerms ( scalar energyPerSite,
dVec *  Qtensors,
int *  latticeTypes,
boundaryObject bounds,
int *  d_latticeNeighbors,
Index2D  neighborIndex,
scalar  a,
scalar  b,
scalar  c,
scalar  L1,
scalar  L2,
scalar  L3,
scalar  L4,
scalar  L6,
bool  computeEfieldContribution,
bool  computeHfieldContribution,
scalar  epsilon,
scalar  epsilon0,
scalar  deltaEpsilon,
scalar3  Efield,
scalar  Chi,
scalar  mu0,
scalar  deltaChi,
scalar3  Hfield,
int  N 
)