CellGPU
0.8.0
GPU-accelerated simulations of cells
|
CUDA kernels and callers for the voronoiModelBase class. More...
Functions | |
bool | gpu_test_circumcenters (int *d_repair, int3 *d_ccs, int Nccs, Dscalar2 *d_pt, unsigned int *d_cell_sizes, int *d_idx, int Np, int xsize, int ysize, Dscalar boxsize, gpubox &Box, Index2D &ci, Index2D &cli, int *fail) |
Test an array of circumcenters for the empty-circumcircle property. More... | |
bool | gpu_compute_voronoi_geometry (Dscalar2 *d_points, Dscalar2 *d_AP, int *d_nn, int *d_n, Dscalar2 *d_vc, Dscalar4 *d_vln, int N, Index2D &n_idx, gpubox &Box) |
compute the area and perimeter of all Voronoi cells, and save the voronoi vertices More... | |
__global__ void | gpu_test_circumcenters_kernel (int *__restrict__ d_repair, const int3 *__restrict__ d_circumcircles, const Dscalar2 *__restrict__ d_pt, const unsigned int *__restrict__ d_cell_sizes, const int *__restrict__ d_cell_idx, int Nccs, int xsize, int ysize, Dscalar boxsize, gpubox Box, Index2D ci, Index2D cli, int *anyFail) |
__global__ void | gpu_compute_voronoi_geometry_kernel (const Dscalar2 *__restrict__ d_points, Dscalar2 *__restrict__ d_AP, const int *__restrict__ d_nn, const int *__restrict__ d_n, Dscalar2 *__restrict__ d_vc, Dscalar4 *__restrict__ d_vln, int N, Index2D n_idx, gpubox Box) |
CUDA kernels and callers for the voronoiModelBase class.
bool gpu_test_circumcenters | ( | int * | d_repair, |
int3 * | d_ccs, | ||
int | Nccs, | ||
Dscalar2 * | d_pt, | ||
unsigned int * | d_cell_sizes, | ||
int * | d_idx, | ||
int | Np, | ||
int | xsize, | ||
int | ysize, | ||
Dscalar | boxsize, | ||
gpubox & | Box, | ||
Index2D & | ci, | ||
Index2D & | cli, | ||
int * | fail | ||
) |
Test an array of circumcenters for the empty-circumcircle property.
call the kernel to test every circumcenter to see if it's empty
Referenced by voronoiModelBase::testTriangulation().
bool gpu_compute_voronoi_geometry | ( | Dscalar2 * | d_points, |
Dscalar2 * | d_AP, | ||
int * | d_nn, | ||
int * | d_n, | ||
Dscalar2 * | d_vc, | ||
Dscalar4 * | d_vln, | ||
int | N, | ||
Index2D & | n_idx, | ||
gpubox & | Box | ||
) |
compute the area and perimeter of all Voronoi cells, and save the voronoi vertices
Call the kernel to compute the geometry.
Referenced by voronoiModelBase::computeGeometryGPU().
__global__ void gpu_test_circumcenters_kernel | ( | int *__restrict__ | d_repair, |
const int3 *__restrict__ | d_circumcircles, | ||
const Dscalar2 *__restrict__ | d_pt, | ||
const unsigned int *__restrict__ | d_cell_sizes, | ||
const int *__restrict__ | d_cell_idx, | ||
int | Nccs, | ||
int | xsize, | ||
int | ysize, | ||
Dscalar | boxsize, | ||
gpubox | Box, | ||
Index2D | ci, | ||
Index2D | cli, | ||
int * | anyFail | ||
) |
Independently check every triangle in the Delaunay mesh to see if the cirumcircle defined by the vertices of that triangle is empty. Use the cell list to ensure that only checks of nearby particles are required.
__global__ void gpu_compute_voronoi_geometry_kernel | ( | const Dscalar2 *__restrict__ | d_points, |
Dscalar2 *__restrict__ | d_AP, | ||
const int *__restrict__ | d_nn, | ||
const int *__restrict__ | d_n, | ||
Dscalar2 *__restrict__ | d_vc, | ||
Dscalar4 *__restrict__ | d_vln, | ||
int | N, | ||
Index2D | n_idx, | ||
gpubox | Box | ||
) |
Since the cells are guaranteed to be convex, the area of the cell is the sum of the areas of the triangles formed by consecutive Voronoi vertices