tavoid division by zero - sphere - GPU-based 3D discrete element method algorit… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit d0e69686437ba011df73815df9dc01116d58b7f1 | |
parent 4f39ae81a66b0fd3f6d57da1ced96d209187fb53 | |
Author: Anders Damsgaard <[email protected]> | |
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(-) | |
--- | |
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() |