tonly read Zdisplacement in new version - 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 1ed93090cb9bf53d18d614d01b1a107faa38589c
 (DIR) parent 51d90ea606adf26fc6e796a38d547269df9b985a
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Sun, 22 Jun 2014 09:35:16 +0200
       
       only read Zdisplacement in new version
       
       Diffstat:
         M python/sphere.py                    |      10 +++++++---
         M src/constants.h                     |       2 +-
       
       2 files changed, 8 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/python/sphere.py b/python/sphere.py
       t@@ -12,7 +12,7 @@ numpy.seterr(all='warn', over='raise')
        
        # Sphere version number. This field should correspond to the value in
        # `../src/constants.h`.
       -VERSION=1.02
       +VERSION=1.03
        
        class sim:
            '''
       t@@ -777,8 +777,12 @@ class sim:
                        self.radius[i] =\
                                numpy.fromfile(fh, dtype=numpy.float64, count=1)
        
       -            self.xyzsum = numpy.fromfile(fh, dtype=numpy.float64,\
       -                    count=self.np*3).reshape(self.np,3)
       +            if (self.version >= 1.03):
       +                self.xyzsum = numpy.fromfile(fh, dtype=numpy.float64,\
       +                        count=self.np*3).reshape(self.np,3)
       +            else:
       +                self.xyzsum = numpy.fromfile(fh, dtype=numpy.float64,\
       +                        count=self.np*2).reshape(self.np,2)
        
                    for i in range(self.np):
                        self.vel[i,:] =\
 (DIR) diff --git a/src/constants.h b/src/constants.h
       t@@ -16,7 +16,7 @@ const Float PI = 3.14159265358979;
        const unsigned int ND = 3;
        
        // Define source code version
       -const double VERSION = 1.02;
       +const double VERSION = 1.03;
        
        // Max. number of contacts per particle
        //const int NC = 16;