← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4166: Correction of an error using psd() with monodisperse packings (false = False in python). Add of a...

 

------------------------------------------------------------
revno: 4166
committer: jduriez <jerome.duriez@xxxxxxxxxxxxxxx>
timestamp: Tue 2014-09-16 18:20:31 -0600
message:
  Correction of an error using psd() with monodisperse packings (false = False in python). Add of an explanatory message
modified:
  py/utils.py


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'py/utils.py'
--- py/utils.py	2014-08-21 14:31:08 +0000
+++ py/utils.py	2014-09-17 00:20:31 +0000
@@ -936,7 +936,9 @@
 			if ((2*b.shape.radius)	> maxD) : maxD = 2*b.shape.radius
 			if (((2*b.shape.radius)	< minD) or (minD==0.0)): minD = 2*b.shape.radius
 
-	if (minD==maxD): return false       #All particles are having the same size
+	if (minD==maxD):
+		print 'Monodisperse packing with diameter =', minD,'. Not computing psd'
+		return False       #All particles are having the same size
   
 	binsSizes = numpy.linspace(minD, maxD, bins+1)