← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1844: And one more back.

 

------------------------------------------------------------
revno: 1844
committer: Bruno Chareyre <bchareyre@r1arduina>
branch nick: trunk
timestamp: Wed 2009-12-02 21:29:01 +0100
message:
  And one more back.
modified:
  pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.cpp
  pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.hpp
  pkg/dem/DataClass/InteractionPhysics/CohesiveFrictionalContactInteraction.hpp
  pkg/dem/Engine/DeusExMachina/CapillaryPressureEngine.cpp
  pkg/dem/Engine/DeusExMachina/CapillaryRecorder.cpp
  pkg/dem/Engine/DeusExMachina/CapillaryRecorder.hpp
  pkg/dem/Engine/DeusExMachina/CapillaryStressRecorder.cpp
  pkg/dem/Engine/DeusExMachina/CapillaryStressRecorder.hpp
  pkg/dem/Engine/DeusExMachina/ContactStressRecorder.cpp
  pkg/dem/Engine/DeusExMachina/ContactStressRecorder.hpp
  pkg/dem/Engine/DeusExMachina/SampleCapillaryPressureEngine.cpp
  pkg/dem/Engine/Functor/SimpleElasticRelationshipsWater.cpp
  pkg/dem/Engine/Functor/SimpleElasticRelationshipsWater.hpp
  pkg/dem/Engine/StandAloneEngine/CapillaryCohesiveLaw.cpp
  pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp
  pkg/dem/PreProcessor/TriaxialTestWater.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/DataClass/InteractionPhysics/CapillaryParameters.cpp'
--- pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.cpp	2009-11-21 10:36:08 +0000
+++ pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.cpp	2009-12-02 20:29:01 +0000
@@ -19,12 +19,9 @@
 {
 }
 
-// void CapillaryParameters::postProcessAttributes(bool)
-// {
-// 
-// }
-
-
-
-YADE_REQUIRE_FEATURE(PHYSPAR);
+
+
+
+
+
 

=== modified file 'pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.hpp'
--- pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.hpp	2009-11-18 13:34:36 +0000
+++ pkg/dem/DataClass/InteractionPhysics/CapillaryParameters.hpp	2009-12-02 20:29:01 +0000
@@ -27,7 +27,6 @@
 	REGISTER_ATTRIBUTES(ElasticContactInteraction,(Vmeniscus)(CapillaryPressure)(Fcap)(Delta1)(Delta2)(meniscus)(fusionNumber));
 	REGISTER_CLASS_NAME(CapillaryParameters);
 	REGISTER_BASE_CLASS_NAME(ElasticContactInteraction);
-// 	REGISTER_CLASS_INDEX(CapillaryParameters,ElasticContactInteraction);
 };
 
 REGISTER_SERIALIZABLE(CapillaryParameters);

=== modified file 'pkg/dem/DataClass/InteractionPhysics/CohesiveFrictionalContactInteraction.hpp'
--- pkg/dem/DataClass/InteractionPhysics/CohesiveFrictionalContactInteraction.hpp	2009-07-17 20:50:55 +0000
+++ pkg/dem/DataClass/InteractionPhysics/CohesiveFrictionalContactInteraction.hpp	2009-12-02 20:29:01 +0000
@@ -38,19 +38,6 @@
 		// FIXME where this?
 		(orientationToContact1)(orientationToContact2)(initialOrientation1)(initialOrientation2)(kr)(currentContactOrientation)(initialContactOrientation)(initialPosition1)(initialPosition2)(twistCreep)
 		(moment_twist)(moment_bending)
-		/* (prevX1)(prevX2)(initX1)(initX2) */
-		//		Real		 kn				// normal elastic constant.
-		//				,ks				// shear elastic constant.
-		//				,initialKn			// initial normal elastic constant.
-		//				,initialKs			// initial shear elastic constant.
-		//				,equilibriumDistance		// equilibrium distance
-		//				,initialEquilibriumDistance	// initial equilibrium distance
-		//				,frictionAngle 			// angle of friction, according to Coulumb criterion
-		//				,tangensOfFrictionAngle;
-		//	
-		//		Vector3r	prevNormal			// unit normal of the contact plane.
-		//				,normalForce			// normal force applied on a DE
-		//				,shearForce;			// shear force applied on a DE
 	);
 	REGISTER_CLASS_NAME(CohesiveFrictionalContactInteraction);
 	REGISTER_BASE_CLASS_NAME(ElasticContactInteraction);

=== modified file 'pkg/dem/Engine/DeusExMachina/CapillaryPressureEngine.cpp'
--- pkg/dem/Engine/DeusExMachina/CapillaryPressureEngine.cpp	2009-12-01 14:56:39 +0000
+++ pkg/dem/Engine/DeusExMachina/CapillaryPressureEngine.cpp	2009-12-02 20:29:01 +0000
@@ -50,5 +50,5 @@
 
 YADE_PLUGIN((CapillaryPressureEngine));
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+//YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== modified file 'pkg/dem/Engine/DeusExMachina/CapillaryRecorder.cpp'
--- pkg/dem/Engine/DeusExMachina/CapillaryRecorder.cpp	2009-12-01 14:56:39 +0000
+++ pkg/dem/Engine/DeusExMachina/CapillaryRecorder.cpp	2009-12-02 20:29:01 +0000
@@ -9,15 +9,15 @@
 *************************************************************************/
 
 #include "CapillaryRecorder.hpp"
-#include <yade/pkg-common/RigidBodyParameters.hpp>
-#include <yade/pkg-common/ParticleParameters.hpp>
+#include <yade/pkg-common/ElasticMat.hpp>
+//#include <yade/pkg-common/ParticleParameters.hpp>
 #include <yade/pkg-dem/CapillaryParameters.hpp>
 #include <yade/core/Omega.hpp>
 #include <yade/core/World.hpp>
 #include <boost/lexical_cast.hpp>
 
 
-CapillaryRecorder::CapillaryRecorder () : DataRecorder()
+CapillaryRecorder::CapillaryRecorder () : Recorder()
 {
 	outputFile = "";
 	interval = 1;
@@ -56,18 +56,18 @@
 	Real R1 = 0.001;
 	Real R2 = 0.001;
 	
-	//physicalParameters de bigBall
-	
-	shared_ptr<BodyContainer>& bodies = ncb->bodies;
-	ParticleParameters* bigBallpp =
-static_cast<ParticleParameters*>((*bodies)[bigBallId]->physicalParameters.get())
-; ;
-		
-		Real x = bigBallpp-> se3.position[0];
-		
-		Real Dintergranular = x - (R1+R2);	
-	
-	// capillary parameters
+// 	//physicalParameters de bigBall
+// 	
+// 	shared_ptr<BodyContainer>& bodies = ncb->bodies;
+// 	Material* bigBallpp =
+// 	static_cast<GranularMat*>((*bodies)[bigBallId]->material.get())
+// ; ;
+// 		
+// 		Real x = bigBallpp-> se3.position[0];
+// 		
+// 		Real Dintergranular = x - (R1+R2);	
+// 	
+// 	// capillary parameters
 	InteractionContainer::iterator ii    = ncb->interactions->begin();
         InteractionContainer::iterator iiEnd = ncb->interactions->end();
         
@@ -100,7 +100,7 @@
 		<< lexical_cast<string>(fy) << " " 
 		<< lexical_cast<string>(fz) << " " 
 		<< lexical_cast<string>(CapillaryPressure) << " "
-		<< lexical_cast<string>(Dintergranular)<< " "
+//		<< lexical_cast<string>(Dintergranular)<< " "
 		<< lexical_cast<string>(Vtotal)<< " " << endl;
 	
 	
@@ -108,5 +108,5 @@
 
 YADE_PLUGIN((CapillaryRecorder));
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+//YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== modified file 'pkg/dem/Engine/DeusExMachina/CapillaryRecorder.hpp'
--- pkg/dem/Engine/DeusExMachina/CapillaryRecorder.hpp	2009-12-01 14:56:39 +0000
+++ pkg/dem/Engine/DeusExMachina/CapillaryRecorder.hpp	2009-12-02 20:29:01 +0000
@@ -8,13 +8,13 @@
 
 #pragma once
 
-#include <yade/core/DataRecorder.hpp>
+#include <yade/pkg-common/Recorder.hpp>
 
 #include <string>
 #include <fstream>
 
 
-class CapillaryRecorder : public DataRecorder
+class CapillaryRecorder : public Recorder
 {
 	private :
 		std::ofstream ofile; 
@@ -31,11 +31,11 @@
 
 		virtual void action(World*);
 		virtual bool isActivated(World*);
-	REGISTER_ATTRIBUTES(DataRecorder,(outputFile)(interval)(bigBallId));
+	REGISTER_ATTRIBUTES(Recorder,(outputFile)(interval)(bigBallId));
 	protected :
 		virtual void postProcessAttributes(bool deserializing);
 	REGISTER_CLASS_NAME(CapillaryRecorder);
-	REGISTER_BASE_CLASS_NAME(DataRecorder);
+	REGISTER_BASE_CLASS_NAME(Recorder);
 };
 
 REGISTER_SERIALIZABLE(CapillaryRecorder);

=== modified file 'pkg/dem/Engine/DeusExMachina/CapillaryStressRecorder.cpp'
--- pkg/dem/Engine/DeusExMachina/CapillaryStressRecorder.cpp	2009-12-01 14:56:39 +0000
+++ pkg/dem/Engine/DeusExMachina/CapillaryStressRecorder.cpp	2009-12-02 20:29:01 +0000
@@ -7,10 +7,10 @@
 *************************************************************************/
 
 #include "CapillaryStressRecorder.hpp"
-#include <yade/pkg-common/RigidBodyParameters.hpp>
-#include <yade/pkg-common/ParticleParameters.hpp>
+//#include <yade/pkg-common/RigidBodyParameters.hpp>
+//#include <yade/pkg-common/ParticleParameters.hpp>
 #include <yade/pkg-common/InteractingSphere.hpp>
-#include <yade/pkg-dem/BodyMacroParameters.hpp>
+#include <yade/pkg-common/ElasticMat.hpp>
 #include <yade/pkg-dem/CapillaryParameters.hpp>
 #include <yade/pkg-dem/CapillaryCohesiveLaw.hpp>
 #include <yade/pkg-dem/TriaxialCompressionEngine.hpp>
@@ -21,7 +21,7 @@
 
 CREATE_LOGGER(CapillaryStressRecorder);
 
-CapillaryStressRecorder::CapillaryStressRecorder () : DataRecorder()
+CapillaryStressRecorder::CapillaryStressRecorder () : Recorder()
 
 {
 	outputFile = "";
@@ -112,16 +112,19 @@
 			f1_cap_y=fcap[1];
 			f1_cap_z=fcap[2];
 			
-			BodyMacroParameters* de1 		= static_cast<BodyMacroParameters*>((*bodies)[id1]->physicalParameters.get());
-			x1 = de1->se3.position[0];
-			y1 = de1->se3.position[1];
-			z1 = de1->se3.position[2];
-
-
-			BodyMacroParameters* de2 		= static_cast<BodyMacroParameters*>((*bodies)[id2]->physicalParameters.get());
-			x2 = de2->se3.position[0];
-			y2 = de2->se3.position[1];
-			z2 = de2->se3.position[2];
+			Body* de1 = (*bodies)[id1].get();
+			Body* de2 = (*bodies)[id2].get();
+			
+// 			BodyMacroParameters* de1 		= static_cast<BodyMacroParameters*>((*bodies)[id1]->physicalParameters.get());
+			x1 = de1->state->pos[0];
+			y1 = de1->state->pos[1];
+			z1 = de1->state->pos[2];
+
+
+// 			BodyMacroParameters* de2 		= static_cast<BodyMacroParameters*>((*bodies)[id2]->physicalParameters.get());
+			x2 = de2->state->pos[0];
+			y2 = de2->state->pos[1];
+			z2 = de2->state->pos[2];
 
 			///Calcul des contraintes capillaires "locales"
 			
@@ -238,5 +241,5 @@
 
 YADE_PLUGIN((CapillaryStressRecorder));
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+//YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== modified file 'pkg/dem/Engine/DeusExMachina/CapillaryStressRecorder.hpp'
--- pkg/dem/Engine/DeusExMachina/CapillaryStressRecorder.hpp	2009-12-01 14:56:39 +0000
+++ pkg/dem/Engine/DeusExMachina/CapillaryStressRecorder.hpp	2009-12-02 20:29:01 +0000
@@ -8,7 +8,7 @@
 
 #pragma once
 
-#include <yade/core/DataRecorder.hpp>
+#include <yade/pkg-common/Recorder.hpp>
 
 #include <string>
 #include <fstream>
@@ -16,7 +16,7 @@
 class TriaxialCompressionEngine;
 class InteractingGeometry;
 
-class CapillaryStressRecorder : public DataRecorder
+class CapillaryStressRecorder : public Recorder
 {
 	private :
 		std::ofstream ofile; 
@@ -42,11 +42,11 @@
 		virtual void action(World*);
 		virtual bool isActivated(World*);
 	DECLARE_LOGGER;
-	REGISTER_ATTRIBUTES(DataRecorder,(outputFile)(interval)/*(wall_bottom_id)(wall_top_id)(wall_left_id)(wall_right_id)(wall_front_id)(wall_back_id)(height)(width)(depth)(thickness)(upperCorner)(lowerCorner)	*/);
+	REGISTER_ATTRIBUTES(Recorder,(outputFile)(interval)/*(wall_bottom_id)(wall_top_id)(wall_left_id)(wall_right_id)(wall_front_id)(wall_back_id)(height)(width)(depth)(thickness)(upperCorner)(lowerCorner)	*/);
 	protected :
 		virtual void postProcessAttributes(bool deserializing);
 	REGISTER_CLASS_NAME(CapillaryStressRecorder);
-	REGISTER_BASE_CLASS_NAME(DataRecorder);
+	REGISTER_BASE_CLASS_NAME(Recorder);
 };
 
 REGISTER_SERIALIZABLE(CapillaryStressRecorder);

=== modified file 'pkg/dem/Engine/DeusExMachina/ContactStressRecorder.cpp'
--- pkg/dem/Engine/DeusExMachina/ContactStressRecorder.cpp	2009-12-01 14:56:39 +0000
+++ pkg/dem/Engine/DeusExMachina/ContactStressRecorder.cpp	2009-12-02 20:29:01 +0000
@@ -7,11 +7,11 @@
 *************************************************************************/
 
 #include "ContactStressRecorder.hpp"
-#include <yade/pkg-common/RigidBodyParameters.hpp>
-#include <yade/pkg-common/ParticleParameters.hpp>
+#include <yade/pkg-common/ElasticMat.hpp>
+//#include <yade/pkg-common/ParticleParameters.hpp>
 //#include <yade/pkg-common/Force.hpp>
 #include <yade/pkg-common/InteractingSphere.hpp>
-#include <yade/pkg-dem/BodyMacroParameters.hpp>
+//#include <yade/pkg-dem/BodyMacroParameters.hpp>
 #include <yade/pkg-dem/ElasticContactLaw.hpp>
 
 #include <yade/pkg-dem/SpheresContactGeometry.hpp>
@@ -25,7 +25,7 @@
 
 CREATE_LOGGER ( ContactStressRecorder );
 
-ContactStressRecorder::ContactStressRecorder () : DataRecorder()/*, actionForce ( new Force )*/
+ContactStressRecorder::ContactStressRecorder () : Recorder()/*, actionForce ( new Force )*/
 {
 	outputFile = "";
 	interval = 1;
@@ -128,21 +128,25 @@
 					( *bodies ) [id1]->interactingGeometry->getClassIndex();
 				int geometryIndex2 =
 					( *bodies ) [id2]->interactingGeometry->getClassIndex();
+				
+				
 
 				if ( geometryIndex1 == geometryIndex2 )
 
 				{
-					BodyMacroParameters* de1 = static_cast<BodyMacroParameters*> ( ( *bodies ) [id1]->physicalParameters.get() );
-					x1 = de1->se3.position[0];
-					y1 = de1->se3.position[1];
-					z1 = de1->se3.position[2];
-
-
-					BodyMacroParameters* de2 = static_cast<BodyMacroParameters*> ( ( *bodies ) [id2]->physicalParameters.get() );
-					x2 = de2->se3.position[0];
-					y2 = de2->se3.position[1];
-					z2 = de2->se3.position[2];
-
+					
+					Body* de1 = (*bodies)[id1].get();
+					Body* de2 = (*bodies)[id2].get();
+			
+
+					x1 = de1->state->pos[0];
+					y1 = de1->state->pos[1];
+					z1 = de1->state->pos[2];
+
+					x2 = de2->state->pos[0];
+					y2 = de2->state->pos[1];
+					z2 = de2->state->pos[2];
+					
 					///Calcul des contraintes elastiques spheres/spheres
 
 					sig11_el = sig11_el + f1_el_x* ( x2 - x1 );
@@ -209,10 +213,10 @@
 		if ( geometryIndex == SpheresClassIndex )
 		{
 			nbElt +=1;
-			ParticleParameters* pp = static_cast<ParticleParameters*> ( b->physicalParameters.get() );
-			Vector3r v = pp->velocity;
+			//ParticleParameters* pp = static_cast<ParticleParameters*> ( b->physicalParameters.get() );
+			Vector3r v = b->state->vel;
 			kinematicE +=
-				0.5* ( pp->mass ) * ( v[0]*v[0]+v[1]*v[1]+v[2]*v[2] );
+					0.5* ( b->state->mass ) * ( v[0]*v[0]+v[1]*v[1]+v[2]*v[2] );
 
 			InteractingSphere* sphere = static_cast<InteractingSphere*> ( b->interactingGeometry.get() );
 			Rbody = sphere->radius;
@@ -332,5 +336,4 @@
 
 YADE_PLUGIN((ContactStressRecorder));
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== modified file 'pkg/dem/Engine/DeusExMachina/ContactStressRecorder.hpp'
--- pkg/dem/Engine/DeusExMachina/ContactStressRecorder.hpp	2009-12-01 14:56:39 +0000
+++ pkg/dem/Engine/DeusExMachina/ContactStressRecorder.hpp	2009-12-02 20:29:01 +0000
@@ -8,7 +8,7 @@
 
 #pragma once
 
-#include <yade/core/DataRecorder.hpp>
+#include <yade/pkg-common/Recorder.hpp>
 
 #include <string>
 #include <fstream>
@@ -17,7 +17,7 @@
 // class SampleCapillaryPressureEngine;
 
 
-class ContactStressRecorder : public DataRecorder
+class ContactStressRecorder : public Recorder
 {
 	private :
 		
@@ -48,10 +48,10 @@
 
 	protected :
 		virtual void postProcessAttributes(bool deserializing);
-	REGISTER_ATTRIBUTES(DataRecorder,( outputFile )( interval )( wall_bottom_id )( wall_top_id )( wall_left_id )( wall_right_id )( wall_front_id )( wall_back_id )( height )( width )( depth )( thickness )( upperCorner )( lowerCorner ));
+	REGISTER_ATTRIBUTES(Recorder,( outputFile )( interval )( wall_bottom_id )( wall_top_id )( wall_left_id )( wall_right_id )( wall_front_id )( wall_back_id )( height )( width )( depth )( thickness )( upperCorner )( lowerCorner ));
 	DECLARE_LOGGER;
 	REGISTER_CLASS_NAME(ContactStressRecorder);
-	REGISTER_BASE_CLASS_NAME(DataRecorder);
+	REGISTER_BASE_CLASS_NAME(Recorder);
 };
 
 REGISTER_SERIALIZABLE(ContactStressRecorder);

=== modified file 'pkg/dem/Engine/DeusExMachina/SampleCapillaryPressureEngine.cpp'
--- pkg/dem/Engine/DeusExMachina/SampleCapillaryPressureEngine.cpp	2009-12-01 14:56:39 +0000
+++ pkg/dem/Engine/DeusExMachina/SampleCapillaryPressureEngine.cpp	2009-12-02 20:29:01 +0000
@@ -137,5 +137,5 @@
 		UnbalancedForce = ComputeUnbalancedForce(ncb);
 } 
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+//YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== modified file 'pkg/dem/Engine/Functor/SimpleElasticRelationshipsWater.cpp'
--- pkg/dem/Engine/Functor/SimpleElasticRelationshipsWater.cpp	2009-12-01 14:56:39 +0000
+++ pkg/dem/Engine/Functor/SimpleElasticRelationshipsWater.cpp	2009-12-02 20:29:01 +0000
@@ -10,8 +10,7 @@
 #include<yade/pkg-dem/SpheresContactGeometry.hpp>
 #include <yade/pkg-dem/CapillaryParameters.hpp>
 #include<yade/pkg-dem/ElasticContactInteraction.hpp>
-#include<yade/pkg-dem/SDECLinkPhysics.hpp> // FIXME
-#include<yade/pkg-dem/BodyMacroParameters.hpp>
+#include<yade/pkg-common/ElasticMat.hpp>
 #include<yade/core/Omega.hpp>
 #include<yade/core/World.hpp>
 
@@ -21,11 +20,8 @@
 
 }
 
-
-
-
-void SimpleElasticRelationshipsWater::go( const shared_ptr<PhysicalParameters>& b1 //BodyMacroParameters
-					, const shared_ptr<PhysicalParameters>& b2 // BodyMacroParameters
+void SimpleElasticRelationshipsWater::go( const shared_ptr<Material>& b1 //GranularMat
+					, const shared_ptr<Material>& b2 // GranularMat
 					, const shared_ptr<Interaction>& interaction)
 {
 	
@@ -37,8 +33,11 @@
 		if(!interaction->interactionPhysics)
 		{
 //cerr << "interaction->isNew" << endl;
-			const shared_ptr<BodyMacroParameters>& sdec1 = YADE_PTR_CAST<BodyMacroParameters>(b1);
-			const shared_ptr<BodyMacroParameters>& sdec2 = YADE_PTR_CAST<BodyMacroParameters>(b2);
+			
+// 			Body* de1 = (*bodies)[id1].get();
+// 			Body* de2 = (*bodies)[id2].get();
+ 			const shared_ptr<GranularMat>& sdec1 = YADE_PTR_CAST<GranularMat>(b1);
+ 			const shared_ptr<GranularMat>& sdec2 = YADE_PTR_CAST<GranularMat>(b2);
 			
  			if (!interaction->interactionPhysics) interaction->interactionPhysics = shared_ptr<CapillaryParameters>(new CapillaryParameters());
 //			interaction->interactionPhysics = shared_ptr<CapillaryParameters>(new CapillaryParameters());
@@ -86,31 +85,11 @@
 
 		}
 		
-		/*else
-		{	// FIXME - are those lines necessary ???? what they are doing in fact ???
-			ElasticContactInteraction* contactPhysics = YADE_CAST<ElasticContactInteraction*>(interaction->interactionPhysics.get());
-
-			contactPhysics->kn = contactPhysics->initialKn;
-			contactPhysics->ks = contactPhysics->initialKs;
-			contactPhysics->equilibriumDistance = contactPhysics->initialEquilibriumDistance;
-		}*/	
 		
 	}
-	else cerr << "Problem here (PERMANENT LINK)" << endl;
-// 	else   // this is PERMANENT LINK because previous dynamic_cast failed, dispatcher should do this job
-// 	{
-// 		SDECLinkGeometry* sdecLinkGeometry =  dynamic_cast<SDECLinkGeometry*>(interaction->interactionGeometry.get());
-// 		if (sdecLinkGeometry)
-// 		{		
-// 			SDECLinkPhysics* linkPhysics = static_cast<SDECLinkPhysics*>(interaction->interactionPhysics.get());
-// 	//		linkPhysics->frictionAngle 		= ?? //FIXME - uninitialized 
-// 			linkPhysics->kn 			= linkPhysics->initialKn;
-// 			linkPhysics->ks 			= linkPhysics->initialKs;
-// 			linkPhysics->equilibriumDistance 	= linkPhysics->initialEquilibriumDistance;
-// 		}
-// 	}
+
 };
 YADE_PLUGIN((SimpleElasticRelationshipsWater));
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+
 

=== modified file 'pkg/dem/Engine/Functor/SimpleElasticRelationshipsWater.hpp'
--- pkg/dem/Engine/Functor/SimpleElasticRelationshipsWater.hpp	2009-12-01 14:22:18 +0000
+++ pkg/dem/Engine/Functor/SimpleElasticRelationshipsWater.hpp	2009-12-02 20:29:01 +0000
@@ -15,12 +15,12 @@
 	public :
 		SimpleElasticRelationshipsWater();
 
-		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);
 
 	REGISTER_ATTRIBUTES(InteractionPhysicsFunctor,/* */);
-	FUNCTOR2D(BodyMacroParameters,BodyMacroParameters);
+	FUNCTOR2D(GranularMat,GranularMat);
 	REGISTER_CLASS_NAME(SimpleElasticRelationshipsWater);
 	REGISTER_BASE_CLASS_NAME(InteractionPhysicsFunctor);
 

=== modified file 'pkg/dem/Engine/StandAloneEngine/CapillaryCohesiveLaw.cpp'
--- pkg/dem/Engine/StandAloneEngine/CapillaryCohesiveLaw.cpp	2009-12-01 14:56:39 +0000
+++ pkg/dem/Engine/StandAloneEngine/CapillaryCohesiveLaw.cpp	2009-12-02 20:29:01 +0000
@@ -13,7 +13,7 @@
 
 
 #include "CapillaryCohesiveLaw.hpp"
-#include <yade/pkg-dem/BodyMacroParameters.hpp>
+#include <yade/pkg-common/ElasticMat.hpp>
 #include <yade/pkg-dem/SpheresContactGeometry.hpp>
 
 #include <yade/pkg-dem/CapillaryParameters.hpp>
@@ -30,8 +30,6 @@
 
 using namespace std;
 
-//int compteur1 = 0;
-//int compteur2 = 0;
 
 CapillaryCohesiveLaw::CapillaryCohesiveLaw() : InteractionSolver()
 {
@@ -130,10 +128,13 @@
 
                         /// definition of interacting objects (not in contact)
 
-                        BodyMacroParameters* de1 		=
-                                static_cast<BodyMacroParameters*>((*bodies)[id1]->physicalParameters.get());
-                        BodyMacroParameters* de2 		=
-                                static_cast<BodyMacroParameters*>((*bodies)[id2]->physicalParameters.get());
+//                         BodyMacroParameters* de1 		=
+//                                 static_cast<BodyMacroParameters*>((*bodies)[id1]->physicalParameters.get());
+//                         BodyMacroParameters* de2 		=
+//                                 static_cast<BodyMacroParameters*>((*bodies)[id2]->physicalParameters.get());
+			
+			Body* b1 = (*bodies)[id1].get();
+			Body* b2 = (*bodies)[id2].get();
 
                         SpheresContactGeometry* currentContactGeometry 	=
                                 static_cast<SpheresContactGeometry*>(interaction->interactionGeometry.get());
@@ -141,11 +142,6 @@
                         CapillaryParameters* currentContactPhysics 	=
                                 static_cast<CapillaryParameters*>(interaction->interactionPhysics.get());
 
-                        //SDECLinkPhysics* currentContactPhysics	= static_cast<SDECLinkPhysics*>(interaction->interactionPhysics.get());
-
-                        //                         CapillaryParameters* meniscusParameters
-                        // = static_cast<CapillaryParameters*>(interaction->interactionPhysics.get());
-
                         /// Capillary components definition:
 
                         Real liquidTension = 0.073; 	// superficial water tension N/m (20�C)
@@ -157,15 +153,6 @@
 
                         Real alpha=1; // OK si pas de gravite!!!
 
-//                         Real R1, R2;
-//                         if (currentContactGeometry->radius2 > currentContactGeometry->radius1) {
-//                                 R1=currentContactGeometry->radius1;
-//                                 R2=currentContactGeometry->radius2;
-//                         } else {
-//                                 R1=currentContactGeometry->radius2;
-//                                 R2=currentContactGeometry->radius1;
-//                         }
-
                         Real R1 = 0;
                         R1=alpha*std::min(currentContactGeometry->radius2,currentContactGeometry->radius1 ) ;
                         Real R2 = 0;
@@ -174,7 +161,7 @@
 
                         /// intergranular distance
 
-                        Real D = alpha*(de2->se3.position-de1->se3.position).Length()-alpha*(                       currentContactGeometry->radius1+ currentContactGeometry->radius2);
+                        Real D = alpha*(b2->state->pos-b1->state->pos).Length()-alpha*(                       currentContactGeometry->radius1+ currentContactGeometry->radius2);
 
 // 			Real intergranularDistance = currentContactGeometry->penetrationDepth;
 			//cerr << "D = " << intergranularDistance << endl;
@@ -711,5 +698,5 @@
 	initialized=false;
 }
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+//YADE_REQUIRE_FEATURE(PHYSPAR);
 

=== modified file 'pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp'
--- pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp	2009-12-02 12:41:25 +0000
+++ pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp	2009-12-02 20:29:01 +0000
@@ -10,7 +10,7 @@
 
 #include<yade/pkg-dem/CohesiveFrictionalContactLaw.hpp>
 #include<yade/pkg-dem/CohesiveFrictionalRelationships.hpp>
-#include<yade/pkg-dem/CohesiveFrictionalBodyParameters.hpp>
+#include<yade/pkg-common/ElasticMat.hpp>
 //#include<yade/pkg-dem/SDECLinkPhysics.hpp>
 #include<yade/pkg-dem/GlobalStiffnessTimeStepper.hpp>
 #include<yade/pkg-dem/PositionOrientationRecorder.hpp>
@@ -370,7 +370,7 @@
 void CohesiveTriaxialTest::createSphere(shared_ptr<Body>& body, Vector3r position, Real radius, bool dynamic )
 {
 	body = shared_ptr<Body>(new Body(body_id_t(0),2));
-	shared_ptr<CohesiveFrictionalBodyParameters> physics(new CohesiveFrictionalBodyParameters);
+	shared_ptr<GranularMat> physics(new GranularMat);
 	shared_ptr<AABB> aabb(new AABB);
 // 	#ifdef YADE_SHAPE
 // 		shared_ptr<Sphere> gSphere(new Sphere);
@@ -403,8 +403,6 @@
 	}
 	
 	aabb->diffuseColor		= Vector3r(0,1,0);
-
-
 	
 	iSphere->radius			= radius;
 	iSphere->diffuseColor		= Vector3r(Mathr::UnitRandom(),Mathr::UnitRandom(),Mathr::UnitRandom());
@@ -427,7 +425,7 @@
 void CohesiveTriaxialTest::createBox(shared_ptr<Body>& body, Vector3r position, Vector3r extents, bool wire)
 {
 	body = shared_ptr<Body>(new Body(body_id_t(0),2));
-	shared_ptr<CohesiveFrictionalBodyParameters> physics(new CohesiveFrictionalBodyParameters);
+	shared_ptr<GranularMat> physics(new GranularMat);
 	shared_ptr<AABB> aabb(new AABB);
 // 	#ifdef YADE_SHAPE
 // 		shared_ptr<Box> gBox(new Box);	
@@ -455,7 +453,6 @@
 	physics->young			= boxYoungModulus;
 	physics->poisson		= boxPoissonRatio;
 	physics->frictionAngle		= boxFrictionDeg * Mathr::PI/180.0;
-	physics->isCohesive		= false;
 
 	aabb->diffuseColor		= Vector3r(1,0,0);
 	

=== modified file 'pkg/dem/PreProcessor/TriaxialTestWater.cpp'
--- pkg/dem/PreProcessor/TriaxialTestWater.cpp	2009-12-01 14:56:39 +0000
+++ pkg/dem/PreProcessor/TriaxialTestWater.cpp	2009-12-02 20:29:01 +0000
@@ -17,24 +17,17 @@
 #include <yade/pkg-dem/CapillaryCohesiveLaw.hpp>
 // #include<yade/pkg-dem/SimpleElasticRelationships.hpp>
 #include<yade/pkg-dem/SimpleElasticRelationshipsWater.hpp>
-#include<yade/pkg-dem/BodyMacroParameters.hpp>
-#include<yade/pkg-dem/SDECLinkPhysics.hpp>
-
+#include<yade/pkg-common/ElasticMat.hpp>
+#include<yade/pkg-dem/PositionOrientationRecorder.hpp>
 #include<yade/pkg-dem/GlobalStiffnessTimeStepper.hpp>
 
-#include<yade/pkg-dem/PositionOrientationRecorder.hpp>
-#include<yade/pkg-dem/AveragePositionRecorder.hpp>
-#include<yade/pkg-dem/ForceRecorder.hpp>
-#include<yade/pkg-dem/VelocityRecorder.hpp>
 #include<yade/pkg-dem/TriaxialStressController.hpp>
 #include<yade/pkg-dem/TriaxialCompressionEngine.hpp>
 #include <yade/pkg-dem/TriaxialStateRecorder.hpp>
 #include <yade/pkg-dem/CapillaryStressRecorder.hpp>
 #include <yade/pkg-dem/ContactStressRecorder.hpp>
 
-#include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/World.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -45,10 +38,6 @@
 #include<yade/pkg-common/InteractingSphere2AABB.hpp>
 
 #include<yade/pkg-common/GravityEngines.hpp>
-#include<yade/pkg-common/PhysicalActionApplier.hpp>
-#include<yade/pkg-common/PhysicalActionDamper.hpp>
-#include<yade/pkg-common/CundallNonViscousDamping.hpp>
-#include<yade/pkg-common/CundallNonViscousDamping.hpp>
 #include<yade/pkg-dem/NewtonsDampedLaw.hpp>
 
 #include<yade/pkg-common/InteractionGeometryDispatcher.hpp>
@@ -60,8 +49,6 @@
 
 #include<yade/pkg-common/PhysicalActionContainerReseter.hpp>
 
-#include<yade/pkg-common/StateMetaEngine.hpp>
-
 #include<yade/pkg-dem/Shop.hpp>
 
 #include <boost/filesystem/convenience.hpp>
@@ -76,7 +63,6 @@
 #include <boost/random/normal_distribution.hpp>
 
 
-YADE_REQUIRE_FEATURE(shape);
 
 using namespace boost;
 using namespace std;
@@ -323,59 +309,64 @@
 void TriaxialTestWater::createSphere(shared_ptr<Body>& body, Vector3r position, Real radius, bool big, bool dynamic )
 {
 	body = shared_ptr<Body>(new Body(body_id_t(0),2));
-	shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
+	shared_ptr<GranularMat> physics(new GranularMat);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
-	Quaternionr q;
-	q.FromAxisAngle( Vector3r(0,0,1),0);
+	Quaternionr q(Mathr::SymmetricRandom(),Mathr::SymmetricRandom(),Mathr::SymmetricRandom(),Mathr::SymmetricRandom());
+	q.Normalize();
+//	q.FromAxisAngle( Vector3r(0,0,1),0);
 	
 	body->isDynamic			= dynamic;
 	
-	physics->angularVelocity	= Vector3r(0,0,0);
-	physics->velocity		= Vector3r(0,0,0);
-	physics->mass			= 4.0/3.0*Mathr::PI*radius*radius*radius*density;
+	body->state->angVel		= Vector3r(0,0,0);
+	body->state->vel		= Vector3r(0,0,0);
+	body->state->mass		= 4.0/3.0*Mathr::PI*radius*radius*radius*density;
 	
-	physics->inertia		= Vector3r( 	2.0/5.0*physics->mass*radius*radius,
-							2.0/5.0*physics->mass*radius*radius,
-							2.0/5.0*physics->mass*radius*radius);
-	physics->se3			= Se3r(position,q);
+	body->state->inertia		= Vector3r( 	2.0/5.0*body->state->mass*radius*radius,
+			2.0/5.0*body->state->mass*radius*radius,
+   2.0/5.0*body->state->mass*radius*radius);
+	body->state->se3			= Se3r(position,q);
 	physics->young			= sphereYoungModulus;
 	physics->poisson		= spherePoissonRatio;
-	physics->frictionAngle		= compactionFrictionDeg * Mathr::PI/180.0;
+	physics->frictionAngle		= sphereFrictionDeg * Mathr::PI/180.0;
 
-// 	if((!big) && (!dynamic) && (!boxWalls))
-// 	{
-// 		physics->young			= boxYoungModulus;
-// 		physics->poisson		= boxPoissonRatio;
-// 		physics->frictionAngle		= boxFrictionDeg * Mathr::PI/180.0;
-// 	}
+	if((!dynamic) && (!boxWalls))
+	{
+		physics->young			= boxYoungModulus;
+		physics->poisson		= boxPoissonRatio;
+		physics->frictionAngle		= boxFrictionDeg * Mathr::PI/180.0;
+	}
 	
 	aabb->diffuseColor		= Vector3r(0,1,0);
-
-
-	gSphere->radius			= radius;
-	gSphere->diffuseColor		= spheresColor;
-	gSphere->wire			= false;
-	gSphere->shadowCaster		= true;
 	
 	iSphere->radius			= radius;
 	iSphere->diffuseColor		= Vector3r(Mathr::UnitRandom(),Mathr::UnitRandom(),Mathr::UnitRandom());
-
+	iSphere->wire			= false;
+	
 	body->interactingGeometry	= iSphere;
-	body->geometricalModel		= gSphere;
+// 	#ifdef YADE_SHAPE
+// 		gSphere->radius			= radius;
+// 	//	gSphere->diffuseColor		= ((int)(position[0]*400.0))%2?Vector3r(0.7,0.7,0.7):Vector3r(0.45,0.45,0.45);
+// 		gSphere->diffuseColor		= spheresColor;
+// 		gSphere->wire			= false;
+// 		gSphere->shadowCaster		= true;
+// 		body->geometricalModel		= gSphere;
+// 	#endif
 	body->boundingVolume		= aabb;
-	body->physicalParameters	= physics;
+	body->material	= physics;
 }
 
 
 void TriaxialTestWater::createBox(shared_ptr<Body>& body, Vector3r position, Vector3r extents, bool wire)
 {
 	body = shared_ptr<Body>(new Body(body_id_t(0),2));
-	shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
+	shared_ptr<GranularMat> physics(new GranularMat);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Box> gBox(new Box);
+// 	#ifdef YADE_SHAPE
+// 		shared_ptr<Box> gBox(new Box);	
+// 	#endif
 	shared_ptr<InteractingBox> iBox(new InteractingBox);
 	
 	Quaternionr q;
@@ -383,37 +374,32 @@
 
 	body->isDynamic			= false;
 	
-	physics->angularVelocity	= Vector3r(0,0,0);
-	physics->velocity		= Vector3r(0,0,0);
-	physics->mass			= 0; 
+	body->state->angVel		= Vector3r(0,0,0);
+	body->state->vel		= Vector3r(0,0,0);
+	body->state->mass			= 0; 
 	//physics->mass			= extents[0]*extents[1]*extents[2]*density*2; 
-	physics->inertia		= Vector3r(
-							  physics->mass*(extents[1]*extents[1]+extents[2]*extents[2])/3
-							, physics->mass*(extents[0]*extents[0]+extents[2]*extents[2])/3
-							, physics->mass*(extents[1]*extents[1]+extents[0]*extents[0])/3
-						);
+	body->state->inertia		= Vector3r(
+			body->state->mass*(extents[1]*extents[1]+extents[2]*extents[2])/3
+			, body->state->mass*(extents[0]*extents[0]+extents[2]*extents[2])/3
+			, body->state->mass*(extents[1]*extents[1]+extents[0]*extents[0])/3
+						  );
 //	physics->mass			= 0;
 //	physics->inertia		= Vector3r(0,0,0);
-	physics->se3			= Se3r(position,q);
+	body->state->se3			= Se3r(position,q);
 
 	physics->young			= boxYoungModulus;
 	physics->poisson		= boxPoissonRatio;
 	physics->frictionAngle		= boxFrictionDeg * Mathr::PI/180.0;
 
 	aabb->diffuseColor		= Vector3r(1,0,0);
-
-	gBox->extents			= extents;
-	gBox->diffuseColor		= Vector3r(1,1,1);
-	gBox->wire			= wire;
-	gBox->shadowCaster		= false;
 	
 	iBox->extents			= extents;
 	iBox->diffuseColor		= Vector3r(1,1,1);
+	iBox->wire			= wire;
 
 	body->boundingVolume		= aabb;
 	body->interactingGeometry	= iBox;
-	body->geometricalModel		= gBox;
-	body->physicalParameters	= physics;
+	body->material	= physics;	
 }
 
 
@@ -524,8 +510,8 @@
 // recording global stress
 	triaxialStateRecorder = shared_ptr<TriaxialStateRecorder>(new
 	TriaxialStateRecorder);
-	triaxialStateRecorder-> outputFile 		= WallStressRecordFile + Key;
-	triaxialStateRecorder-> interval 		= recordIntervalIter;
+	triaxialStateRecorder-> file 		= WallStressRecordFile + Key;
+	triaxialStateRecorder-> iterPeriod 		= recordIntervalIter;
 	//triaxialStateRecorderer-> thickness 		= thickness;
 
 	// recording capillary stress
@@ -604,16 +590,11 @@
 
 
 void TriaxialTestWater::positionRootBody(shared_ptr<World>& rootBody)
-{
+{	
 	rootBody->isDynamic		= false;
 
 	Quaternionr q;
 	q.FromAxisAngle( Vector3r(0,0,1),0);
-	shared_ptr<ParticleParameters> physics(new ParticleParameters); // FIXME : fix indexable class PhysicalParameters
-	physics->se3			= Se3r(Vector3r(0,0,0),q);
-	physics->mass			= 0;
-	physics->velocity		= Vector3r::ZERO;
-	physics->acceleration		= Vector3r::ZERO;
 	
 	shared_ptr<MetaInteractingGeometry> set(new MetaInteractingGeometry());
 	
@@ -623,9 +604,7 @@
 	aabb->diffuseColor		= Vector3r(0,0,1);
 	
 	rootBody->interactingGeometry	= YADE_PTR_CAST<InteractingGeometry>(set);	
-	rootBody->boundingVolume	= YADE_PTR_CAST<BoundingVolume>(aabb);
-	rootBody->physicalParameters 	= physics;
-	
+	rootBody->boundingVolume	= YADE_PTR_CAST<BoundingVolume>(aabb);	
 }
 
 
@@ -685,5 +664,5 @@
 
 YADE_PLUGIN((TriaxialTestWater));
 
-YADE_REQUIRE_FEATURE(PHYSPAR);
+//YADE_REQUIRE_FEATURE(PHYSPAR);