tdo not raise exception if radii can be read from file - sphere - GPU-based 3D … | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 1d39555fbe7f3e3cce7412e28f78ab0f22bd6bb1 | |
parent 2dcc601d6b15d1deb7c53a29eb834b23da793d02 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 9 Jan 2015 13:56:22 +0100 | |
do not raise exception if radii can be read from file | |
Diffstat: | |
M python/sphere.py | 8 +++++--- | |
1 file changed, 5 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -5666,9 +5666,11 @@ class sim: | |
# dilation in number of mean particle diameters | |
d_bar = numpy.mean(self.radius)*2.0 | |
if numpy.isnan(d_bar): | |
- raise Exception("Error, d_bar is NaN. Please check that th… | |
- + " radii are initialized.") | |
- self.readfirst(verbose=False) | |
+ #raise Exception("Error, d_bar is NaN. Please check that t… | |
+ # + " radii are initialized.") | |
+ print('No radii in self.radius, attempting to read first ' | |
+ + 'file') | |
+ self.readfirst() | |
d_bar = numpy.mean(self.radius)*2.0 | |
self.dilation[i] = (sb.w_x[0] - w_x0)/d_bar | |