tuse built-in coloring function - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 2cbdf7ac7d7e6d9ea19ba3a6d70b8a4a155326c3
(DIR) parent c4d1459f3e3b3c23b2492423d4897316fd4d361b
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Thu, 21 Aug 2014 12:46:10 +0200
use built-in coloring function
Diffstat:
M python/diffusivity-starter.py | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
---
(DIR) diff --git a/python/diffusivity-starter.py b/python/diffusivity-starter.py
t@@ -20,21 +20,7 @@ for sigma0_str in sys.argv[4:]:
'-c_grad_p=' + str(c_grad_p)
print(sim.sid)
- # Checkerboard colors
- x_min = numpy.min(sim.x[:,0])
- x_max = numpy.max(sim.x[:,0])
- y_min = numpy.min(sim.x[:,1])
- y_max = numpy.max(sim.x[:,1])
- z_min = numpy.min(sim.x[:,2])
- z_max = numpy.max(sim.x[:,2])
- color_nx = 6
- color_ny = 6
- color_nz = 6
- for i in range(sim.np):
- ix = numpy.floor((sim.x[i,0] - x_min)/(x_max/color_nx))
- iy = numpy.floor((sim.x[i,1] - y_min)/(y_max/color_ny))
- iz = numpy.floor((sim.x[i,2] - z_min)/(z_max/color_nz))
- sim.color[i] = (-1)**ix + (-1)**iy + (-1)**iz
+ sim.checkerboardColors()
sim.cleanup()
sim.adjustUpperWall()