CellGPU
0.8.0
GPU-accelerated simulations of cells
|
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) |
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
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.
d_points | Dscalar2 array of locations |
d_disp | Dscalar2 array of displacements |
N | The number of degrees of freedom to move |
Box | The gpubox in which the new positions must reside |
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].
d_points | Dscalar2 array of locations |
d_disp | Dscalar2 array of displacements |
N | The number of degrees of freedom to move |
Box | The gpubox in which the new positions must reside |
bool gpu_set_integer_array | ( | int * | d_array, |
int | value, | ||
int | N | ||
) |
A utility function; set all copmonents of an integer array to value.
d_array | int array of values |
value | the integer to set the entire array to |
N | The number of values in the array to set (d_array[0] tp d_array[N-1]) |
__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.
__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
__global__ void gpu_set_integer_array_kernel | ( | int * | d_array, |
int | value, | ||
int | N | ||
) |
every thread just writes in a value