← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2483: - rename classes :

 

------------------------------------------------------------
revno: 2483
committer: bchareyre <bchareyre@dt-rv020>
branch nick: yade
timestamp: Wed 2010-10-13 18:00:36 +0200
message:
  - rename classes :
  	Law2_ScGeom_CohFrictPhys_ElasticPlastic ->  Law2_ScGeom_CohFrictPhys_CohesionMoment
  	Law2_Dem3DofGeom_FrictPhys_Basic -> Law2_Dem3DofGeom_FrictPhys_CundallStrack
  	Law2_ScGeom_FrictPhys_Basic -> Law2_ScGeom_FrictPhys_CundallStrack
modified:
  pkg/common/DataClass/Shape/Cylinder.hpp
  pkg/dem/DataClass/IPhys/CohFrictPhys.hpp
  pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_CohFrictPhys.hpp
  pkg/dem/Engine/GlobalEngine/CohesiveFrictionalContactLaw.cpp
  pkg/dem/Engine/GlobalEngine/CohesiveFrictionalContactLaw.hpp
  pkg/dem/Engine/GlobalEngine/CundallStrack.hpp
  pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp
  pkg/dem/Engine/GlobalEngine/ElasticContactLaw.hpp
  py/system.py
  scripts/multi.py


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/common/DataClass/Shape/Cylinder.hpp'
--- pkg/common/DataClass/Shape/Cylinder.hpp	2010-09-30 18:00:41 +0000
+++ pkg/common/DataClass/Shape/Cylinder.hpp	2010-10-13 16:00:36 +0000
@@ -191,8 +191,6 @@
 	);
 };
 
-
-
 // Keep this : Cylinders and ChainedCylinders will have different centers maybe.
 // class Bo1_ChainedCylinder_Aabb : public Bo1_Cylinder_Aabb
 // {
@@ -204,18 +202,15 @@
 // 	);
 // };
 
-
-
-
 REGISTER_SERIALIZABLE(Bo1_Cylinder_Aabb);
 REGISTER_SERIALIZABLE(Bo1_ChainedCylinder_Aabb);
-#ifdef YADE_OPENGL
-REGISTER_SERIALIZABLE(Gl1_Cylinder);
-REGISTER_SERIALIZABLE(Gl1_ChainedCylinder);
-#endif
 REGISTER_SERIALIZABLE(Cylinder);
 REGISTER_SERIALIZABLE(ChainedCylinder);
 REGISTER_SERIALIZABLE(ChainedState);
 REGISTER_SERIALIZABLE(CylScGeom);
 REGISTER_SERIALIZABLE(Ig2_Sphere_ChainedCylinder_CylScGeom);
 REGISTER_SERIALIZABLE(Ig2_ChainedCylinder_ChainedCylinder_ScGeom);
+#ifdef YADE_OPENGL
+REGISTER_SERIALIZABLE(Gl1_Cylinder);
+REGISTER_SERIALIZABLE(Gl1_ChainedCylinder);
+#endif

=== modified file 'pkg/dem/DataClass/IPhys/CohFrictPhys.hpp'
--- pkg/dem/DataClass/IPhys/CohFrictPhys.hpp	2010-08-24 12:54:14 +0000
+++ pkg/dem/DataClass/IPhys/CohFrictPhys.hpp	2010-10-13 16:00:36 +0000
@@ -23,7 +23,7 @@
 		((bool,fragile,true,,"do cohesion disapear when contact strength is exceeded?"))
 		((Real,kr,0,,"rotational stiffness [N.m/rad]"))
 		((Real,normalAdhesion,0,,"tensile strength"))
-		((Real,shearAdhesion,0,,"cohesive part of the shear strength (a frictional term might be added depending on :yref:`Law2_ScGeom_CohFrictPhys_ElasticPlastic::always_use_moment_law`)"))
+		((Real,shearAdhesion,0,,"cohesive part of the shear strength (a frictional term might be added depending on :yref:`Law2_ScGeom_CohFrictPhys_CohesionMoment::always_use_moment_law`)"))
 		// internal attributes
 		((Vector3r,moment_twist,Vector3r(0,0,0),,""))
 		((Vector3r,moment_bending,Vector3r(0,0,0),,""))

=== modified file 'pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_CohFrictPhys.hpp'
--- pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_CohFrictPhys.hpp	2010-09-30 18:00:41 +0000
+++ pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_CohFrictPhys.hpp	2010-10-13 16:00:36 +0000
@@ -19,7 +19,7 @@
 		int cohesionDefinitionIteration;
 		
 		YADE_CLASS_BASE_DOC_ATTRS_CTOR(Ip2_2xCohFrictMat_CohFrictPhys,IPhysFunctor,
-		"Generates cohesive-frictional interactions with moments. Used in the contact law :yref:`Law2_ScGeom_CohFrictPhys_ElasticPlastic`.",
+		"Generates cohesive-frictional interactions with moments. Used in the contact law :yref:`Law2_ScGeom_CohFrictPhys_CohesionMoment`.",
 		((bool,setCohesionNow,false,,""))
 		((bool,setCohesionOnNewContacts,false,,""))
 		((Real,normalCohesion,10000000,,""))

=== modified file 'pkg/dem/Engine/GlobalEngine/CohesiveFrictionalContactLaw.cpp'
--- pkg/dem/Engine/GlobalEngine/CohesiveFrictionalContactLaw.cpp	2010-10-13 15:04:25 +0000
+++ pkg/dem/Engine/GlobalEngine/CohesiveFrictionalContactLaw.cpp	2010-10-13 16:00:36 +0000
@@ -14,8 +14,8 @@
 #include<yade/core/Scene.hpp>
 
 
-YADE_PLUGIN((CohesiveFrictionalContactLaw)(Law2_ScGeom_CohFrictPhys_ElasticPlastic));
-CREATE_LOGGER(Law2_ScGeom_CohFrictPhys_ElasticPlastic);
+YADE_PLUGIN((CohesiveFrictionalContactLaw)(Law2_ScGeom_CohFrictPhys_CohesionMoment));
+CREATE_LOGGER(Law2_ScGeom_CohFrictPhys_CohesionMoment);
 
 Vector3r translation_vect_ ( 0.10,0,0 );
 
@@ -23,7 +23,7 @@
 
 void CohesiveFrictionalContactLaw::action()
 {
-	if(!functor) functor=shared_ptr<Law2_ScGeom_CohFrictPhys_ElasticPlastic>(new Law2_ScGeom_CohFrictPhys_ElasticPlastic);
+	if(!functor) functor=shared_ptr<Law2_ScGeom_CohFrictPhys_CohesionMoment>(new Law2_ScGeom_CohFrictPhys_CohesionMoment);
 	functor->erosionActivated = erosionActivated;
 	functor->detectBrokenBodies = detectBrokenBodies;
 	functor->always_use_moment_law = always_use_moment_law;
@@ -40,7 +40,7 @@
 }
 
 
-void Law2_ScGeom_CohFrictPhys_ElasticPlastic::go(shared_ptr<IGeom>& ig, shared_ptr<IPhys>& ip, Interaction* contact)
+void Law2_ScGeom_CohFrictPhys_CohesionMoment::go(shared_ptr<IGeom>& ig, shared_ptr<IPhys>& ip, Interaction* contact)
 {
 	const Real& dt = scene->dt;
 // 		if (detectBrokenBodies  //Experimental, has no effect

=== modified file 'pkg/dem/Engine/GlobalEngine/CohesiveFrictionalContactLaw.hpp'
--- pkg/dem/Engine/GlobalEngine/CohesiveFrictionalContactLaw.hpp	2010-10-13 15:04:25 +0000
+++ pkg/dem/Engine/GlobalEngine/CohesiveFrictionalContactLaw.hpp	2010-10-13 16:00:36 +0000
@@ -13,10 +13,10 @@
 #include <set>
 #include <boost/tuple/tuple.hpp>
 
-class Law2_ScGeom_CohFrictPhys_ElasticPlastic: public LawFunctor{
+class Law2_ScGeom_CohFrictPhys_CohesionMoment: public LawFunctor{
 	public:
 	virtual void go(shared_ptr<IGeom>& _geom, shared_ptr<IPhys>& _phys, Interaction* I);
-	YADE_CLASS_BASE_DOC_ATTRS(Law2_ScGeom_CohFrictPhys_ElasticPlastic,LawFunctor,"Law for linear traction-compression-bending-twisting, with cohesion+friction and Mohr-Coulomb plasticity surface. This law adds adhesion and moments to :yref:`Law2_ScGeom_FrictPhys_Basic`.\n\nThe normal force is (with the convention of positive tensile forces) $F_n=min(k_n*u_n, a_n)$, with $a_n$ the normal adhesion. The shear force is $F_s=k_s*u_s$, the plasticity condition defines the maximum value of the shear force, by default $F_s^{max}=F_n*tan(\\phi)+a_s$, with $\\phi$ the friction angle and $a_n$ the shear adhesion. If :yref:`CohFrictPhys::cohesionDisableFriction` is True, friction is ignored as long as adhesion is active, and the maximum shear force is only $F_s^{max}=a_s$.\n\nIf the maximum tensile or maximum shear force is reached and :yref:`CohFrictPhys::fragile` =True (default), the cohesive link is broken, and $a_n, a_s$ are set back to zero. If a tensile force is present, the contact is lost, else the shear strength is $F_s^{max}=F_n*tan(\\phi)$. If :yref:`CohFrictPhys::fragile` =False (in course of implementation), the behaviour is perfectly plastic, and the shear strength is kept constant.\n\nIf :yref:`Law2_ScGeom_CohFrictPhys_ElasticPlastic::momentRotationLaw` =True, bending and twisting moments are computed using a linear law with moduli respectively $k_t$ and $k_r$ (the two values are the same currently), so that the moments are : $M_b=k_b*\\Theta_b$ and $M_t=k_t*\\Theta_t$, with $\\Theta_{b,t}$ the relative rotations between interacting bodies. There is no maximum value of moments in the current implementation, though they could be added in the future.\nCreep at contact is implemented in this law, as defined in [Hassan2010]_ can be activated. In this case, there is a viscous behaviour of the shear and twisting components, and the evolution of the elastic parts of shear displacement and relative twist is given by $du_{s,e}/dt=F_s/\\nu_s$ and $d\\Theta_{t,e}/dt=M_t/\\nu_t$.",
+	YADE_CLASS_BASE_DOC_ATTRS(Law2_ScGeom_CohFrictPhys_CohesionMoment,LawFunctor,"Law for linear traction-compression-bending-twisting, with cohesion+friction and Mohr-Coulomb plasticity surface. This law adds adhesion and moments to :yref:`Law2_ScGeom_FrictPhys_CundallStrack`.\n\nThe normal force is (with the convention of positive tensile forces) $F_n=min(k_n*u_n, a_n)$, with $a_n$ the normal adhesion. The shear force is $F_s=k_s*u_s$, the plasticity condition defines the maximum value of the shear force, by default $F_s^{max}=F_n*tan(\\phi)+a_s$, with $\\phi$ the friction angle and $a_n$ the shear adhesion. If :yref:`CohFrictPhys::cohesionDisableFriction` is True, friction is ignored as long as adhesion is active, and the maximum shear force is only $F_s^{max}=a_s$.\n\nIf the maximum tensile or maximum shear force is reached and :yref:`CohFrictPhys::fragile` =True (default), the cohesive link is broken, and $a_n, a_s$ are set back to zero. If a tensile force is present, the contact is lost, else the shear strength is $F_s^{max}=F_n*tan(\\phi)$. If :yref:`CohFrictPhys::fragile` =False (in course of implementation), the behaviour is perfectly plastic, and the shear strength is kept constant.\n\nIf :yref:`Law2_ScGeom_CohFrictPhys_CohesionMoment::momentRotationLaw` =True, bending and twisting moments are computed using a linear law with moduli respectively $k_t$ and $k_r$ (the two values are the same currently), so that the moments are : $M_b=k_b*\\Theta_b$ and $M_t=k_t*\\Theta_t$, with $\\Theta_{b,t}$ the relative rotations between interacting bodies. There is no maximum value of moments in the current implementation, though they could be added in the future.\nCreep at contact is implemented in this law, as defined in [Hassan2010]_ can be activated. In this case, there is a viscous behaviour of the shear and twisting components, and the evolution of the elastic parts of shear displacement and relative twist is given by $du_{s,e}/dt=F_s/\\nu_s$ and $d\\Theta_{t,e}/dt=M_t/\\nu_t$.",
 		((bool,neverErase,false,,"Keep interactions even if particles go away from each other (only in case another constitutive law is in the scene, e.g. :yref:`Law2_ScGeom_CapillaryPhys_Capillarity`)"))
 		((bool,momentRotationLaw,false,,"use bending/twisting moment at contacts. See :yref:`CohFrictPhys::cohesionDisablesFriction` for details."))
 		((bool,always_use_moment_law,false,,"If true, use bending/twisting moments at all contacts. If false, compute moments only for cohesive contacts."))
@@ -30,18 +30,18 @@
 	FUNCTOR2D(ScGeom,CohFrictPhys);
 	DECLARE_LOGGER;
 };
-REGISTER_SERIALIZABLE(Law2_ScGeom_CohFrictPhys_ElasticPlastic);
+REGISTER_SERIALIZABLE(Law2_ScGeom_CohFrictPhys_CohesionMoment);
 
 
 class CohesiveFrictionalContactLaw : public GlobalEngine
 {
-	shared_ptr<Law2_ScGeom_CohFrictPhys_ElasticPlastic> functor;
+	shared_ptr<Law2_ScGeom_CohFrictPhys_CohesionMoment> functor;
 	
 	public :		
 		long iter;/// used for checking if new iteration
 		void action();
 		
-	YADE_CLASS_BASE_DOC_ATTRS(CohesiveFrictionalContactLaw,GlobalEngine,"[DEPRECATED] Loop over interactions applying :yref:`Law2_ScGeom_CohFrictPhys_ElasticPlastic` on all interactions.\n\n.. note::\n  Use :yref:`InteractionLoop` and :yref:`Law2_ScGeom_CohFrictPhys_ElasticPlastic` instead of this class for performance reasons.",
+	YADE_CLASS_BASE_DOC_ATTRS(CohesiveFrictionalContactLaw,GlobalEngine,"[DEPRECATED] Loop over interactions applying :yref:`Law2_ScGeom_CohFrictPhys_CohesionMoment` on all interactions.\n\n.. note::\n  Use :yref:`InteractionLoop` and :yref:`Law2_ScGeom_CohFrictPhys_CohesionMoment` instead of this class for performance reasons.",
 		((bool,neverErase,false,,"Keep interactions even if particles go away from each other (only in case another constitutive law is in the scene, e.g. :yref:`Law2_ScGeom_CapillaryPhys_Capillarity`)"))
 		((bool,momentRotationLaw,false,,"use bending/twisting moment at contacts. See :yref:`CohesiveFrictionalContactLaw::always_use_moment_law` for details."))
 		((bool,always_use_moment_law,false,,"If true, use bending/twisting moments at all contacts. If false, compute moments only for cohesive contacts."))

=== modified file 'pkg/dem/Engine/GlobalEngine/CundallStrack.hpp'
--- pkg/dem/Engine/GlobalEngine/CundallStrack.hpp	2010-09-30 18:00:41 +0000
+++ pkg/dem/Engine/GlobalEngine/CundallStrack.hpp	2010-10-13 16:00:36 +0000
@@ -8,7 +8,7 @@
 #include <set>
 #include <boost/tuple/tuple.hpp>
 
-//! This is the simplest law with Kn, Ks and Coulomb.  It is a duplication of Law2_Dem3DofGeom_FrictPhys_Basic, but it is cleaner.
+//! This is the simplest law with Kn, Ks and Coulomb.  It is a duplication of Law2_Dem3DofGeom_FrictPhys_CundallStrack, but it is cleaner.
 //! It also shows clearly to a beginner on how to write a Constitutive Law.  In a sense, it is similar to RockPM
 
 class Law2_Dem3Dof_CSPhys_CundallStrack: public LawFunctor{

=== modified file 'pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp'
--- pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp	2010-09-30 18:00:41 +0000
+++ pkg/dem/Engine/GlobalEngine/ElasticContactLaw.cpp	2010-10-13 16:00:36 +0000
@@ -12,15 +12,15 @@
 #include<yade/core/Omega.hpp>
 #include<yade/core/Scene.hpp>
 
-YADE_PLUGIN((Law2_ScGeom_FrictPhys_Basic)(Law2_Dem3DofGeom_FrictPhys_Basic)(ElasticContactLaw));
+YADE_PLUGIN((Law2_ScGeom_FrictPhys_CundallStrack)(Law2_Dem3DofGeom_FrictPhys_CundallStrack)(ElasticContactLaw));
 
-Real Law2_ScGeom_FrictPhys_Basic::Real0=0;
-Real Law2_ScGeom_FrictPhys_Basic::getPlasticDissipation() {return (Real) plasticDissipation;}
-void Law2_ScGeom_FrictPhys_Basic::initPlasticDissipation(Real initVal) {plasticDissipation.reset(); plasticDissipation+=initVal;}
+Real Law2_ScGeom_FrictPhys_CundallStrack::Real0=0;
+Real Law2_ScGeom_FrictPhys_CundallStrack::getPlasticDissipation() {return (Real) plasticDissipation;}
+void Law2_ScGeom_FrictPhys_CundallStrack::initPlasticDissipation(Real initVal) {plasticDissipation.reset(); plasticDissipation+=initVal;}
 
 void ElasticContactLaw::action()
 {
-	if(!functor) functor=shared_ptr<Law2_ScGeom_FrictPhys_Basic>(new Law2_ScGeom_FrictPhys_Basic);
+	if(!functor) functor=shared_ptr<Law2_ScGeom_FrictPhys_CundallStrack>(new Law2_ScGeom_FrictPhys_CundallStrack);
 	functor->neverErase=neverErase;
 	functor->scene=scene;
 	FOREACH(const shared_ptr<Interaction>& I, *scene->interactions){
@@ -33,7 +33,7 @@
 	}
 }
 
-Real Law2_ScGeom_FrictPhys_Basic::elasticEnergy()
+Real Law2_ScGeom_FrictPhys_CundallStrack::elasticEnergy()
 {
 	Real energy=0;
 	FOREACH(const shared_ptr<Interaction>& I, *scene->interactions){
@@ -45,8 +45,8 @@
 	return energy;
 }
 
-CREATE_LOGGER(Law2_ScGeom_FrictPhys_Basic);
-void Law2_ScGeom_FrictPhys_Basic::go(shared_ptr<IGeom>& ig, shared_ptr<IPhys>& ip, Interaction* contact){
+CREATE_LOGGER(Law2_ScGeom_FrictPhys_CundallStrack);
+void Law2_ScGeom_FrictPhys_CundallStrack::go(shared_ptr<IGeom>& ig, shared_ptr<IPhys>& ip, Interaction* contact){
 	int id1 = contact->getId1(), id2 = contact->getId2();
 
 	ScGeom*    geom= static_cast<ScGeom*>(ig.get());
@@ -99,7 +99,7 @@
 }
 
 // same as elasticContactLaw, but using Dem3DofGeom
-void Law2_Dem3DofGeom_FrictPhys_Basic::go(shared_ptr<IGeom>& ig, shared_ptr<IPhys>& ip, Interaction* contact){
+void Law2_Dem3DofGeom_FrictPhys_CundallStrack::go(shared_ptr<IGeom>& ig, shared_ptr<IPhys>& ip, Interaction* contact){
 	Dem3DofGeom* geom=static_cast<Dem3DofGeom*>(ig.get());
 	FrictPhys* phys=static_cast<FrictPhys*>(ip.get());
 	Real displN=geom->displacementN();

=== modified file 'pkg/dem/Engine/GlobalEngine/ElasticContactLaw.hpp'
--- pkg/dem/Engine/GlobalEngine/ElasticContactLaw.hpp	2010-10-13 15:17:59 +0000
+++ pkg/dem/Engine/GlobalEngine/ElasticContactLaw.hpp	2010-10-13 16:00:36 +0000
@@ -14,26 +14,26 @@
 #include <boost/tuple/tuple.hpp>
 #include<yade/lib-base/openmp-accu.hpp>
 
-class Law2_ScGeom_FrictPhys_Basic: public LawFunctor{
+class Law2_ScGeom_FrictPhys_CundallStrack: public LawFunctor{
 	public:
 		static Real Real0;
-		OpenMPAccumulator<Real,&Law2_ScGeom_FrictPhys_Basic::Real0> plasticDissipation;
+		OpenMPAccumulator<Real,&Law2_ScGeom_FrictPhys_CundallStrack::Real0> plasticDissipation;
 		virtual void go(shared_ptr<IGeom>& _geom, shared_ptr<IPhys>& _phys, Interaction* I);
 		Real elasticEnergy ();
 		Real getPlasticDissipation();
 		void initPlasticDissipation(Real initVal=0);
-		YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Law2_ScGeom_FrictPhys_Basic,LawFunctor,"Law for linear compression, and Mohr-Coulomb plasticity surface without cohesion.\nThis law implements the classical linear elastic-plastic law from [CundallStrack1979]_ (see also [Pfc3dManual30]_). The normal force is (with the convention of positive tensile forces) $F_n=min(k_n*u_n, 0)$. The shear force is $F_s=k_s*u_s$, the plasticity condition defines the maximum value of the shear force : $F_s^{max}=F_n*tan(\\phi)$, with $\\phi$ the friction angle.\n\n.. note::\n This law uses :yref:`ScGeom`; there is also functionally equivalent :yref:`Law2_Dem3DofGeom_FrictPhys_Basic`, which uses :yref:`Dem3DofGeom` (sphere-box interactions are not implemented for the latest).\n\n.. note::\n This law is well tested in the context of triaxial simulation, and has been used for a number of published results (see e.g. [Scholtes2009b]_ and other papers from the same authors). It is generalised by :yref:`Law2_ScGeom_CohFrictPhys_ElasticPlastic`, which adds cohesion and moments at contact.",
+		YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Law2_ScGeom_FrictPhys_CundallStrack,LawFunctor,"Law for linear compression, and Mohr-Coulomb plasticity surface without cohesion.\nThis law implements the classical linear elastic-plastic law from [CundallStrack1979]_ (see also [Pfc3dManual30]_). The normal force is (with the convention of positive tensile forces) $F_n=min(k_n*u_n, 0)$. The shear force is $F_s=k_s*u_s$, the plasticity condition defines the maximum value of the shear force : $F_s^{max}=F_n*tan(\\phi)$, with $\\phi$ the friction angle.\n\n.. note::\n This law uses :yref:`ScGeom`; there is also functionally equivalent :yref:`Law2_Dem3DofGeom_FrictPhys_CundallStrack`, which uses :yref:`Dem3DofGeom` (sphere-box interactions are not implemented for the latest).\n\n.. note::\n This law is well tested in the context of triaxial simulation, and has been used for a number of published results (see e.g. [Scholtes2009b]_ and other papers from the same authors). It is generalised by :yref:`Law2_ScGeom_CohFrictPhys_CohesionMoment`, which adds cohesion and moments at contact.",
 		((bool,neverErase,false,,"Keep interactions even if particles go away from each other (only in case another constitutive law is in the scene, e.g. :yref:`Law2_ScGeom_CapillaryPhys_Capillarity`)"))
 		((bool,traceEnergy,false,,"Define the total energy dissipated in plastic slips at all contacts."))
 		,,
-		.def("elasticEnergy",&Law2_ScGeom_FrictPhys_Basic::elasticEnergy,"Compute and return the total elastic energy in all \"FrictPhys\" contacts")
-		.def("plasticDissipation",&Law2_ScGeom_FrictPhys_Basic::getPlasticDissipation,"Total energy dissipated in plastic slips at all FrictPhys contacts. Computed only if :yref:`Law2_ScGeom_FrictPhys_Basic::traceEnergy` is true.")
-		.def("initPlasticDissipation",&Law2_ScGeom_FrictPhys_Basic::initPlasticDissipation,"Initialize cummulated plastic dissipation to a value (0 by default).")
+		.def("elasticEnergy",&Law2_ScGeom_FrictPhys_CundallStrack::elasticEnergy,"Compute and return the total elastic energy in all \"FrictPhys\" contacts")
+		.def("plasticDissipation",&Law2_ScGeom_FrictPhys_CundallStrack::getPlasticDissipation,"Total energy dissipated in plastic slips at all FrictPhys contacts. Computed only if :yref:`Law2_ScGeom_FrictPhys_CundallStrack::traceEnergy` is true.")
+		.def("initPlasticDissipation",&Law2_ScGeom_FrictPhys_CundallStrack::initPlasticDissipation,"Initialize cummulated plastic dissipation to a value (0 by default).")
 	);
 	FUNCTOR2D(ScGeom,FrictPhys);
 	DECLARE_LOGGER;
 };
-REGISTER_SERIALIZABLE(Law2_ScGeom_FrictPhys_Basic);
+REGISTER_SERIALIZABLE(Law2_ScGeom_FrictPhys_CundallStrack);
 
 /* Constitutive law for linear compression, no tension, and linear plasticity surface.
 
@@ -41,19 +41,19 @@
 
 	https://yade-dem.org/index.php/ConstitutiveLawHowto
 */
-class Law2_Dem3DofGeom_FrictPhys_Basic: public LawFunctor{
+class Law2_Dem3DofGeom_FrictPhys_CundallStrack: public LawFunctor{
 	public:
 		virtual void go(shared_ptr<IGeom>& _geom, shared_ptr<IPhys>& _phys, Interaction* I);
 		FUNCTOR2D(Dem3DofGeom,FrictPhys);
-		YADE_CLASS_BASE_DOC(Law2_Dem3DofGeom_FrictPhys_Basic,LawFunctor,"Constitutive law for linear compression, no tension, and linear plasticity surface.\n\nThis class serves also as tutorial and is documented in detail at https://yade-dem.org/index.php/ConstitutiveLawHowto.";);
+		YADE_CLASS_BASE_DOC(Law2_Dem3DofGeom_FrictPhys_CundallStrack,LawFunctor,"Constitutive law for linear compression, no tension, and linear plasticity surface.\n\nThis class serves also as tutorial and is documented in detail at https://yade-dem.org/index.php/ConstitutiveLawHowto.";);
 };
-REGISTER_SERIALIZABLE(Law2_Dem3DofGeom_FrictPhys_Basic);
+REGISTER_SERIALIZABLE(Law2_Dem3DofGeom_FrictPhys_CundallStrack);
 
 class ElasticContactLaw : public GlobalEngine{
-		shared_ptr<Law2_ScGeom_FrictPhys_Basic> functor;
+		shared_ptr<Law2_ScGeom_FrictPhys_CundallStrack> functor;
 	public :
 		void action();
-	YADE_CLASS_BASE_DOC_ATTRS(ElasticContactLaw,GlobalEngine,"[DEPRECATED] Loop over interactions applying :yref:`Law2_ScGeom_FrictPhys_Basic` on all interactions.\n\n.. note::\n  Use :yref:`InteractionLoop` and :yref:`Law2_ScGeom_FrictPhys_Basic` instead of this class for performance reasons.",
+	YADE_CLASS_BASE_DOC_ATTRS(ElasticContactLaw,GlobalEngine,"[DEPRECATED] Loop over interactions applying :yref:`Law2_ScGeom_FrictPhys_CundallStrack` on all interactions.\n\n.. note::\n  Use :yref:`InteractionLoop` and :yref:`Law2_ScGeom_FrictPhys_CundallStrack` instead of this class for performance reasons.",
 		((bool,neverErase,false,,"Keep interactions even if particles go away from each other (only in case another constitutive law is in the scene, e.g. :yref:`Law2_ScGeom_CapillaryPhys_Capillarity`)"))
 	);
 };

=== modified file 'py/system.py'
--- py/system.py	2010-09-30 18:00:41 +0000
+++ py/system.py	2010-10-13 16:00:36 +0000
@@ -155,6 +155,9 @@
 	'InteractionPhysicsFunctor':'IPhysFunctor', # Thu Sep 30 14:27:53 2010, chia@engs-018373
 	'InteractionPhysicsDispatcher':'IPhysDispatcher', # Thu Sep 30 14:28:12 2010, chia@engs-018373
 	'InteractionGeometryDispatcher':'IGeomDispatcher', # Thu Sep 30 14:28:22 2010, chia@engs-018373
+	'Law2_ScGeom_FrictPhys_Basic':'Law2_ScGeom_FrictPhys_CundallStrack', # Wed Oct 13 17:40:42 2010, bchareyre@dt-rv020
+	'Law2_Dem3DofGeom_FrictPhys_Basic':'Law2_Dem3DofGeom_FrictPhys_CundallStrack', # Wed Oct 13 17:45:32 2010, bchareyre@dt-rv020
+	'Law2_ScGeom_CohFrictPhys_ElasticPlastic':'Law2_ScGeom_CohFrictPhys_CohesionMoment', # Wed Oct 13 17:47:09 2010, bchareyre@dt-rv020
 	### END_RENAMED_CLASSES_LIST ### (do not delete this line; scripts/rename-class.py uses it
 }
 

=== modified file 'scripts/multi.py'
--- scripts/multi.py	2010-09-27 17:47:59 +0000
+++ scripts/multi.py	2010-10-13 16:00:36 +0000
@@ -15,7 +15,7 @@
 	InteractionLoop(
 		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
 		[Ip2_FrictMat_FrictMat_FrictPhys(),],
-		[Law2_ScGeom_FrictPhys_Basic(),]
+		[Law2_ScGeom_FrictPhys_CundallStrack(),]
 	),
 	GravityEngine(gravity=(0,0,gravity)), ## here we use the 'gravity' parameter
 	PyRunner(iterPeriod=100,command='myAddPlotData()',label='plotDataCollector'),