CellGPU  0.8.0
GPU-accelerated simulations of cells
Functions
Simple2DCell Kernels

CUDA kernels and callers for the Simple2DCell class. More...

Functions

bool gpu_move_degrees_of_freedom (Dscalar2 *d_points, Dscalar2 *d_disp, int N, gpubox &Box)
 Move degrees of freedom according to a set of displacements, and put them back in the unit cell. More...
 
bool gpu_move_degrees_of_freedom (Dscalar2 *d_points, Dscalar2 *d_disp, Dscalar scale, int N, gpubox &Box)
 The same as the above, but scale the displacements by a scalar (i.e., x[i] += scale*disp[i]. More...
 
bool gpu_set_integer_array (int *d_array, int value, int N)
 A utility function; set all copmonents of an integer array to value. More...
 
__global__ void gpu_move_degrees_of_freedom_kernel (Dscalar2 *d_points, Dscalar2 *d_disp, int N, gpubox Box)
 
__global__ void gpu_move_degrees_of_freedom_kernel (Dscalar2 *d_points, Dscalar2 *d_disp, Dscalar scale, int N, gpubox Box)
 
__global__ void gpu_set_integer_array_kernel (int *d_array, int value, int N)
 

Detailed Description

CUDA kernels and callers for the Simple2DCell class.

One might think that a "computeGeometry" function should be here, but this function depends too much on whether the primary degrees of freedom are cells or vertices

Function Documentation

◆ gpu_move_degrees_of_freedom() [1/2]

bool gpu_move_degrees_of_freedom ( Dscalar2 *  d_points,
Dscalar2 *  d_disp,
int  N,
gpubox Box 
)

Move degrees of freedom according to a set of displacements, and put them back in the unit cell.

Parameters
d_pointsDscalar2 array of locations
d_dispDscalar2 array of displacements
NThe number of degrees of freedom to move
BoxThe gpubox in which the new positions must reside

◆ gpu_move_degrees_of_freedom() [2/2]

bool gpu_move_degrees_of_freedom ( Dscalar2 *  d_points,
Dscalar2 *  d_disp,
Dscalar  scale,
int  N,
gpubox Box 
)

The same as the above, but scale the displacements by a scalar (i.e., x[i] += scale*disp[i].

Parameters
d_pointsDscalar2 array of locations
d_dispDscalar2 array of displacements
NThe number of degrees of freedom to move
BoxThe gpubox in which the new positions must reside

◆ gpu_set_integer_array()

bool gpu_set_integer_array ( int *  d_array,
int  value,
int  N 
)

A utility function; set all copmonents of an integer array to value.

Parameters
d_arrayint array of values
valuethe integer to set the entire array to
NThe number of values in the array to set (d_array[0] tp d_array[N-1])

◆ gpu_move_degrees_of_freedom_kernel() [1/2]

__global__ void gpu_move_degrees_of_freedom_kernel ( Dscalar2 *  d_points,
Dscalar2 *  d_disp,
int  N,
gpubox  Box 
)

A simple routine that takes in a pointer array of points, an array of displacements, adds the displacements to the points, and puts the points back in the primary unit cell.

◆ gpu_move_degrees_of_freedom_kernel() [2/2]

__global__ void gpu_move_degrees_of_freedom_kernel ( Dscalar2 *  d_points,
Dscalar2 *  d_disp,
Dscalar  scale,
int  N,
gpubox  Box 
)

A simple routine that takes in a pointer array of points, an array of displacements, adds the displacements to the points, but with the displacement vector scaled by some amount, and puts the points back in the primary unit cell. This is useful, e.g., when the displacements are a dt times a velocity

◆ gpu_set_integer_array_kernel()

__global__ void gpu_set_integer_array_kernel ( int *  d_array,
int  value,
int  N 
)

every thread just writes in a value