timprove 'fluid-pressure' visualization - 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 7d1d52e4c892231f8481a147838f6c3f6550c4a2
 (DIR) parent ba0c4fc4ce51e38765e69f6b540f2c1ad73810d0
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Fri,  9 Jan 2015 15:06:24 +0100
       
       improve 'fluid-pressure' visualization
       
       Diffstat:
         M python/sphere.py                    |       9 ++++++++-
       
       1 file changed, 8 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/python/sphere.py b/python/sphere.py
       t@@ -5782,7 +5782,14 @@ class sim:
        
                        ax = plt.subplot(1,1,1)
        
       -                im1 = ax.pcolormesh(t, zpos_c, pres/1000.0,
       +                pres /= 1000.0 # Pa to kPa
       +                # use largest difference in p from 0 as +/- limit on colormap
       +                p_ext = numpy.max(numpy.abs(pres))
       +
       +                im1 = ax.pcolormesh(t, zpos_c, pres,
       +                        #cmap=matplotlib.cm.get_cmap('bwr'),
       +                        cmap=matplotlib.cm.get_cmap('coolwarm'),
       +                        vmin=-p_ext, vmax=p_ext,
                                rasterized=True)
                        #ax.set_xlim([0, numpy.max(shear_strain)])
                        ax.set_xlim([0, numpy.max(t)])