tadd else clause for old files - sphere - GPU-based 3D discrete element method … | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 652a45877961f69687a5a30eb6542c7d75cd8c60 | |
parent 549f59dd4a97cebb68290f4233b94dae1e38187f | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 14 Jan 2015 14:53:15 +0100 | |
add else clause for old files | |
Diffstat: | |
M python/sphere.py | 2 ++ | |
1 file changed, 2 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -1042,6 +1042,8 @@ class sim: | |
self.w_sigma0_f = numpy.fromfile(fh, dtype=numpy.float64, coun… | |
if self.version >= 2.1: | |
self.w_tau_x = numpy.fromfile(fh, dtype=numpy.float64, count=1) | |
+ else: | |
+ self.w_tau_x = numpy.zeros(1, dtype=numpy.float64) | |
if bonds: | |
# Inter-particle bonds |