← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4172: rename PolyhedraVolumetricLaw -> Law2_PolyhedraGeom_PolyhedraPhys_Veolumetric

 

------------------------------------------------------------
revno: 4172
committer: Jan Stransky <jan.stransky@xxxxxxxxxxx>
timestamp: Mon 2014-09-22 14:28:50 +0200
message:
  rename PolyhedraVolumetricLaw -> Law2_PolyhedraGeom_PolyhedraPhys_Veolumetric
modified:
  examples/polyhedra/ball.py
  examples/polyhedra/free-fall.py
  examples/polyhedra/irregular.py
  examples/polyhedra/wall.py
  examples/tetra/twoTetrasPoly.py
  pkg/dem/Polyhedra.cpp
  pkg/dem/Polyhedra.hpp


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

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'examples/polyhedra/ball.py'
--- examples/polyhedra/ball.py	2013-10-16 15:24:49 +0000
+++ examples/polyhedra/ball.py	2014-09-22 12:28:50 +0000
@@ -27,7 +27,7 @@
    InteractionLoop(
       [Ig2_Wall_Polyhedra_PolyhedraGeom(), Ig2_Polyhedra_Polyhedra_PolyhedraGeom(), Ig2_Facet_Polyhedra_PolyhedraGeom()], 
       [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()], # collision "physics"
-      [PolyhedraVolumetricLaw()]   # contact law -- apply forces
+      [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]   # contact law -- apply forces
    ),
    #GravityEngine(gravity=(0,0,-9.81)),
    NewtonIntegrator(damping=0.5,gravity=(0,0,-9.81)),

=== modified file 'examples/polyhedra/free-fall.py'
--- examples/polyhedra/free-fall.py	2013-10-16 15:24:49 +0000
+++ examples/polyhedra/free-fall.py	2014-09-22 12:28:50 +0000
@@ -36,7 +36,7 @@
    InteractionLoop(
       [Ig2_Wall_Polyhedra_PolyhedraGeom(), Ig2_Polyhedra_Polyhedra_PolyhedraGeom(), Ig2_Facet_Polyhedra_PolyhedraGeom()], 
       [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()], # collision "physics"
-      [PolyhedraVolumetricLaw()]   # contact law -- apply forces
+      [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]   # contact law -- apply forces
    ),
    #GravityEngine(gravity=(0,0,-9.81)),
    NewtonIntegrator(damping=0.3,gravity=(0,0,-9.81)),

=== modified file 'examples/polyhedra/irregular.py'
--- examples/polyhedra/irregular.py	2013-10-16 15:24:49 +0000
+++ examples/polyhedra/irregular.py	2014-09-22 12:28:50 +0000
@@ -38,7 +38,7 @@
    InteractionLoop(
       [Ig2_Wall_Polyhedra_PolyhedraGeom(), Ig2_Polyhedra_Polyhedra_PolyhedraGeom(), Ig2_Facet_Polyhedra_PolyhedraGeom()], 
       [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()], # collision "physics"
-      [PolyhedraVolumetricLaw()]   # contact law -- apply forces
+      [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]   # contact law -- apply forces
    ),
    #GravityEngine(gravity=(0,0,-9.81)),
    NewtonIntegrator(damping=0.5,gravity=(0,0,-9.81)),

=== modified file 'examples/polyhedra/wall.py'
--- examples/polyhedra/wall.py	2013-10-16 15:24:49 +0000
+++ examples/polyhedra/wall.py	2014-09-22 12:28:50 +0000
@@ -50,7 +50,7 @@
    InteractionLoop(
       [Ig2_Wall_Polyhedra_PolyhedraGeom(), Ig2_Polyhedra_Polyhedra_PolyhedraGeom(), Ig2_Facet_Polyhedra_PolyhedraGeom()], 
       [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()], # collision "physics"
-      [PolyhedraVolumetricLaw()]   # contact law -- apply forces
+      [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]   # contact law -- apply forces
    ),
    #GravityEngine(gravity=(0,0,-9.81)),
    NewtonIntegrator(damping=0.5,gravity=(0,0,-9.81)),

=== modified file 'examples/tetra/twoTetrasPoly.py'
--- examples/tetra/twoTetrasPoly.py	2013-10-15 17:11:37 +0000
+++ examples/tetra/twoTetrasPoly.py	2014-09-22 12:28:50 +0000
@@ -27,7 +27,7 @@
 	InteractionLoop(
 		[Ig2_Polyhedra_Polyhedra_PolyhedraGeom()],
 		[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],
-		[PolyhedraVolumetricLaw()]
+		[Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]
 	),
 	NewtonIntegrator(damping=0),
 	PyRunner(iterPeriod=500,command="addPlotData()"),

=== modified file 'pkg/dem/Polyhedra.cpp'
--- pkg/dem/Polyhedra.cpp	2014-09-22 12:28:50 +0000
+++ pkg/dem/Polyhedra.cpp	2014-09-22 12:28:50 +0000
@@ -13,7 +13,7 @@
 
 #define _USE_MATH_DEFINES
 
-YADE_PLUGIN(/* self-contained in hpp: */ (Polyhedra) (PolyhedraGeom) (Bo1_Polyhedra_Aabb) (PolyhedraPhys) (PolyhedraMat) (Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys) (PolyhedraVolumetricLaw)
+YADE_PLUGIN(/* self-contained in hpp: */ (Polyhedra) (PolyhedraGeom) (Bo1_Polyhedra_Aabb) (PolyhedraPhys) (PolyhedraMat) (Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys) (Law2_PolyhedraGeom_PolyhedraPhys_Volumetric)
 	/* some code in cpp (this file): */ 
 	#ifdef YADE_OPENGL
 		(Gl1_Polyhedra) (Gl1_PolyhedraGeom) (Gl1_PolyhedraPhys)
@@ -396,9 +396,9 @@
 
 //**************************************************************************************
 #if 1
-Real PolyhedraVolumetricLaw::getPlasticDissipation() {return (Real) plasticDissipation;}
-void PolyhedraVolumetricLaw::initPlasticDissipation(Real initVal) {plasticDissipation.reset(); plasticDissipation+=initVal;}
-Real PolyhedraVolumetricLaw::elasticEnergy()
+Real Law2_PolyhedraGeom_PolyhedraPhys_Volumetric::getPlasticDissipation() {return (Real) plasticDissipation;}
+void Law2_PolyhedraGeom_PolyhedraPhys_Volumetric::initPlasticDissipation(Real initVal) {plasticDissipation.reset(); plasticDissipation+=initVal;}
+Real Law2_PolyhedraGeom_PolyhedraPhys_Volumetric::elasticEnergy()
 {
 	Real energy=0;
 	FOREACH(const shared_ptr<Interaction>& I, *scene->interactions){
@@ -414,7 +414,7 @@
 
 //**************************************************************************************
 // Apply forces on polyhedrons in collision based on geometric configuration
-bool PolyhedraVolumetricLaw::go(shared_ptr<IGeom>& ig, shared_ptr<IPhys>& ip, Interaction* I){
+bool Law2_PolyhedraGeom_PolyhedraPhys_Volumetric::go(shared_ptr<IGeom>& ig, shared_ptr<IPhys>& ip, Interaction* I){
 
 		if (!I->geom) {return true;} 
 		const shared_ptr<PolyhedraGeom>& contactGeom(YADE_PTR_DYN_CAST<PolyhedraGeom>(I->geom));

=== modified file 'pkg/dem/Polyhedra.hpp'
--- pkg/dem/Polyhedra.hpp	2014-07-18 18:18:50 +0000
+++ pkg/dem/Polyhedra.hpp	2014-09-22 12:28:50 +0000
@@ -240,26 +240,26 @@
 //***************************************************************************
 /*! Calculate physical response based on penetration configuration given by TTetraGeom. */
 
-class PolyhedraVolumetricLaw: public LawFunctor{
+class Law2_PolyhedraGeom_PolyhedraPhys_Volumetric: public LawFunctor{
 	OpenMPAccumulator<Real> plasticDissipation;
 	virtual bool go(shared_ptr<IGeom>&, shared_ptr<IPhys>&, Interaction*);
 	Real elasticEnergy ();
 	Real getPlasticDissipation();
 	void initPlasticDissipation(Real initVal=0);
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(PolyhedraVolumetricLaw,LawFunctor,"Calculate physical response of 2 :yref:`vector<Polyhedra>` in interaction, based on penetration configuration given by :yref:`PolyhedraGeom`.",
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Law2_PolyhedraGeom_PolyhedraPhys_Volumetric,LawFunctor,"Calculate physical response of 2 :yref:`vector<Polyhedra>` in interaction, based on penetration configuration given by :yref:`PolyhedraGeom`.",
 	((Vector3r,shearForce,Vector3r::Zero(),,"Shear force from last step"))
 	((bool,traceEnergy,false,,"Define the total energy dissipated in plastic slips at all contacts. This will trace only plastic energy in this law, see O.trackEnergy for a more complete energies tracing"))
 	((int,plastDissipIx,-1,(Attr::hidden|Attr::noSave),"Index for plastic dissipation (with O.trackEnergy)"))
 	((int,elastPotentialIx,-1,(Attr::hidden|Attr::noSave),"Index for elastic potential energy (with O.trackEnergy)"))
 	,,
-	.def("elasticEnergy",&PolyhedraVolumetricLaw::elasticEnergy,"Compute and return the total elastic energy in all \"FrictPhys\" contacts")
-	.def("plasticDissipation",&PolyhedraVolumetricLaw::getPlasticDissipation,"Total energy dissipated in plastic slips at all FrictPhys contacts. Computed only if :yref:`Law2_ScGeom_FrictPhys_CundallStrack::traceEnergy` is true.")
-	.def("initPlasticDissipation",&PolyhedraVolumetricLaw::initPlasticDissipation,"Initialize cummulated plastic dissipation to a value (0 by default).")
+	.def("elasticEnergy",&Law2_PolyhedraGeom_PolyhedraPhys_Volumetric::elasticEnergy,"Compute and return the total elastic energy in all \"FrictPhys\" contacts")
+	.def("plasticDissipation",&Law2_PolyhedraGeom_PolyhedraPhys_Volumetric::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_PolyhedraGeom_PolyhedraPhys_Volumetric::initPlasticDissipation,"Initialize cummulated plastic dissipation to a value (0 by default).")
 	);
 	FUNCTOR2D(PolyhedraGeom,PolyhedraPhys);
 	DECLARE_LOGGER;
 };
-REGISTER_SERIALIZABLE(PolyhedraVolumetricLaw);
+REGISTER_SERIALIZABLE(Law2_PolyhedraGeom_PolyhedraPhys_Volumetric);
 
 
 //***************************************************************************