tadd grid dimensions to registers - sphere - GPU-based 3D discrete element meth… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit ce4cc3c55e6f421b258d803a47b479a6624a264e | |
parent 6319358f1bad931421ffe4afc3e7f763e8708fc3 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 20 Mar 2015 14:09:15 +0100 | |
add grid dimensions to registers | |
Diffstat: | |
M src/darcy.cuh | 9 ++++++--- | |
1 file changed, 6 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/src/darcy.cuh b/src/darcy.cuh | |
t@@ -912,9 +912,12 @@ __global__ void findDarcyPressureForceLinear( | |
const unsigned int cellidx = d_idx(i_x, i_y, i_z); | |
// determine cell dimensions | |
- const Float dx = devC_grid.L[0]/devC_grid.num[0]; | |
- const Float dy = devC_grid.L[1]/devC_grid.num[1]; | |
- const Float dz = devC_grid.L[2]/devC_grid.num[2]; | |
+ const unsigned int nx = devC_grid.num[0]; | |
+ const unsigned int ny = devC_grid.num[1]; | |
+ const unsigned int nz = devC_grid.num[2]; | |
+ const Float dx = devC_grid.L[0]/nx; | |
+ const Float dy = devC_grid.L[1]/ny; | |
+ const Float dz = devC_grid.L[2]/nz; | |
// read fluid information | |
__syncthreads(); |