tPossible major bugfix; reuse of old contact positions - 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 0522edd70b53f35f1825e240dec81a65d71ae77b
(DIR) parent 72e8a2458f7da3e8d00b2476c966715afa57fef7
(HTM) Author: Anders Damsgaard <adc@geo.au.dk>
Date: Wed, 10 Oct 2012 11:28:17 +0200
Possible major bugfix; reuse of old contact positions
Diffstat:
M src/contactsearch.cuh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/src/contactsearch.cuh b/src/contactsearch.cuh
t@@ -259,7 +259,9 @@ __device__ void findContactsInCell(int3 targetCell,
for (int i=0; i<devC_nc; ++i) {
__syncthreads();
cidx = dev_contacts[(unsigned int)(idx_a_orig*devC_nc+i)];
- if (cidx == idx_b_orig)
+ if (cidx == idx_b_orig) // Write to position of same contact
+ cpos = i;
+ if (cidx == devC_np) // Write to position of now-deleted contact
cpos = i;
}
t@@ -439,7 +441,6 @@ __global__ void interact(unsigned int* dev_gridParticleIndex, // Input: Unsorted
idx_b_orig = dev_contacts[mempos];
distmod = dev_distmod[mempos];
x_b = dev_x[idx_b_orig];
- //radius_b = dev_radius[idx_b_orig];
radius_b = distmod.w;
// Inter-particle vector, corrected for periodic boundaries