← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2073: 1. penetrationDepth() declaration fixed. Thanks to Vaclav.

 

------------------------------------------------------------
revno: 2073
committer: Anton Gladkyy <gladk@IAM004>
branch nick: trunk
timestamp: Wed 2010-03-10 11:23:35 +0100
message:
  1. penetrationDepth() declaration fixed. Thanks to Vaclav.
modified:
  pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_FacetSphere.hpp
  pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.hpp
  pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp


--
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 'pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_FacetSphere.hpp'
--- pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_FacetSphere.hpp	2010-03-10 09:18:14 +0000
+++ pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_FacetSphere.hpp	2010-03-10 10:23:35 +0000
@@ -16,7 +16,6 @@
 		virtual Real displacementN(){ return (se32.position-contactPoint).Length()-refLength;}
 		virtual Vector3r displacementT(){ relocateContactPoints(); return contPtInTgPlane2()-contPtInTgPlane1(); }
 		virtual Real slipToDisplacementTMax(Real displacementTMax);
-		Real penetrationDepth() {return refR2-refLength-displacementN();}
 		/***** end API ******/
 
 		void setTgPlanePts(const Vector3r&, const Vector3r&);

=== modified file 'pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.hpp'
--- pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.hpp	2010-03-10 09:18:14 +0000
+++ pkg/dem/DataClass/InteractionGeometry/Dem3DofGeom_SphereSphere.hpp	2010-03-10 10:23:35 +0000
@@ -28,7 +28,6 @@
 			#endif
 		}
 		Real slipToDisplacementTMax(Real displacementTMax);
-		Real penetrationDepth() {return (refR1+refR2)-refLength-displacementN();}
 		/********* end API ***********/
 
 	YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(Dem3DofGeom_SphereSphere,Dem3DofGeom,"Class representing 2 spheres in contact which computes 3 degrees of freedom (normal and shear deformation).",

=== modified file 'pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp'
--- pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp	2010-03-10 09:18:14 +0000
+++ pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp	2010-03-10 10:23:35 +0000
@@ -30,7 +30,6 @@
 		virtual Real displacementN();
 		virtual Vector3r displacementT(){throw;}
 		virtual Real slipToDisplacementTMax(Real displacementTMax){throw;}; // plasticity
-		virtual Real penetrationDepth(){throw;};
 		// reference radii, for contact stiffness computation; set to negative for nonsense values
 		// end API
 
@@ -41,6 +40,14 @@
 		}
 		Vector3r strainT(){return displacementT()/refLength;}
 		Real slipToStrainTMax(Real strainTMax){return slipToDisplacementTMax(strainTMax*refLength)/refLength;}
+		
+		Real penetrationDepth(){
+			if (refR1>0) {																	//If we have both radiuses: Sphere-Sphere
+			return (refR1+refR2)-refLength-displacementN();
+			} else {																				//If we have only 1 radius: Sphere-Facet
+				return refR2-refLength-displacementN();
+			}
+		}
 
 		YADE_CLASS_BASE_DOC_ATTRS_CTOR(Dem3DofGeom,GenericSpheresContact,
 			"Abstract base class for representing contact geometry of 2 elements that has 3 degrees of freedom: normal (1 component) and shear (Vector3r, but in plane perpendicular to the normal).",