← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1738: Some nonessential changes

 

------------------------------------------------------------
revno: 1738
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2009-08-26 11:10:54 +0200
message:
  Some nonessential changes
modified:
  pkg/dem/meta/RockPM.cpp
  py/utils.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 'pkg/dem/meta/RockPM.cpp'
--- pkg/dem/meta/RockPM.cpp	2009-08-24 14:59:16 +0000
+++ pkg/dem/meta/RockPM.cpp	2009-08-26 09:10:54 +0000
@@ -32,7 +32,6 @@
 void Law2_Dem3DofGeom_RockPMPhys_Rpm::go(shared_ptr<InteractionGeometry>& ig, shared_ptr<InteractionPhysics>& ip, Interaction* contact, MetaBody* rootBody){
 	Dem3DofGeom* geom=static_cast<Dem3DofGeom*>(ig.get());
 	RpmPhys* phys=static_cast<RpmPhys*>(ip.get());
-	//geom->distanceFactor=1.1;
 	
 	Real displN=geom->displacementN();
 	const Real& crossSection=phys->crossSection;
@@ -57,10 +56,6 @@
 	const shared_ptr<RpmMat>& rbp1=YADE_PTR_CAST<RpmMat>(body1->physicalParameters);
 	const shared_ptr<RpmMat>& rbp2=YADE_PTR_CAST<RpmMat>(body2->physicalParameters);
 	
-	///check, whether one of bodies is damaged
-	if ((rbp1->isDamaged) || (rbp2->isDamaged)) {
-		phys->isCohesive = false;
-	}
 
 	if(displN<=0){
 		/**Normal Interaction*/
@@ -84,26 +79,35 @@
 		phys->shearForce = Fs;
 
 		applyForceAtContactPoint(phys->normalForce + phys->shearForce, geom->contactPoint, contact->getId1(), geom->se31.position, contact->getId2(), geom->se32.position, rootBody);
-		/**Normal Interaction_____*/
+		/**Normal Interaction*/
 		if ((phys->isCohesive)&&(displN<(-phys->lengthMaxCompression))) {
-			//LOG_WARN(displN<<"__COMRESS!!!__");
 			phys->isCohesive = false;
-			rbp1->isDamaged=true;
-			rbp2->isDamaged=true;
 		}
 		return;
 	} else {
+		/**If spheres do not touch, check, whether they are cohesive*/
 		if (phys->isCohesive) {
+			/**If the distance 
+			 * between spheres more than critical and they are cohesive,
+			 * we delete the interaction
+			 * Destruction.
+			 **/
 			if (displN>(phys->lengthMaxTension)) {
-				//LOG_WARN(displN<<"__TENSION!!!__");
 				rootBody->interactions->requestErase(contact->getId1(),contact->getId2());
 				return; 
 			} else {
+			/**If the distance 
+			 * between spheres less than critical and they are cohesive,
+			 * we aply additional forces to keep particles together.
+			 **/
 				phys->normalForce=phys->kn*displN*geom->normal;
 				applyForceAtContactPoint(phys->normalForce, geom->contactPoint, contact->getId1(), geom->se31.position, contact->getId2(), geom->se32.position, rootBody);
 				return;
 			}
 		} else {
+			/**
+			 * Delete interactions
+			 */ 
 			rootBody->interactions->requestErase(contact->getId1(),contact->getId2());
 			return;
 		}

=== modified file 'py/utils.py'
--- py/utils.py	2009-08-24 17:07:33 +0000
+++ py/utils.py	2009-08-26 09:10:54 +0000
@@ -142,28 +142,6 @@
 	if wallMask&32: ret+=doWall(E,F,G,H)
 	return ret
 	
-	'''
-	mn,mx=[center[i]-extents[i] for i in 0,1,2],[center[i]+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)]
-	ret=[]
-	qTemp = Quaternion(Vector3(orientation[0],orientation[1],orientation[2]),orientation[3])
-	A=qTemp.Rotate(Vector3(mn[0],mn[1],mn[2]))
-	B=qTemp.Rotate(Vector3(mx[0],mn[1],mn[2]))
-	C=qTemp.Rotate(Vector3(mx[0],mx[1],mn[2]))
-	D=qTemp.Rotate(Vector3(mn[0],mx[1],mn[2]))
-	E=qTemp.Rotate(Vector3(mn[0],mn[1],mx[2]))
-	F=qTemp.Rotate(Vector3(mx[0],mn[1],mx[2]))
-	G=qTemp.Rotate(Vector3(mx[0],mx[1],mx[2]))
-	H=qTemp.Rotate(Vector3(mn[0],mx[1],mx[2]))
-	if wallMask&1:  ret+=doWall(A,D,H,E)
-	if wallMask&2:  ret+=doWall(B,C,G,F)
-	if wallMask&4:  ret+=doWall(A,B,F,E)
-	if wallMask&8:  ret+=doWall(D,H,G,C)
-	if wallMask&16: ret+=doWall(A,D,C,B)
-	if wallMask&32: ret+=doWall(E,F,G,H)
-	return ret
-	'''
 	
 
 def aabbWalls(extrema=None,thickness=None,oversizeFactor=1.5,**kw):