tonly remove fluid parameters in wet simulations - 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 70df506c3f46fc35da97083eb542ac90c3abd46d
(DIR) parent 2f797ca42a01f9ba8b1a0b796f1a2d401fd93cb8
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Tue, 30 Sep 2014 14:32:06 +0200
only remove fluid parameters in wet simulations
Diffstat:
M python/shear-results-forces.py | 3 ++-
M python/sphere.py | 9 +++++----
2 files changed, 7 insertions(+), 5 deletions(-)
---
(DIR) diff --git a/python/shear-results-forces.py b/python/shear-results-forces.py
t@@ -112,7 +112,8 @@ for step_str in steps:
print(sid + ' not found')
s += 1
-fig = plt.figure(figsize=(8,4*(len(steps))+1))
+#fig = plt.figure(figsize=(8,4*(len(steps))+1))
+fig = plt.figure(figsize=(8,5*(len(steps))+1))
ax = []
for s in numpy.arange(len(steps)):
(DIR) diff --git a/python/sphere.py b/python/sphere.py
t@@ -747,10 +747,11 @@ class sim:
self.ev = numpy.delete(self.ev, i)
self.p = numpy.delete(self.p, i)
self.color = numpy.delete(self.color, i)
- self.f_d = numpy.delete(self.f_d, i, axis=0)
- self.f_p = numpy.delete(self.f_p, i, axis=0)
- self.f_v = numpy.delete(self.f_v, i, axis=0)
- self.f_sum = numpy.delete(self.f_sum, i, axis=0)
+ if self.fluid:
+ self.f_d = numpy.delete(self.f_d, i, axis=0)
+ self.f_p = numpy.delete(self.f_p, i, axis=0)
+ self.f_v = numpy.delete(self.f_v, i, axis=0)
+ self.f_sum = numpy.delete(self.f_sum, i, axis=0)
def deleteAllParticles(self):
'''