tCode cleanup - sphere - GPU-based 3D discrete element method algorithm with op… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit f5c826ebd0189733df3104e874d91082aeeb97ef | |
parent 293fca0187ef2fe0ed566d0c019eb47f0f19d335 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 27 Aug 2012 14:15:56 +0200 | |
Code cleanup | |
Diffstat: | |
M src/contactsearch.cuh | 9 ++++++--- | |
1 file changed, 6 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/src/contactsearch.cuh b/src/contactsearch.cuh | |
t@@ -420,8 +420,8 @@ __global__ void interact(unsigned int* dev_gridParticleInd… | |
// Inter-particle vector, corrected for periodic boundaries | |
x_ab = MAKE_FLOAT3(x_a.x - x_b.x + distmod.x, | |
- x_a.y - x_b.y + distmod.y, | |
- x_a.z - x_b.z + distmod.z); | |
+ x_a.y - x_b.y + distmod.y, | |
+ x_a.z - x_b.z + distmod.z); | |
x_ab_length = length(x_ab); | |
delta_n = x_ab_length - (radius_a + radius_b); | |
t@@ -457,7 +457,7 @@ __global__ void interact(unsigned int* dev_gridParticleInd… | |
// Remove this contact (there is no particle with index=np) | |
dev_contacts[mempos] = devC_np; | |
// Zero sum of shear displacement in this position | |
- dev_delta_t[mempos] = MAKE_FLOAT4(0.0f, 0.0f, 0.0f, 0.0f); | |
+ dev_delta_t[mempos] = MAKE_FLOAT4(0.0f, 0.0f, 0.0f, 0.0f); | |
} | |
} else { | |
__syncthreads(); | |
t@@ -465,6 +465,9 @@ __global__ void interact(unsigned int* dev_gridParticleInd… | |
} | |
} // Contact loop end | |
+ | |
+ // Find contacts and process collisions immidiately for | |
+ // shearmodel 1 (visco-frictional). | |
} else if (devC_shearmodel == 1) { | |
int3 gridPos; |