tread first input file if no information is present - 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 2dcc601d6b15d1deb7c53a29eb834b23da793d02
 (DIR) parent dfa8cd6359c3fe3253c253fa633d028c24ca48dd
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Fri,  9 Jan 2015 13:51:17 +0100
       
       read first input file if no information is present
       
       Diffstat:
         M python/sphere.py                    |      10 ++++++----
       
       1 file changed, 6 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/python/sphere.py b/python/sphere.py
       t@@ -5668,6 +5668,8 @@ class sim:
                        if numpy.isnan(d_bar):
                            raise Exception("Error, d_bar is NaN. Please check that the"
                                    + " radii are initialized.")
       +                    self.readfirst(verbose=False)
       +                    d_bar = numpy.mean(self.radius)*2.0
                        self.dilation[i] = (sb.w_x[0] - w_x0)/d_bar
        
                        # Test if this was the max. shear stress
       t@@ -5747,8 +5749,8 @@ class sim:
                        # linear plot of deviatoric stress
                        ax1 = plt.subplot2grid((1,1),(0,0))
                        ax1.set_xlabel('Time $t$, [s]')
       -                ax1.set_ylabel('Mean fluid pressure, $\\bar{p}_f$, [Pa]')
       -                ax1.plot(t, p_mean, '+-')
       +                ax1.set_ylabel('Mean fluid pressure, $\\bar{p}_f$, [kPa]')
       +                ax1.plot(t, p_mean/1000.0, '+-')
                        #ax1.legend()
                        ax1.grid()
        
       t@@ -5782,14 +5784,14 @@ class sim:
                        im1 = ax.pcolormesh(shear_strain, zpos_c, pres/1000.0,
                                rasterized=True)
                        ax.set_xlim([0, numpy.max(shear_strain)])
       -                ax.set_ylim([zpos_c[0], sim.w_x[0]])
       +                ax.set_ylim([zpos_c[0], sb.w_x[0]])
                        ax.set_xlabel('Shear strain $\\gamma$ [-]')
                        ax.set_ylabel('Vertical position $z$ [m]')
        
                        ax.set_title(sb.id())
        
                        cb = plt.colorbar(im1)
       -                cb.set_label('$p_\\text{f}$ [kPa]')
       +                cb.set_label('$p_f$ [kPa]')
                        cb.solids.set_rasterized(True)
                        plt.tight_layout()
                        plt.subplots_adjust(wspace = .05)