toverlapsInCell renamed to findAndProcessContactsInCell - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit e16de644cf05a50d925c03ad9502f553f8c10680
(DIR) parent c3c603cccf305f9764fc3c3179bfdb9976e531b3
(HTM) Author: Anders Damsgaard <adc@geo.au.dk>
Date: Mon, 3 Sep 2012 14:27:18 +0200
overlapsInCell renamed to findAndProcessContactsInCell
Diffstat:
M src/Makefile | 3 ++-
M src/contactsearch.cuh | 40 ++++++++++++++++----------------
2 files changed, 22 insertions(+), 21 deletions(-)
---
(DIR) diff --git a/src/Makefile b/src/Makefile
t@@ -20,7 +20,8 @@ NVCCFLAGS=--use_fast_math -O3 -m64 -gencode=arch=compute_20,code=\"sm_20,compute
# Profile code?
#NVCCFLAGS+=-pg
-# Debugable code?
+# Debugable code? Beware that enabling this option will
+# considerably slow down the execution.
#CCFLAGS+=-g
#NVCCFLAGS+=-g -G
(DIR) diff --git a/src/contactsearch.cuh b/src/contactsearch.cuh
t@@ -80,20 +80,20 @@ __device__ int findDistMod(int3* targetCell, Float3* distmod)
// Used for shearmodel=1, where contact history is not needed.
// Kernel executed on device, and callable from device only.
// Function is called from interact().
-__device__ void overlapsInCell(int3 targetCell,
- unsigned int idx_a,
- Float4 x_a, Float radius_a,
- Float3* N, Float3* T,
- Float* es_dot, Float* p,
- Float4* dev_x_sorted,
- Float* dev_radius_sorted,
- Float4* dev_vel_sorted,
- Float4* dev_angvel_sorted,
- unsigned int* dev_cellStart,
- unsigned int* dev_cellEnd,
- Float4* dev_w_nx,
- Float4* dev_w_mvfd)
- //uint4 bonds)
+__device__ void findAndProcessContactsInCell(int3 targetCell,
+ unsigned int idx_a,
+ Float4 x_a, Float radius_a,
+ Float3* N, Float3* T,
+ Float* es_dot, Float* p,
+ Float4* dev_x_sorted,
+ Float* dev_radius_sorted,
+ Float4* dev_vel_sorted,
+ Float4* dev_angvel_sorted,
+ unsigned int* dev_cellStart,
+ unsigned int* dev_cellEnd,
+ Float4* dev_w_nx,
+ Float4* dev_w_mvfd)
+//uint4 bonds)
{
// Get distance modifier for interparticle
t@@ -500,12 +500,12 @@ __global__ void interact(unsigned int* dev_gridParticleIndex, // Input: Unsorted
for (int y_dim=-1; y_dim<2; ++y_dim) { // y-axis
for (int x_dim=-1; x_dim<2; ++x_dim) { // x-axis
targetPos = gridPos + make_int3(x_dim, y_dim, z_dim);
- overlapsInCell(targetPos, idx_a, x_a, radius_a,
- &F, &T, &es_dot, &p,
- dev_x_sorted, dev_radius_sorted,
- dev_vel_sorted, dev_angvel_sorted,
- dev_cellStart, dev_cellEnd,
- dev_w_nx, dev_w_mvfd);
+ findAndProcessContactsInCell(targetPos, idx_a, x_a, radius_a,
+ &F, &T, &es_dot, &p,
+ dev_x_sorted, dev_radius_sorted,
+ dev_vel_sorted, dev_angvel_sorted,
+ dev_cellStart, dev_cellEnd,
+ dev_w_nx, dev_w_mvfd);
}
}
}