tonly add fluid force vectors if fluid=true - 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 21f1894e7c4390b1b3c1856bd7510ecda586c1e3
(DIR) parent 0f1185f84c194087b38e96293082d0f4f73d5afa
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Mon, 1 Sep 2014 10:47:59 +0200
only add fluid force vectors if fluid=true
Diffstat:
M python/sphere.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/python/sphere.py b/python/sphere.py
t@@ -691,10 +691,11 @@ class sim:
self.ev = numpy.append(self.ev, ev)
self.p = numpy.append(self.p, p)
self.color = numpy.append(self.color, color)
- self.f_d = numpy.append(self.f_d, [numpy.zeros(3)], axis=0)
- self.f_p = numpy.append(self.f_p, [numpy.zeros(3)], axis=0)
- self.f_v = numpy.append(self.f_v, [numpy.zeros(3)], axis=0)
- self.f_sum = numpy.append(self.f_sum, [numpy.zeros(3)], axis=0)
+ if self.fluid:
+ self.f_d = numpy.append(self.f_d, [numpy.zeros(3)], axis=0)
+ self.f_p = numpy.append(self.f_p, [numpy.zeros(3)], axis=0)
+ self.f_v = numpy.append(self.f_v, [numpy.zeros(3)], axis=0)
+ self.f_sum = numpy.append(self.f_sum, [numpy.zeros(3)], axis=0)
def deleteParticle(self, i):
'''