← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2052: 1. Fix plugin registration for CinemCNCEngine, remove some cruft, fix formatting, add hyperlinks.

 

------------------------------------------------------------
revno: 2052
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Sat 2010-02-27 00:29:53 +0100
message:
  1. Fix plugin registration for CinemCNCEngine, remove some cruft, fix formatting, add hyperlinks.
modified:
  pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp
  pkg/common/Engine/PartialEngine/CinemCNCEngine.hpp
  pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.cpp
  pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp
  pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.hpp
  pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.cpp
  pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.hpp
  py/_utils.cpp


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

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp'
--- pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp	2010-02-26 17:01:36 +0000
+++ pkg/common/Engine/PartialEngine/CinemCNCEngine.cpp	2010-02-26 23:29:53 +0000
@@ -5,10 +5,9 @@
 *  This program is free software; it is licensed under the terms of the  *
 *  GNU General Public License v2 or later. See file LICENSE for details. *
 *************************************************************************/
-// YADE_REQUIRE_FEATURE(physpar)
+YADE_PLUGIN((CinemCNCEngine));
 
 #include "CinemCNCEngine.hpp"
-// #include<yade/pkg-common/RigidBodyParameters.hpp> , remplace par : 
 #include<yade/core/State.hpp>
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-dem/FrictPhys.hpp>
@@ -16,30 +15,6 @@
 #include <yade/lib-base/Math.hpp>
 
 
-// CinemCNCEngine::CinemCNCEngine() : leftbox(new Body), rightbox(new Body), frontbox(new Body), backbox(new Body), topbox(new Body), boxbas(new Body)
-// {
-// 	firstRun=true;
-// 	shearSpeed=0;
-// 	alpha=Mathr::PI/2.0;;
-// 	gamma_save.resize(0);
-// 	temoin_save.resize(0);
-// 	temoin=0;
-// 	gamma=0;
-// 	gammalim=0;
-// 	id_topbox=3;
-// 	id_boxbas=1;
-// 	id_boxleft=0;
-// 	id_boxright=2;
-// 	id_boxfront=5;
-// 	id_boxback=4;
-// 	F_0=0;
-// 	Key="";
-// 	LOG=0;
-// 	wallDamping = 0.2;
-// 	coeff_dech=1.0;
-// }
-
-
 void CinemCNCEngine::applyCondition(Scene * ncb)
 {
 	if(LOG)	cout << "debut applyCondi du CNCEngine !!" << endl;

=== modified file 'pkg/common/Engine/PartialEngine/CinemCNCEngine.hpp'
--- pkg/common/Engine/PartialEngine/CinemCNCEngine.hpp	2010-02-26 17:01:36 +0000
+++ pkg/common/Engine/PartialEngine/CinemCNCEngine.hpp	2010-02-26 23:29:53 +0000
@@ -49,7 +49,7 @@
 		void computeStiffness(Scene* ncb);
 	
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR(CinemCNCEngine,PartialEngine,
-				 "To apply a constant normal stress shear for a parallelogram box (simple shear)\n\n This engine, used in simulations issued from 'DirectShearCis' Preprocessor, allows to translate horizontally the upper plate while the lateral ones rotate so that they always keep contact with the lower and upper walls.\n In fact the upper plate can move not only horizontally but also vertically, so that the normal stress acting on it remains constant (this constant value is not choosen by the user but is the one that exists at the beginning of the simulation)\n The right vertical displacements which will be allowed are computed from the rigidity Kn of the sample over the wall (so to cancel a deltaSigma, a normal dplt deltaSigma*S/(Kn) is set)\n The movement is moreover controlled by the user via a 'shearSpeed' which will be the speed of the upper wall, and by a maximum value of horizontal displacement 'gammalim', after which the shear stops.\n \nNota : not only the positions of walls are updated but also their speeds, which is all but useless considering the fact that in the contact laws these velocities of bodies are used to compute values of tangential relative displacements.\n!!WARNING!! : But, because of this last point, if you want to use later saves of simulations executed with this Engine, but without that stopMovement was executed, your boxes will keep their speeds => you will have to cancel them 'by hand' in the .xml",
+				 "To apply a constant normal stress shear for a parallelogram box (simple shear)\n\nThis engine, used in simulations issued from :yref:`DirectShearCis` Preprocessor, allows to translate horizontally the upper plate while the lateral ones rotate so that they always keep contact with the lower and upper walls.\n\nIn fact the upper plate can move not only horizontally but also vertically, so that the normal stress acting on it remains constant (this constant value is not choosen by the user but is the one that exists at the beginning of the simulation)\n\nThe right vertical displacements which will be allowed are computed from the rigidity Kn of the sample over the wall (so to cancel a deltaSigma, a normal dplt deltaSigma*S/(Kn) is set)\n\nThe movement is moreover controlled by the user via a *shearSpeed* which will be the speed of the upper wall, and by a maximum value of horizontal displacement *gammalim*, after which the shear stops.\n\n.. note::\n\tNot only the positions of walls are updated but also their speeds, which is all but useless considering the fact that in the contact laws these velocities of bodies are used to compute values of tangential relative displacements.\n\n.. warning::\n\tBecause of this last point, if you want to use later saves of simulations executed with this Engine, but without that stopMovement was executed, your boxes will keep their speeds => you will have to cancel them 'by hand' in the .xml.\n",
 				 ((Real,shearSpeed,0.0,"the speed at wich the shearing is performed [m/s]"))
 				 ((Real,gammalim,0.0,"the value of tangential displacement at wich the shearing is stopped [m]"))
 				 ((Real,gamma,0.0,"current value of tangential displacement [m]"))

=== modified file 'pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.cpp'
--- pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.cpp	2010-02-26 17:01:36 +0000
+++ pkg/dem/DataClass/InteractionPhysics/NormalInelasticityPhys.cpp	2010-02-26 23:29:53 +0000
@@ -9,24 +9,6 @@
 #include "NormalInelasticityPhys.hpp"
 
 
-// NormalInelasticityPhys::NormalInelasticityPhys()
-// {
-// 	createIndex();
-// 
-// // assign neutral value	
-// 	orientationToContact1 = Quaternionr(1.0,0.0,0.0,0.0);
-// 	orientationToContact2 = Quaternionr(1.0,0.0,0.0,0.0);
-// 	initialOrientation1 = Quaternionr(1.0,0.0,0.0,0.0);
-// 	initialOrientation2 = Quaternionr(1.0,0.0,0.0,0.0);
-// 	kr = 0;
-// 	currentContactOrientation = Quaternionr(1.0,0.0,0.0,0.0);
-// 	initialContactOrientation = Quaternionr(1.0,0.0,0.0,0.0);
-// 	initialPosition1=initialPosition2=Vector3r(1,0,0);
-// 	unMax = 0;
-// 	previousun = 0;
-// 	previousFn = 0;
-// 
-// }
 
 void NormalInelasticityPhys::SetBreakingState()
 {
@@ -40,13 +22,6 @@
 {
 }
 
-// void NormalInelasticityPhys::postProcessAttributes(bool)
-// {
-// 
-// }
-
 
 YADE_PLUGIN((NormalInelasticityPhys));
 
-// YADE_REQUIRE_FEATURE(PHYSPAR);
-

=== modified file 'pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp'
--- pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp	2010-02-26 17:01:36 +0000
+++ pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.cpp	2010-02-26 23:29:53 +0000
@@ -14,18 +14,6 @@
 #include<yade/core/Scene.hpp>
 
 
-// Ip2_2xCohFrictMat_NormalInelasticityPhys::Ip2_2xCohFrictMat_NormalInelasticityPhys()
-// {
-// 	betaR = 0.12;
-// 	setCohesionNow = false;
-// 	setCohesionOnNewContacts = false;
-// 	cohesionDefinitionIteration = -1; 
-// 
-// //		elasticRollingLimit = ;
-// }
-
-
-
 //
 //
 //
@@ -187,5 +175,3 @@
 #endif
 };
 YADE_PLUGIN((Ip2_2xCohFrictMat_NormalInelasticityPhys));
-
-// YADE_REQUIRE_FEATURE(PHYSPAR);

=== modified file 'pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.hpp'
--- pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.hpp	2010-02-26 17:01:36 +0000
+++ pkg/dem/Engine/Functor/Ip2_2xCohFrictMat_NormalInelasticityPhys.hpp	2010-02-26 23:29:53 +0000
@@ -30,7 +30,7 @@
 	FUNCTOR2D(CohesiveFrictionalMat,CohesiveFrictionalMat);
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR(Ip2_2xCohFrictMat_NormalInelasticityPhys,
 				  InteractionPhysicsFunctor,
-				  "The RelationShips for using NormalInelasticityLaw\n \n In these RelationShips all the attributes of the interactions (which are of NormalInelasticityPhys type) are computed. \n WARNING : as in the others Relationships most of the attributes are computed only once : when the interaction is (new)",
+				  "The RelationShips for using NormalInelasticityLaw\n\n In these RelationShips all the attributes of the interactions (which are of NormalInelasticityPhys type) are computed. \n\n.. warning::\n\tas in the others :yref:`Ip2 functors<InteractionPhysicsFunctor>`, most of the attributes are computed only once, when the interaction is new.",
 				  ((Real,betaR,0.12,"Parameter for computing the torque-stifness : T-stifness = betaR * Rmoy^2"))
 				  ((bool,setCohesionNow,false,""))
 				  ((bool,setCohesionOnNewContacts,false,"")),

=== modified file 'pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.cpp'
--- pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.cpp	2010-02-26 17:01:36 +0000
+++ pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.cpp	2010-02-26 23:29:53 +0000
@@ -16,20 +16,6 @@
 Vector3r translation_vect (0.10,0,0);
 
 
-// <<<<<<< TREE
-// NormalInelasticityLaw::NormalInelasticityLaw() : GlobalEngine()
-// // =======
-// // ContactLaw1::ContactLaw1() : GlobalEngine()
-// // >>>>>>> MERGE-SOURCE
-// {
-// 	sdecGroupMask=1;
-// 	momentRotationLaw = true;
-// 	coeff_dech=1.0;
-// 	momentAlwaysElastic=false;
-// }
-
-
-
 void NormalInelasticityLaw::action(Scene* ncb)
 {
     shared_ptr<BodyContainer>& bodies = ncb->bodies;
@@ -305,5 +291,3 @@
 
 YADE_PLUGIN((NormalInelasticityLaw));
 
-// YADE_REQUIRE_FEATURE(PHYSPAR);
-

=== modified file 'pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.hpp'
--- pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.hpp	2010-02-26 17:01:36 +0000
+++ pkg/dem/Engine/GlobalEngine/NormalInelasticityLaw.hpp	2010-02-26 23:29:53 +0000
@@ -25,7 +25,7 @@
 		void action(Scene*);
 	YADE_CLASS_BASE_DOC_ATTRS(NormalInelasticityLaw,
 				  GlobalEngine,
-				  "Contact law including cohesion, moment transfer and inelastic compression behaviour\n\n This contact Law is inspired by CohesiveFrictionalContactLaw (inspired itselve directly from the work of Plassiard & Belheine, see the corresponding articles in (Annual Report 2006) in http://geo.hmg.inpg.fr/frederic/Discrete_Element_Group_FVD.html for example).\n It allows so to set moments, cohesion, tension limit and (that's the difference) inelastic unloadings in compression between bodies. All that concerned brokenBodies (this flag and the erosionactivated one) and the useless 'iter' has been suppressed.\n The Relationsships corresponding are Ip2_2xCohFrictMat_NormalInelasticityPhys, where the rigidities, the friction angles (with their tan()), and the orientations of the interactions are calculated. No more cohesion and tension limits are computed for all the interactions.\n To use it you should also use :\n- CohesiveFrictionalMat for the bodies, with 'isCohesive' = 1 (A verifier ce dernier point)\n- Ip2_2xCohFrictMat_NormalInelasticityPhys (=> which involves interactions of 'NormalInelasticityPhys' type)",
+				  "Contact law including cohesion, moment transfer and inelastic compression behaviour\n\n This contact Law is inspired by :yref:`CohesiveFrictionalContactLaw` (inspired itselve directly from the work of Plassiard & Belheine, see the corresponding articles in (Annual Report 2006) in http://geo.hmg.inpg.fr/frederic/Discrete_Element_Group_FVD.html for example).\n\n It allows so to set moments, cohesion, tension limit and (that's the difference) inelastic unloadings in compression between bodies. All that concerned brokenBodies (this flag and the erosionactivated one) and the useless 'iter' has been suppressed.\n\n The Relationsships corresponding are Ip2_2xCohFrictMat_NormalInelasticityPhys, where the rigidities, the friction angles (with their tan()), and the orientations of the interactions are calculated. No more cohesion and tension limits are computed for all the interactions.\n\n To use it you should also use :\n- :yref:`CohesiveFrictionalMat` for bodies, with *isCohesive* = 1 (A verifier ce dernier point)\n- :yref:`Ip2_2xCohFrictMat_NormalInelasticityPhys` (=> which involves interactions of :yref:`NormalInelasticityPhys` type)",
 				  ((int,sdecGroupMask,1,"?"))
 				  ((Real,coeff_dech,1.0,"=kn(unload) / kn(load)"))
 				  ((bool,momentRotationLaw,true,"boolean, true=> computation of a torque (against relative rotation) exchanged between particles"))

=== modified file 'py/_utils.cpp'
--- py/_utils.cpp	2010-02-12 08:07:23 +0000
+++ py/_utils.cpp	2010-02-26 23:29:53 +0000
@@ -45,7 +45,6 @@
 	Vector3r dim=maximum-minimum;
 	return python::make_tuple(minimum+.5*cutoff*dim,maximum-.5*cutoff*dim);
 }
-BOOST_PYTHON_FUNCTION_OVERLOADS(aabbExtrema_overloads,aabbExtrema,0,2);
 
 python::tuple negPosExtremeIds(int axis, Real distFactor=1.1){
 	python::tuple extrema=aabbExtrema();
@@ -418,7 +417,7 @@
 
 
 	def("PWaveTimeStep",PWaveTimeStep,"Get timestep accoring to the velocity of P-Wave propagation; computed from sphere radii, rigidities and masses.");
-	def("aabbExtrema",aabbExtrema,aabbExtrema_overloads(args("cutoff","centers"),"Return coordinates of box enclosing all bodies\n centers: do not take sphere radii in account, only their centroids (default=False)\n cutoff: 0-1 number by which the box will be scaled around its center (default=0)"));
+	def("aabbExtrema",aabbExtrema,(python::arg("cutoff")=0.0,python::arg("centers")=false),"Return coordinates of box enclosing all bodies\n\n:Parameters:\n\tcenters : bool\n\t\tdo not take sphere radii in account, only their centroids\n\tcutoff : float ∈〈0…1〉\n\t\trelative dimension by which the box will be cut away at its boundaries.\n\n:return: (lower corner, upper corner) as (Vector3,Vector3)\n");
 	def("ptInAABB",ptInAABB,"Return True/False whether the point (3-tuple) p is within box given by its min (3-tuple) and max (3-tuple) corners");
 	def("negPosExtremeIds",negPosExtremeIds,negPosExtremeIds_overloads(args("axis","distFactor"),"Return list of ids for spheres (only) that are on extremal ends of the specimen along given axis; distFactor multiplies their radius so that sphere that do not touch the boundary coordinate can also be returned."));
 	def("approxSectionArea",approxSectionArea,"Compute area of convex hull when when taking (swept) spheres crossing the plane at coord, perpendicular to axis.");