tfix host side vidx - sphere - GPU-based 3D discrete element method algorithm w… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 3cba4eeb49ac21221e20a93f576466bb220f6c2c | |
parent 4df908f08d8b32257ec0e176f7a620382d798e98 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sat, 28 Jun 2014 14:59:50 +0200 | |
fix host side vidx | |
Diffstat: | |
M src/navierstokes.cpp | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/src/navierstokes.cpp b/src/navierstokes.cpp | |
t@@ -98,7 +98,7 @@ unsigned int DEM::vidx( | |
const int z) | |
{ | |
//return x + (ns.nx+1)*y + (ns.nx+1)*(ns.ny+1)*z; // without ghost nodes | |
- return x + (ns.nx+3)*y + (ns.nx+3)*(ns.ny+3)*z; // with ghost nodes | |
+ return (x+1) + (ns.nx+3)*(y+1) + (ns.nx+3)*(ns.ny+3)*(z+1); // with ghost … | |
} | |
// Determine if the FTCS (forward time, central space) solution of the Navier |