← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2139: 1. Reorganize engines a little bit, as discussed in http://www.mail-archive.com/yade-dev@xxxxxxxx...

 

------------------------------------------------------------
revno: 2139
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-04-13 23:09:57 +0200
message:
  1. Reorganize engines a little bit, as discussed in http://www.mail-archive.com/yade-dev@xxxxxxxxxxxxxxxxxxx/msg03337.html and other messages in the thread (trivial to change, though)
  2. Small fixes at different places
added:
  pkg/common/Engine/GlobalEngine/BoundaryController.cpp
  pkg/common/Engine/GlobalEngine/BoundaryController.hpp
  pkg/common/Engine/GlobalEngine/FieldApplier.cpp
  pkg/common/Engine/GlobalEngine/FieldApplier.hpp
modified:
  core/main/yade-multi.in
  pkg/common/Engine/PartialEngine/GravityEngines.hpp
  pkg/dem/Engine/GlobalEngine/PeriIsoCompressor.hpp
  pkg/dem/Engine/GlobalEngine/UniaxialStrainer.cpp
  pkg/dem/Engine/GlobalEngine/UniaxialStrainer.hpp
  pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.hpp
  pkg/dem/Engine/PartialEngine/KinemCNDEngine.hpp
  pkg/dem/Engine/PartialEngine/KinemCNLEngine.hpp
  pkg/dem/Engine/PartialEngine/KinemCNSEngine.hpp
  pkg/dem/Engine/PartialEngine/KinemCTDEngine.hpp
  pkg/dem/Engine/PartialEngine/TriaxialStressController.hpp
  py/remote.py
  scripts/multi.py
  yadeSCons.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 'core/main/yade-multi.in'
--- core/main/yade-multi.in	2010-01-23 10:53:12 +0000
+++ core/main/yade-multi.in	2010-04-13 21:09:57 +0000
@@ -230,10 +230,11 @@
 			logging.warning('WARNING: job #%d will use %d slots but only %d are available'%(i,nSlots,maxJobs))
 	jobs.append(JobInfo(i,params[l]['description'],'PARAM_TABLE=%s:%d DISPLAY= %s %s --threads=%d %s -x %s > %s 2>&1'%(table,l,' '.join(envVars),executable,int(nSlots),'--nice=%s'%nice if nice!=None else '',simul,pipes.quote(logFile)),logFile,nSlots))
 
+print "Master process pid",os.getpid()
+
 print "Job summary:"
 for job in jobs:
 	print '   #%d (%s%s):'%(job.num,job.id,'' if job.nSlots==1 else '/%d'%job.nSlots),job.command
-print "Master process pid",os.getpid()
 sys.stdout.flush()
 
 httpLastServe=0

=== added file 'pkg/common/Engine/GlobalEngine/BoundaryController.cpp'
--- pkg/common/Engine/GlobalEngine/BoundaryController.cpp	1970-01-01 00:00:00 +0000
+++ pkg/common/Engine/GlobalEngine/BoundaryController.cpp	2010-04-13 21:09:57 +0000
@@ -0,0 +1,4 @@
+#include<yade/pkg-common/BoundaryController.hpp>
+#include<stdexcept>
+void BoundaryController::action(){ throw std::runtime_error("BoundaryController must not be used in simulations directly (BoundaryController::action called)."); }
+YADE_PLUGIN((BoundaryController));

=== added file 'pkg/common/Engine/GlobalEngine/BoundaryController.hpp'
--- pkg/common/Engine/GlobalEngine/BoundaryController.hpp	1970-01-01 00:00:00 +0000
+++ pkg/common/Engine/GlobalEngine/BoundaryController.hpp	2010-04-13 21:09:57 +0000
@@ -0,0 +1,6 @@
+#include<yade/core/GlobalEngine.hpp>
+class BoundaryController: public GlobalEngine{
+	virtual void action();
+	YADE_CLASS_BASE_DOC(BoundaryController,GlobalEngine,"Base for engines controlling boundary conditions of simulations. Not to be used directly.");
+};
+REGISTER_SERIALIZABLE(BoundaryController);

=== added file 'pkg/common/Engine/GlobalEngine/FieldApplier.cpp'
--- pkg/common/Engine/GlobalEngine/FieldApplier.cpp	1970-01-01 00:00:00 +0000
+++ pkg/common/Engine/GlobalEngine/FieldApplier.cpp	2010-04-13 21:09:57 +0000
@@ -0,0 +1,5 @@
+#include<yade/pkg-common/FieldApplier.hpp>
+#include<stdexcept>
+void FieldApplier::action(){ throw std::runtime_error("FieldApplier must not be used in simulations directly (FieldApplier::action called)."); }
+YADE_PLUGIN((FieldApplier));
+

=== added file 'pkg/common/Engine/GlobalEngine/FieldApplier.hpp'
--- pkg/common/Engine/GlobalEngine/FieldApplier.hpp	1970-01-01 00:00:00 +0000
+++ pkg/common/Engine/GlobalEngine/FieldApplier.hpp	2010-04-13 21:09:57 +0000
@@ -0,0 +1,7 @@
+#include<yade/core/GlobalEngine.hpp>
+class FieldApplier: public GlobalEngine{
+	virtual void action();
+	YADE_CLASS_BASE_DOC(FieldApplier,GlobalEngine,"Base for engines controlling boundary conditions of simulations. Not to be used directly.");
+};
+REGISTER_SERIALIZABLE(FieldApplier);
+

=== modified file 'pkg/common/Engine/PartialEngine/GravityEngines.hpp'
--- pkg/common/Engine/PartialEngine/GravityEngines.hpp	2010-03-20 12:40:44 +0000
+++ pkg/common/Engine/PartialEngine/GravityEngines.hpp	2010-04-13 21:09:57 +0000
@@ -1,7 +1,7 @@
 // 2004 © Janek Kozicki <cosurgi@xxxxxxxxxx>
 // 2007,2008 © Václav Šmilauer <eudoxos@xxxxxxxx> 
 #pragma once
-#include<yade/core/GlobalEngine.hpp>
+#include<yade/pkg-common/FieldApplier.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/core/Body.hpp>
 #ifdef YADE_OPENMP
@@ -9,10 +9,10 @@
 #endif
 
 /*! Homogeneous gravity field; applies gravity×mass force on all bodies. */
-class GravityEngine: public GlobalEngine{
+class GravityEngine: public FieldApplier{
 	public:
 		virtual void action();
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(GravityEngine,GlobalEngine,"Engine applying constant acceleration to all bodies.",
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(GravityEngine,FieldApplier,"Engine applying constant acceleration to all bodies.",
 		((Vector3r,gravity,Vector3r::ZERO,"Acceleration [kgms⁻²]"))
 		,/*ctor*/,/*py*/
 	);
@@ -24,10 +24,10 @@
  *
  * @todo This code has not been yet tested at all.
  */
-class CentralGravityEngine: public GlobalEngine {
+class CentralGravityEngine: public FieldApplier {
 	public:
 		virtual void action();
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(CentralGravityEngine,GlobalEngine,"Engine applying acceleration to all bodies, towards a central body.",
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(CentralGravityEngine,FieldApplier,"Engine applying acceleration to all bodies, towards a central body.",
 		((body_id_t,centralBody,Body::ID_NONE,"The :yref:`body<Body>` towards which all other bodies are attracted."))
 		((Real,accel,0,"Acceleration magnitude [kgms⁻²]"))
 		((bool,reciprocal,false,"If true, acceleration will be applied on the central body as well."))
@@ -39,10 +39,10 @@
 /*! Apply acceleration (independent of distance) directed towards an axis.
  *
  */
-class AxialGravityEngine: public GlobalEngine {
+class AxialGravityEngine: public FieldApplier {
 	public:
 	virtual void action();
-	YADE_CLASS_BASE_DOC_ATTRS(AxialGravityEngine,GlobalEngine,"Apply acceleration (independent of distance) directed towards an axis.",
+	YADE_CLASS_BASE_DOC_ATTRS(AxialGravityEngine,FieldApplier,"Apply acceleration (independent of distance) directed towards an axis.",
 		((Vector3r,axisPoint,Vector3r::ZERO,"Point through which the axis is passing."))
 		((Vector3r,axisDirection,Vector3r::UNIT_X,"direction of the gravity axis (will be normalized automatically)"))
 		((Real,acceleration,0,"Acceleration magnitude [kgms⁻²]"))

=== modified file 'pkg/dem/Engine/GlobalEngine/PeriIsoCompressor.hpp'
--- pkg/dem/Engine/GlobalEngine/PeriIsoCompressor.hpp	2010-03-20 12:40:44 +0000
+++ pkg/dem/Engine/GlobalEngine/PeriIsoCompressor.hpp	2010-04-13 21:09:57 +0000
@@ -2,14 +2,14 @@
 
 #pragma once
 
-#include<yade/core/GlobalEngine.hpp>
+#include<yade/pkg-common/BoundaryController.hpp>
 
-class PeriIsoCompressor: public GlobalEngine{
+class PeriIsoCompressor: public BoundaryController{
 	Real avgStiffness; Real maxDisplPerStep; Vector3r sumForces, sigma; 
 	Real currUnbalanced;
 	public:
 		void action();
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(PeriIsoCompressor,GlobalEngine,"Compress/decompress cloud of spheres by controlling periodic cell size until it reaches prescribed average stress, then moving to next stress value in given stress series.",
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(PeriIsoCompressor,BoundaryController,"Compress/decompress cloud of spheres by controlling periodic cell size until it reaches prescribed average stress, then moving to next stress value in given stress series.",
 		((vector<Real>,stresses,,"Stresses that should be reached, one after another"))
 		((Real,charLen,-1.,"Characteristic length, should be something like mean particle diameter (default -1=invalid value))"))
 		((Real,maxSpan,-1.,"Maximum body span in terms of bbox, to prevent periodic cell getting too small. |ycomp|"))
@@ -41,11 +41,11 @@
 See scripts/test/periodic-triax.py for a simple example.
 
 */
-class PeriTriaxController: public GlobalEngine{
+class PeriTriaxController: public BoundaryController{
 	public:
 		virtual void action();
 		void strainStressStiffUpdate();
-	YADE_CLASS_BASE_DOC_ATTRS(PeriTriaxController,GlobalEngine,"Engine for independently controlling stress or strain in periodic simulations.\n\n``strainStress`` contains absolute values for the controlled quantity, and ``stressMask`` determines meaning of those values (0 for strain, 1 for stress): e.g. ``( 1<<0 | 1<<2 ) = 1 | 4 = 5`` means that ``strainStress[0]`` and ``strainStress[2]`` are stress values, and ``strainStress[1]`` is strain. \n\nSee scripts/test/periodic-triax.py for a simple example.",
+	YADE_CLASS_BASE_DOC_ATTRS(PeriTriaxController,BoundaryController,"Engine for independently controlling stress or strain in periodic simulations.\n\n``strainStress`` contains absolute values for the controlled quantity, and ``stressMask`` determines meaning of those values (0 for strain, 1 for stress): e.g. ``( 1<<0 | 1<<2 ) = 1 | 4 = 5`` means that ``strainStress[0]`` and ``strainStress[2]`` are stress values, and ``strainStress[1]`` is strain. \n\nSee scripts/test/periodic-triax.py for a simple example.",
 		((bool,reversedForces,false,"For broken constitutive laws, normalForce and shearForce on interactions are in the reverse sense. see `bugreport <https://bugs.launchpad.net/yade/+bug/493102>`_"))
 		((bool,dynCell,false,"Imposed stress can be controlled using the packing stiffness or by applying the laws of dynamic (dynCell=true). Don't forget to assign a mass to the cell (PeriTriaxController->mass)."))
 		((Vector3r,goal,Vector3r::ZERO,"Desired stress or strain values (depending on stressMask), strains defined as ``strain(i)=log(Fii)``"))

=== modified file 'pkg/dem/Engine/GlobalEngine/UniaxialStrainer.cpp'
--- pkg/dem/Engine/GlobalEngine/UniaxialStrainer.cpp	2010-03-20 12:40:44 +0000
+++ pkg/dem/Engine/GlobalEngine/UniaxialStrainer.cpp	2010-04-13 21:09:57 +0000
@@ -2,6 +2,7 @@
 #include"UniaxialStrainer.hpp"
 #include<boost/foreach.hpp>
 
+#include<yade/core/Scene.hpp>
 #include<yade/core/InteractionContainer.hpp>
 #include<yade/pkg-common/Aabb.hpp>
 

=== modified file 'pkg/dem/Engine/GlobalEngine/UniaxialStrainer.hpp'
--- pkg/dem/Engine/GlobalEngine/UniaxialStrainer.hpp	2010-03-20 12:40:44 +0000
+++ pkg/dem/Engine/GlobalEngine/UniaxialStrainer.hpp	2010-04-13 21:09:57 +0000
@@ -2,9 +2,9 @@
 #pragma once
 #include<fstream>
 #include<limits>
+#include<yade/core/Scene.hpp>
 #include<yade/pkg-dem/Shop.hpp>
-#include<yade/core/FileGenerator.hpp>
-#include<yade/core/GlobalEngine.hpp>
+#include<yade/pkg-common/BoundaryController.hpp>
 
 #ifndef FOREACH
 #define FOREACH BOOST_FOREACH
@@ -16,7 +16,7 @@
  *
  * This engine should be run once forces on particles have been computed.
  */
-class UniaxialStrainer: public GlobalEngine {
+class UniaxialStrainer: public BoundaryController {
 	private:
 		bool needsInit;
 		void computeAxialForce();
@@ -32,7 +32,7 @@
 		vector<Real> posCoords,negCoords;
 
 		virtual void action();
-		YADE_CLASS_BASE_DOC_ATTRS_CTOR(UniaxialStrainer,GlobalEngine,"Axial displacing two groups of bodies in the opposite direction with given strain rate.",
+		YADE_CLASS_BASE_DOC_ATTRS_CTOR(UniaxialStrainer,BoundaryController,"Axial displacing two groups of bodies in the opposite direction with given strain rate.",
 			((Real,strainRate,NaN,"Rate of strain, starting at 0, linearly raising to strainRate. [-]"))
 			((Real,absSpeed,NaN,"alternatively, absolute speed of boundary motion can be specified; this is effective only at the beginning and if strainRate is not set; changing absSpeed directly during simulation wil have no effect. [ms⁻¹]"))
 			((Real,initAccelTime,-200,"Time for strain reaching the requested value (linear interpolation). If negative, the time is dt*(-initAccelTime), where dt is  the timestep at the first iteration. [s]"))

=== modified file 'pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.hpp'
--- pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.hpp	2010-03-20 12:40:44 +0000
+++ pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.hpp	2010-04-13 21:09:57 +0000
@@ -9,14 +9,14 @@
 #pragma once
 
 #include<yade/core/Omega.hpp>
-#include<yade/core/PartialEngine.hpp>
+#include<yade/pkg-common/BoundaryController.hpp>
 #include<yade/core/Body.hpp>
 #include <Wm3Vector3.h>
 // #include<yade/lib-base/yadeWm3.hpp>
 
 
 
-class Disp2DPropLoadEngine : public PartialEngine
+class Disp2DPropLoadEngine : public BoundaryController
 {
 	private :
 		Real	dgamma	// the increment of horizontal displacement in one timestep, part of the disturbation
@@ -54,8 +54,8 @@
 			;
 		virtual void postProcessAttributes(bool deserializing);
 
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR(Disp2DPropLoadEngine,PartialEngine,
-		"Disturbs a simple shear sample in a given displacement direction \n \n This engine allows to apply, on a simple shear sample, a loading controlled by du/dgamma = cste, which is equivalent to du + cste' * dgamma = 0 (proportionnal path loadings).\n To do so, the upper plate of the simple shear box is moved in a given direction (corresponding to a given du/dgamma), whereas lateral plates are moved so that the box remains closed.\n This engine can easily be used to perform directionnal probes, with a python script launching successivly the same .xml which contains this engine, after having modified the direction of loading (see *theta* attribute). That's why this Engine contains a *saveData* procedure which can save data on the state of the sample at the end of the loading (in case of successive loadings - for successive directions - through a python script, each line would correspond to one direction of loading).",
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(Disp2DPropLoadEngine,BoundaryController,
+		"Disturbs a simple shear sample in a given displacement direction\n\nThis engine allows to apply, on a simple shear sample, a loading controlled by du/dgamma = cste, which is equivalent to du + cste' * dgamma = 0 (proportionnal path loadings).\nTo do so, the upper plate of the simple shear box is moved in a given direction (corresponding to a given du/dgamma), whereas lateral plates are moved so that the box remains closed.\nThis engine can easily be used to perform directionnal probes, with a python script launching successivly the same .xml which contains this engine, after having modified the direction of loading (see *theta* attribute). That's why this Engine contains a *saveData* procedure which can save data on the state of the sample at the end of the loading (in case of successive loadings - for successive directions - through a python script, each line would correspond to one direction of loading).",
 		((body_id_t,id_topbox,3,"the id of the upper wall"))
 		((body_id_t,id_boxbas,1,"the id of the lower wall"))
 		((body_id_t,id_boxleft,0,"the id of the left wall"))

=== modified file 'pkg/dem/Engine/PartialEngine/KinemCNDEngine.hpp'
--- pkg/dem/Engine/PartialEngine/KinemCNDEngine.hpp	2010-04-03 16:40:33 +0000
+++ pkg/dem/Engine/PartialEngine/KinemCNDEngine.hpp	2010-04-13 21:09:57 +0000
@@ -9,11 +9,11 @@
 #pragma once
 
 #include<yade/core/Omega.hpp>
-#include<yade/core/PartialEngine.hpp>
+#include<yade/pkg-common/BoundaryController.hpp>
 #include<yade/lib-base/Math.hpp>
 
 
-class KinemCNDEngine : public PartialEngine
+class KinemCNDEngine : public BoundaryController
 {
 	private :
 		Real	alpha	// angle from the lower plate to the left box (trigo wise), the Engine finds itself its value
@@ -37,7 +37,7 @@
 
 	protected :
 
-		YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemCNDEngine,PartialEngine,
+		YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemCNDEngine,BoundaryController,
 			"To apply a constant normal displacement shear for a parallelogram box\n\n \tThis engine, designed for simulations implying a simple shear box (:yref:`SimpleShear` Preprocessor), allows to perform a constant normal displacement shear, by translating horizontally the upper plate, while the lateral ones rotate so that they always keep contact with the lower and upper walls.",
 			((Real,shearSpeed,0.0,"the speed at which the shear is performed : speed of the upper plate [m/s]"))
 			((Real,gammalim,0.0,"the value of the tangential displacement at wich the displacement is stopped [m]"))

=== modified file 'pkg/dem/Engine/PartialEngine/KinemCNLEngine.hpp'
--- pkg/dem/Engine/PartialEngine/KinemCNLEngine.hpp	2010-04-08 09:14:11 +0000
+++ pkg/dem/Engine/PartialEngine/KinemCNLEngine.hpp	2010-04-13 21:09:57 +0000
@@ -9,7 +9,7 @@
 #pragma once
 
 #include<yade/core/Omega.hpp>
-#include<yade/core/PartialEngine.hpp>
+#include<yade/pkg-common/BoundaryController.hpp>
 #include<yade/core/Body.hpp>
 #include<yade/lib-base/Math.hpp>
 #include<yade/pkg-dem/NormalInelasticityLaw.hpp>
@@ -17,7 +17,7 @@
 
 
 
-class KinemCNLEngine : public PartialEngine
+class KinemCNLEngine : public BoundaryController
 {
 	private :
 		shared_ptr<Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity> myLdc;
@@ -48,7 +48,7 @@
 		void stopMovement();		// to cancel all the velocities when gammalim is reached
 		void computeStiffness();
 	
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemCNLEngine,PartialEngine,
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemCNLEngine,BoundaryController,
 				 "To apply a constant normal stress shear for a parallelogram box (simple shear)\n\nThis engine, used in simulations issued from :yref:`SimpleShear` 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 : speed of the upper plate [m/s]"))
 				 ((Real,gammalim,0.0,"the value of tangential displacement (of upper plate) at wich the shearing is stopped [m]"))

=== modified file 'pkg/dem/Engine/PartialEngine/KinemCNSEngine.hpp'
--- pkg/dem/Engine/PartialEngine/KinemCNSEngine.hpp	2010-04-10 15:11:48 +0000
+++ pkg/dem/Engine/PartialEngine/KinemCNSEngine.hpp	2010-04-13 21:09:57 +0000
@@ -9,14 +9,14 @@
 #pragma once
 
 #include<yade/core/Omega.hpp>
-#include<yade/core/PartialEngine.hpp>
+#include<yade/pkg-common/BoundaryController.hpp>
 #include<yade/core/Body.hpp>
 #include<yade/lib-base/Math.hpp>
 #include<yade/pkg-dem/NormalInelasticityLaw.hpp>
 
 
 
-class KinemCNSEngine : public PartialEngine
+class KinemCNSEngine : public BoundaryController
 {
 	private :
 		shared_ptr<Law2_ScGeom_NormalInelasticityPhys_NormalInelasticity> myLdc;
@@ -47,7 +47,7 @@
 		void stopMovement();		// to cancel all the velocities when gammalim is reached
 		void computeStiffness();
 
-	YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemCNSEngine,PartialEngine,
+	YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemCNSEngine,BoundaryController,
 		"To apply a constant normal rigidity shear for a parallelogram box (simple shear)\n\nThis engine, useable in simulations implying one deformable parallelepipedic box (e.g. :yref:`SimpleShear` 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. The upper plate can move not only horizontally but also vertically, so that the normal rigidity defined by DeltaF(upper plate)/DeltaU(upper plate) = constant (= *KnC* defined by the user).\n\nThe movement is moreover controlled by the user via a *shearSpeed* which is the horizontal speed of the upper wall, and by a maximum value of horizontal displacement *gammalim* (of the upper plate), after which the shear stops.\n\n.. note::\n\t 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\n.. warning::\n\tBut, 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",
 		((Real,shearSpeed,0.0,"the speed at wich the shearing is performed : speed of the upper plate [m/s]"))
 		((Real,gammalim,0.0,"the value of tangential displacement (of upper plate) at wich the shearing is stopped [m]"))

=== modified file 'pkg/dem/Engine/PartialEngine/KinemCTDEngine.hpp'
--- pkg/dem/Engine/PartialEngine/KinemCTDEngine.hpp	2010-04-03 16:40:33 +0000
+++ pkg/dem/Engine/PartialEngine/KinemCTDEngine.hpp	2010-04-13 21:09:57 +0000
@@ -8,12 +8,12 @@
 
 #pragma once
 
-#include<yade/core/PartialEngine.hpp>
+#include<yade/pkg-common/BoundaryController.hpp>
 #include<yade/core/Body.hpp>
 #include<Wm3Vector3.h>
 
 
-class KinemCTDEngine : public PartialEngine
+class KinemCTDEngine : public BoundaryController
 {
 	private :
 		Real	alpha	// angle from the lower plate to the left box (trigo wise), the Engine finds itself its value
@@ -40,7 +40,7 @@
 			,computeAlpha()
 			;
 
-		YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemCTDEngine,PartialEngine,
+		YADE_CLASS_BASE_DOC_ATTRS_CTOR(KinemCTDEngine,BoundaryController,
 			"To compress a simple shear sample by moving the upper box in a vertical way only, so that the tangential displacement (defined by the horizontal gap between the upper and lower boxes) remains constant.\n \t The lateral boxes move also to keep always contact. All that until this box is submitted to a given stress (=*target_sigma*). Moreover saves are executed at each value of stresses stored in the vector *sigma_save*, and at *target_sigma*",
 			((Real,compSpeed,0.0,"(vertical) speed of the upper box : >0 for real compression, <0 for unloading [m/s]"))
 			((std::vector<Real>,sigma_save,,"vector with the values of sigma at which a save of the simulation should be performed [kPa]"))

=== modified file 'pkg/dem/Engine/PartialEngine/TriaxialStressController.hpp'
--- pkg/dem/Engine/PartialEngine/TriaxialStressController.hpp	2010-04-01 06:53:09 +0000
+++ pkg/dem/Engine/PartialEngine/TriaxialStressController.hpp	2010-04-13 21:09:57 +0000
@@ -8,7 +8,7 @@
 
 #pragma once
 
-#include<yade/core/GlobalEngine.hpp>
+#include<yade/pkg-common/BoundaryController.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/lib-base/Math.hpp>
 
@@ -23,7 +23,7 @@
 	detailed description...
 */
 
-class TriaxialStressController : public GlobalEngine 
+class TriaxialStressController : public BoundaryController
 {
 	private :
 // 		Real previousStress, previousMultiplier; //previous mean stress and size multiplier		
@@ -106,7 +106,7 @@
     		Real ComputeUnbalancedForce(bool maxUnbalanced=false);
 		
 		YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(
-		TriaxialStressController,GlobalEngine,"An engine maintaining constant stresses on some boundaries of a parallepipedic packing."
+		TriaxialStressController,BoundaryController,"An engine maintaining constant stresses on some boundaries of a parallepipedic packing."
 		,
    		((unsigned int,stiffnessUpdateInterval,10,"target strain rate (./s)"))
    		((unsigned int,radiusControlInterval,10,""))

=== modified file 'py/remote.py'
--- py/remote.py	2009-12-13 22:51:22 +0000
+++ py/remote.py	2010-04-13 21:09:57 +0000
@@ -27,6 +27,7 @@
 	The connection is authenticated by requiring a cookie.
 	Only connections from localhost (127.0.0.*) are allowed.
 	"""
+	from yade import *
 	def setup(self):
 		if not self.client_address[0].startswith('127.0.0'):
 			print "TCP Connection from non-127.0.0.* address %s rejected"%self.client_address[0]
@@ -46,6 +47,8 @@
 >>> """%(str(self.client_address[0]),self.client_address[1]))
   			return True
 		else:
+			import time
+			time.sleep(5)
 			print "invalid cookie"
 			return False
 	def displayhook(self,s):

=== modified file 'scripts/multi.py'
--- scripts/multi.py	2010-01-10 09:09:32 +0000
+++ scripts/multi.py	2010-04-13 21:09:57 +0000
@@ -6,17 +6,12 @@
 utils.readParamsFromTable(gravity=-9.81,density=2400,initialSpeed=10,noTableOk=True)
 print gravity,density,initialSpeed
 
-o=Omega()
-o.initializers=[
-		BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()])
-	]
-o.engines=[
+O.materials.append(FrictMat(young=30e9,density=density,poisson=.3)) ## use the 'density' parameter here
+
+O.engines=[
 	ForceResetter(),
-	BoundDispatcher([
-		Bo1_Sphere_Aabb(),
-		Bo1_Box_Aabb(),
-	]),
-	PersistentSAPCollider(),
+	BoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Box_Aabb(),]),
+	InsertionSortCollider(),
 	InteractionDispatchers(
 		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
 		[Ip2_FrictMat_FrictMat_FrictPhys(),],
@@ -26,23 +21,25 @@
 	PeriodicPythonRunner(iterPeriod=100,command='myAddPlotData()',label='plotDataCollector'),
 	NewtonIntegrator(damping=0.4)
 ]
-o.bodies.append(utils.box([0,50,0],extents=[1,50,1],dynamic=False,color=[1,0,0],young=30e9,poisson=.3,density=density)) ## here we use the density parameter
-o.bodies.append(utils.sphere([0,0,10],1,color=[0,1,0],young=30e9,poisson=.3,density=density)) ## here again
-
-o.bodies[1].phys['velocity']=[0,initialSpeed,0] ## assign initial velocity
-
-o.dt=.8*utils.PWaveTimeStep()
+O.bodies.append([
+	utils.box([0,50,0],extents=[1,50,1],dynamic=False,color=[1,0,0]),
+	utils.sphere([0,0,10],1,color=[0,1,0])
+])
+
+O.bodies[1].state.vel=(0,initialSpeed,0) ## assign initial velocity
+
+O.dt=.8*utils.PWaveTimeStep()
 ## o.saveTmp('initial')
 def myAddPlotData():
 	s=O.bodies[1]
-	plot.addData({'t':O.time,'y_sph':s.phys.pos[1],'z_sph':s.phys.pos[2]})
+	plot.addData({'t':O.time,'y_sph':s.state.pos[1],'z_sph':s.state.pos[2]})
 plot.plots={'y_sph':('z_sph',)}
 
 # run 30000 iterations
-o.run(20000,True)
+O.run(20000,True)
 
 # write some results to a common file
 # (we rely on the fact that 2 processes will not write results at exactly the same time)
 # 'a' means to open for appending
-file('multi.out','a').write('%s %g %g %g %g\n'%(o.tags['description'],gravity,density,initialSpeed,o.bodies[1].phys.pos[1]))
+file('multi.out','a').write('%s %g %g %g %g\n'%(O.tags['description'],gravity,density,initialSpeed,O.bodies[1].state.pos[1]))
 print 'gnuplot',plot.saveGnuplot(O.tags['id'])

=== modified file 'yadeSCons.py'
--- yadeSCons.py	2010-03-21 15:25:50 +0000
+++ yadeSCons.py	2010-04-13 21:09:57 +0000
@@ -57,7 +57,7 @@
 				if not (f.endswith('.cpp') or f.endswith('.cc') or f.endswith('C')): continue
 				ff=root+'/'+f
 				linkDeps,featureDeps=set(),set()
-				isPlugin=True #False
+				isPlugin=True # False
 				skipping=False
 				for l in open(ff):
 					if re.match(r'\s*#endif.*$',l): skipping=False; continue