tadded checkerboard coloring, disabled relaxation run - 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 33ad1b0819d543205cc99cf47192ad8ae1a902d7
 (DIR) parent 85cb16e537cf83c60149c96f1b0f4a565382ef1c
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Sat, 21 Jun 2014 12:55:13 +0200
       
       added checkerboard coloring, disabled relaxation run
       
       Diffstat:
         M python/shortening.py                |      30 ++++++++++++++++++++++++------
       
       1 file changed, 24 insertions(+), 6 deletions(-)
       ---
 (DIR) diff --git a/python/shortening.py b/python/shortening.py
       t@@ -98,9 +98,9 @@ sim.uniaxialStrainRate(wvel = 0.0)
        sim.initTemporal(total=3.0, file_dt = 0.01)
        sim.zeroKinematics()
        
       -sim.run(dry=True)
       -sim.run()
       -sim.writeVTKall()
       +#sim.run(dry=True)
       +#sim.run()
       +#sim.writeVTKall()
        
        
        ## Shortening
       t@@ -112,12 +112,30 @@ sim.initTemporal(current=0.0, total=5.0, file_dt = 0.01)
        
        # set colors again
        color_ny = 6
       +color_nz = 50
       +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_dy = y_max/color_ny
       +color_dz = z_max/color_nz
        color_y = numpy.arange(0.0, y_max, ny)
       -for i in range(ny-1):
       -    I = numpy.nonzero((sim.x[:,1] >= color_y[i]) & (sim.x[:,1] <= color_y[i+1]))
       -    sim.color[I] = i%2 + 1
       +color_z = numpy.arange(0.0, z_max, nz)
       +
       +# 1 or 2 in horizontal layers
       +#for i in range(ny-1):
       +    #I = numpy.nonzero((sim.x[:,1] >= color_y[i]) & (sim.x[:,1] <= color_y[i+1]))
       +    #sim.color[I] = i%2 + 1
       +
       +# 1 or 3 in checkerboard
       +for i in range(sim.np):
       +    iy = numpy.floor((self.x[i,1] - y_min)/(y_max/color_ny))
       +    iz = numpy.floor((self.x[i,2] - z_min)/(z_max/color_nz))
       +    sim.color[i] = (-1)**iy + (-1)**iz + 1
       +
       +sim.normalBoundariesXY()
       +sim.mu_ws[0] = 0.0
       +sim.mu_wd[0] = 0.0
        
        sim.mu_s[0] = 0.5
        sim.mu_d[0] = 0.5