tavoid division by zero - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
HTML git clone git://src.adamsgaard.dk/sphere
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
DIR commit d0e69686437ba011df73815df9dc01116d58b7f1
DIR parent 4f39ae81a66b0fd3f6d57da1ced96d209187fb53
HTML Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Mon, 27 Oct 2014 11:13:16 +0100
avoid division by zero
Diffstat:
M python/sphere.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
DIR diff --git a/python/sphere.py b/python/sphere.py
t@@ -5217,7 +5217,8 @@ class sim:
#ax1.plot(xdisp / w_x0, sigma_eff, '+-g', label="$\sigma'$")
#ax1.plot(xdisp / w_x0, sigma_def, '+-b', label="$\sigma_0$")
#ax1.plot(xdisp / w_x0, tau, '+-r', label="$\\tau$")
- ax1.plot(self.shear_strain, self.tau/self.sigma_eff,\
+ ax1.plot(self.shear_strain[1:],\
+ self.tau[1:]/self.sigma_eff[1:],\
'.-', label="$\\tau$")
#ax1.legend(loc=4)
ax1.grid()