← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1778: Fix what seems like bug in is2is4scg...

 

------------------------------------------------------------
revno: 1778
committer: Václav Šmilauer <vaclav@flux>
branch nick: trunk
timestamp: Tue 2009-11-03 20:10:37 +0100
message:
  Fix what seems like bug in is2is4scg...
modified:
  pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp


--
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/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp'
--- pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp	2009-08-19 12:00:35 +0000
+++ pkg/dem/Engine/EngineUnit/InteractingSphere2InteractingSphere4SpheresContactGeometry.cpp	2009-11-03 19:10:37 +0000
@@ -33,14 +33,14 @@
 
 		Real penetrationDepth=s1->radius+s2->radius-normal.Normalize(); /* Normalize() works in-place and returns length before normalization; from here, normal is unit vector */
 		scm->contactPoint=se31.position+(s1->radius-0.5*penetrationDepth)*normal;//0.5*(pt1+pt2);
+		#ifdef SCG_SHEAR
+			if(isNew) scm->prevNormal=normal; 
+			else scm->prevNormal=scm->normal;
+		#endif
 		scm->normal=normal;
 		scm->penetrationDepth=penetrationDepth;
 		scm->radius1=s1->radius;
 		scm->radius2=s2->radius;
-		#ifdef SCG_SHEAR
-			if(isNew) scm->prevNormal=normal; 
-			else scm->prevNormal=scm->normal;
-		#endif
 		// keep this for reference on how to compute bending and torsion from relative orientation; parts in SpheresContactGeometry header
 		#if 0
 			scm->initRelOri12=se31.orientation.Conjugate()*se32.orientation;