yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #02584
[Branch ~yade-dev/yade/trunk] Rev 1874: 1. In utils.facetBox added 'Defence from zero dimensions'
------------------------------------------------------------
revno: 1874
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2009-12-09 10:52:15 +0100
message:
1. In utils.facetBox added 'Defence from zero dimensions'
2. regular-sphere-pack.py is updated due to new names
modified:
py/utils.py
scripts/test/regular-sphere-pack.py
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'py/utils.py'
--- py/utils.py 2009-12-09 09:24:52 +0000
+++ py/utils.py 2009-12-09 09:52:15 +0000
@@ -182,6 +182,17 @@
Remaining **kw arguments are passed to utils.facet.
The facets are oriented outwards from the box."""
+
+ """Defence from zero dimensions"""
+ if (extents[0]==0):
+ wallMask=1
+ elif (extents[1]==0):
+ wallMask=4
+ elif (extents[2]==0):
+ wallMask=16
+ if (((extents[0]==0) and (extents[1]==0)) or ((extents[0]==0) and (extents[2]==0)) or ((extents[1]==0) and (extents[2]==0))):
+ raise TypeError("Please, specify at least 2 none-zero dimensions in extents!");
+
mn,mx=[-extents[i] for i in 0,1,2],[extents[i] for i in 0,1,2]
def doWall(a,b,c,d):
return [facet((a,b,c),**kw),facet((a,c,d),**kw)]
=== modified file 'scripts/test/regular-sphere-pack.py'
--- scripts/test/regular-sphere-pack.py 2009-12-04 23:27:26 +0000
+++ scripts/test/regular-sphere-pack.py 2009-12-09 09:52:15 +0000
@@ -74,7 +74,7 @@
BoundDispatcher([InteractingSphere2AABB(),InteractingFacet2AABB(),MetaInteractingGeometry2AABB()]),
InsertionSortCollider(),
InteractionDispatchers(
- [ef2_Sphere_Sphere_Dem3DofGeom(),ef2_Facet_Sphere_Dem3DofGeom()],
+ [Ig2_Sphere_Sphere_Dem3DofGeom(),Ig2_Facet_Sphere_Dem3DofGeom()],
[SimpleElasticRelationships()],
[Law2_Dem3Dof_Elastic_Elastic()],
),
Follow ups