| tgrid index fix - sphere - GPU-based 3D discrete element method algorithm with … | |
| git clone git://src.adamsgaard.dk/sphere | |
| Log | |
| Files | |
| Refs | |
| LICENSE | |
| --- | |
| commit f881fe5dabefd584e475f38dbc42e234a4754cc0 | |
| parent 5d129366464784427904960a745de18f1ea89356 | |
| Author: Anders Damsgaard <[email protected]> | |
| Date: Wed, 18 Jun 2014 12:34:07 +0200 | |
| grid index fix | |
| Diffstat: | |
| M python/sphere.py | 2 +- | |
| 1 file changed, 1 insertion(+), 1 deletion(-) | |
| --- | |
| diff --git a/python/sphere.py b/python/sphere.py | |
| t@@ -1957,7 +1957,7 @@ class sim: | |
| # Find position in 3d mesh from linear index | |
| gridpos[0] = (i % (coarsegrid[0])) | |
| - gridpos[1] = numpy.floor(i/(coarsegrid[0])) % (coarsegrid[0]) | |
| + gridpos[1] = numpy.floor(i/(coarsegrid[0])) % (coarsegrid[1]) | |
| gridpos[2] = numpy.floor(i/((coarsegrid[0])*(coarsegrid[1]))) | |
| # Place particles in grid structure, and randomly adjust the |