tflip grid indexing - sphere - GPU-based 3D discrete element method algorithm w… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 50488b013525b02bbf8f5d13ea682ae3a9746028 | |
parent d668588d4b3af15e63f56421e3c21cc9164d550c | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 1 Sep 2014 11:21:50 +0200 | |
flip grid indexing | |
Diffstat: | |
M python/capillary-cohesion2.py | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/python/capillary-cohesion2.py b/python/capillary-cohesion2.py | |
t@@ -61,7 +61,7 @@ for z in range(nz): | |
for y in range(ny): | |
for x in range(nx): | |
- if (grid[x,z] == 0): | |
+ if (grid[z,x] == 0): | |
continue # skip to next iteration | |
for i in range(cube.np): | |
t@@ -69,7 +69,7 @@ for z in range(nz): | |
pos = [ cube.x[i,0] + x*dx, | |
cube.x[i,1] + y*dy, | |
cube.x[i,2] + z*dz ] | |
- sim.addParticle(pos, radius=cube.radius[i], color=grid[z,y]) | |
+ sim.addParticle(pos, radius=cube.radius[i], color=grid[z,x]) | |
sim.checkerboardColors() | |
sim.defaultParams(capillaryCohesion=cohesion) |