← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2171: - Remove equilibriumDistance and initialEquilibriumDistance from FrictPhys and inheriting code.

 

------------------------------------------------------------
revno: 2171
committer: Bruno Chareyre <bchareyre@r1arduina>
branch nick: trunk
timestamp: Thu 2010-04-22 18:40:45 +0200
message:
  - Remove equilibriumDistance and initialEquilibriumDistance from FrictPhys and inheriting code.
  - Remove rotationBlocked from TriaxialTest.
  - Fix documentation (backticks in pkg/dem/PreProcessor/TriaxialTest.hpp, pkg/dem/Engine/PartialEngine/TriaxialStressController.hpp, 
  pkg/dem/Engine/PartialEngine/TriaxialCompressionEngine.hpp).
modified:
  pkg/dem/DataClass/InteractionPhysics/FrictPhys.hpp
  pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_CohFrictPhys.cpp
  pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp
  pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.cpp
  pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.hpp
  pkg/dem/Engine/PartialEngine/TriaxialCompressionEngine.hpp
  pkg/dem/Engine/PartialEngine/TriaxialStressController.hpp
  pkg/dem/PreProcessor/TriaxialTest.cpp
  pkg/dem/PreProcessor/TriaxialTest.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/InteractionPhysics/FrictPhys.hpp'
--- pkg/dem/DataClass/InteractionPhysics/FrictPhys.hpp	2010-02-09 16:50:30 +0000
+++ pkg/dem/DataClass/InteractionPhysics/FrictPhys.hpp	2010-04-22 16:40:45 +0000
@@ -9,8 +9,9 @@
 		// kn,ks,normal inherited from NormShearPhys
 		Real initialKn			// initial normal elastic constant.
 				,initialKs			// initial shear elastic constant.
-				,equilibriumDistance		// equilibrium distance
-				,initialEquilibriumDistance	// initial equilibrium distance
+				//Those two attributes were removed. If you need them, copy those two lines in your class inheriting from FrictPhys
+// 				,equilibriumDistance		// equilibrium distance
+// 				,initialEquilibriumDistance	// initial equilibrium distance
 				,frictionAngle 			// angle of friction, according to Coulumb criterion
 				;	
 		virtual ~FrictPhys();

=== modified file 'pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_CohFrictPhys.cpp'
--- pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_CohFrictPhys.cpp	2010-04-19 13:08:27 +0000
+++ pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_CohFrictPhys.cpp	2010-04-22 16:40:45 +0000
@@ -13,45 +13,36 @@
 #include<yade/core/Omega.hpp>
 #include<yade/core/Scene.hpp>
 
-void Ip2_2xCohFrictMat_CohFrictPhys::go(	  const shared_ptr<Material>& b1 // CohFrictMat
-		, const shared_ptr<Material>& b2 // CohFrictMat
-					, const shared_ptr<Interaction>& interaction)
+void Ip2_2xCohFrictMat_CohFrictPhys::go(const shared_ptr<Material>& b1    // CohFrictMat
+                                        , const shared_ptr<Material>& b2 // CohFrictMat
+                                        , const shared_ptr<Interaction>& interaction)
 {
 	CohFrictMat* sdec1 = static_cast<CohFrictMat*>(b1.get());
 	CohFrictMat* sdec2 = static_cast<CohFrictMat*>(b2.get());
 	ScGeom* interactionGeometry = YADE_CAST<ScGeom*>(interaction->interactionGeometry.get());
-	
+
 	//Create cohesive interractions only once
 	if (setCohesionNow && cohesionDefinitionIteration==-1) {
-		cohesionDefinitionIteration=Omega::instance().getCurrentIteration();}
+		cohesionDefinitionIteration=Omega::instance().getCurrentIteration();
+	}
 	if (setCohesionNow && cohesionDefinitionIteration!=-1 && cohesionDefinitionIteration!=Omega::instance().getCurrentIteration()) {
 		cohesionDefinitionIteration = -1;
 		setCohesionNow = 0;}
-	
-	
-	if(interactionGeometry) 
+		
+	if (interactionGeometry)
 	{
-		if(!interaction->interactionPhysics)
+		if (!interaction->interactionPhysics)
 		{
-//std::cerr << " isNew, id1: " << interaction->getId1() << " id2: " << interaction->getId2()  << "\n";
 			interaction->interactionPhysics = shared_ptr<CohFrictPhys>(new CohFrictPhys());
 			CohFrictPhys* contactPhysics = YADE_CAST<CohFrictPhys*>(interaction->interactionPhysics.get());
-
 			Real Ea 	= sdec1->young;
 			Real Eb 	= sdec2->young;
 			Real Va 	= sdec1->poisson;
 			Real Vb 	= sdec2->poisson;
-			Real Da 	= interactionGeometry->radius1; 
-			Real Db 	= interactionGeometry->radius2; 
+			Real Da 	= interactionGeometry->radius1;
+			Real Db 	= interactionGeometry->radius2;
 			Real fa 	= sdec1->frictionAngle;
 			Real fb 	= sdec2->frictionAngle;
-
-			//Real Eab	= 2*Ea*Eb/(Ea+Eb);
-			//Real Vab	= 2*Va*Vb/(Va+Vb);
-
-			Real Dinit 	= Da+Db; 			// FIXME - is it just a sum?
-			//Real Sinit 	= Mathr::PI * std::pow( std::min(Da,Db) , 2);
-
 			Real Kn = 2.0*Ea*Da*Eb*Db/(Ea*Da+Eb*Db);//harmonic average of two stiffnesses
 			Real Ks = 2.0*Ea*Da*Va*Eb*Db*Vb/(Ea*Da*Va+Eb*Db*Va);//harmonic average of two stiffnesses with ks=V*kn for each sphere
 
@@ -62,16 +53,15 @@
 
 			contactPhysics->initialKn			= Kn;
 			contactPhysics->initialKs			= Ks;
-//cerr << "Ks: " <<       contactPhysics->initialKs			<< endl;
-			contactPhysics->frictionAngle			= std::min(fa,fb); // FIXME - this is actually a waste of memory space, just like initialKs and initialKn
+			contactPhysics->frictionAngle			= std::min(fa,fb);
 			contactPhysics->tangensOfFrictionAngle		= std::tan(contactPhysics->frictionAngle);
 
-			if ((setCohesionOnNewContacts || setCohesionNow) && sdec1->isCohesive && sdec2->isCohesive) 
+			if ((setCohesionOnNewContacts || setCohesionNow) && sdec1->isCohesive && sdec2->isCohesive)
 			{
 				contactPhysics->cohesionBroken = false;
 				contactPhysics->normalAdhesion			= normalCohesion*pow(std::min(Db, Da),2);
 				contactPhysics->shearAdhesion			= shearCohesion*pow(std::min(Db, Da),2);;
-							
+
 				contactPhysics->initialOrientation1	= Body::byId(interaction->getId1())->state->ori;
 				contactPhysics->initialOrientation2	= Body::byId(interaction->getId2())->state->ori;
 				contactPhysics->initialPosition1    = Body::byId(interaction->getId1())->state->pos;
@@ -82,14 +72,9 @@
 				contactPhysics->orientationToContact1   = contactPhysics->initialOrientation1.Conjugate() * contactPhysics->initialContactOrientation;
 				contactPhysics->orientationToContact2	= contactPhysics->initialOrientation2.Conjugate() * contactPhysics->initialContactOrientation;
 			}
-
-			contactPhysics->prevNormal 			= interactionGeometry->normal;
-			contactPhysics->initialEquilibriumDistance	= Dinit;			
-
+			contactPhysics->prevNormal = interactionGeometry->normal;
 			contactPhysics->kn = contactPhysics->initialKn;
 			contactPhysics->ks = contactPhysics->initialKs;
-			contactPhysics->equilibriumDistance = contactPhysics->initialEquilibriumDistance;
-
 			contactPhysics->initialOrientation1	= Body::byId(interaction->getId1())->state->ori;
 			contactPhysics->initialOrientation2	= Body::byId(interaction->getId2())->state->ori;
 			contactPhysics->initialPosition1    = Body::byId(interaction->getId1())->state->pos;
@@ -100,40 +85,31 @@
 			contactPhysics->orientationToContact1   = contactPhysics->initialOrientation1.Conjugate() * contactPhysics->initialContactOrientation;
 			contactPhysics->orientationToContact2	= contactPhysics->initialOrientation2.Conjugate() * contactPhysics->initialContactOrientation;
 			//contactPhysics->elasticRollingLimit = elasticRollingLimit;
-			//
 		}
-		else // !isNew
-		{	
-			// FIXME - are those lines necessary ???? what they are doing in fact ???
-			// ANSWER - they are used when you setCohesionNow (contact isNew not)
+		else // !isNew, but if setCohesionNow, all contacts are initialized like if they were newly created
+		{
 			CohFrictPhys* contactPhysics = YADE_CAST<CohFrictPhys*>(interaction->interactionPhysics.get());
-
 			contactPhysics->kn = contactPhysics->initialKn;
 			contactPhysics->ks = contactPhysics->initialKs;
-			contactPhysics->equilibriumDistance = contactPhysics->initialEquilibriumDistance;
-
-			if (setCohesionNow && sdec1->isCohesive && sdec2->isCohesive) 
-			{ 
+			if (setCohesionNow && sdec1->isCohesive && sdec2->isCohesive)
+			{
 				contactPhysics->cohesionBroken = false;
 				contactPhysics->normalAdhesion			= normalCohesion*pow(std::min(interactionGeometry->radius2, interactionGeometry->radius1),2);
 				contactPhysics->shearAdhesion			= shearCohesion*pow(std::min(interactionGeometry->radius2, interactionGeometry->radius1),2);
-				//setCohesionNow = false;
-
-			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; 
-			Real Db 	= interactionGeometry->radius2; 
-			Real Kr = Da*Db*contactPhysics->ks*2.0; // just like "2.0" above - it's an arbitrary parameter
-			contactPhysics->kr = Kr;
-			contactPhysics->initialContactOrientation.Align(Vector3r(1.0,0.0,0.0),interactionGeometry->normal);
-			contactPhysics->currentContactOrientation = contactPhysics->initialContactOrientation;
-			contactPhysics->orientationToContact1   = contactPhysics->initialOrientation1.Conjugate() * contactPhysics->initialContactOrientation;
-			contactPhysics->orientationToContact2	= contactPhysics->initialOrientation2.Conjugate() * contactPhysics->initialContactOrientation;
+				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;
+				Real Db 	= interactionGeometry->radius2;
+				Real Kr = Da*Db*contactPhysics->ks*2.0; // just like "2.0" above - it's an arbitrary parameter
+				contactPhysics->kr = Kr;
+				contactPhysics->initialContactOrientation.Align(Vector3r(1.0,0.0,0.0),interactionGeometry->normal);
+				contactPhysics->currentContactOrientation = contactPhysics->initialContactOrientation;
+				contactPhysics->orientationToContact1   = contactPhysics->initialOrientation1.Conjugate() * contactPhysics->initialContactOrientation;
+				contactPhysics->orientationToContact2	= contactPhysics->initialOrientation2.Conjugate() * contactPhysics->initialContactOrientation;
 			}
-		}	
-		
+		}
 	}
 };
 YADE_PLUGIN((Ip2_2xCohFrictMat_CohFrictPhys));

=== modified file 'pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp'
--- pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp	2010-04-19 13:23:53 +0000
+++ pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp	2010-04-22 16:40:45 +0000
@@ -56,12 +56,6 @@
 			Real fa 	= sdec1->frictionAngle;
 			Real fb 	= sdec2->frictionAngle;
 
-			//Real Eab	= 2*Ea*Eb/(Ea+Eb);
-			//Real Vab	= 2*Va*Vb/(Va+Vb);
-
-			Real Dinit 	= Da+Db; 			// FIXME - is it just a sum?
-			//Real Sinit 	= Mathr::PI * std::pow( std::min(Da,Db) , 2);
-
 			Real Kn = 2.0*Ea*Da*Eb*Db/(Ea*Da+Eb*Db);//harmonic average of two stiffnesses
 			Real Ks = 2.0*Ea*Da*Va*Eb*Db*Vb/(Ea*Da*Va+Eb*Db*Va);//harmonic average of two stiffnesses with ks=V*kn for each sphere
 
@@ -104,12 +98,8 @@
 			}
 
 			contactPhysics->prevNormal 			= interactionGeometry->normal;
-			contactPhysics->initialEquilibriumDistance	= Dinit;			
-
 			contactPhysics->kn = contactPhysics->initialKn;
 			contactPhysics->ks = contactPhysics->initialKs;
-			contactPhysics->equilibriumDistance = contactPhysics->initialEquilibriumDistance;
-
 			// FIXME - or here [1] ?
 			contactPhysics->initialOrientation1	= Body::byId(interaction->getId1())->state->ori;
 			contactPhysics->initialOrientation2	= Body::byId(interaction->getId2())->state->ori;
@@ -131,8 +121,6 @@
 
 			contactPhysics->kn = contactPhysics->initialKn;
 			contactPhysics->ks = contactPhysics->initialKs;
-			contactPhysics->equilibriumDistance = contactPhysics->initialEquilibriumDistance;
-
 			if (setCohesionNow && sdec1->isCohesive && sdec2->isCohesive) 
 			{ 
 				//setCohesionNow = false;

=== modified file 'pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.cpp'
--- pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.cpp	2010-03-31 00:06:48 +0000
+++ pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.cpp	2010-04-22 16:40:45 +0000
@@ -19,24 +19,16 @@
 void Ip2_FrictMat_FrictMat_CapillaryPhys::go( const shared_ptr<Material>& b1 //FrictMat
 					, const shared_ptr<Material>& b2 // FrictMat
 					, const shared_ptr<Interaction>& interaction)
-{
-	
+{	
 	ScGeom* interactionGeometry = YADE_CAST<ScGeom*>(interaction->interactionGeometry.get());
-	
-	if(interactionGeometry) // so it is ScGeom  - NON PERMANENT LINK
+	if(interactionGeometry) 
 	{
-//cerr << "interactionGeometry" << endl;
 		if(!interaction->interactionPhysics)
 		{
-//cerr << "interaction->isNew" << endl;
-			
-// 			Body* de1 = (*bodies)[id1].get();
-// 			Body* de2 = (*bodies)[id2].get();
  			const shared_ptr<FrictMat>& sdec1 = YADE_PTR_CAST<FrictMat>(b1);
  			const shared_ptr<FrictMat>& sdec2 = YADE_PTR_CAST<FrictMat>(b2);
 			
  			if (!interaction->interactionPhysics) interaction->interactionPhysics = shared_ptr<CapillaryPhys>(new CapillaryPhys());
-//			interaction->interactionPhysics = shared_ptr<CapillaryPhys>(new CapillaryPhys());
 			const shared_ptr<CapillaryPhys>& contactPhysics = YADE_PTR_CAST<CapillaryPhys>(interaction->interactionPhysics);
 
 			Real Ea 	= sdec1->young;
@@ -47,43 +39,17 @@
 			Real Db 	= interactionGeometry->radius2; // FIXME - as above
 			Real fa 	= sdec1->frictionAngle;
 			Real fb 	= sdec2->frictionAngle;
-
-			//Real Eab	= 2*Ea*Eb/(Ea+Eb);
-			//Real Vab	= 2*Va*Vb/(Va+Vb);
-
-			Real Dinit 	= Da+Db; 			// FIXME - is it just a sum?
-			//Real Sinit 	= Mathr::PI * std::pow( std::min(Da,Db) , 2);
-
 			Real Kn = 2*Ea*Da*Eb*Db/(Ea*Da+Eb*Db);//harmonic average of two stiffnesses
 			Real Ks = 2*Ea*Da*Va*Eb*Db*Vb/(Ea*Da*Va+Eb*Db*Va);//harmonic average of two stiffnesses with ks=V*kn for each sphere
-
-
-	//This is the formula used in PFC-3D
-	//
-	//Real Kn = 4 * ((Ea+Eb)*0.5) * ((Da+Db)*0.5);
-	//Real Ks = Kn/2.0;
-
-
 			contactPhysics->initialKn			= Kn;
 			contactPhysics->initialKs			= Ks;
-//cerr << "Ks: " <<       contactPhysics->initialKs			<< endl;
-			contactPhysics->frictionAngle			= std::min(fa,fb); // FIXME - this is actually a waste of memory space, just like initialKs and initialKn
-//cerr << "contactPhysics->frictionAngle " << contactPhysics->frictionAngle << " "<< fa << " " << fb << endl;
+			contactPhysics->frictionAngle			= std::min(fa,fb);
 			contactPhysics->tangensOfFrictionAngle		= std::tan(contactPhysics->frictionAngle); 
-//cerr << "contactPhysics->tangensOfFrictionAngle " << contactPhysics->tangensOfFrictionAngle << endl;
-
 			contactPhysics->prevNormal 			= interactionGeometry->normal;
-			contactPhysics->initialEquilibriumDistance	= Dinit;			
-
 			contactPhysics->kn = contactPhysics->initialKn;
 			contactPhysics->ks = contactPhysics->initialKs;
-			contactPhysics->equilibriumDistance = contactPhysics->initialEquilibriumDistance;
-
 		}
-		
-		
 	}
-
 };
 
 

=== modified file 'pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.hpp'
--- pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.hpp	2010-03-31 00:06:48 +0000
+++ pkg/dem/Engine/Functor/Ip2_FrictMat_FrictMat_CapillaryPhys.hpp	2010-04-22 16:40:45 +0000
@@ -1,6 +1,6 @@
 /*************************************************************************
-*  Copyright (C) 2007 by Bruno CHAREYRE                                 *
-*  bruno.chareyre@xxxxxxxxxxx                                        *
+*  Copyright (C) 2007 by Bruno CHAREYRE                                  *
+*  bruno.chareyre@xxxxxxxxxxx                                            *
 *                                                                        *
 *  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. *

=== modified file 'pkg/dem/Engine/PartialEngine/TriaxialCompressionEngine.hpp'
--- pkg/dem/Engine/PartialEngine/TriaxialCompressionEngine.hpp	2010-03-20 12:40:44 +0000
+++ pkg/dem/Engine/PartialEngine/TriaxialCompressionEngine.hpp	2010-04-22 16:40:45 +0000
@@ -87,9 +87,9 @@
 		"\n\n.. note::\n\t This engine handles many different manipulations, including some save/reload with attributes modified manually in between. Please don't modify the algorithms, even if they look strange (especially test sequences) without notifying me and getting explicit approval. A typical situation is somebody generates a sample with !autoCompressionActivation and run : he wants a saved simulation at the end. He then reload the saved state, modify some parameters, set autoCompressionActivation=true, and run. He should get the compression test done."
 		,
 		((Real,strainRate,0,"target strain rate (./s)"))
-		((Real,currentStrainRate,0,"current strain rate - converging to :yref:'TriaxialCompressionEngine::strainRate' (./s)"))
+		((Real,currentStrainRate,0,"current strain rate - converging to :yref:`TriaxialCompressionEngine::strainRate` (./s)"))
 		((Real,UnbalancedForce,1,"mean resultant forces divided by mean contact force"))
-		((Real,StabilityCriterion,0.001,"tolerance in terms of :yref:'TriaxialCompressionEngine::UnbalancedForce' to consider the packing is stable"))
+		((Real,StabilityCriterion,0.001,"tolerance in terms of :yref:`TriaxialCompressionEngine::UnbalancedForce` to consider the packing is stable"))
 		((Vector3r,translationAxis,TriaxialStressController::normal[wall_bottom_id],"compression axis"))
 		((bool,autoCompressionActivation,true,"Auto-switch from isotropic compaction (or unloading state if sigmaLateralConfinement<sigmaIsoCompaction) to deviatoric loading"))
 		((bool,autoUnload,true,"Auto-switch from isotropic compaction to unloading"))
@@ -99,13 +99,13 @@
 		((stateNum,previousState,1,"Previous state (used to detect manual changes of the state in .xml)"))
 		((Real,sigmaIsoCompaction,1,"Prescribed isotropic pressure during the compaction phase"))
 		((Real,previousSigmaIso,1,"Previous value of inherited sigma_iso (used to detect manual changes of the confining pressure)"))
-		((Real,sigmaLateralConfinement,1,"Prescribed confining pressure in the deviatoric loading; might be different from :yref:'TriaxialCompressionEngine::sigmaIsoCompaction'"))
+		((Real,sigmaLateralConfinement,1,"Prescribed confining pressure in the deviatoric loading; might be different from :yref:`TriaxialCompressionEngine::sigmaIsoCompaction`"))
 		((std::string,Key,"","A string appended at the end of all files, use it to name simulations."))
 		((bool,noFiles,false,"If true, no files will be generated (*.xml, *.spheres,...)"))
 		((Real,frictionAngleDegree,-1,"Value of friction assigned just before the deviatoric loading"))
 		((Real,epsilonMax,0.5,"Value of axial deformation for which the loading must stop"))
 		((Real,uniaxialEpsilonCurr,1,"Current value of axial deformation during confined loading (is reference to strain[1])"))
-		((Real,fixedPoroCompaction,false,"A special type of compaction with imposed final porosity :yref:'TriaxialCompressionEngine::fixedPorosity' (WARNING : can give unrealistic results!)"))
+		((Real,fixedPoroCompaction,false,"A special type of compaction with imposed final porosity :yref:`TriaxialCompressionEngine::fixedPorosity` (WARNING : can give unrealistic results!)"))
 		((Real,spheresVolume,1,""))
 		((Real,fixedPorosity,0,"Value of porosity chosen by the user"))
 		((Real,maxStress,0,"Max value of stress during the simulation (for post-processing)"))

=== modified file 'pkg/dem/Engine/PartialEngine/TriaxialStressController.hpp'
--- pkg/dem/Engine/PartialEngine/TriaxialStressController.hpp	2010-04-19 13:29:06 +0000
+++ pkg/dem/Engine/PartialEngine/TriaxialStressController.hpp	2010-04-22 16:40:45 +0000
@@ -19,69 +19,34 @@
 
 
 /*! \brief Controls the stress on the boundaries of a box and compute strain-like and stress-like quantities for the packing
-
-	detailed description...
 */
 
 class TriaxialStressController : public BoundaryController
 {
 	private :
-// 		Real previousStress, previousMultiplier; //previous mean stress and size multiplier		
 		bool first;
 		inline const Vector3r getForce(Scene* rb, body_id_t id){ return rb->forces.getForce(id); /* needs sync, which is done at the beginning of action */ }
-		
-		 	
 	public :
-// 		unsigned int stiffnessUpdateInterval, computeStressStrainInterval, radiusControlInterval;
 		//! internal index values for retrieving walls
 		enum { wall_bottom=0, wall_top, wall_left, wall_right, wall_front, wall_back };
 		//! real index values of walls in the Scene
 		int wall_id [6];
-//   		vector<int> wall_id;
 		//! Stores the value of the translation at the previous time step, stiffness, and normal
 		boost::array<Vector3r,6> previousTranslation;
 		//! The value of stiffness (updated according to stiffnessUpdateInterval) 
 		vector<Real>	stiffness;
 		Real 		strain [3];
-// 		Real volumetricStrain;
 		Vector3r	normal [6];
 		//! The values of stresses 
 		Vector3r	stress [6];
 		Vector3r	force [6];
-// 		Real		meanStress;
 		//! Value of spheres volume (solid volume)
 		Real spheresVolume;
 		//! Value of box volume 
 		Real boxVolume;
 		//! Sample porosity
 		Real porosity;
-				
-		
-		//Real UnbalancedForce;		
-				
-		//! wallDamping coefficient - wallDamping=0 implies a "perfect" control of the resultant force, wallDamping=1 means no movement
-// 		Real			wallDamping;
-		//! maximum displacement/cycle (usefull to prevent explosions when stiffness is very low...) 
-
-// 		Real			maxMultiplier;
-// 		Real			finalMaxMultiplier;
-		//! switch between "external" (walls) and "internal" (growth of particles) compaction 
-// 		bool internalCompaction; 
-		
-		
-// 		int &wall_bottom_id, &wall_top_id, &wall_left_id, &wall_right_id, &wall_front_id, &wall_back_id;
-// 		bool wall_bottom_activated, wall_top_activated, wall_left_activated, wall_right_activated, wall_front_activated, wall_back_activated;
-// 		Real height, width, depth, height0, width0, depth0;
-// 		Real thickness;
-// 		Real sigma_iso;
-		//! The three following parameters allow to perform an external stress control with different stress values for the three space directions.
-// 		Real sigma1;
-// 		Real sigma2;
-// 		Real sigma3;
-		//!"if (isAxisymetric)" (true by default) sigma_iso is attributed to sigma1, 2 and 3
-// 		bool isAxisymetric;
-// 		Real max_vel;
-		//! The three following parameters allow to perform an external stress control with different stress values for the three space directions.
+		
 		Real max_vel1;
 		Real max_vel2;
 		Real max_vel3;
@@ -92,7 +57,6 @@
 		Real position_front;
 		Real position_back;
 
-// 		TriaxialStressController();
 		virtual ~TriaxialStressController();
 	
 		virtual void action();
@@ -100,8 +64,10 @@
 		void controlExternalStress(int wall, Vector3r resultantForce, State* p, Real wall_max_vel);
 		//! Regulate the mean stress by changing spheres size, WARNING : this function assumes that all dynamic bodies in the problem are spheres
 		void controlInternalStress(Real multiplier);
+		//! update the stiffness of boundary-packing interaction (sum of contacts stiffness on the boundary)
 		void updateStiffness();
-		void computeStressStrain(); //Compute stresses on walls as "Vector3r stress[6]", compute meanStress, strain[3] and mean strain
+		//! Compute stresses on walls as "Vector3r stress[6]", compute meanStress, strain[3] and mean strain
+		void computeStressStrain();
 		//! Compute the mean/max unbalanced force in the assembly (normalized by mean contact force)
     		Real ComputeUnbalancedForce(bool maxUnbalanced=false);
 		
@@ -113,7 +79,6 @@
 		((unsigned int,computeStressStrainInterval,10,""))
 		((Real,wallDamping,0.25,"wallDamping coefficient - wallDamping=0 implies a (theoretical) perfect control, wallDamping=1 means no movement"))
 		((Real,thickness,-1,""))
-// 		((vector<int>,wall_id,vector<int>(6,0),"Real index values of walls in the scene."))
 		((int,wall_bottom_id,0,"id of boundary ; coordinate 1-"))
 		((int,wall_top_id,0,"id of boundary ; coordinate 1+"))
 		((int,wall_left_id,0,"id of boundary ; coordinate 0-"))
@@ -132,19 +97,19 @@
 		((Real,height0,0,""))
 		((Real,width0,0,""))
 		((Real,depth0,0,""))		
-		((Real,sigma_iso,0,"applied confining stress (see :yref:'TriaxialStressController::isAxisymetric')"))
-		((Real,sigma1,0,"applied stress on axis 1 (see :yref:'TriaxialStressController::isAxisymetric') |ycomp|"))
-		((Real,sigma2,0,"applied stress on axis 2 (see :yref:'TriaxialStressController::isAxisymetric') |ycomp|"))
-		((Real,sigma3,0,"applied stress on axis 3 (see :yref:'TriaxialStressController::isAxisymetric') |ycomp|"))
+		((Real,sigma_iso,0,"applied confining stress (see :yref:`TriaxialStressController::isAxisymetric`)"))
+		((Real,sigma1,0,"applied stress on axis 1 (see :yref:`TriaxialStressController::isAxisymetric`)"))
+		((Real,sigma2,0,"applied stress on axis 2 (see :yref:`TriaxialStressController::isAxisymetric`)"))
+		((Real,sigma3,0,"applied stress on axis 3 (see :yref:`TriaxialStressController::isAxisymetric`)"))
 		((bool,isAxisymetric,true,"if true, sigma_iso is assigned to sigma1, 2 and 3"))
-		((Real,maxMultiplier,1.001,""))
-		((Real,finalMaxMultiplier,1.00001,""))
-		((Real,max_vel,0.001,"max walls velocity [m/s]"))
+		((Real,maxMultiplier,1.001,"max multiplier of diameters during internal compaction (initial fast increase - :yref:`TriaxialStressController::finalMaxMultiplier` is used in a second stage)"))
+		((Real,finalMaxMultiplier,1.00001,"max multiplier of diameters during internal compaction (secondary precise adjustment - :yref:`TriaxialStressController::maxMultiplier` is used in the initial stage)"))	
+		((Real,max_vel,0.001,"Maximum allowed walls velocity [m/s]. This value superseeds the one assigned by the stress controller if the later is higher. max_vel can be set to infinity in many cases, but sometimes helps stabilizing packings. Based on this value, different maxima are computed for each axis based on the dimensions of the sample, so that if each boundary moves at its maximum velocity, the strain rate will be isotropic (see e.g. :yref:`TriaxialStressController::max_vel1`)."))
 		((Real,previousStress,0,""))
 		((Real,previousMultiplier,1,""))
 		((bool,internalCompaction,true,"Switch between 'external' (walls) and 'internal' (growth of particles) compaction."))
-		((Real,meanStress,0,""))
-		((Real,volumetricStrain,0,""))
+		((Real,meanStress,0,"Mean stress in the packing."))
+		((Real,volumetricStrain,0,"Volumetric strain (see :yref:`TriaxialStressController::strain`)."))
  		,
 		/* extra initializers */
 		,
@@ -152,10 +117,7 @@
    		first = true;
 		stiffness.resize(6);
 		previousTranslation.assign(Vector3r::ZERO);
-			for (int i=0; i<6; ++i){
-				normal[i] = stress[i] = force[i] = Vector3r::ZERO;
-				stiffness[i] = 0;
-			}
+		for (int i=0; i<6; ++i){normal[i]=stress[i]=force[i]=Vector3r::ZERO;stiffness[i]=0;}
 		normal[wall_bottom].Y()=1;
 		normal[wall_top].Y()=-1;
 		normal[wall_left].X()=1;
@@ -164,17 +126,13 @@
 		normal[wall_back].Z()=1;	
 		porosity=1;
 		,
-		.def_readonly("strain",&TriaxialStressController::strain,"")
- 		.def_readonly("porosity",&TriaxialStressController::porosity,"")
-		.def_readonly("boxVolume",&TriaxialStressController::boxVolume,"")
-		.def_readonly("max_vel1",&TriaxialStressController::max_vel1,"|ycomp|")
-		.def_readonly("max_vel2",&TriaxialStressController::max_vel2,"|ycomp|")
-		.def_readonly("max_vel3",&TriaxialStressController::max_vel3,"|ycomp|")
-		//.def("setContactProperties",&TriaxialCompressionEngine::setContactProperties,"Assign a new friction angle (degrees) to dynamic bodies and relative interactions")
+		.def_readonly("strain",&TriaxialStressController::strain,"Current strain (logarithmic).")
+ 		.def_readonly("porosity",&TriaxialStressController::porosity,"Pososity of the packing.")
+		.def_readonly("boxVolume",&TriaxialStressController::boxVolume,"Total packing volume.")
+		.def_readonly("max_vel1",&TriaxialStressController::max_vel1,"see :yref:`TriaxialStressController::max_vel` |ycomp|")
+		.def_readonly("max_vel2",&TriaxialStressController::max_vel2,"see :yref:`TriaxialStressController::max_vel` |ycomp|")
+		.def_readonly("max_vel3",&TriaxialStressController::max_vel3,"see :yref:`TriaxialStressController::max_vel` |ycomp|")
 		 )
 		DECLARE_LOGGER;	
 };
-
 REGISTER_SERIALIZABLE(TriaxialStressController);
-
-

=== modified file 'pkg/dem/PreProcessor/TriaxialTest.cpp'
--- pkg/dem/PreProcessor/TriaxialTest.cpp	2010-04-19 10:18:42 +0000
+++ pkg/dem/PreProcessor/TriaxialTest.cpp	2010-04-22 16:40:45 +0000
@@ -53,79 +53,6 @@
 using namespace boost;
 using namespace std;
 
-// TriaxialTest::TriaxialTest () : FileGenerator()
-// {
-// 	lowerCorner 		= Vector3r(0,0,0);
-// 	upperCorner 		= Vector3r(1,1,1);
-// 	thickness 		= 0.001;
-// 	importFilename          = ""; // oh, PLEASE, keep this empty -- i.e., by default, generate spheres in the box, not load them.
-// 	Key			="";
-// 	outputFileName 		= "./TriaxialTest"+Key+".xml";
-// 	//nlayers = 1;
-// 	wall_top 		= true;
-// 	wall_bottom 		= true;
-// 	wall_1			= true;
-// 	wall_2			= true;
-// 	wall_3			= true;
-// 	wall_4			= true;
-// 	wall_top_wire 		= true;
-// 	wall_bottom_wire	= true;
-// 	wall_1_wire		= true;
-// 	wall_2_wire		= true;
-// 	wall_3_wire		= true;
-// 	wall_4_wire		= true;
-// 	spheresColor		= Vector3r(0.8,0.3,0.3);
-// 	spheresRandomColor	= false;
-// 	recordIntervalIter	= 20;
-// 	saveAnimationSnapshots = false;
-// 	AnimationSnapshotsBaseName = "./snapshots_"+Key+"/snap";
-// 	WallStressRecordFile = "./WallStresses"+Key;
-// 
-// 	rotationBlocked 	= false;
-// 	boxWalls 		= true;
-// 	internalCompaction	=false;
-// 	dampingForce 		= 0.2;
-// 	dampingMomentum 	= 0.2;
-// 	defaultDt 		= -1;
-// 	
-// 	timeStepUpdateInterval = 50;
-// 	timeStepOutputInterval = 50;
-// 	wallStiffnessUpdateInterval = 10;
-// 	radiusControlInterval 	= 10;
-// 	numberOfGrains 		= 400;
-// 	strainRate 		= 0.1;
-// 	maxWallVelocity		=10;
-// 	StabilityCriterion 	= 0.01;
-// 	autoCompressionActivation = true;
-// 	autoUnload 		= true;
-// 	autoStopSimulation 	= false;
-// 	maxMultiplier 		= 1.01;
-// 	finalMaxMultiplier 	= 1.001;	
-// 	sphereYoungModulus  	= 15000000.0;
-// 	sphereKsDivKn  	= 0.5;	
-// 	sphereFrictionDeg 	= 18.0;
-// 	compactionFrictionDeg   = sphereFrictionDeg;
-// 	density			= 2600;
-// 	
-// 	boxYoungModulus   	= 15000000.0;
-// 	boxKsDivKn  	= 0.2;
-// 	boxFrictionDeg   	= 0.f;
-// 	gravity 		= Vector3r(0,-9.81,0);
-// 	
-// 	sigmaIsoCompaction = 50000;
-// 	sigmaLateralConfinement=sigmaIsoCompaction;
-// 	wallOversizeFactor=1.3;
-// 	biaxial2dTest=false;
-// 	radiusStdDev=0.3;
-// 	radiusMean=-1; // no radius specified
-// 	fixedPoroCompaction=false;
-// 	fixedPorosity = 1;
-// 	fast=false;
-// 	noFiles=false;
-// 	facetWalls=false;
-// 	wallWalls=false;
-// }
-
 TriaxialTest::~TriaxialTest () {}
 
 bool TriaxialTest::generate()

=== modified file 'pkg/dem/PreProcessor/TriaxialTest.hpp'
--- pkg/dem/PreProcessor/TriaxialTest.hpp	2010-04-18 15:46:26 +0000
+++ pkg/dem/PreProcessor/TriaxialTest.hpp	2010-04-22 16:40:45 +0000
@@ -20,8 +20,8 @@
 
 /*! \brief Isotropic compression + triaxial compression test
 
-	TriaxialTest full documentation is here : http://yade-dem.org/index.php/TriaxialTest
-	This preprocessor is designed to :
+	TriaxialTest full documentation is here : http://yade-dem.org/wiki/TriaxialTest
+	This preprocessor shows how to simulate a triaxial test in Yade. It is using the elastic-frictional contact law defined in ElasticContactLaw (similar procedures can be used for other contact laws).  It is designed to :
 	1/ generate random loose packings and compress them under isotropic confining stress, either squeezing the packing between moving rigid boxes or expanding the particles while boxes are fixed (depending on flag "InternalCompaction").
 	2/ simulate all sorts triaxial loading path (there is however a default loading path corresponding to constant lateral stress in 2 directions and constant strain rate on the third direction - this loading path is used when the flag AutoCompressionActivation = true, otherwise the simulation stops after isotropic compression)
 	
@@ -68,16 +68,13 @@
 		void createSphere(shared_ptr<Body>& body, Vector3r position, Real radius,bool big,bool dynamic);
 		void createActors(shared_ptr<Scene>& rootBody);
 		void positionRootBody(shared_ptr<Scene>& rootBody);
-
-		typedef pair<Vector3r, Real> BasicSphere;
-	
+		typedef pair<Vector3r, Real> BasicSphere;	
 	public : 
-		//TriaxialTest ();
 		~TriaxialTest ();
 		bool generate();
 		
 		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(
-		TriaxialTest,FileGenerator,"Prepare a scene for triaxial tests. See full documentation at http://yade-dem.org/index.php/TriaxialTest.";
+		TriaxialTest,FileGenerator,"Prepare a scene for triaxial tests. See full documentation at http://yade-dem.org/wiki/TriaxialTest.";
 		,
    		((Vector3r,lowerCorner,Vector3r(0,0,0),"Lower corner of the box."))
 		((Vector3r,upperCorner,Vector3r(1,1,1),"Upper corner of the box."))
@@ -85,14 +82,12 @@
 		((string,Key,"","A code that is added to output filenames."))
 		((string,fixedBoxDims,"","string that contains some subset (max. 2) of {'x','y','z'} ; containes axes will have box dimension hardcoded, even if box is scaled as mean_radius is prescribed: scaling will be applied on the rest."))
 		((string,AnimationSnapshotsBaseName,"./snapshots_"+Key+"/snap",""))
-		((string,WallStressRecordFile,"./WallStresses"+Key,""))
-					
+		((string,WallStressRecordFile,"./WallStresses"+Key,""))					
 		((bool,internalCompaction,false,"flag for choosing between moving boundaries or increasing particles sizes during the compaction stage."))
 		((bool,biaxial2dTest,false,"FIXME : what is that?"))
-		((bool,rotationBlocked,false,"FIXME : what is that?"))
 		((bool,fixedPoroCompaction,false,"flag to choose an isotropic compaction until a fixed porosity choosing a same translation speed for the six walls"))
 		((bool,autoCompressionActivation,true,"Do we just want to generate a stable packing under isotropic pressure (false) or do we want the triaxial loading to start automatically right after compaction stage (true)?"))
-		((bool,autoUnload,true,"auto adjust the isotropic stress state from :yref:'TriaxialTest::sigmaIsoCompaction' to :yref:'TriaxialTest::sigmaLateralConfinement' if they have different values. See docs for :yref:'TriaxialCompressionEngine::autoUnload'"))
+		((bool,autoUnload,true,"auto adjust the isotropic stress state from :yref:`TriaxialTest::sigmaIsoCompaction` to :yref:`TriaxialTest::sigmaLateralConfinement` if they have different values. See docs for :yref:`TriaxialCompressionEngine::autoUnload`"))
 		((bool,autoStopSimulation,false,"freeze the simulation when conditions are reached (don't activate this if you want to be able to run/stop from Qt GUI)"))
 		((bool,saveAnimationSnapshots,false,""))
 		((bool,noFiles,false,"Do not create any files during run (.xml, .spheres, wall stress records)"))
@@ -105,26 +100,26 @@
 		((Real,maxMultiplier,1.01,"max multiplier of diameters during internal compaction (initial fast increase)"))
 		((Real,finalMaxMultiplier,1.001,"max multiplier of diameters during internal compaction (secondary precise adjustment)"))
 		((Real,radiusStdDev,0.3,"Normalized standard deviation of generated sizes."))
-		((Real,radiusMean,-1,"Mean radius. If negative (default), autocomputed to as a function of box size and :yref:'TriaxialTest::numberOfGrains'"))
+		((Real,radiusMean,-1,"Mean radius. If negative (default), autocomputed to as a function of box size and :yref:`TriaxialTest::numberOfGrains`"))
 		((Real,sphereYoungModulus,15000000.0,"Stiffness of spheres."))
 		((Real,sphereKsDivKn,0.5,"Ratio of shear vs. normal contact stiffness for spheres."))
 		((Real,sphereFrictionDeg,18.0,"Friction angle [°] of spheres assigned just before triaxial testing."))
-		((Real,compactionFrictionDeg,sphereFrictionDeg,"Friction angle [°] of spheres during compaction (different values result in different porosities)]. This value is overriden by :yref:'TriaxialTest::sphereFrictionDeg' before triaxial testing."))
+		((Real,compactionFrictionDeg,sphereFrictionDeg,"Friction angle [°] of spheres during compaction (different values result in different porosities)]. This value is overriden by :yref:`TriaxialTest::sphereFrictionDeg` before triaxial testing."))
 		((Real,boxYoungModulus,15000000.0,"Stiffness of boxes."))
 		((Real,maxWallVelocity,10,"max velocity of boundaries. Usually useless, but can help stabilizing the system in some cases."))
 		((Real,boxKsDivKn,0.5,"Ratio of shear vs. normal contact stiffness for boxes."))
 		((Real,boxFrictionDeg,0.0,"Friction angle [°] of boundaries contacts."))
 		((Real,density,2600,"density of spheres"))
-		((Real,strainRate,0.1,"Strain rate in triaxial testing."))
+		((Real,strainRate,0.1,"Strain rate in triaxial loading."))
 		((Real,defaultDt,-1,"Max time-step. Used as initial value if defined. Latter adjusted by the time stepper."))
 		((Real,dampingForce,0.2,"Coefficient of Cundal-Non-Viscous damping (applied on on the 3 components of forces)"))
 		((Real,dampingMomentum,0.2,"Coefficient of Cundal-Non-Viscous damping (applied on on the 3 components of torques)"))
 		((Real,StabilityCriterion,0.01,"Value of unbalanced force for which the system is considered stable. Used in conditionals to switch between loading stages."))
 		((Real,wallOversizeFactor,1.3,"Make boundaries larger than the packing to make sure spheres don't go out during deformation."))
 		((Real,sigmaIsoCompaction,50000,"Confining stress during isotropic compaction."))
-		((Real,sigmaLateralConfinement,50000,"Lateral stress during triaxial loading. An isotropic unloading is performed if the value is not equal to :yref:'TriaxialTest::SigmaIsoCompaction'."))
+		((Real,sigmaLateralConfinement,50000,"Lateral stress during triaxial loading. An isotropic unloading is performed if the value is not equal to :yref:`TriaxialTest::SigmaIsoCompaction`."))
 		
-		((int,timeStepUpdateInterval,50,"interval for :yref:'GlobalStiffnessTimeStepper'"))
+		((int,timeStepUpdateInterval,50,"interval for :yref:`GlobalStiffnessTimeStepper`"))
 		((int,timeStepOutputInterval,50,"interval for outputing general informations on the simulation (stress,unbalanced force,...)"))
 		((int,wallStiffnessUpdateInterval,10,"interval for updating the stiffness of sample/boundaries contacts"))
 		((int,radiusControlInterval,10,"interval between size changes when growing spheres."))