| tAdded dx exception - sphere - GPU-based 3D discrete element method algorithm w… | |
| git clone git://src.adamsgaard.dk/sphere | |
| Log | |
| Files | |
| Refs | |
| LICENSE | |
| --- | |
| commit 7e019763c23bf063f7ae4916bc03d404a648a135 | |
| parent 47aa1cb121030dda5698b6c732d38e8cd8f718a9 | |
| Author: Anders Damsgaard <[email protected]> | |
| Date: Thu, 3 Apr 2014 14:26:39 +0200 | |
| Added dx exception | |
| Diffstat: | |
| M python/sphere.py | 4 ++++ | |
| 1 file changed, 4 insertions(+), 0 deletions(-) | |
| --- | |
| diff --git a/python/sphere.py b/python/sphere.py | |
| t@@ -1710,6 +1710,10 @@ class sim: | |
| if (dx > 0.0): | |
| cellsize_min = dx | |
| else: | |
| + if (self.np[0] < 1): | |
| + raise Exception('Error: You need to define dx in ' | |
| + 'defineWorldBoundaries if there are no particles in ' | |
| + 'the simulation.') | |
| cellsize_min = 2.1 * numpy.amax(self.radius) | |
| # Lower boundary of the sorting grid |