← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2285: 1. make Body::isDynamic a method (and Body::setDynamic to change it), in preparation towards maki...

 

------------------------------------------------------------
revno: 2285
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-06-08 23:22:07 +0200
message:
  1. make Body::isDynamic a method (and Body::setDynamic to change it), in preparation towards making dynamic equivalent to State::blockDOFs==State::DOF_ALL
  2. make YADE_BOOST_SERIALIZATION and YADE_SERIALIZE_USING_BOOST #defined in all builds (will be removed later once the switch is complete)
modified:
  SConstruct
  core/Body.hpp
  gui/qt3/GLViewer.cpp
  pkg/common/Engine/GlobalEngine/PersistentTriangulationCollider.cpp
  pkg/common/Engine/GlobalEngine/SpheresFactory.cpp
  pkg/common/Engine/PartialEngine/StepDisplacer.cpp
  pkg/common/Engine/PartialEngine/StepDisplacer.hpp
  pkg/dem/DataClass/Clump.cpp
  pkg/dem/DataClass/Clump.hpp
  pkg/dem/Engine/Callback/UnbalancedForceCallbacks.cpp
  pkg/dem/Engine/Callback/UnbalancedForceCallbacks.hpp
  pkg/dem/Engine/GlobalEngine/GlobalStiffnessTimeStepper.cpp
  pkg/dem/Engine/GlobalEngine/MicroMacroAnalyser.cpp
  pkg/dem/Engine/GlobalEngine/NewtonIntegrator.cpp
  pkg/dem/Engine/GlobalEngine/TesselationWrapper.cpp
  pkg/dem/Engine/GlobalEngine/UniaxialStrainer.cpp
  pkg/dem/Engine/GlobalEngine/VTKRecorder.cpp
  pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.cpp
  pkg/dem/Engine/PartialEngine/ThreeDTriaxialEngine.cpp
  pkg/dem/Engine/PartialEngine/TriaxialCompressionEngine.cpp
  pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.cpp
  pkg/dem/Engine/PartialEngine/TriaxialStressController.cpp
  pkg/dem/PreProcessor/CapillaryTriaxialTest.cpp
  pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp
  pkg/dem/PreProcessor/DirectShearCis.cpp
  pkg/dem/PreProcessor/STLImporterTest.cpp
  pkg/dem/PreProcessor/SimpleShear.cpp
  pkg/dem/PreProcessor/TriaxialTest.cpp
  pkg/dem/meta/ConcretePM.cpp
  pkg/dem/meta/Shop.cpp
  py/_eudoxos.cpp
  py/yadeWrapper/yadeWrapper.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 'SConstruct'
--- SConstruct	2010-06-07 14:56:29 +0000
+++ SConstruct	2010-06-08 21:22:07 +0000
@@ -139,7 +139,7 @@
 	BoolVariable('optimize','Turn on heavy optimizations',defOptions['optimize']),
 	ListVariable('exclude','Yade components that will not be built','none',names=['gui','extra','common','dem','lattice','snow']),
 	EnumVariable('PGO','Whether to "gen"erate or "use" Profile-Guided Optimization','',['','gen','use'],{'no':'','0':'','false':''},1),
-	ListVariable('features','Optional features that are turned on','log4cxx,opengl,gts,openmp,vtk',names=['opengl','log4cxx','cgal','openmp','gts','vtk','python','gl2ps','boost-serialization','never_use_this_one']),
+	ListVariable('features','Optional features that are turned on','log4cxx,opengl,gts,openmp,vtk',names=['opengl','log4cxx','cgal','openmp','gts','vtk','python','gl2ps','never_use_this_one']),
 	('jobs','Number of jobs to run at the same time (same as -j, but saved)',2,None,int),
 	#('extraModules', 'Extra directories with their own SConscript files (must be in-tree) (whitespace separated)',None,None,Split),
 	('buildPrefix','Where to create build-[version][variant] directory for intermediary files','..'),
@@ -385,6 +385,8 @@
 	env.Append(LIBS='yade-support')
 
 	env.Append(CPPDEFINES=['YADE_'+f.upper().replace('-','_') for f in env['features']])
+	# temporary, until #ifdefs removed from the code
+	env.Append(CPPDEFINES=['YADE_BOOST_SERIALIZATION','YADE_SERIALIZE_USING_BOOST'])
 
 	env=conf.Finish()
 

=== modified file 'core/Body.hpp'
--- core/Body.hpp	2010-02-09 20:22:04 +0000
+++ core/Body.hpp	2010-06-08 21:22:07 +0000
@@ -45,6 +45,15 @@
 		bool isClumpMember() const {return clumpId!=ID_NONE && id!=clumpId;}
 		//! Whether this body is standalone (neither Clump, nor member of a Clump)
 		bool isStandalone() const {return clumpId==ID_NONE;}
+		//! Whether this body has all DOFs blocked
+		// temporary versions
+		bool isDynamic() const {return dynamic;}
+		void setDynamic(bool dyn){ dynamic=dyn; }
+		#if 0
+			// future versions: make sure state is not NULL when called
+			bool isDynamic() const { return state->blockedDOFs!=State::DOF_ALL; }
+			setDynamic(bool dyn) { state->blockedDOFs=State::DOF_ALL; }
+		#endif
 		/*! Hook for clump to update position of members when user-forced reposition and redraw (through GUI) occurs.
 		 * This is useful only in cases when engines that do that in every iteration are not active - i.e. when the simulation is paused.
 		 * (otherwise, GLViewer would depend on Clump and therefore Clump would have to go to core...) */
@@ -64,7 +73,7 @@
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Body,Serializable,"A particle, basic element of simulation; interacts with other bodies.",
 		((body_id_t,id,Body::ID_NONE,"[will be overridden]"))
 		((int,groupMask,1,"Bitmask for determining interactions."))
-		((bool,isDynamic,true,"Whether this body will be moved by forces."))
+		((bool,dynamic,true,"Whether this body will be moved by forces."))
 
 		((shared_ptr<Material>,material,,":yref:`Material` instance associated with this body."))
 		((shared_ptr<State>,state,new State,"Physical :yref:`state<State>`."))
@@ -77,7 +86,7 @@
 		.def_readonly("id",&Body::id,"Unique id of this body") // overwrites automatic def_readwrite("id",...) earlier
 		.def_readonly("clumpId",&Body::clumpId,"Id of clump this body makes part of; invalid number if not part of clump; see :yref:`Body::isStandalone`, :yref:`Body::isClump`, :yref:`Body::isClumpMember` properties. \n\n This property is not meant to be modified directly from Python, use :yref:`O.bodies.appendClumped<BodyContainer.appendClumped>` instead.")
 		.def_readwrite("mat",&Body::material,"Shorthand for :yref:`Body::material`")
-		.def_readwrite("dynamic",&Body::isDynamic,"Shorthand for :yref:`Body::isDynamic`")
+		.add_property("isDynamic",&Body::isDynamic,"Deprecated synonym for :yref:`Body::dynamic`")
 		.def_readwrite("mask",&Body::groupMask,"Shorthand for :yref:`Body::groupMask`")
 		.add_property("isStandalone",&Body::isStandalone,"True if this body is neither clump, nor clump member; false otherwise.")
 		.add_property("isClumpMember",&Body::isClumpMember,"True if this body is clump member, false otherwise.")

=== modified file 'gui/qt3/GLViewer.cpp'
--- gui/qt3/GLViewer.cpp	2010-05-03 12:17:44 +0000
+++ gui/qt3/GLViewer.cpp	2010-06-08 21:22:07 +0000
@@ -269,7 +269,7 @@
 		// make all bodies visible
 		else centerScene();
 	}
-	else if(e->key()==Qt::Key_D &&(e->state() & AltButton)){ body_id_t id; if((id=Omega::instance().getScene()->selectedBody)>=0){ const shared_ptr<Body>& b=Body::byId(id); b->isDynamic=!b->isDynamic; LOG_INFO("Body #"<<id<<" now "<<(b->isDynamic?"":"NOT")<<" dynamic"); } }
+	else if(e->key()==Qt::Key_D &&(e->state() & AltButton)){ body_id_t id; if((id=Omega::instance().getScene()->selectedBody)>=0){ const shared_ptr<Body>& b=Body::byId(id); b->setDynamic(!b->isDynamic()); LOG_INFO("Body #"<<id<<" now "<<(b->isDynamic()?"":"NOT")<<" dynamic"); } }
 	else if(e->key()==Qt::Key_D) {timeDispMask+=1; if(timeDispMask>(TIME_REAL|TIME_VIRT|TIME_ITER))timeDispMask=0; }
 	else if(e->key()==Qt::Key_G) {bool anyDrawn=drawGridXYZ[0]||drawGridXYZ[1]||drawGridXYZ[2]; for(int i=0; i<3; i++)drawGridXYZ[i]=!anyDrawn; }
 	else if (e->key()==Qt::Key_M && selectedName() >= 0){
@@ -526,9 +526,7 @@
 // if so, then set isDynamic of previous selection, to old value
 void GLViewer::endSelection(const QPoint &point){
 	manipulatedClipPlane=-1;
-	//int old = selectedName();
 	QGLViewer::endSelection(point);
-	// if(old != -1 && old!=selectedName() && (*(Omega::instance().getScene()->bodies)).exists(old)) Body::byId(old)->isDynamic = wasDynamic;
 }
 
 qglviewer::Vec GLViewer::displayedSceneCenter(){

=== modified file 'pkg/common/Engine/GlobalEngine/PersistentTriangulationCollider.cpp'
--- pkg/common/Engine/GlobalEngine/PersistentTriangulationCollider.cpp	2010-05-26 08:18:36 +0000
+++ pkg/common/Engine/GlobalEngine/PersistentTriangulationCollider.cpp	2010-06-08 21:22:07 +0000
@@ -52,7 +52,7 @@
 		BodyContainer::iterator biEnd = bodies->end();
 		for ( ; bi!=biEnd ; ++bi )
 		{
-			if ( ( *bi )->isDynamic )
+			if ( ( *bi )->isDynamic() )
 			{//means "is it a sphere (not a wall)"
 				const Sphere* s = YADE_CAST<Sphere*> ( ( *bi )->shape.get() );
 				Tes->insert ( (*bi)->state->pos[0],(*bi)->state->pos[1],(*bi)->state->pos[2], s->radius, ( *bi )->getId() );
@@ -71,7 +71,7 @@
 //   BodyContainer::iterator biEnd = bodies->end();
 //   for ( ; bi!=biEnd ; ++bi )
 //   {
-//    if ( ( *bi )->isDynamic )
+//    if ( ( *bi )->isDynamic() )
 //    {//means "is it a sphere (not a wall)"
 //     const Sphere* s = YADE_CAST<Sphere*> ( ( *bi )->shape.get() );
 //     const RigidBodyParameters* p = YADE_CAST<RigidBodyParameters*> ( ( *bi )->physicalParameters.get() );

=== modified file 'pkg/common/Engine/GlobalEngine/SpheresFactory.cpp'
--- pkg/common/Engine/GlobalEngine/SpheresFactory.cpp	2010-04-26 13:58:23 +0000
+++ pkg/common/Engine/GlobalEngine/SpheresFactory.cpp	2010-06-08 21:22:07 +0000
@@ -143,7 +143,7 @@
 	shared_ptr<Aabb> aabb(new Aabb);
 	shared_ptr<Sphere> iSphere(new Sphere);
 	
-	body->isDynamic			= true;
+	body->setDynamic(true);
 	
 	physics->velocity		= Vector3r(//
 			velocity[0]+velocityRange[0]*randomSymmetricUnit(),

=== modified file 'pkg/common/Engine/PartialEngine/StepDisplacer.cpp'
--- pkg/common/Engine/PartialEngine/StepDisplacer.cpp	2010-05-14 10:04:59 +0000
+++ pkg/common/Engine/PartialEngine/StepDisplacer.cpp	2010-06-08 21:22:07 +0000
@@ -15,7 +15,7 @@
 			b->state->angVel=aa.axis()*aa.angle()/dt;
 			LOG_DEBUG("Angular velocity set to "<<aa.axis()*aa.angle()/dt<<". Axis="<<aa.axis()<<", angle="<<aa.angle());
 		}
-		if(!setVelocities || (setVelocities && !b->isDynamic)){
+		if(!setVelocities || (setVelocities && !b->isDynamic())){
 			b->state->pos+=deltaSe3.position;
 			b->state->ori=deltaSe3.orientation*b->state->ori;
 		}

=== modified file 'pkg/common/Engine/PartialEngine/StepDisplacer.hpp'
--- pkg/common/Engine/PartialEngine/StepDisplacer.hpp	2010-06-03 17:49:44 +0000
+++ pkg/common/Engine/PartialEngine/StepDisplacer.hpp	2010-06-08 21:22:07 +0000
@@ -8,7 +8,7 @@
 		virtual void action();
 	YADE_CLASS_BASE_DOC_ATTRS(StepDisplacer,PartialEngine,"Apply generalized displacement (displacement or rotation) stepwise on subscribed bodies.",
 		((Se3r,deltaSe3,Se3r(Vector3r::Zero(),Quaternionr::Identity()),"Difference of position/orientation that will be added. Position is added to current :yref:`State::pos` using vector addition, orientation to :yref:`State::ori` using quaternion multiplication (rotation composition)."))
-		((bool,setVelocities,false,"If true,  velocity and angularVelocity are modified in such a way that over one iteration (dt), the body will have prescribed se3 jump. In this case, se3 itself is not updated for :yref:`dynamic<Body::isDynamic>` bodies, since they would have the delta applied twice (here and in the :yref:`integrator<NewtonIntegrator>`). For non-dynamic bodies however, se3 *is* still updated."))
+		((bool,setVelocities,false,"If true,  velocity and angularVelocity are modified in such a way that over one iteration (dt), the body will have prescribed se3 jump. In this case, se3 itself is not updated for :yref:`dynamic<Body::dynamic>` bodies, since they would have the delta applied twice (here and in the :yref:`integrator<NewtonIntegrator>`). For non-dynamic bodies however, se3 *is* still updated."))
 	);
 	DECLARE_LOGGER;
 };

=== modified file 'pkg/dem/DataClass/Clump.cpp'
--- pkg/dem/DataClass/Clump.cpp	2010-06-02 04:46:39 +0000
+++ pkg/dem/DataClass/Clump.cpp	2010-06-08 21:22:07 +0000
@@ -27,7 +27,7 @@
 			static_cast<Clump*>(b.get())->moveMembers();
 		}
 	}
-	//if(!clump->isDynamic) return; // perhaps clump that has been desactivated?!
+	//if(!clump->isDynamic()) return; // perhaps clump that has been desactivated?!
 }
 #endif
 
@@ -51,7 +51,7 @@
 
 	// begin actual setup
 	subBody->clumpId=getId();
-	subBody->isDynamic=false;
+	subBody->setDynamic(false);
 	// for now, push just unitialized se3; will be updated by updateProperties
 	members[subId]=Se3r();
 
@@ -68,7 +68,7 @@
 	// restore body's internal parameters;
 	shared_ptr<Body> subBody=Body::byId(subId);
 	subBody->clumpId=Body::ID_NONE;
-	subBody->isDynamic=true;
+	subBody->setDynamic(true);
 	LOG_DEBUG("Removed body #"<<subId<<" from clump #"<<getId());
 }
 
@@ -203,7 +203,7 @@
 	TRVAR1(M);
 	TRWM3MAT(Ig);
 	TRWM3VEC(Sg);
-	if(M==0){ state->mass=0; state->inertia=Vector3r(0,0,0); isDynamic=false; return; }
+	if(M==0){ state->mass=0; state->inertia=Vector3r(0,0,0); setDynamic(false); return; }
 
 	state->pos=Sg/M; // clump's centroid
 	// this will calculate translation only, since rotation is zero

=== modified file 'pkg/dem/DataClass/Clump.hpp'
--- pkg/dem/DataClass/Clump.hpp	2010-03-29 12:28:06 +0000
+++ pkg/dem/DataClass/Clump.hpp	2010-06-08 21:22:07 +0000
@@ -13,7 +13,7 @@
 /*! Body representing clump (rigid aggregate) composed by other existing bodies.
 
 	Clump is one of bodies that reside in rootBody->bodies.
-	When an existing body is added to ::Clump, it's ::Body::isDynamic flag is set to false
+	When an existing body is added to ::Clump, it's ::Body::dynamic flag is set to false
 	(it is still subscribed to all its engines, to make it possible to remove it from the clump again).
 	All forces acting on Clump::members are made to act on the clump itself, which will ensure that they
 	influence all Clump::members as if the clump were a rigid particle.
@@ -37,7 +37,7 @@
 	-# Apply forces acting on members to the clump instead (done in NewtonsForceLaw, NewtonsMomentumLaw) - uses world coordinates to calculate effect on the clump's centroid
 	-# Integrate position and orientation of the clump
 		- LeapFrogPositionIntegrator and LeapFrogOrientationIntegrator move clump as whole
-			- clump members are skipped, since they have Body::isDynamic==false. 
+			- clump members are skipped, since they have Body::dynamic==false. 
 		- ClumpMemberMover is an engine that updates positions of the clump memebers in each timestep (calls Clump::moveSubBodies internally)
 
 	Some more information can be found http://beta.arcig.cz/~eudoxos/phd/index.cgi/YaDe/HighLevelClumps
@@ -76,7 +76,7 @@
 	
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR(Clump,Body,"Rigid aggregate of bodies",
 		((memberMap,members,,"Ids and relative positions+orientations of members of the clump (should not be accessed directly)")),
-		/*ctor*/isDynamic=true;
+		/*ctor*/setDynamic(true); /* possible source of crash is setDynamic manipulates Body::State! */
 	);
 	DECLARE_LOGGER;
 };

=== modified file 'pkg/dem/Engine/Callback/UnbalancedForceCallbacks.cpp'
--- pkg/dem/Engine/Callback/UnbalancedForceCallbacks.cpp	2010-05-03 12:17:44 +0000
+++ pkg/dem/Engine/Callback/UnbalancedForceCallbacks.cpp	2010-06-08 21:22:07 +0000
@@ -36,7 +36,7 @@
 	return &SumBodyForcesCb::go;
 }
 void SumBodyForcesCb::go(BodyCallback* _self, Body* b){
-	if(!b->isDynamic) return;
+	if(!b->isDynamic()) return;
 	SumBodyForcesCb* self=static_cast<SumBodyForcesCb*>(_self);
 #ifdef YADE_OPENMP
 	cerr<<"["<<omp_get_thread_num()<<",#"<<b->id<<",scene="<<self->scene<<"]";

=== modified file 'pkg/dem/Engine/Callback/UnbalancedForceCallbacks.hpp'
--- pkg/dem/Engine/Callback/UnbalancedForceCallbacks.hpp	2010-03-29 15:48:04 +0000
+++ pkg/dem/Engine/Callback/UnbalancedForceCallbacks.hpp	2010-06-08 21:22:07 +0000
@@ -23,6 +23,6 @@
 		OpenMPAccumulator<Real,&SumIntrForcesCb::Real0> force;
 		static void go(BodyCallback*,Body*);
 		virtual BodyCallback::FuncPtr stepInit();
-	YADE_CLASS_BASE_DOC(SumBodyForcesCb,BodyCallback,"Callback summing magnitudes of resultant forces over :yref:`dynamic<Body::isDynamic>` bodies.");
+	YADE_CLASS_BASE_DOC(SumBodyForcesCb,BodyCallback,"Callback summing magnitudes of resultant forces over :yref:`dynamic<Body::dynamic>` bodies.");
 };
 REGISTER_SERIALIZABLE(SumBodyForcesCb);

=== modified file 'pkg/dem/Engine/GlobalEngine/GlobalStiffnessTimeStepper.cpp'
--- pkg/dem/Engine/GlobalEngine/GlobalStiffnessTimeStepper.cpp	2010-05-13 20:19:38 +0000
+++ pkg/dem/Engine/GlobalEngine/GlobalStiffnessTimeStepper.cpp	2010-06-08 21:22:07 +0000
@@ -74,7 +74,7 @@
 	for(  ; bi!=biEnd ; ++bi )
 	{
 		shared_ptr<Body> b = *bi;
-		if (b->isDynamic) findTimeStepFromBody(b, ncb);
+		if (b->isDynamic()) findTimeStepFromBody(b, ncb);
 	}
 		
 	if(computedSomething)

=== modified file 'pkg/dem/Engine/GlobalEngine/MicroMacroAnalyser.cpp'
--- pkg/dem/Engine/GlobalEngine/MicroMacroAnalyser.cpp	2010-05-03 12:17:44 +0000
+++ pkg/dem/Engine/GlobalEngine/MicroMacroAnalyser.cpp	2010-06-08 21:22:07 +0000
@@ -119,7 +119,7 @@
 	for (; bi!=biEnd ; ++bi) {
 		const body_id_t Idg = (*bi)->getId();
 		TS.grains[Idg].id = Idg;
-		if (!(*bi)->isDynamic) {
+		if (!(*bi)->isDynamic()) {
 			TS.grains[Idg].isSphere = false; fictiousVtx.push_back(Idg);}
 		else {//then it is a sphere (not a wall)
 			++Ng;

=== modified file 'pkg/dem/Engine/GlobalEngine/NewtonIntegrator.cpp'
--- pkg/dem/Engine/GlobalEngine/NewtonIntegrator.cpp	2010-06-02 14:19:37 +0000
+++ pkg/dem/Engine/GlobalEngine/NewtonIntegrator.cpp	2010-06-08 21:22:07 +0000
@@ -96,7 +96,7 @@
 			State* state=b->state.get();
 			const body_id_t& id=b->getId();
 			// clump members are non-dynamic; we only get their velocities here
-			if (!b->isDynamic || b->isClumpMember()){
+			if (!b->isDynamic() || b->isClumpMember()){
 				saveMaximaVelocity(scene,id,state);
 				continue;
 			}

=== modified file 'pkg/dem/Engine/GlobalEngine/TesselationWrapper.cpp'
--- pkg/dem/Engine/GlobalEngine/TesselationWrapper.cpp	2010-04-25 15:46:26 +0000
+++ pkg/dem/Engine/GlobalEngine/TesselationWrapper.cpp	2010-06-08 21:22:07 +0000
@@ -66,7 +66,7 @@
 	body_id_t MaxId=0;
 	TW.mean_radius = 0;
 	for (; bi!=biEnd ; ++bi) {
-		if ((*bi)->isDynamic) { //then it is a sphere (not a wall) FIXME : need test if isSphere
+		if ((*bi)->isDynamic()) { //then it is a sphere (not a wall) FIXME : need test if isSphere
 			const Sphere* s = YADE_CAST<Sphere*> ((*bi)->shape.get());
 			const Vector3r& pos = (*bi)->state->pos;
 			const Real rad = s->radius;

=== modified file 'pkg/dem/Engine/GlobalEngine/UniaxialStrainer.cpp'
--- pkg/dem/Engine/GlobalEngine/UniaxialStrainer.cpp	2010-05-13 20:19:38 +0000
+++ pkg/dem/Engine/GlobalEngine/UniaxialStrainer.cpp	2010-06-08 21:22:07 +0000
@@ -17,14 +17,14 @@
 	assert(negIds.size()>0);
 	posCoords.clear(); negCoords.clear();
 	FOREACH(body_id_t id,posIds){ const shared_ptr<Body>& b=Body::byId(id,scene); posCoords.push_back(b->state->pos[axis]);
-		if(blockDisplacements && blockRotations) b->isDynamic=false;
+		if(blockDisplacements && blockRotations) b->state->blockedDOFs=State::DOF_ALL;
 		else{
 			if(!blockDisplacements) b->state->blockedDOFs=State::axisDOF(axis); else b->state->blockedDOFs=State::DOF_XYZ;
 			if(blockRotations) b->state->blockedDOFs|=State::DOF_RXRYRZ;
 		}
 	}
 	FOREACH(body_id_t id,negIds){ const shared_ptr<Body>& b=Body::byId(id,scene); negCoords.push_back(b->state->pos[axis]);
-		if(blockDisplacements && blockRotations) b->isDynamic=false;
+		if(blockDisplacements && blockRotations) b->state->blockedDOFs=State::DOF_ALL;
 		else{
 			if(!blockDisplacements) b->state->blockedDOFs=State::axisDOF(axis); else b->state->blockedDOFs=State::DOF_XYZ;
 			if(blockRotations) b->state->blockedDOFs|=State::DOF_RXRYRZ;

=== modified file 'pkg/dem/Engine/GlobalEngine/VTKRecorder.cpp'
--- pkg/dem/Engine/GlobalEngine/VTKRecorder.cpp	2010-06-08 06:53:32 +0000
+++ pkg/dem/Engine/GlobalEngine/VTKRecorder.cpp	2010-06-08 21:22:07 +0000
@@ -196,7 +196,7 @@
 		if (recActive[REC_SPHERES]){
 			const Sphere* sphere = dynamic_cast<Sphere*>(b->shape.get()); 
 			if (sphere){
-				if(skipNondynamic && !b->isDynamic) continue;
+				if(skipNondynamic && !b->isDynamic()) continue;
 				vtkIdType pid[1];
 				const Vector3r& pos = b->state->pos;
 				pid[0] = spheresPos->InsertNextPoint(pos[0], pos[1], pos[2]);

=== modified file 'pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.cpp'
--- pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.cpp	2010-05-13 20:19:38 +0000
+++ pkg/dem/Engine/PartialEngine/Disp2DPropLoadEngine.cpp	2010-06-08 21:22:07 +0000
@@ -62,7 +62,7 @@
 				TotInt++;
 				const shared_ptr<Body>& b1 = Body::byId( (*ii)->getId1() );
 				const shared_ptr<Body>& b2 = Body::byId( (*ii)->getId2() );
-				if ( (b1->isDynamic) && (b2->isDynamic) )
+				if ( (b1->isDynamic()) && (b2->isDynamic()) )
 					OnlySsInt++;
 			}
 		}
@@ -192,7 +192,7 @@
 			TotInt++;
 			const shared_ptr<Body>& b1 = Body::byId( (*ii)->getId1() );
 			const shared_ptr<Body>& b2 = Body::byId( (*ii)->getId2() );
-			if ( (b1->isDynamic) && (b2->isDynamic) )
+			if ( (b1->isDynamic()) && (b2->isDynamic()) )
 				OnlySsInt++;
 		}
 	}

=== modified file 'pkg/dem/Engine/PartialEngine/ThreeDTriaxialEngine.cpp'
--- pkg/dem/Engine/PartialEngine/ThreeDTriaxialEngine.cpp	2010-05-13 20:19:38 +0000
+++ pkg/dem/Engine/PartialEngine/ThreeDTriaxialEngine.cpp	2010-06-08 21:22:07 +0000
@@ -155,7 +155,7 @@
 	scene = Omega::instance().getScene().get();
 	shared_ptr<BodyContainer>& bodies = scene->bodies;
 	FOREACH(const shared_ptr<Body>& b,*scene->bodies){
-		if (b->isDynamic)
+		if (b->isDynamic())
 		YADE_PTR_CAST<FrictMat> (b->material)->frictionAngle = frictionDegree * Mathr::PI/180.0;
 	}
 				

=== modified file 'pkg/dem/Engine/PartialEngine/TriaxialCompressionEngine.cpp'
--- pkg/dem/Engine/PartialEngine/TriaxialCompressionEngine.cpp	2010-06-02 23:31:35 +0000
+++ pkg/dem/Engine/PartialEngine/TriaxialCompressionEngine.cpp	2010-06-08 21:22:07 +0000
@@ -239,7 +239,7 @@
 	shared_ptr<BodyContainer>& bodies = scene->bodies;
 	FOREACH(const shared_ptr<Body>& b,*scene->bodies){
 		if(b->isClump()) continue;
-		if (b->isDynamic)
+		if (b->isDynamic())
 		YADE_PTR_CAST<FrictMat> (b->material)->frictionAngle = frictionDegree * Mathr::PI/180.0;
 	}
 	FOREACH(const shared_ptr<Interaction>& ii, *scene->interactions){

=== modified file 'pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.cpp'
--- pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.cpp	2010-06-02 23:31:35 +0000
+++ pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.cpp	2010-06-08 21:22:07 +0000
@@ -50,7 +50,7 @@
 	for ( ; bi!=biEnd; ++bi ){
 		if((*bi)->isClump()) continue;
 		const shared_ptr<Body>& b = *bi;
-		if ( b->isDynamic ){
+		if ( b->isDynamic() ){
 			//Sorry, the next string was commented, because it gave a Warning "unused variable v". Anton Gladky
 			//const Vector3r& v = b->state->vel;
 			Vs += 1.3333333*Mathr::PI*pow ( YADE_PTR_CAST<Sphere>( b->shape)->radius, 3 );}

=== modified file 'pkg/dem/Engine/PartialEngine/TriaxialStressController.cpp'
--- pkg/dem/Engine/PartialEngine/TriaxialStressController.cpp	2010-05-13 20:19:38 +0000
+++ pkg/dem/Engine/PartialEngine/TriaxialStressController.cpp	2010-06-08 21:22:07 +0000
@@ -99,7 +99,7 @@
 		{
 			if((*bi)->isClump()) continue;
 			const shared_ptr<Body>& b = *bi;
-			if ( b->isDynamic )
+			if ( b->isDynamic() )
 			{
 				const shared_ptr<Sphere>& sphere =
 						YADE_PTR_CAST<Sphere> ( b->shape );
@@ -211,7 +211,7 @@
 	BodyContainer::iterator biEnd = scene->bodies->end();
 	for ( ; bi!=biEnd ; ++bi )
 	{
-		if ( ( *bi )->isDynamic )
+		if ( ( *bi )->isDynamic() )
 		{
 			( static_cast<Sphere*> ( ( *bi )->shape.get() ) )->radius *= multiplier;
 				(*bi)->state->mass*=pow(multiplier,3);
@@ -225,9 +225,9 @@
 	{
 		if ((*ii)->isReal()) {
 			ScGeom* contact = static_cast<ScGeom*>((*ii)->interactionGeometry.get());
-			if ((*(scene->bodies))[(*ii)->getId1()]->isDynamic)
+			if ((*(scene->bodies))[(*ii)->getId1()]->isDynamic())
 				contact->radius1 = static_cast<Sphere*>((* (scene->bodies))[(*ii)->getId1()]->shape.get())->radius;
-			if ((* (scene->bodies))[(*ii)->getId2()]->isDynamic)
+			if ((* (scene->bodies))[(*ii)->getId2()]->isDynamic())
 				contact->radius2 = static_cast<Sphere*>((* (scene->bodies))[(*ii)->getId2()]->shape.get())->radius;
 			const shared_ptr<FrictPhys>& contactPhysics = YADE_PTR_CAST<FrictPhys>((*ii)->interactionPhysics);
 			contactPhysics->kn*=multiplier; contactPhysics->ks*=multiplier;
@@ -270,7 +270,7 @@
 		BodyContainer::iterator biEnd = bodies->end();
 		Real f;
 		for(  ; bi!=biEnd ; ++bi ) {
-			if ((*bi)->isDynamic) {
+			if ((*bi)->isDynamic()) {
 				f=getForce(scene,(*bi)->getId()).norm();
 				MeanUnbalanced += f;
 				if (f!=0) ++nBodies;
@@ -283,7 +283,7 @@
 		Real MaxUnbalanced=0;
 		BodyContainer::iterator bi    = bodies->begin();
 		BodyContainer::iterator biEnd = bodies->end();
-		for(  ; bi!=biEnd ; ++bi ) if ((*bi)->isDynamic)
+		for(  ; bi!=biEnd ; ++bi ) if ((*bi)->isDynamic())
 				MaxUnbalanced = std::max(getForce(scene,(*bi)->getId()).norm(),MaxUnbalanced);
 		if (MeanForce != 0) MaxUnbalanced = MaxUnbalanced/MeanForce;
 		return MaxUnbalanced;

=== modified file 'pkg/dem/PreProcessor/CapillaryTriaxialTest.cpp'
--- pkg/dem/PreProcessor/CapillaryTriaxialTest.cpp	2010-06-02 14:19:37 +0000
+++ pkg/dem/PreProcessor/CapillaryTriaxialTest.cpp	2010-06-08 21:22:07 +0000
@@ -299,7 +299,7 @@
 	q.normalize();
 //	q.FromAxisAngle( Vector3r(0,0,1),0);
 	
-	body->isDynamic			= dynamic;
+	body->setDynamic(dynamic);
 	
 	body->state->angVel		= Vector3r(0,0,0);
 	body->state->vel		= Vector3r(0,0,0);
@@ -339,7 +339,7 @@
 	shared_ptr<Aabb> aabb(new Aabb);
 	shared_ptr<Box> iBox(new Box);
 	
-	body->isDynamic			= false;
+	body->setDynamic(false);
 	
 	body->state->angVel		= Vector3r(0,0,0);
 	body->state->vel		= Vector3r(0,0,0);

=== modified file 'pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp'
--- pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp	2010-06-02 14:19:37 +0000
+++ pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp	2010-06-08 21:22:07 +0000
@@ -286,7 +286,7 @@
 	Quaternionr q(Mathr::SymmetricRandom(),Mathr::SymmetricRandom(),Mathr::SymmetricRandom(),Mathr::SymmetricRandom());
 	q.normalize();
 	
-	body->isDynamic			= dynamic;
+	body->setDynamic(dynamic);
 	
 	body->state->angVel		= Vector3r(0,0,0);
 	body->state->vel		= Vector3r(0,0,0);
@@ -327,7 +327,7 @@
 
 	shared_ptr<Box> iBox(new Box);
 	
-	body->isDynamic			= false;
+	body->setDynamic(false);
 	
 	body->state->angVel		= Vector3r(0,0,0);
 	body->state->vel		= Vector3r(0,0,0);

=== modified file 'pkg/dem/PreProcessor/DirectShearCis.cpp'
--- pkg/dem/PreProcessor/DirectShearCis.cpp	2010-05-18 10:28:02 +0000
+++ pkg/dem/PreProcessor/DirectShearCis.cpp	2010-06-08 21:22:07 +0000
@@ -175,7 +175,7 @@
 	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<Sphere> iSphere(new Sphere);
 	
-	body->isDynamic			= true;
+	body->setDynamic(true);
 	
 	physics->angularVelocity	= Vector3r(0,0,0);
 	physics->velocity		= Vector3r(0,0,0);
@@ -214,7 +214,7 @@
 	shared_ptr<Box> iBox(new Box);
 	
 	
-	body->isDynamic			= false;
+	body->setDynamic(false);
 	
 	physics->angularVelocity	= Vector3r(0,0,0);
 	physics->velocity		= Vector3r(0,0,0);
@@ -329,7 +329,7 @@
 
 void DirectShearCis::positionRootBody(shared_ptr<Scene>& rootBody) 
 {
-	rootBody->isDynamic		= false;
+	rootBody->setDynamic(false);
 	
 	shared_ptr<ParticleParameters> physics(new ParticleParameters); // FIXME : fix indexable class PhysicalParameters
 	physics->se3				= Se3r(Vector3r(0,0,0),Quaternionr::Identity());

=== modified file 'pkg/dem/PreProcessor/STLImporterTest.cpp'
--- pkg/dem/PreProcessor/STLImporterTest.cpp	2010-05-18 10:28:02 +0000
+++ pkg/dem/PreProcessor/STLImporterTest.cpp	2010-06-08 21:22:07 +0000
@@ -94,7 +94,7 @@
 	{
 	    shared_ptr<Body> b(new Body(body_id_t(0),1));
     
-	    b->isDynamic		= false;
+	    b->setDynamic(false);
 	    
 	    // physical parameters
 	    shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
@@ -158,7 +158,7 @@
 	
 	Real radius 			= (Mathr::IntervalRandom(minRadius,maxRadius));
 	
-	body->isDynamic			= true;
+	body->setDynamic(true);
 	
 	physics->angularVelocity	= Vector3r(0,0,0);
 	physics->velocity		= Vector3r(0,0,0);
@@ -250,7 +250,7 @@
 
 void STLImporterTest::positionRootBody(shared_ptr<Scene>& rootBody) 
 {
-	rootBody->isDynamic		= false;
+	rootBody->setDynamic(false);
 	
 	shared_ptr<ParticleParameters> physics(new ParticleParameters); // FIXME : fix indexable class PhysicalParameters
 	physics->se3				= Se3r(Vector3r(0,0,0),Quaternionr::Identity());

=== modified file 'pkg/dem/PreProcessor/SimpleShear.cpp'
--- pkg/dem/PreProcessor/SimpleShear.cpp	2010-06-04 15:26:30 +0000
+++ pkg/dem/PreProcessor/SimpleShear.cpp	2010-06-08 21:22:07 +0000
@@ -164,7 +164,7 @@
 // 	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<Sphere> iSphere(new Sphere);
 	
-	body->isDynamic			= true;
+	body->setDynamic(true);
 	body->state->pos		=position;
 	body->state->ori		=Quaternionr::Identity();
 	body->state->vel		=Vector3r(0,0,0);
@@ -206,7 +206,7 @@
 // 	shared_ptr<BoxModel> gBox(new BoxModel);
 	shared_ptr<Box> iBox(new Box);
 
-	body->isDynamic			= false;
+	body->setDynamic(false);
 	
 	body->state->angVel		= Vector3r(0,0,0);
 	body->state->vel		= Vector3r(0,0,0);

=== modified file 'pkg/dem/PreProcessor/TriaxialTest.cpp'
--- pkg/dem/PreProcessor/TriaxialTest.cpp	2010-05-18 10:28:02 +0000
+++ pkg/dem/PreProcessor/TriaxialTest.cpp	2010-06-08 21:22:07 +0000
@@ -220,7 +220,7 @@
 	shared_ptr<Aabb> aabb(new Aabb);
 	shared_ptr<Sphere> iSphere(new Sphere);
 	
-	body->isDynamic			= dynamic;	
+	body->setDynamic(dynamic);	
 	body->state->mass		= 4.0/3.0*Mathr::PI*radius*radius*radius*density;
 	body->state->inertia		= Vector3r( 	2.0/5.0*body->state->mass*radius*radius,
 							2.0/5.0*body->state->mass*radius*radius,
@@ -243,7 +243,7 @@
 void TriaxialTest::createBox(shared_ptr<Body>& body, Vector3r position, Vector3r extents, bool wire)
 {
 	body = shared_ptr<Body>(new Body(body_id_t(0),2));
-	body->isDynamic			= false;
+	body->setDynamic(false);
 	shared_ptr<Aabb> aabb(new Aabb);
 	aabb->diffuseColor		= Vector3r(1,0,0);
 	body->bound		= aabb;

=== modified file 'pkg/dem/meta/ConcretePM.cpp'
--- pkg/dem/meta/ConcretePM.cpp	2010-05-26 17:49:15 +0000
+++ pkg/dem/meta/ConcretePM.cpp	2010-06-08 21:22:07 +0000
@@ -367,7 +367,7 @@
 			}
 		}
 		else { state->normDmg=0; state->normEpsPl=0;}
-		B->shape->color=Vector3r(state->normDmg,1-state->normDmg,B->isDynamic?0:1);
+		B->shape->color=Vector3r(state->normDmg,1-state->normDmg,B->isDynamic()?0:1);
 		nAvgRelResidual+=0.5*state->numBrokenCohesive; // add half or broken interactions, other body has the other half
 	}
 	avgRelResidual/=nAvgRelResidual;

=== modified file 'pkg/dem/meta/Shop.cpp'
--- pkg/dem/meta/Shop.cpp	2010-05-18 22:10:18 +0000
+++ pkg/dem/meta/Shop.cpp	2010-06-08 21:22:07 +0000
@@ -170,7 +170,7 @@
 	// get maximum force on a body and sum of all forces (for averaging)
 	Real sumF=0,maxF=0,currF; int nb=0;
 	FOREACH(const shared_ptr<Body>& b, *rb->bodies){
-		if(!b->isDynamic) continue;
+		if(!b->isDynamic()) continue;
 		currF=rb->forces.getForce(b->id).norm(); maxF=max(currF,maxF); sumF+=currF; nb++;
 	}
 	Real meanF=sumF/nb;
@@ -190,7 +190,7 @@
 	Scene* rb=_rb ? _rb : Omega::instance().getScene().get();
 	Real ret=0.;
 	FOREACH(const shared_ptr<Body>& b, *rb->bodies){
-		if(!b->isDynamic) continue;
+		if(!b->isDynamic()) continue;
 		// ½(mv²+ωIω)
 		ret+=.5*(b->state->mass*b->state->vel.squaredNorm()+b->state->angVel.dot(diagMult(b->state->inertia,b->state->angVel)));
 	}
@@ -318,7 +318,7 @@
 /*! Create body - sphere. */
 shared_ptr<Body> Shop::sphere(Vector3r center, Real radius, shared_ptr<Material> mat){
 	shared_ptr<Body> body(new Body);
-	body->isDynamic=true;
+	body->setDynamic(true);
 	body->material=mat ? mat : static_pointer_cast<Material>(defaultGranularMat());
 	body->state->pos=center;
 	body->state->mass=4.0/3.0*Mathr::PI*radius*radius*radius*body->material->density;
@@ -331,7 +331,7 @@
 /*! Create body - box. */
 shared_ptr<Body> Shop::box(Vector3r center, Vector3r extents, shared_ptr<Material> mat){
 	shared_ptr<Body> body(new Body);
-	body->isDynamic=true;
+	body->setDynamic(true);
 	body->material=mat ? mat : static_pointer_cast<Material>(defaultGranularMat());
 	body->state->pos=center;
 	Real mass=8.0*extents[0]*extents[1]*extents[2]*body->material->density;
@@ -345,7 +345,7 @@
 /*! Create body - tetrahedron. */
 shared_ptr<Body> Shop::tetra(Vector3r v_global[4], shared_ptr<Material> mat){
 	shared_ptr<Body> body(new Body);
-	body->isDynamic=true;
+	body->setDynamic(true);
 	body->material=mat ? mat : static_pointer_cast<Material>(defaultGranularMat());
 	Vector3r centroid=(v_global[0]+v_global[1]+v_global[2]+v_global[3])*.25;
 	Vector3r v[4]; for(int i=0; i<4; i++) v[i]=v_global[i]-centroid;
@@ -366,7 +366,7 @@
 	if(!f.good()) throw runtime_error("Unable to open file `"+fname+"'");
 
 	FOREACH(shared_ptr<Body> b, *rootBody->bodies){
-		if (!b->isDynamic) continue;
+		if (!b->isDynamic()) continue;
 		shared_ptr<Sphere>	intSph=dynamic_pointer_cast<Sphere>(b->shape);
 		if(!intSph) continue;
 		const Vector3r& pos=b->state->pos;
@@ -379,7 +379,7 @@
 	const shared_ptr<Scene>& rootBody=Omega::instance().getScene();
 	Real vol=0;
 	FOREACH(shared_ptr<Body> b, *rootBody->bodies){
-		if (!b->isDynamic) continue;
+		if (!b->isDynamic()) continue;
 		shared_ptr<Sphere> intSph=YADE_PTR_CAST<Sphere>(b->shape);
 		vol += 4.18879020*pow(intSph->radius,3);
 	}

=== modified file 'py/_eudoxos.cpp'
--- py/_eudoxos.cpp	2010-05-04 13:56:05 +0000
+++ py/_eudoxos.cpp	2010-06-08 21:22:07 +0000
@@ -58,7 +58,7 @@
  * to particles subject to axial compaction to speed up the process. */
 void velocityTowardsAxis(const Vector3r& axisPoint, const Vector3r& axisDirection, Real timeToAxis, Real subtractDist=0., Real perturbation=0.1){
 	FOREACH(const shared_ptr<Body>&b, *(Omega::instance().getScene()->bodies)){
-		if(!b->isDynamic) continue;
+		if(!b->isDynamic()) continue;
 		const Vector3r& x0=b->state->pos;
 		const Vector3r& x1=axisPoint;
 		const Vector3r x2=axisPoint+axisDirection;

=== modified file 'py/yadeWrapper/yadeWrapper.cpp'
--- py/yadeWrapper/yadeWrapper.cpp	2010-05-13 20:52:41 +0000
+++ py/yadeWrapper/yadeWrapper.cpp	2010-06-08 21:22:07 +0000
@@ -22,7 +22,6 @@
 #include<boost/version.hpp>
 
 #include<yade/lib-base/Logging.hpp>
-#include<yade/lib-serialization-xml/XMLFormatManager.hpp>
 #include<yade/lib-pyutil/gil.hpp>
 #include<yade/lib-pyutil/raw_constructor.hpp>
 #include<yade/lib-pyutil/doc_opts.hpp>
@@ -119,7 +118,7 @@
 		// create and add clump itself
 		shared_ptr<Clump> clump=shared_ptr<Clump>(new Clump());
 		shared_ptr<Body> clumpAsBody=static_pointer_cast<Body>(clump);
-		clump->isDynamic=true;
+		clump->setDynamic(true);
 		proxee->insert(clumpAsBody);
 		// add clump members to the clump
 		FOREACH(body_id_t id, ids) clump->add(id);


Follow ups