← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2001: - "SimpleShear" was re-introduced in pkg/, instead of attic/

 

Merge authors:
  jduriez <jduriez@c1solimara-l>
------------------------------------------------------------
revno: 2001 [merge]
committer: jduriez <jduriez@c1solimara-l>
branch nick: trunk
timestamp: Tue 2010-02-02 17:20:35 +0100
message:
  - "SimpleShear" was re-introduced in pkg/, instead of attic/
  
  Linked code is normally adapted to current design :
  - RockJointLaw and the (interaction) physics and Relationships linked
  - Engines CinemCNC / DNC / KNC
renamed:
  attic/pkg/dem/PreProcessor/SimpleShear.cpp => pkg/dem/PreProcessor/SimpleShear.cpp
  attic/pkg/dem/PreProcessor/SimpleShear.hpp => pkg/dem/PreProcessor/SimpleShear.hpp
modified:
  pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp
  pkg/common/Engine/PartialEngine/CinemDNCEngine.cpp
  pkg/common/Engine/PartialEngine/CinemKNCEngine.cpp
  pkg/common/Engine/PartialEngine/CinemKNCEngine.hpp
  pkg/dem/DataClass/InteractionPhysics/RockJointPhys.cpp
  pkg/dem/Engine/Functor/RockJointLawRelationships.cpp
  pkg/dem/Engine/Functor/RockJointLawRelationships.hpp
  pkg/dem/Engine/GlobalEngine/RockJointLaw.cpp
  pkg/dem/PreProcessor/SimpleShear.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/common/Engine/PartialEngine/CinemCNCEngine.cpp'
--- pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp	2010-02-02 14:27:14 +0000
+++ pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp	2010-02-02 16:20:35 +0000
@@ -5,7 +5,7 @@
 *  This program is free software; it is licensed under the terms of the  *
 *  GNU General Public License v2 or later. See file LICENSE for details. *
 *************************************************************************/
-YADE_REQUIRE_FEATURE(physpar)
+// YADE_REQUIRE_FEATURE(physpar)
 
 #include "CinemCNCEngine.hpp"
 // #include<yade/pkg-common/RigidBodyParameters.hpp> , remplace par : 

=== modified file 'pkg/common/Engine/PartialEngine/CinemDNCEngine.cpp'
--- pkg/common/Engine/PartialEngine/CinemDNCEngine.cpp	2010-02-01 15:20:54 +0000
+++ pkg/common/Engine/PartialEngine/CinemDNCEngine.cpp	2010-02-02 16:20:35 +0000
@@ -6,7 +6,6 @@
 *  GNU General Public License v2 or later. See file LICENSE for details. *
 *************************************************************************/
 
-#include<yade/pkg-common/RigidBodyParameters.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/lib-base/yadeWm3Extra.hpp>
 #include<yade/lib-miniWm3/Wm3Math.h>
@@ -28,7 +27,7 @@
 }
 
 
-void CinemDNCEngine::applyCondition(Scene * body)
+void CinemDNCEngine::applyCondition(Scene * ncb)
 {
 	leftbox = Body::byId(id_boxleft);
 	rightbox = Body::byId(id_boxright);
@@ -63,30 +62,25 @@
 }
 
 
-void CinemDNCEngine::letMove(MetaBody * ncb)
+void CinemDNCEngine::letMove(Scene * ncb)
 {
 	shared_ptr<BodyContainer> bodies = ncb->bodies;
 	Real dt = Omega::instance().getTimeStep();
 	Real dx = shearSpeed * dt;
 
-	(topbox->physicalParameters.get())->se3.position += Vector3r(dx,0,0);
-
-	(leftbox->physicalParameters.get())->se3.position += Vector3r(dx/2.0,0,0);
-	(rightbox->physicalParameters.get())->se3.position += Vector3r(dx/2.0,0,0);
-
-	Real Ysup = (topbox->physicalParameters.get())->se3.position.Y();
-	Real Ylat = (leftbox->physicalParameters.get())->se3.position.Y();
+	topbox->state->pos += Vector3r(dx,0,0);
+
+	leftbox->state->pos += Vector3r(dx/2.0,0,0);
+	rightbox->state->pos += Vector3r(dx/2.0,0,0);
+
+	Real Ysup = topbox->state->pos.Y();
+	Real Ylat = leftbox->state->pos.Y();
 
 
 //	with the corresponding velocities :
-	RigidBodyParameters * rb = dynamic_cast<RigidBodyParameters*>(topbox->physicalParameters.get());
-	rb->velocity = Vector3r(shearSpeed,0,0);
-
-	rb = dynamic_cast<RigidBodyParameters*>(leftbox->physicalParameters.get());
-	rb->velocity = Vector3r(shearSpeed/2.0,0,0);
-
-	rb = dynamic_cast<RigidBodyParameters*>(rightbox->physicalParameters.get());
-	rb->velocity = Vector3r(shearSpeed/2.0,0,0);
+	topbox->state->vel = Vector3r(shearSpeed,0,0);
+	leftbox->state->vel = Vector3r(shearSpeed/2.0,0,0);
+	rightbox->state->vel = Vector3r(shearSpeed/2.0,0,0);
 
 //	Then computation of the angle of the rotation to be done :
 	computeAlpha();
@@ -104,13 +98,11 @@
 	qcorr.FromAxisAngle(Vector3r(0,0,1),dalpha);
 
 // On applique la rotation en changeant l'orientation des plaques, leurs vang et en affectant donc alpha
-	rb = dynamic_cast<RigidBodyParameters*>(leftbox->physicalParameters.get());
-	rb->se3.orientation	= qcorr*rb->se3.orientation;
-	rb->angularVelocity	= Vector3r(0,0,1)*dalpha/dt;
+	leftbox->state->ori	= qcorr*leftbox->state->ori;
+	leftbox->state->angVel	= Vector3r(0,0,1)*dalpha/dt;
 
-	rb = dynamic_cast<RigidBodyParameters*>(rightbox->physicalParameters.get());
-	rb->se3.orientation	= qcorr*rb->se3.orientation;
-	rb->angularVelocity	= Vector3r(0,0,1)*dalpha/dt;
+	rightbox->state->ori	= qcorr*rightbox->state->ori;
+	rightbox->state->angVel	= Vector3r(0,0,1)*dalpha/dt;
 
 	gamma+=dx;
 }
@@ -119,8 +111,8 @@
 void CinemDNCEngine::computeAlpha()
 {
 	Quaternionr orientationLeftBox,orientationRightBox;
-	orientationLeftBox = (dynamic_cast<RigidBodyParameters*>(leftbox->physicalParameters.get()) )->se3.orientation;
-	orientationRightBox = (dynamic_cast<RigidBodyParameters*>(rightbox->physicalParameters.get()) )->se3.orientation;
+	orientationLeftBox = leftbox->state->ori;
+	orientationRightBox = rightbox->state->ori;
 	if(orientationLeftBox!=orientationRightBox)
 	{
 		cout << "WARNING !!! your lateral boxes have not the same orientation, you're not in the case of a box imagined for creating these engines" << endl;
@@ -134,20 +126,17 @@
 void CinemDNCEngine::stopMovement()
 {
 	// annulation de la vitesse de la plaque du haut
-	RigidBodyParameters * rb = YADE_CAST<RigidBodyParameters*>(topbox->physicalParameters.get());
-	rb->velocity		=  Vector3r(0,0,0);
+	topbox->state->vel	=  Vector3r(0,0,0);
 
 	// de la plaque gauche
-	rb = YADE_CAST<RigidBodyParameters*>(leftbox->physicalParameters.get());
-	rb->velocity		=  Vector3r(0,0,0);
-	rb->angularVelocity	=  Vector3r(0,0,0);
+	leftbox->state->vel	=  Vector3r(0,0,0);
+	leftbox->state->angVel	=  Vector3r(0,0,0);
 
 	// de la plaque droite
-	rb = YADE_CAST<RigidBodyParameters*>(rightbox->physicalParameters.get());
-	rb->velocity		=  Vector3r(0,0,0);
-	rb->angularVelocity	=  Vector3r(0,0,0);
+	rightbox->state->vel	=  Vector3r(0,0,0);
+	rightbox->state->angVel	=  Vector3r(0,0,0);
 }
 
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+// YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== modified file 'pkg/common/Engine/PartialEngine/CinemKNCEngine.cpp'
--- pkg/common/Engine/PartialEngine/CinemKNCEngine.cpp	2010-02-02 14:27:14 +0000
+++ pkg/common/Engine/PartialEngine/CinemKNCEngine.cpp	2010-02-02 16:20:35 +0000
@@ -5,11 +5,12 @@
 *  This program is free software; it is licensed under the terms of the  *
 *  GNU General Public License v2 or later. See file LICENSE for details. *
 *************************************************************************/
-YADE_REQUIRE_FEATURE(physpar)
+
 
 
 #include "CinemKNCEngine.hpp"
-#include<yade/pkg-common/RigidBodyParameters.hpp>
+// #include<yade/pkg-common/RigidBodyParameters.hpp>
+#include<yade/core/State.hpp>
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-dem/FrictPhys.hpp>
 #include<yade/core/Scene.hpp>
@@ -38,7 +39,7 @@
 }
 
 
-void CinemKNCEngine::applyCondition(Body * body)
+void CinemKNCEngine::applyCondition(Scene * ncb)
 {
 	if(LOG) cerr << "debut applyCondi !!" << endl;
 	leftbox = Body::byId(id_boxleft);
@@ -52,7 +53,7 @@
 
 	if(gamma<=gammalim)
 	{
-		letMove(body);
+		letMove(ncb);
 		if(temoin==0)
 		{
 			temoin=1;
@@ -73,9 +74,8 @@
 
 }
 
-void CinemKNCEngine::letMove(Body * body)
+void CinemKNCEngine::letMove(Scene * ncb)
 {
-	Scene * ncb = YADE_CAST<Scene*>(body);
 	shared_ptr<BodyContainer> bodies = ncb->bodies;
 
 	if(LOG) cout << "It : " << Omega::instance().getCurrentIteration() << endl;
@@ -85,28 +85,23 @@
 	Real dx = shearSpeed * dt;
 
 
-	Real Ysup = (topbox->physicalParameters.get())->se3.position.Y();
-	Real Ylat = (leftbox->physicalParameters.get())->se3.position.Y();
+	Real Ysup = topbox->state->pos.Y();
+	Real Ylat = leftbox->state->pos.Y();
 
 // 	Changes in vertical and horizontal position :
 
-	(topbox->physicalParameters.get())->se3.position += Vector3r(dx,deltaH,0);
+	topbox->state->pos += Vector3r(dx,deltaH,0);
 
-	(leftbox->physicalParameters.get())->se3.position += Vector3r(dx/2.0,deltaH/2.0,0);
-	(rightbox->physicalParameters.get())->se3.position += Vector3r(dx/2.0,deltaH/2.0,0);
+	leftbox->state->pos += Vector3r(dx/2.0,deltaH/2.0,0);
+	rightbox->state->pos += Vector3r(dx/2.0,deltaH/2.0,0);
 	
-	Real Ysup_mod = (topbox->physicalParameters.get())->se3.position.Y();
-	Real Ylat_mod = (leftbox->physicalParameters.get())->se3.position.Y();
+	Real Ysup_mod = topbox->state->pos.Y();
+	Real Ylat_mod = leftbox->state->pos.Y();
 
 //	with the corresponding velocities :
-	RigidBodyParameters * rb = dynamic_cast<RigidBodyParameters*>(topbox->physicalParameters.get());
-	rb->velocity = Vector3r(shearSpeed,deltaH/dt,0);
-
-	rb = dynamic_cast<RigidBodyParameters*>(leftbox->physicalParameters.get());
-	rb->velocity = Vector3r(shearSpeed/2.0,deltaH/(2.0*dt),0);
-
-	rb = dynamic_cast<RigidBodyParameters*>(rightbox->physicalParameters.get());
-	rb->velocity = Vector3r(shearSpeed/2.0,deltaH/(2.0*dt),0);
+	topbox->state->vel = Vector3r(shearSpeed,deltaH/dt,0);
+	leftbox->state->vel = Vector3r(shearSpeed/2.0,deltaH/(2.0*dt),0);
+	rightbox->state->vel = Vector3r(shearSpeed/2.0,deltaH/(2.0*dt),0);
 
 //	Then computation of the angle of the rotation to be done :
 	if (alpha == Mathr::PI/2.0)	// Case of the very beginning
@@ -124,15 +119,11 @@
 	if(LOG)
 		cout << "Quaternion associe a la rotation incrementale : " << qcorr.W() << " " << qcorr.X() << " " << qcorr.Y() << " " << qcorr.Z() << endl;
 // On applique la rotation en changeant l'orientation des plaques, leurs vang et en affectant donc alpha
-	rb = dynamic_cast<RigidBodyParameters*>(leftbox->physicalParameters.get());
-	rb->se3.orientation	= qcorr*rb->se3.orientation;
-	if(LOG)
-		cout << "Quaternion d'orientation plaq gauche apres correc : "<<rb->se3.orientation.W() << " " << rb->se3.orientation.X() << " " << rb->se3.orientation.Y() << " " << rb->se3.orientation.Z() << endl;
-	rb->angularVelocity	= Vector3r(0,0,1)*dalpha/dt;
+	leftbox->state->ori	= qcorr*leftbox->state->ori;
+	leftbox->state->angVel	= Vector3r(0,0,1)*dalpha/dt;
 
-	rb = dynamic_cast<RigidBodyParameters*>(rightbox->physicalParameters.get());
-	rb->se3.orientation	= qcorr*rb->se3.orientation;
-	rb->angularVelocity	= Vector3r(0,0,1)*dalpha/dt;
+	rightbox->state->ori	= qcorr*rightbox->state->ori;
+	rightbox->state->angVel	= Vector3r(0,0,1)*dalpha/dt;
 
 	gamma+=dx;
 }
@@ -140,8 +131,8 @@
 void CinemKNCEngine::computeAlpha()
 {
 	Quaternionr orientationLeftBox,orientationRightBox;
-	orientationLeftBox = (dynamic_cast<RigidBodyParameters*>(leftbox->physicalParameters.get()) )->se3.orientation;
-	orientationRightBox = (dynamic_cast<RigidBodyParameters*>(rightbox->physicalParameters.get()) )->se3.orientation;
+	orientationLeftBox = leftbox->state->ori;
+	orientationRightBox = rightbox->state->ori;
 	if(orientationLeftBox!=orientationRightBox)
 	{
 		cout << "WARNING !!! your lateral boxes have not the same orientation, you're not in the case of a box imagined for creating these engines" << endl;
@@ -170,13 +161,13 @@
 				{
 					myLdc =  YADE_PTR_CAST<RockJointLaw> ( *itFirst );
 					coeff_dech = myLdc ->coeff_dech;
-					if(LOG) cout << "My ContactLaw engine found, de coeff_dech = " << coeff_dech << endl;
+					if(LOG) cout << "RockJointLaw engine found, with coeff_dech = " << coeff_dech << endl;
 				}
 			}
 		}
 
 		alpha=Mathr::PI/2.0;;
-		Y0 = (topbox->physicalParameters.get())->se3.position.Y();
+		Y0 = topbox->state->pos.Y();
 		cout << "Y0 initialise à : " << Y0 << endl;
 		F_0 = F_sup.Y();
 		prevF_sup=F_sup;
@@ -184,17 +175,17 @@
 	}
 		
 // Computation of the current dimensions of the box : //
-	Real Xleft = (leftbox->physicalParameters.get())->se3.position.X() + (YADE_CAST<Box*>(leftbox->shape.get()))->extents.X();
-	Real Xright = (rightbox->physicalParameters.get())->se3.position.X() - (YADE_CAST<Box*>(rightbox->shape.get()))->extents.X();
+	Real Xleft = leftbox->state->pos.X() + (YADE_CAST<Box*>(leftbox->shape.get()))->extents.X();
+	Real Xright = rightbox->state->pos.X() - (YADE_CAST<Box*>(rightbox->shape.get()))->extents.X();
 
-	Real Zfront = (frontbox->physicalParameters.get())->se3.position.Z() - YADE_CAST<Box*>(frontbox->shape.get())->extents.Z();
-	Real Zback = (backbox->physicalParameters.get())->se3.position.Z() + (YADE_CAST<Box*>(backbox->shape.get()))->extents.Z();
+	Real Zfront = frontbox->state->pos.Z() - YADE_CAST<Box*>(frontbox->shape.get())->extents.Z();
+	Real Zback = backbox->state->pos.Z() + (YADE_CAST<Box*>(backbox->shape.get()))->extents.Z();
 
 	Real Scontact = (Xright-Xleft)*(Zfront-Zback);	// that's so the value of section at the middle of the height of the box
 // End of computation of the current dimensions of the box //
 
 	computeStiffness(ncb);
-	Real Hcurrent = (topbox->physicalParameters.get())->se3.position.Y();
+	Real Hcurrent = topbox->state->pos.Y();
 	Real Fdesired = F_0 + KnC * 1.0e9 * Scontact * (Hcurrent-Y0); // The value of the force desired
 
 // Prise en compte de la difference de rigidite entre charge et decharge dans le cadre de RockJointLaw :
@@ -230,18 +221,15 @@
 void CinemKNCEngine::stopMovement()
 {
 	// annulation de la vitesse de la plaque du haut
-	RigidBodyParameters * rb = YADE_CAST<RigidBodyParameters*>(topbox->physicalParameters.get());
-	rb->velocity		=  Vector3r(0,0,0);
+	topbox->state->vel		=  Vector3r(0,0,0);
 
 	// de la plaque gauche
-	rb = YADE_CAST<RigidBodyParameters*>(leftbox->physicalParameters.get());
-	rb->velocity		=  Vector3r(0,0,0);
-	rb->angularVelocity	=  Vector3r(0,0,0);
+	leftbox->state->vel		=  Vector3r(0,0,0);
+	leftbox->state->angVel		=  Vector3r(0,0,0);
 
 	// de la plaque droite
-	rb = YADE_CAST<RigidBodyParameters*>(rightbox->physicalParameters.get());
-	rb->velocity		=  Vector3r(0,0,0);
-	rb->angularVelocity	=  Vector3r(0,0,0);
+	rightbox->state->vel		=  Vector3r(0,0,0);
+	rightbox->state->angVel		=  Vector3r(0,0,0);
 }
 
 void CinemKNCEngine::computeStiffness(Scene* ncb)
@@ -275,5 +263,5 @@
 
 
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+// YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== modified file 'pkg/common/Engine/PartialEngine/CinemKNCEngine.hpp'
--- pkg/common/Engine/PartialEngine/CinemKNCEngine.hpp	2010-02-02 14:27:14 +0000
+++ pkg/common/Engine/PartialEngine/CinemKNCEngine.hpp	2010-02-02 16:20:35 +0000
@@ -57,7 +57,7 @@
 		shared_ptr<Body> boxbas;
 	public :
 		CinemKNCEngine();
-		void 	applyCondition(Body * body)
+		void 	applyCondition(Scene * ncb)
 			,computeAlpha()
 			;
 
@@ -81,7 +81,7 @@
 
 	REGISTER_ATTRIBUTES(PartialEngine,(shearSpeed)(gammalim)(prevF_sup)(firstRun)(id_boxhaut)(id_boxbas)(id_boxleft)(id_boxright)(id_boxfront)(id_boxback)(Y0)(F_0)(KnC)(max_vel)(Key)(LOG)(coeff_dech)(wallDamping));
 	protected :
-		void letMove(Body* body);
+		void letMove(Scene* ncb);
 		void computeDu(Scene* ncb);
 		void stopMovement();		// to cancel all the velocities when gammalim is reached
 		void computeStiffness(Scene* ncb);

=== modified file 'pkg/dem/DataClass/InteractionPhysics/RockJointPhys.cpp'
--- pkg/dem/DataClass/InteractionPhysics/RockJointPhys.cpp	2010-02-02 14:27:14 +0000
+++ pkg/dem/DataClass/InteractionPhysics/RockJointPhys.cpp	2010-02-02 15:26:07 +0000
@@ -48,5 +48,5 @@
 
 YADE_PLUGIN((RockJointPhys));
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+// YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== modified file 'pkg/dem/Engine/Functor/RockJointLawRelationships.cpp'
--- pkg/dem/Engine/Functor/RockJointLawRelationships.cpp	2010-02-02 14:27:14 +0000
+++ pkg/dem/Engine/Functor/RockJointLawRelationships.cpp	2010-02-02 15:26:07 +0000
@@ -37,8 +37,8 @@
 //
 //
 
-void RockJointLawRelationships::go(	  const shared_ptr<PhysicalParameters>& b1 // CohesiveFrictionalMat
-					, const shared_ptr<PhysicalParameters>& b2 // CohesiveFrictionalMat
+void RockJointLawRelationships::go(	  const shared_ptr<Material>& b1 // CohesiveFrictionalMat
+					, const shared_ptr<Material>& b2 // CohesiveFrictionalMat
 					, const shared_ptr<Interaction>& interaction)
 {
 	CohesiveFrictionalMat* sdec1 = static_cast<CohesiveFrictionalMat*>(b1.get());
@@ -95,10 +95,10 @@
 			{
 			
 				// FIXME - not sure: do I need to repeat it here [1] ?
-				contactPhysics->initialOrientation1	= sdec1->se3.orientation;
-				contactPhysics->initialOrientation2	= sdec2->se3.orientation;
-				contactPhysics->initialPosition1    = sdec1->se3.position;
-				contactPhysics->initialPosition2    = sdec2->se3.position;
+				contactPhysics->initialOrientation1	= Body::byId(interaction->getId1())->state->ori;
+				contactPhysics->initialOrientation2	= Body::byId(interaction->getId2())->state->ori;
+				contactPhysics->initialPosition1    = Body::byId(interaction->getId1())->state->pos;
+				contactPhysics->initialPosition2    = Body::byId(interaction->getId2())->state->pos;
 				contactPhysics->kr = Kr;
 				contactPhysics->initialContactOrientation.Align(Vector3r(1.0,0.0,0.0),interactionGeometry->normal);
 				contactPhysics->currentContactOrientation = contactPhysics->initialContactOrientation;
@@ -125,10 +125,10 @@
 			contactPhysics->equilibriumDistance = contactPhysics->initialEquilibriumDistance;
 
 			// FIXME - or here [1] ?
-			contactPhysics->initialOrientation1	= sdec1->se3.orientation;
-			contactPhysics->initialOrientation2	= sdec2->se3.orientation;
-			contactPhysics->initialPosition1    = sdec1->se3.position;
-			contactPhysics->initialPosition2    = sdec2->se3.position;
+			contactPhysics->initialOrientation1	= Body::byId(interaction->getId1())->state->ori;
+			contactPhysics->initialOrientation2	= Body::byId(interaction->getId2())->state->ori;
+			contactPhysics->initialPosition1    = Body::byId(interaction->getId1())->state->pos;
+			contactPhysics->initialPosition2    = Body::byId(interaction->getId2())->state->pos;
 			contactPhysics->kr = Kr;
 			contactPhysics->initialContactOrientation.Align(Vector3r(1.0,0.0,0.0),interactionGeometry->normal);
 			contactPhysics->currentContactOrientation = contactPhysics->initialContactOrientation;
@@ -151,10 +151,10 @@
 			{ 
 				//setCohesionNow = false;
 
-			contactPhysics->initialOrientation1 = sdec1->se3.orientation;
-			contactPhysics->initialOrientation2 = sdec2->se3.orientation;
-			contactPhysics->initialPosition1    = sdec1->se3.position;
-			contactPhysics->initialPosition2    = sdec2->se3.position;
+			contactPhysics->initialOrientation1	= Body::byId(interaction->getId1())->state->ori;
+			contactPhysics->initialOrientation2	= Body::byId(interaction->getId2())->state->ori;
+			contactPhysics->initialPosition1    = Body::byId(interaction->getId1())->state->pos;
+			contactPhysics->initialPosition2    = Body::byId(interaction->getId2())->state->pos;
 			Real Da 	= interactionGeometry->radius1; // FIXME - multiply by factor of sphere interaction distance (so sphere interacts at bigger range that its geometrical size)
 			Real Db 	= interactionGeometry->radius2; // FIXME - as above
 			Real Kr = betaR*std::pow((Da+Db)/2.0,2)*contactPhysics->ks;
@@ -190,4 +190,4 @@
 };
 YADE_PLUGIN((RockJointLawRelationships));
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+// YADE_REQUIRE_FEATURE(PHYSPAR);

=== modified file 'pkg/dem/Engine/Functor/RockJointLawRelationships.hpp'
--- pkg/dem/Engine/Functor/RockJointLawRelationships.hpp	2010-02-02 14:27:14 +0000
+++ pkg/dem/Engine/Functor/RockJointLawRelationships.hpp	2010-02-02 15:26:07 +0000
@@ -21,8 +21,8 @@
 	public :
 		RockJointLawRelationships();
 
-		virtual void go(	const shared_ptr<PhysicalParameters>& b1,
-					const shared_ptr<PhysicalParameters>& b2,
+		virtual void go(	const shared_ptr<Material>& b1,
+					const shared_ptr<Material>& b2,
 					const shared_ptr<Interaction>& interaction);
 
 		Real 		betaR;	// a parameter for computing the maximum value of momentum

=== modified file 'pkg/dem/Engine/GlobalEngine/RockJointLaw.cpp'
--- pkg/dem/Engine/GlobalEngine/RockJointLaw.cpp	2010-02-02 14:27:14 +0000
+++ pkg/dem/Engine/GlobalEngine/RockJointLaw.cpp	2010-02-02 16:20:35 +0000
@@ -10,7 +10,6 @@
 #include<yade/pkg-dem/CohesiveFrictionalMat.hpp>
 #include<yade/pkg-dem/ScGeom.hpp>
 #include<yade/pkg-dem/RockJointPhys.hpp>
-#include<yade/pkg-dem/SDECLinkPhysics.hpp>
 #include<yade/core/Omega.hpp>
 #include<yade/core/Scene.hpp>
 
@@ -56,8 +55,9 @@
 		if ( !( (*bodies)[id1]->getGroupMask() & (*bodies)[id2]->getGroupMask() & sdecGroupMask)  )
 			continue; // skip other groups,
 
-		CohesiveFrictionalMat* de1 			= YADE_CAST<CohesiveFrictionalMat*>((*bodies)[id1]->physicalParameters.get());
-		CohesiveFrictionalMat* de2 			= YADE_CAST<CohesiveFrictionalMat*>((*bodies)[id2]->physicalParameters.get());
+// 		CohesiveFrictionalMat* de1 			= YADE_CAST<CohesiveFrictionalMat*>((*bodies)[id1]->physicalParameters.get());
+		State* de1 = Body::byId(id1,ncb)->state.get();
+		State* de2 = Body::byId(id2,ncb)->state.get();
 		ScGeom* currentContactGeometry		= YADE_CAST<ScGeom*>(contact->interactionGeometry.get());
 		RockJointPhys* currentContactPhysics = YADE_CAST<RockJointPhys*> (contact->interactionPhysics.get());
 
@@ -128,7 +128,7 @@
 
 		axis	 		= currentContactPhysics->prevNormal.Cross(currentContactGeometry->normal);
 		shearForce 	       -= shearForce.Cross(axis);
-		angle 			= dt*0.5*currentContactGeometry->normal.Dot(de1->angularVelocity+de2->angularVelocity);
+		angle 			= dt*0.5*currentContactGeometry->normal.Dot(de1->angVel+de2->angVel);
 		axis 			= angle*currentContactGeometry->normal;
 		shearForce 	       -= shearForce.Cross(axis);
 
@@ -142,7 +142,7 @@
                 //
                 // 		currentContactPhysics->shearForce	= currentContactPhysics->shearForce*q;
                 //
-                // 		angle					= dt*0.5*currentContactGeometry->normal.dot(de1->angularVelocity+de2->angularVelocity);
+                // 		angle					= dt*0.5*currentContactGeometry->normal.dot(de1->angVel+de2->angVel);
                 // 		axis					= currentContactGeometry->normal;
                 // 		q.fromAngleAxis(angle,axis);
                 // 		currentContactPhysics->shearForce	= q*currentContactPhysics->shearForce;
@@ -158,7 +158,7 @@
 		///   ed. T. Triantafyllidis (Balklema, London, 2004), p. 3-10 - and a lot more papers from the same authors)
                 Vector3r _c1x_	= currentContactGeometry->radius1*currentContactGeometry->normal;
                 Vector3r _c2x_	= -currentContactGeometry->radius2*currentContactGeometry->normal;
-                Vector3r relativeVelocity		= (de2->velocity+de2->angularVelocity.Cross(_c2x_)) - (de1->velocity+de1->angularVelocity.Cross(_c1x_));
+                Vector3r relativeVelocity		= (de2->vel+de2->angVel.Cross(_c2x_)) - (de1->vel+de1->angVel.Cross(_c1x_));
                 Vector3r shearVelocity			= relativeVelocity-currentContactGeometry->normal.Dot(relativeVelocity)*currentContactGeometry->normal;
                 Vector3r shearDisplacement		= shearVelocity*dt;
 
@@ -307,5 +307,5 @@
 
 YADE_PLUGIN((RockJointLaw));
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+// YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== renamed file 'attic/pkg/dem/PreProcessor/SimpleShear.cpp' => 'pkg/dem/PreProcessor/SimpleShear.cpp'
--- attic/pkg/dem/PreProcessor/SimpleShear.cpp	2010-02-02 14:27:14 +0000
+++ pkg/dem/PreProcessor/SimpleShear.cpp	2010-02-02 15:26:07 +0000
@@ -47,7 +47,7 @@
 #include<yade/core/Body.hpp>
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/Sphere.hpp>
-#include<yade/pkg-common/StateMetaEngine.hpp>
+// #include<yade/pkg-common/StateMetaEngine.hpp>
 
 #include <boost/filesystem/convenience.hpp>
 #include <utility>
@@ -337,7 +337,7 @@
 			if (!overlap)
 			{
 				sphere_list.push_back(s);
-				cout << "j'ai bien rajoute une sphere dans la liste" << endl;
+// 				cout << "j'ai bien rajoute une sphere dans la liste" << endl;
 				break;
 			}
 		}
@@ -396,5 +396,5 @@
 
 
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+// YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== renamed file 'attic/pkg/dem/PreProcessor/SimpleShear.hpp' => 'pkg/dem/PreProcessor/SimpleShear.hpp'