tfix syntax - sphere - GPU-based 3D discrete element method algorithm with opti… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 05dea71ea320521a46900fb3b74dd6f44a9327c5 | |
parent d299ad9ed8edbb6652677fe9568ce4f9a78b6299 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 14 Jan 2015 13:57:39 +0100 | |
fix syntax | |
Diffstat: | |
M src/integration.cuh | 12 ++++++------ | |
1 file changed, 6 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/src/integration.cuh b/src/integration.cuh | |
t@@ -455,19 +455,19 @@ __global__ void findShearStressOnFixedMovingParticles( | |
// Copy data to temporary arrays to avoid any potential | |
// read-after-write, write-after-read, or write-after-write hazards. | |
__syncthreads(); | |
- const Float4 x = dev_x[idx]; | |
- const Float force_x = dev_force[idx].x; | |
- | |
- Float f_x = 0.0; | |
+ const Float z = dev_x[idx].z; | |
+ const Float fixvel = dev_vel[idx].w; | |
+ const Float force_x = dev_force[idx].x; | |
// Only select fixed velocity (fixvel > 0.0, fixvel = vel.w) particles | |
// at the top boundary (z > L[0]/2) | |
- if (vel.w > 0.0 && x.z > devC_grid.L[2]*0.5) | |
+ Float f_x = 0.0; | |
+ if (fixvel > 0.0 && z > devC_grid.L[2]*0.5) | |
f_x = force_x; | |
__syncthreads(); | |
// Convert force to shear stress and save | |
- dev_walls_tau_eff_x_pp[idx] = f_x/(devC_grid.L[0]*devC_grid.L[1]; | |
+ dev_walls_tau_eff_x_pp[idx] = f_x/(devC_grid.L[0]*devC_grid.L[1]); | |
} | |
} | |
#endif |