tfixed error in addParticle - sphere - GPU-based 3D discrete element method alg… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit a0d18146c21e0e14765c3ec12f79ef48a28ea880 | |
parent 86ff0596acf9d36f1e849e72d1a6184fd6a4edcf | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 2 Oct 2013 11:59:30 +0200 | |
fixed error in addParticle | |
Diffstat: | |
M python/sphere.py | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -210,7 +210,7 @@ class Spherebin: | |
def addParticle(self, | |
x, | |
radius, | |
- xysum = numpy.zeros(1), | |
+ xysum = numpy.zeros(2), | |
vel = numpy.zeros(3), | |
fixvel = numpy.zeros(1), | |
force = numpy.zeros(3), | |
t@@ -232,6 +232,7 @@ class Spherebin: | |
self.x = numpy.append(self.x, [x], axis=0) | |
self.radius = numpy.append(self.radius, radius) | |
self.vel = numpy.append(self.vel, [vel], axis=0) | |
+ self.xysum = numpy.append(self.xysum, [xysum], axis=0) | |
self.fixvel = numpy.append(self.fixvel, fixvel) | |
self.force = numpy.append(self.force, [force], axis=0) | |
self.angpos = numpy.append(self.angpos, [angpos], axis=0) |