← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3978: Remove all remaining `using namespace boost`

 

------------------------------------------------------------
revno: 3978
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Fri 2014-05-23 15:05:19 +0200
message:
  Remove all remaining `using namespace boost`
modified:
  CMakeLists.txt
  core/Body.cpp
  core/Body.hpp
  core/Clump.cpp
  core/Clump.hpp
  core/Dispatcher.hpp
  core/FileGenerator.hpp
  core/Functor.hpp
  core/InteractionContainer.cpp
  core/Omega.cpp
  core/Scene.cpp
  core/State.cpp
  gui/qt4/GLViewer.cpp
  gui/qt4/GLViewer.hpp
  gui/qt4/GLViewerDisplay.cpp
  gui/qt4/_GLViewer.cpp
  lib/multimethods/DynLibDispatcher.hpp
  pkg/common/Collider.cpp
  pkg/common/Collider.hpp
  pkg/common/Cylinder.hpp
  pkg/common/Facet.cpp
  pkg/common/GravityEngines.cpp
  pkg/common/Grid.hpp
  pkg/common/InsertionSortCollider.cpp
  pkg/common/InsertionSortCollider.hpp
  pkg/common/InteractionLoop.cpp
  pkg/common/InteractionLoop.hpp
  pkg/common/OpenGLRenderer.cpp
  pkg/common/OpenGLRenderer.hpp
  pkg/common/Recorder.cpp
  pkg/common/ZECollider.cpp
  pkg/dem/CapillaryStressRecorder.cpp
  pkg/dem/CapillaryTriaxialTest.cpp
  pkg/dem/CohesiveTriaxialTest.cpp
  pkg/dem/ConcretePM.cpp
  pkg/dem/Disp2DPropLoadEngine.cpp
  pkg/dem/DomainLimiter.cpp
  pkg/dem/FacetTopologyAnalyzer.cpp
  pkg/dem/FlatGridCollider.cpp
  pkg/dem/GeneralIntegratorInsertionSortCollider.cpp
  pkg/dem/GlobalStiffnessTimeStepper.cpp
  pkg/dem/Ig2_Sphere_Sphere_ScGeom.cpp
  pkg/dem/JointedCohesiveFrictionalPM.cpp
  pkg/dem/KinemCNDEngine.cpp
  pkg/dem/KinemCNLEngine.cpp
  pkg/dem/KinemCNSEngine.cpp
  pkg/dem/KinemCTDEngine.cpp
  pkg/dem/NewtonIntegrator.cpp
  pkg/dem/Polyhedra.cpp
  pkg/dem/Polyhedra_splitter.cpp
  pkg/dem/RungeKuttaCashKarp54Integrator.cpp
  pkg/dem/RungeKuttaCashKarp54Integrator.hpp
  pkg/dem/ScGeom.hpp
  pkg/dem/Shop.hpp
  pkg/dem/Shop_01.cpp
  pkg/dem/Shop_02.cpp
  pkg/dem/SimpleShear.cpp
  pkg/dem/SpherePack.cpp
  pkg/dem/SpheresFactory.cpp
  pkg/dem/TesselationWrapper.cpp
  pkg/dem/TesselationWrapper.hpp
  pkg/dem/Tetra.cpp
  pkg/dem/TriaxialCompressionEngine.cpp
  pkg/dem/TriaxialStateRecorder.cpp
  pkg/dem/TriaxialStressController.hpp
  pkg/dem/TriaxialTest.cpp
  pkg/dem/UniaxialStrainer.cpp
  pkg/dem/VTKRecorder.cpp
  pkg/pfv/FlowEngine.hpp
  py/_polyhedra_utils.cpp
  py/_utils.cpp
  py/wrapper/customConverters.cpp
  py/wrapper/yadeWrapper.cpp


--
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 'CMakeLists.txt'
--- CMakeLists.txt	2014-05-23 13:03:49 +0000
+++ CMakeLists.txt	2014-05-23 13:05:19 +0000
@@ -61,7 +61,7 @@
 ENDIF()
 
 #===========================================================
-ADD_DEFINITIONS(" -DYADE_PTR_CAST=static_pointer_cast -DYADE_CAST=static_cast ")
+ADD_DEFINITIONS(" -DYADE_PTR_CAST=boost::static_pointer_cast -DYADE_CAST=static_cast ")
 IF (CMAKE_CXX_FLAGS)
   #If flags are set, add only neccessary flags
   IF (DEBUG)

=== modified file 'core/Body.cpp'
--- core/Body.cpp	2014-04-09 14:03:16 +0000
+++ core/Body.cpp	2014-05-23 13:05:19 +0000
@@ -12,8 +12,8 @@
 const shared_ptr<Body>& Body::byId(Body::id_t _id, shared_ptr<Scene> rb){return (*(rb->bodies))[_id];}
 
 // return list of interactions of this particle
-python::list Body::py_intrs(){
-	python::list ret;
+boost::python::list Body::py_intrs(){
+  boost::python::list ret;
 	for(Body::MapId2IntrT::iterator it=this->intrs.begin(),end=this->intrs.end(); it!=end; ++it) {  //Iterate over all bodie's interactions
 		if(!(*it).second->isReal()) continue;
 		ret.append((*it).second);

=== modified file 'core/Body.hpp'
--- core/Body.hpp	2014-05-09 13:25:19 +0000
+++ core/Body.hpp	2014-05-23 13:05:19 +0000
@@ -62,7 +62,7 @@
 		 * (otherwise, GLViewer would depend on Clump and therefore Clump would have to go to core...) */
 		virtual void userForcedDisplacementRedrawHook(){return;}
 
-		python::list py_intrs();
+    boost::python::list py_intrs();
 
 		Body::id_t getId() const {return id;};
 		unsigned int coordNumber();  // Number of neighboring particles

=== modified file 'core/Clump.cpp'
--- core/Clump.cpp	2014-05-16 09:46:02 +0000
+++ core/Clump.cpp	2014-05-23 13:05:19 +0000
@@ -10,10 +10,10 @@
 YADE_PLUGIN((Clump));
 CREATE_LOGGER(Clump);
 
-python::dict Clump::members_get(){
-	python::dict ret;
+boost::python::dict Clump::members_get(){
+  boost::python::dict ret;
 	FOREACH(MemberMap::value_type& b, members){
-		ret[b.first]=python::make_tuple(b.second.position,b.second.orientation);
+		ret[b.first]=boost::python::make_tuple(b.second.position,b.second.orientation);
 	}
 	return ret;
 }
@@ -21,8 +21,8 @@
 void Clump::add(const shared_ptr<Body>& clumpBody, const shared_ptr<Body>& subBody){
 	Body::id_t subId=subBody->getId();
 	const shared_ptr<Clump> clump=YADE_PTR_CAST<Clump>(clumpBody->shape);
-	if(clump->members.count(subId)!=0) throw std::invalid_argument(("Body #"+lexical_cast<string>(subId)+" is already part of this clump #"+lexical_cast<string>(clumpBody->id)).c_str());
-	if(subBody->isClumpMember()) throw std::invalid_argument(("Body #"+lexical_cast<string>(subId)+" is already a clump member of #"+lexical_cast<string>(subBody->clumpId)).c_str());
+	if(clump->members.count(subId)!=0) throw std::invalid_argument(("Body #"+boost::lexical_cast<string>(subId)+" is already part of this clump #"+boost::lexical_cast<string>(clumpBody->id)).c_str());
+	if(subBody->isClumpMember()) throw std::invalid_argument(("Body #"+boost::lexical_cast<string>(subId)+" is already a clump member of #"+boost::lexical_cast<string>(subBody->clumpId)).c_str());
 	else if(subBody->isClump()){
 		const shared_ptr<Clump> subClump=YADE_PTR_CAST<Clump>(subBody->shape);
 		FOREACH(const MemberMap::value_type& mm, subClump->members){
@@ -48,7 +48,7 @@
 void Clump::del(const shared_ptr<Body>& clumpBody, const shared_ptr<Body>& subBody){
 	// erase the subBody; removing body that is not part of the clump throws
 	const shared_ptr<Clump> clump=YADE_PTR_CAST<Clump>(clumpBody->shape);
-	if(clump->members.erase(subBody->id)!=1) throw std::invalid_argument(("Body #"+lexical_cast<string>(subBody->id)+" not part of clump #"+lexical_cast<string>(clumpBody->id)+"; not removing.").c_str());
+	if(clump->members.erase(subBody->id)!=1) throw std::invalid_argument(("Body #"+boost::lexical_cast<string>(subBody->id)+" not part of clump #"+boost::lexical_cast<string>(clumpBody->id)+"; not removing.").c_str());
 	subBody->clumpId=Body::ID_NONE;
 	LOG_DEBUG("Removed body #"<<subBody->id<<" from clump #"<<clumpBody->id);
 }

=== modified file 'core/Clump.hpp'
--- core/Clump.hpp	2014-02-27 08:27:24 +0000
+++ core/Clump.hpp	2014-05-23 13:05:19 +0000
@@ -97,7 +97,7 @@
 		//! Recalculate body's inertia tensor in rotated coordinates.
 		static Matrix3r inertiaTensorRotate(const Matrix3r& I, const Quaternionr& rot);
 
-		python::dict members_get();
+    boost::python::dict members_get();
 	
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Clump,Shape,"Rigid aggregate of bodies",
 		((MemberMap,members,,Attr::hidden,"Ids and relative positions+orientations of members of the clump (should not be accessed directly)"))

=== modified file 'core/Dispatcher.hpp'
--- core/Dispatcher.hpp	2014-05-23 13:03:50 +0000
+++ core/Dispatcher.hpp	2014-05-23 13:05:19 +0000
@@ -46,11 +46,11 @@
 	BOOST_PP_CAT(_YADE_DISPATCHER,BOOST_PP_CAT(Dim,D_FUNCTOR_ADD))(FunctorT,f) \
 	boost::python::list functors_get(void) const { boost::python::list ret; FOREACH(const shared_ptr<FunctorT>& f, functors){ ret.append(f); } return ret; } \
 	void functors_set(const vector<shared_ptr<FunctorT> >& ff){ functors.clear(); FOREACH(const shared_ptr<FunctorT>& f, ff) add(f); postLoad(*this); } \
-	void pyHandleCustomCtorArgs(python::tuple& t, python::dict& d){ if(python::len(t)==0)return; if(python::len(t)!=1) throw invalid_argument("Exactly one list of " BOOST_PP_STRINGIZE(FunctorT) " must be given."); typedef std::vector<shared_ptr<FunctorT> > vecF; vecF vf=boost::python::extract<vecF>(t[0])(); functors_set(vf); t=python::tuple(); } \
+	void pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d){ if(boost::python::len(t)==0)return; if(boost::python::len(t)!=1) throw invalid_argument("Exactly one list of " BOOST_PP_STRINGIZE(FunctorT) " must be given."); typedef std::vector<shared_ptr<FunctorT> > vecF; vecF vf=boost::python::extract<vecF>(t[0])(); functors_set(vf); t=boost::python::tuple(); } \
 	YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(DispatcherT,Dispatcher,"Dispatcher calling :yref:`functors<" BOOST_PP_STRINGIZE(FunctorT) ">` based on received argument type(s).\n\n" doc, \
 		((vector<shared_ptr<FunctorT> >,functors,,,"Functors active in the dispatch mechanism [overridden below].")) /*additional attrs*/ attrs, \
 		/*ctor*/ ctor, /*py*/ py .add_property("functors",&DispatcherT::functors_get,&DispatcherT::functors_set,"Functors associated with this dispatcher." " :yattrtype:`vector<shared_ptr<" BOOST_PP_STRINGIZE(FunctorT) "> >` ") \
-		.def("dispMatrix",&DispatcherT::dump,python::arg("names")=true,"Return dictionary with contents of the dispatch matrix.").def("dispFunctor",&DispatcherT::getFunctor,"Return functor that would be dispatched for given argument(s); None if no dispatch; ambiguous dispatch throws."); \
+		.def("dispMatrix",&DispatcherT::dump,boost::python::arg("names")=true,"Return dictionary with contents of the dispatch matrix.").def("dispFunctor",&DispatcherT::getFunctor,"Return functor that would be dispatched for given argument(s); None if no dispatch; ambiguous dispatch throws."); \
 	)
 
 #define YADE_DISPATCHER1D_FUNCTOR_DOC_ATTRS_CTOR_PY(DispatcherT,FunctorT,doc,attrs,ctor,py) _YADE_DIM_DISPATCHER_FUNCTOR_DOC_ATTRS_CTOR_PY(1,DispatcherT,FunctorT,doc,attrs,ctor,py)
@@ -65,13 +65,13 @@
 s*/
 template<class topIndexable>
 std::string Dispatcher_indexToClassName(int idx){
-	scoped_ptr<topIndexable> top(new topIndexable);
+  boost::scoped_ptr<topIndexable> top(new topIndexable);
 	std::string topName=top->getClassName();
 	typedef std::pair<string,DynlibDescriptor> classItemType;
 	FOREACH(classItemType clss, Omega::instance().getDynlibsDescriptor()){
 		if(Omega::instance().isInheritingFrom_recursive(clss.first,topName) || clss.first==topName){
 			// create instance, to ask for index
-			shared_ptr<topIndexable> inst=dynamic_pointer_cast<topIndexable>(ClassFactory::instance().createShared(clss.first));
+			shared_ptr<topIndexable> inst=boost::dynamic_pointer_cast<topIndexable>(ClassFactory::instance().createShared(clss.first));
 			assert(inst);
 			if(inst->getClassIndex()<0 && inst->getClassName()!=top->getClassName()){
 				throw logic_error("Class "+inst->getClassName()+" didn't use REGISTER_CLASS_INDEX("+inst->getClassName()+","+top->getClassName()+") and/or forgot to call createIndex() in the ctor. [[ Please fix that! ]]");
@@ -88,8 +88,8 @@
 
 //! Return sequence (hierarchy) of class indices of given indexable; optionally convert to names
 template<typename TopIndexable>
-python::list Indexable_getClassIndices(const shared_ptr<TopIndexable> i, bool convertToNames){
-	int depth=1; python::list ret; int idx0=i->getClassIndex();
+boost::python::list Indexable_getClassIndices(const shared_ptr<TopIndexable> i, bool convertToNames){
+	int depth=1; boost::python::list ret; int idx0=i->getClassIndex();
 	if(convertToNames) ret.append(Dispatcher_indexToClassName<TopIndexable>(idx0));
 	else ret.append(idx0);
 	if(idx0<0) return ret; // don't continue and call getBaseClassIndex(), since we are at the top already
@@ -107,7 +107,7 @@
 template<typename DispatcherT>
 std::vector<shared_ptr<typename DispatcherT::functorType> > Dispatcher_functors_get(shared_ptr<DispatcherT> self){
 	std::vector<shared_ptr<typename DispatcherT::functorType> > ret;
-	FOREACH(const shared_ptr<Functor>& functor, self->functors){ shared_ptr<typename DispatcherT::functorType> functorRightType(dynamic_pointer_cast<typename DispatcherT::functorType>(functor)); if(!functorRightType) throw logic_error("Internal error: Dispatcher of type "+self->getClassName()+" did not contain Functor of the required type "+typeid(typename DispatcherT::functorType).name()+"?"); ret.push_back(functorRightType); }
+	FOREACH(const shared_ptr<Functor>& functor, self->functors){ shared_ptr<typename DispatcherT::functorType> functorRightType(boost::dynamic_pointer_cast<typename DispatcherT::functorType>(functor)); if(!functorRightType) throw logic_error("Internal error: Dispatcher of type "+self->getClassName()+" did not contain Functor of the required type "+typeid(typename DispatcherT::functorType).name()+"?"); ret.push_back(functorRightType); }
 	return ret;
 }
 
@@ -150,13 +150,13 @@
 		typedef DynLibDispatcher<TYPELIST_1(baseClass),FunctorType,typename FunctorType::ReturnType,typename FunctorType::ArgumentTypes,autoSymmetry> dispatcherBase;
 
 		shared_ptr<FunctorType> getFunctor(shared_ptr<baseClass> arg){ return dispatcherBase::getExecutor(arg); }
-		python::dict dump(bool convertIndicesToNames){
-			python::dict ret;
+    boost::python::dict dump(bool convertIndicesToNames){
+      boost::python::dict ret;
 			FOREACH(const DynLibDispatcher_Item1D& item, dispatcherBase::dataDispatchMatrix1D()){
 				if(convertIndicesToNames){
 					string arg1=Dispatcher_indexToClassName<argType1>(item.ix1);
-					ret[python::make_tuple(arg1)]=item.functorName;
-				} else ret[python::make_tuple(item.ix1)]=item.functorName;
+					ret[boost::python::make_tuple(arg1)]=item.functorName;
+				} else ret[boost::python::make_tuple(item.ix1)]=item.functorName;
 			}
 			return ret;
 		}
@@ -201,13 +201,13 @@
 		typedef FunctorType functorType;
 		typedef DynLibDispatcher<TYPELIST_2(baseClass1,baseClass2),FunctorType,typename FunctorType::ReturnType,typename FunctorType::ArgumentTypes,autoSymmetry> dispatcherBase;
 		shared_ptr<FunctorType> getFunctor(shared_ptr<baseClass1> arg1, shared_ptr<baseClass2> arg2){ return dispatcherBase::getExecutor(arg1,arg2); }
-		python::dict dump(bool convertIndicesToNames){
-			python::dict ret;
+    boost::python::dict dump(bool convertIndicesToNames){
+      boost::python::dict ret;
 			FOREACH(const DynLibDispatcher_Item2D& item, dispatcherBase::dataDispatchMatrix2D()){
 				if(convertIndicesToNames){
 					string arg1=Dispatcher_indexToClassName<argType1>(item.ix1), arg2=Dispatcher_indexToClassName<argType2>(item.ix2);
-					ret[python::make_tuple(arg1,arg2)]=item.functorName;
-				} else ret[python::make_tuple(item.ix1,item.ix2)]=item.functorName;
+					ret[boost::python::make_tuple(arg1,arg2)]=item.functorName;
+				} else ret[boost::python::make_tuple(item.ix1,item.ix2)]=item.functorName;
 			}
 			return ret;
 		}

=== modified file 'core/FileGenerator.hpp'
--- core/FileGenerator.hpp	2010-11-07 11:46:20 +0000
+++ core/FileGenerator.hpp	2014-05-23 13:05:19 +0000
@@ -31,7 +31,7 @@
 		/*attrs*/,
 		/*ctor*/
 		,
-		.def("generate",&FileGenerator::pyGenerate,(python::arg("out")),"Generate scene, save to given file")
+		.def("generate",&FileGenerator::pyGenerate,(boost::python::arg("out")),"Generate scene, save to given file")
 		.def("load",&FileGenerator::pyLoad,"Generate scene, save to temporary file and load immediately");
 	);
 	DECLARE_LOGGER;

=== modified file 'core/Functor.hpp'
--- core/Functor.hpp	2013-09-27 12:11:28 +0000
+++ core/Functor.hpp	2014-05-23 13:05:19 +0000
@@ -50,7 +50,7 @@
 {
 	public:
 		typedef _DispatchType1 DispatchType1; typedef _ReturnType ReturnType; typedef _ArgumentTypes ArgumentTypes; 
-		#define FUNCTOR1D(type1) public: std::string get1DFunctorType1(void){return string(#type1);} int checkArgTypes(const shared_ptr<DispatchType1>& arg1){ return (bool)dynamic_pointer_cast<type1>(arg1)?1:0; }
+		#define FUNCTOR1D(type1) public: std::string get1DFunctorType1(void){return string(#type1);} int checkArgTypes(const shared_ptr<DispatchType1>& arg1){ return (bool)boost::dynamic_pointer_cast<type1>(arg1)?1:0; }
 		virtual std::string get1DFunctorType1(void){throw runtime_error("Class "+this->getClassName()+" did not use FUNCTOR1D to declare its argument type?"); }
 		virtual vector<string> getFunctorTypes(void){vector<string> ret; ret.push_back(get1DFunctorType1()); return ret;};
 		// check that the object can be correctly cast to the derived class handled by the functor (will be used if ever utils.createInteraction can be called with list of functors only)
@@ -72,7 +72,7 @@
 {
 	public:
 		typedef _DispatchType1 DispatchType1; typedef _DispatchType2 DispatchType2; typedef _ReturnType ReturnType; typedef _ArgumentTypes ArgumentTypes; 
-		#define FUNCTOR2D(type1,type2) public: std::string get2DFunctorType1(void){return string(#type1);}; std::string get2DFunctorType2(void){return string(#type2);}; int checkArgTypes(const shared_ptr<DispatchType1>& arg1, const shared_ptr<DispatchType2>& arg2){ if(dynamic_pointer_cast<type1>(arg1)&&dynamic_pointer_cast<type2>(arg2)) return 1; if(dynamic_pointer_cast<type1>(arg2)&&dynamic_pointer_cast<type2>(arg1)) return -1; return 0; }
+		#define FUNCTOR2D(type1,type2) public: std::string get2DFunctorType1(void){return string(#type1);}; std::string get2DFunctorType2(void){return string(#type2);}; int checkArgTypes(const shared_ptr<DispatchType1>& arg1, const shared_ptr<DispatchType2>& arg2){ if(boost::dynamic_pointer_cast<type1>(arg1)&&boost::dynamic_pointer_cast<type2>(arg2)) return 1; if(boost::dynamic_pointer_cast<type1>(arg2)&&boost::dynamic_pointer_cast<type2>(arg1)) return -1; return 0; }
 		virtual std::string get2DFunctorType1(void){throw logic_error("Class "+this->getClassName()+" did not use FUNCTOR2D to declare its argument types?");}
 		virtual std::string get2DFunctorType2(void){throw logic_error("Class "+this->getClassName()+" did not use FUNCTOR2D to declare its argument types?");}
 		virtual vector<string> getFunctorTypes(){vector<string> ret; ret.push_back(get2DFunctorType1()); ret.push_back(get2DFunctorType2()); return ret;};

=== modified file 'core/InteractionContainer.cpp'
--- core/InteractionContainer.cpp	2014-02-03 11:21:42 +0000
+++ core/InteractionContainer.cpp	2014-05-23 13:05:19 +0000
@@ -79,7 +79,7 @@
 		}
 	}
 	if(linIx<0) {
-		LOG_ERROR("InteractionContainer::erase: attempt to delete interaction with a deleted body (the definition of linPos in the call to erase() should fix the problem) for  ##"+lexical_cast<string>(id1)+"+"+lexical_cast<string>(id2));
+		LOG_ERROR("InteractionContainer::erase: attempt to delete interaction with a deleted body (the definition of linPos in the call to erase() should fix the problem) for  ##"+boost::lexical_cast<string>(id1)+"+"+boost::lexical_cast<string>(id2));
 		return false;}
 	// iid is not the last element; we have to move last one to its place
 	if (linIx<(int)currSize-1) {

=== modified file 'core/Omega.cpp'
--- core/Omega.cpp	2014-05-23 13:03:50 +0000
+++ core/Omega.cpp	2014-05-23 13:05:19 +0000
@@ -82,14 +82,14 @@
 }
 
 void Omega::cleanupTemps(){
-	filesystem::path tmpPath(tmpFileDir);
-	filesystem::remove_all(tmpPath);
+  boost::filesystem::path tmpPath(tmpFileDir);
+  boost::filesystem::remove_all(tmpPath);
 }
 
 std::string Omega::tmpFilename(){
 	if(tmpFileDir.empty()) throw runtime_error("tmpFileDir empty; Omega::initTemps not yet called()?");
 	boost::mutex::scoped_lock lock(tmpFileCounterMutex);
-	return tmpFileDir+"/tmp-"+lexical_cast<string>(tmpFileCounter++);
+	return tmpFileDir+"/tmp-"+boost::lexical_cast<string>(tmpFileCounter++);
 }
 
 void Omega::reset(){
@@ -145,9 +145,9 @@
 		try {
 			LOG_DEBUG("Factoring plugin "<<name);
 			f = ClassFactory::instance().createShared(name);
-			dynlibs[name].isIndexable    = dynamic_pointer_cast<Indexable>(f);
-			dynlibs[name].isFactorable   = dynamic_pointer_cast<Factorable>(f);
-			dynlibs[name].isSerializable = dynamic_pointer_cast<Serializable>(f);
+			dynlibs[name].isIndexable    = boost::dynamic_pointer_cast<Indexable>(f);
+			dynlibs[name].isFactorable   = boost::dynamic_pointer_cast<Factorable>(f);
+			dynlibs[name].isSerializable = boost::dynamic_pointer_cast<Serializable>(f);
 			for(int i=0;i<f->getBaseClassNumber();i++){
 				dynlibs[name].baseClasses.insert(f->getBaseClassName(i));
 			}
@@ -236,8 +236,8 @@
 }
 
 void Omega::loadSimulation(const string& f, bool quiet){
-	bool isMem=algorithm::starts_with(f,":memory:");
-	if(!isMem && !filesystem::exists(f)) throw runtime_error("Simulation file to load doesn't exist: "+f);
+	bool isMem=boost::algorithm::starts_with(f,":memory:");
+	if(!isMem && !boost::filesystem::exists(f)) throw runtime_error("Simulation file to load doesn't exist: "+f);
 	if(isMem && memSavedSimulations.count(f)==0) throw runtime_error("Cannot load nonexistent memory-saved simulation "+f);
 	
 	if(!quiet) LOG_INFO("Loading file "+f);
@@ -269,7 +269,7 @@
 	//shared_ptr<Scene> scene = getScene();
 	shared_ptr<Scene>& scene = scenes[currentSceneNb];
 	//shared_ptr<Scene>& scene = getScene();
-	if(algorithm::starts_with(f,":memory:")){
+	if(boost::algorithm::starts_with(f,":memory:")){
 		if(memSavedSimulations.count(f)>0 && !quiet) LOG_INFO("Overwriting in-memory saved simulation "<<f);
 		ostringstream oss;
 		yade::ObjectIO::save<typeof(scene),boost::archive::binary_oarchive>(oss,"scene",scene);

=== modified file 'core/Scene.cpp'
--- core/Scene.cpp	2014-05-08 05:57:04 +0000
+++ core/Scene.cpp	2014-05-23 13:05:19 +0000
@@ -46,7 +46,7 @@
 	string gecos(pw->pw_gecos), gecos2; size_t p=gecos.find(","); if(p!=string::npos) boost::algorithm::erase_tail(gecos,gecos.size()-p); for(size_t i=0;i<gecos.size();i++){gecos2.push_back(((unsigned char)gecos[i])<128 ? gecos[i] : '?'); }
 	tags.push_back(boost::algorithm::replace_all_copy(string("author=")+gecos2+" ("+string(pw->pw_name)+"@"+hostname+")"," ","~"));
 	tags.push_back(string("isoTime="+boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time())));
-	string id=boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time())+"p"+lexical_cast<string>(getpid());
+	string id=boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time())+"p"+boost::lexical_cast<string>(getpid());
 	tags.push_back("id="+id);
 	tags.push_back("d.id="+id);
 	tags.push_back("id.d="+id);
@@ -150,7 +150,7 @@
 bool Scene::timeStepperPresent(){
 	int n=0;
 	FOREACH(const shared_ptr<Engine>&e, engines){ if(dynamic_cast<TimeStepper*>(e.get())) n++; }
-	if(n>1) throw std::runtime_error(string("Multiple ("+lexical_cast<string>(n)+") TimeSteppers in the simulation?!").c_str());
+	if(n>1) throw std::runtime_error(string("Multiple ("+boost::lexical_cast<string>(n)+") TimeSteppers in the simulation?!").c_str());
 	return n>0;
 }
 
@@ -159,7 +159,7 @@
 	FOREACH(const shared_ptr<Engine>&e, engines){
 		TimeStepper* ts=dynamic_cast<TimeStepper*>(e.get()); if(ts) { ret=ts->active; n++; }
 	}
-	if(n>1) throw std::runtime_error(string("Multiple ("+lexical_cast<string>(n)+") TimeSteppers in the simulation?!").c_str());
+	if(n>1) throw std::runtime_error(string("Multiple ("+boost::lexical_cast<string>(n)+") TimeSteppers in the simulation?!").c_str());
 	return ret;
 }
 
@@ -169,7 +169,7 @@
 		TimeStepper* ts=dynamic_cast<TimeStepper*>(e.get());
 		if(ts) { ts->setActive(a); n++; }
 	}
-	if(n>1) throw std::runtime_error(string("Multiple ("+lexical_cast<string>(n)+") TimeSteppers in the simulation?!").c_str());
+	if(n>1) throw std::runtime_error(string("Multiple ("+boost::lexical_cast<string>(n)+") TimeSteppers in the simulation?!").c_str());
 	return n>0;
 }
 
@@ -178,9 +178,9 @@
 void Scene::checkStateTypes(){
 	FOREACH(const shared_ptr<Body>& b, *bodies){
 		if(!b || !b->material) continue;
-		if(b->material && !b->state) throw std::runtime_error("Body #"+lexical_cast<string>(b->getId())+": has Body::material, but NULL Body::state.");
+		if(b->material && !b->state) throw std::runtime_error("Body #"+boost::lexical_cast<string>(b->getId())+": has Body::material, but NULL Body::state.");
 		if(!b->material->stateTypeOk(b->state.get())){
-			throw std::runtime_error("Body #"+lexical_cast<string>(b->getId())+": Body::material type "+b->material->getClassName()+" doesn't correspond to Body::state type "+b->state->getClassName()+" (should be "+b->material->newAssocState()->getClassName()+" instead).");
+			throw std::runtime_error("Body #"+boost::lexical_cast<string>(b->getId())+": Body::material type "+b->material->getClassName()+" doesn't correspond to Body::state type "+b->state->getClassName()+" (should be "+b->material->newAssocState()->getClassName()+" instead).");
 		}
 	}
 }

=== modified file 'core/State.cpp'
--- core/State.cpp	2014-05-13 15:07:07 +0000
+++ core/State.cpp	2014-05-23 13:05:19 +0000
@@ -27,6 +27,6 @@
 			#define _GET_DOF(DOF_ANY,ch) if(c==ch) { blockedDOFs|=State::DOF_ANY; continue; }
 			_GET_DOF(DOF_X,'x'); _GET_DOF(DOF_Y,'y'); _GET_DOF(DOF_Z,'z'); _GET_DOF(DOF_RX,'X'); _GET_DOF(DOF_RY,'Y'); _GET_DOF(DOF_RZ,'Z');
 			#undef _GET_DOF
-			throw std::invalid_argument("Invalid  DOF specification `"+lexical_cast<string>(c)+"' in '"+dofs+"', characters must be ∈{x,y,z,X,Y,Z}.");
+			throw std::invalid_argument("Invalid  DOF specification `"+boost::lexical_cast<string>(c)+"' in '"+dofs+"', characters must be ∈{x,y,z,X,Y,Z}.");
 	}
 }

=== modified file 'gui/qt4/GLViewer.cpp'
--- gui/qt4/GLViewer.cpp	2014-05-23 13:03:50 +0000
+++ gui/qt4/GLViewer.cpp	2014-05-23 13:05:19 +0000
@@ -62,7 +62,7 @@
 	resize(550,550);
 	last=-1;
 	if(viewId==0) setWindowTitle("Primary view");
-	else setWindowTitle(("Secondary view #"+lexical_cast<string>(viewId)).c_str());
+	else setWindowTitle(("Secondary view #"+boost::lexical_cast<string>(viewId)).c_str());
 
 	show();
 	
@@ -132,7 +132,7 @@
 	const Se3r se3(renderer->clipPlaneSe3[planeNo]);
 	manipulatedFrame()->setPositionAndOrientation(qglviewer::Vec(se3.position[0],se3.position[1],se3.position[2]),qglviewer::Quaternion(se3.orientation.x(),se3.orientation.y(),se3.orientation.z(),se3.orientation.w()));
 	string grp=strBoundGroup();
-	displayMessage("Manipulating clip plane #"+lexical_cast<string>(planeNo+1)+(grp.empty()?grp:" (bound planes:"+grp+")"));
+	displayMessage("Manipulating clip plane #"+boost::lexical_cast<string>(planeNo+1)+(grp.empty()?grp:" (bound planes:"+grp+")"));
 }
 
 string GLViewer::getState(){
@@ -169,7 +169,7 @@
 		else { resetManipulation(); displayMessage("Manipulating scene."); }
 	}
 	else if(e->key()==Qt::Key_Space){
-		if(manipulatedClipPlane>=0) {displayMessage("Clip plane #"+lexical_cast<string>(manipulatedClipPlane+1)+(renderer->clipPlaneActive[manipulatedClipPlane]?" de":" ")+"activated"); renderer->clipPlaneActive[manipulatedClipPlane]=!renderer->clipPlaneActive[manipulatedClipPlane]; }
+		if(manipulatedClipPlane>=0) {displayMessage("Clip plane #"+boost::lexical_cast<string>(manipulatedClipPlane+1)+(renderer->clipPlaneActive[manipulatedClipPlane]?" de":" ")+"activated"); renderer->clipPlaneActive[manipulatedClipPlane]=!renderer->clipPlaneActive[manipulatedClipPlane]; }
 		else{ centerMedianQuartile(); }
 	}
 	/* function keys */
@@ -184,8 +184,8 @@
 		int n=0; if(e->key()==Qt::Key_1) n=1; else if(e->key()==Qt::Key_2) n=2; else if(e->key()==Qt::Key_3) n=3; assert(n>0); int planeId=n-1;
 		if(planeId>=renderer->numClipPlanes) return; // no such clipping plane
 		if(e->modifiers() & Qt::AltModifier){
-			if(boundClipPlanes.count(planeId)==0) {boundClipPlanes.insert(planeId); displayMessage("Added plane #"+lexical_cast<string>(planeId+1)+" to the bound group: "+strBoundGroup());}
-			else {boundClipPlanes.erase(planeId); displayMessage("Removed plane #"+lexical_cast<string>(planeId+1)+" from the bound group: "+strBoundGroup());}
+			if(boundClipPlanes.count(planeId)==0) {boundClipPlanes.insert(planeId); displayMessage("Added plane #"+boost::lexical_cast<string>(planeId+1)+" to the bound group: "+strBoundGroup());}
+			else {boundClipPlanes.erase(planeId); displayMessage("Removed plane #"+boost::lexical_cast<string>(planeId+1)+" from the bound group: "+strBoundGroup());}
 		}
 		else if(manipulatedClipPlane>=0 && manipulatedClipPlane!=planeId) {
 			const Quaternionr& o=renderer->clipPlaneSe3[planeId].orientation;
@@ -232,7 +232,7 @@
 			Quaternionr& ori=renderer->clipPlaneSe3[manipulatedClipPlane].orientation;
 			ori=Quaternionr(AngleAxisr(Mathr::PI,Vector3r(0,1,0)))*ori; 
 			manipulatedFrame()->setOrientation(qglviewer::Quaternion(qglviewer::Vec(0,1,0),Mathr::PI)*manipulatedFrame()->orientation());
-			displayMessage("Plane #"+lexical_cast<string>(manipulatedClipPlane+1)+" reversed.");
+			displayMessage("Plane #"+boost::lexical_cast<string>(manipulatedClipPlane+1)+" reversed.");
 		}
 		else {
 			camera()->setRevolveAroundPoint(sceneCenter());
@@ -277,17 +277,17 @@
 	else if( e->key()==Qt::Key_Plus ){
 			cut_plane = std::min(1.0, cut_plane + std::pow(10.0,(double)cut_plane_delta));
 			static_cast<YadeCamera*>(camera())->setCuttingDistance(cut_plane);
-			displayMessage("Cut plane: "+lexical_cast<std::string>(cut_plane));
+			displayMessage("Cut plane: "+boost::lexical_cast<std::string>(cut_plane));
 	}else if( e->key()==Qt::Key_Minus ){
 			cut_plane = std::max(0.0, cut_plane - std::pow(10.0,(double)cut_plane_delta));
 			static_cast<YadeCamera*>(camera())->setCuttingDistance(cut_plane);
-			displayMessage("Cut plane: "+lexical_cast<std::string>(cut_plane));
+			displayMessage("Cut plane: "+boost::lexical_cast<std::string>(cut_plane));
 	}else if( e->key()==Qt::Key_Slash ){
 			cut_plane_delta -= 1;
-			displayMessage("Cut plane increment: 1e"+(cut_plane_delta>0?std::string("+"):std::string(""))+lexical_cast<std::string>(cut_plane_delta));
+			displayMessage("Cut plane increment: 1e"+(cut_plane_delta>0?std::string("+"):std::string(""))+boost::lexical_cast<std::string>(cut_plane_delta));
 	}else if( e->key()==Qt::Key_Asterisk ){
 			cut_plane_delta = std::min(1+cut_plane_delta,-1);
-			displayMessage("Cut plane increment: 1e"+(cut_plane_delta>0?std::string("+"):std::string(""))+lexical_cast<std::string>(cut_plane_delta));
+			displayMessage("Cut plane increment: 1e"+(cut_plane_delta>0?std::string("+"):std::string(""))+boost::lexical_cast<std::string>(cut_plane_delta));
 	}
 #endif
 
@@ -399,16 +399,16 @@
 		
 		setSelectedName(selection);
 		LOG_DEBUG("New selection "<<selection);
-		displayMessage("Selected body #"+lexical_cast<string>(selection)+(Body::byId(selection)->isClump()?" (clump)":""));
+		displayMessage("Selected body #"+boost::lexical_cast<string>(selection)+(Body::byId(selection)->isClump()?" (clump)":""));
 		Omega::instance().getScene()->selectedBody = selection;
 			PyGILState_STATE gstate;
 			gstate = PyGILState_Ensure();
-				python::object main=python::import("__main__");
-				python::object global=main.attr("__dict__");
+      boost::python::object main=boost::python::import("__main__");
+      boost::python::object global=main.attr("__dict__");
 				// the try/catch block must be properly nested inside PyGILState_Ensure and PyGILState_Release
 				try{
-					python::eval(string("onBodySelect("+lexical_cast<string>(selection)+")").c_str(),global,global);
-				} catch (python::error_already_set const &) {
+          boost::python::eval(string("onBodySelect("+boost::lexical_cast<string>(selection)+")").c_str(),global,global);
+				} catch (boost::python::error_already_set const &) {
 					LOG_DEBUG("unable to call onBodySelect. Not defined?");
 				}
 			PyGILState_Release(gstate);

=== modified file 'gui/qt4/GLViewer.hpp'
--- gui/qt4/GLViewer.hpp	2014-03-08 21:19:02 +0000
+++ gui/qt4/GLViewer.hpp	2014-05-23 13:05:19 +0000
@@ -54,7 +54,7 @@
 		int manipulatedClipPlane;
 		set<int> boundClipPlanes;
 		shared_ptr<qglviewer::LocalConstraint> xyPlaneConstraint;
-		string strBoundGroup(){string ret;FOREACH(int i, boundClipPlanes) ret+=" "+lexical_cast<string>(i+1);return ret;}
+		string strBoundGroup(){string ret;FOREACH(int i, boundClipPlanes) ret+=" "+boost::lexical_cast<string>(i+1);return ret;}
 		boost::posix_time::ptime last_user_event;
 
      public:

=== modified file 'gui/qt4/GLViewerDisplay.cpp'
--- gui/qt4/GLViewerDisplay.cpp	2014-05-23 13:03:50 +0000
+++ gui/qt4/GLViewerDisplay.cpp	2014-05-23 13:05:19 +0000
@@ -38,14 +38,14 @@
 void GLViewer::useDisplayParameters(size_t n){
 	LOG_DEBUG("Loading display parameters from #"<<n);
 	vector<shared_ptr<DisplayParameters> >& dispParams=Omega::instance().getScene()->dispParams;
-	if(dispParams.size()<=(size_t)n){ throw std::invalid_argument(("Display parameters #"+lexical_cast<string>(n)+" don't exist (number of entries "+lexical_cast<string>(dispParams.size())+")").c_str());; return;}
+	if(dispParams.size()<=(size_t)n){ throw std::invalid_argument(("Display parameters #"+boost::lexical_cast<string>(n)+" don't exist (number of entries "+boost::lexical_cast<string>(dispParams.size())+")").c_str());; return;}
 	const shared_ptr<DisplayParameters>& dp=dispParams[n];
 	string val;
 	if(dp->getValue("OpenGLRenderer",val)){ istringstream oglre(val);
 		yade::ObjectIO::load<typeof(renderer),boost::archive::xml_iarchive>(oglre,"renderer",renderer);
 	}
 	else { LOG_WARN("OpenGLRenderer configuration not found in display parameters, skipped.");}
-	if(dp->getValue("GLViewer",val)){ GLViewer::setState(val); displayMessage("Loaded view configuration #"+lexical_cast<string>(n)); }
+	if(dp->getValue("GLViewer",val)){ GLViewer::setState(val); displayMessage("Loaded view configuration #"+boost::lexical_cast<string>(n)); }
 	else { LOG_WARN("GLViewer configuration not found in display parameters, skipped."); }
 }
 
@@ -58,7 +58,7 @@
 	yade::ObjectIO::save<typeof(renderer),boost::archive::xml_oarchive>(oglre,"renderer",renderer);
 	dp->setValue("OpenGLRenderer",oglre.str());
 	dp->setValue("GLViewer",GLViewer::getState());
-	displayMessage("Saved view configuration ot #"+lexical_cast<string>(n));
+	displayMessage("Saved view configuration ot #"+boost::lexical_cast<string>(n));
 }
 
 void GLViewer::draw()

=== modified file 'gui/qt4/_GLViewer.cpp'
--- gui/qt4/_GLViewer.cpp	2012-11-01 21:42:22 +0000
+++ gui/qt4/_GLViewer.cpp	2014-05-23 13:05:19 +0000
@@ -9,13 +9,13 @@
 
 namespace py=boost::python;
 
-qglviewer::Vec tuple2vec(py::tuple t){ qglviewer::Vec ret; for(int i=0;i<3;i++){py::extract<Real> e(t[i]); if(!e.check()) throw invalid_argument("Element #"+lexical_cast<string>(i)+" is not a number"); ret[i]=e();} return ret;};
+qglviewer::Vec tuple2vec(py::tuple t){ qglviewer::Vec ret; for(int i=0;i<3;i++){py::extract<Real> e(t[i]); if(!e.check()) throw invalid_argument("Element #"+boost::lexical_cast<string>(i)+" is not a number"); ret[i]=e();} return ret;};
 py::tuple vec2tuple(qglviewer::Vec v){return py::make_tuple(v[0],v[1],v[2]);};
 
 class pyGLViewer{
 	const size_t viewNo;
 	public:
-		#define GLV if((OpenGLManager::self->views.size()<=viewNo) || !(OpenGLManager::self->views[viewNo])) throw runtime_error("No view #"+lexical_cast<string>(viewNo)); GLViewer* glv=OpenGLManager::self->views[viewNo].get();
+		#define GLV if((OpenGLManager::self->views.size()<=viewNo) || !(OpenGLManager::self->views[viewNo])) throw runtime_error("No view #"+boost::lexical_cast<string>(viewNo)); GLViewer* glv=OpenGLManager::self->views[viewNo].get();
 		pyGLViewer(size_t _viewNo=0): viewNo(_viewNo){}
 		void close(){ GLV; QCloseEvent* e(new QCloseEvent); QApplication::postEvent(glv,e); }
 		py::tuple get_grid(){GLV; return py::make_tuple(bool(glv->drawGrid & 1),bool(glv->drawGrid & 2),bool(glv->drawGrid & 4));}
@@ -40,7 +40,7 @@
 		void center(bool median){GLV;  if(median)glv->centerMedianQuartile(); else glv->centerScene();}
 		Vector2i get_screenSize(){GLV;  return Vector2i(glv->width(),glv->height());}
 		void set_screenSize(Vector2i t){ /*GLV;*/ OpenGLManager::self->emitResizeView(viewNo,t[0],t[1]);}
-		string pyStr(){return string("<GLViewer for view #")+lexical_cast<string>(viewNo)+">";}
+		string pyStr(){return string("<GLViewer for view #")+boost::lexical_cast<string>(viewNo)+">";}
 		void saveDisplayParameters(size_t n){GLV;  glv->saveDisplayParameters(n);}
 		void useDisplayParameters(size_t n){GLV;  glv->useDisplayParameters(n);}
 		string get_timeDisp(){GLV;  const int& m(glv->timeDispMask); string ret; if(m&GLViewer::TIME_REAL) ret+='r'; if(m&GLViewer::TIME_VIRT) ret+="v"; if(m&GLViewer::TIME_ITER) ret+="i"; return ret;}

=== modified file 'lib/multimethods/DynLibDispatcher.hpp'
--- lib/multimethods/DynLibDispatcher.hpp	2010-11-07 11:46:20 +0000
+++ lib/multimethods/DynLibDispatcher.hpp	2014-05-23 13:05:19 +0000
@@ -37,8 +37,6 @@
 
 
 using namespace std;
-using namespace boost;
-
 
 struct DynLibDispatcher_Item2D{ int ix1, ix2; std::string functorName; DynLibDispatcher_Item2D(int a, int b, std::string c):ix1(a),ix2(b),functorName(c){}; };
 struct DynLibDispatcher_Item1D{ int ix1     ; std::string functorName; DynLibDispatcher_Item1D(int a,        std::string c):ix1(a),       functorName(c){}; };
@@ -184,13 +182,13 @@
 
 		shared_ptr<Executor> getExecutor(shared_ptr<BaseClass1>& arg1){
 		  	int ix1;
-			if(arg1->getClassIndex()<0) throw runtime_error("No functor for type "+arg1->getClassName()+" (index "+lexical_cast<string>(arg1->getClassIndex())+"), since the index is invalid (negative).");
+			if(arg1->getClassIndex()<0) throw runtime_error("No functor for type "+arg1->getClassName()+" (index "+boost::lexical_cast<string>(arg1->getClassIndex())+"), since the index is invalid (negative).");
 			if(locateMultivirtualFunctor1D(ix1,arg1)) return callBacks[ix1];
 			return shared_ptr<Executor>();
 		}
 
 		shared_ptr<Executor> getExecutor(shared_ptr<BaseClass1>& arg1, shared_ptr<BaseClass2>& arg2){
-			if(arg1->getClassIndex()<0 || arg2->getClassIndex()<0) throw runtime_error("No functor for types "+arg1->getClassName()+" (index "+lexical_cast<string>(arg1->getClassIndex())+") + "+arg2->getClassName()+" (index "+lexical_cast<string>(arg2->getClassIndex())+"), since some of the indices is invalid (negative).");
+			if(arg1->getClassIndex()<0 || arg2->getClassIndex()<0) throw runtime_error("No functor for types "+arg1->getClassName()+" (index "+boost::lexical_cast<string>(arg1->getClassIndex())+") + "+arg2->getClassName()+" (index "+boost::lexical_cast<string>(arg2->getClassIndex())+"), since some of the indices is invalid (negative).");
 			int ix1,ix2;
 			if(locateMultivirtualFunctor2D(ix1,ix2,arg1,arg2)) return callBacks[ix1][ix2];
 			return shared_ptr<Executor>();

=== modified file 'pkg/common/Collider.cpp'
--- pkg/common/Collider.cpp	2012-11-08 13:03:30 +0000
+++ pkg/common/Collider.cpp	2014-05-23 13:05:19 +0000
@@ -26,19 +26,19 @@
 	;
 }
 
-void Collider::pyHandleCustomCtorArgs(python::tuple& t, python::dict& d){
-	if(python::len(t)==0) return; // nothing to do
-	if(python::len(t)!=1) throw invalid_argument(("Collider optionally takes exactly one list of BoundFunctor's as non-keyword argument for constructor ("+lexical_cast<string>(python::len(t))+" non-keyword ards given instead)").c_str());
+void Collider::pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d){
+	if(boost::python::len(t)==0) return; // nothing to do
+	if(boost::python::len(t)!=1) throw invalid_argument(("Collider optionally takes exactly one list of BoundFunctor's as non-keyword argument for constructor ("+boost::lexical_cast<string>(boost::python::len(t))+" non-keyword ards given instead)").c_str());
 	typedef std::vector<shared_ptr<BoundFunctor> > vecBound;
-	vecBound vb=python::extract<vecBound>(t[0])();
+	vecBound vb=boost::python::extract<vecBound>(t[0])();
 	FOREACH(shared_ptr<BoundFunctor> bf, vb) this->boundDispatcher->add(bf);
-	t=python::tuple(); // empty the args
+	t=boost::python::tuple(); // empty the args
 }
 
 void Collider::findBoundDispatcherInEnginesIfNoFunctorsAndWarn(){
 	if(boundDispatcher->functors.size()>0) return;
 	shared_ptr<BoundDispatcher> bd;
-	FOREACH(shared_ptr<Engine>& e, scene->engines){ bd=dynamic_pointer_cast<BoundDispatcher>(e); if(bd) break; }
+	FOREACH(shared_ptr<Engine>& e, scene->engines){ bd=boost::dynamic_pointer_cast<BoundDispatcher>(e); if(bd) break; }
 	if(!bd) return;
 	LOG_WARN("Collider.boundDispatcher had no functors defined, while there was a BoundDispatcher found in O.engines. Since version 0.60 (r2396), Collider has boundDispatcher integrated in itself; separate BoundDispatcher should not be used anymore. For now, I will fix it for you, but change your script! Where it reads e.g.\n\n\tO.engines=[...,\n\t\tBoundDispatcher([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),\n\t\t"<<getClassName()<<"(),\n\t\t...\n\t]\n\nit should become\n\n\tO.engines=[...,\n\t\t"<<getClassName()<<"([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),\n\t\t...\n\t]\n\ninstead.")
 	boundDispatcher=bd;

=== modified file 'pkg/common/Collider.hpp'
--- pkg/common/Collider.hpp	2012-11-08 13:03:30 +0000
+++ pkg/common/Collider.hpp	2014-05-23 13:05:19 +0000
@@ -32,7 +32,7 @@
 		virtual void invalidatePersistentData(){}
 
 		// ctor with functors for the integrated BoundDispatcher
-		virtual void pyHandleCustomCtorArgs(python::tuple& t, python::dict& d);
+		virtual void pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d);
 
 		// backwards-compatility func, can be removed later
 		void findBoundDispatcherInEnginesIfNoFunctorsAndWarn();
@@ -48,4 +48,4 @@
 		
 	);
 };
-REGISTER_SERIALIZABLE(Collider);
\ No newline at end of file
+REGISTER_SERIALIZABLE(Collider);

=== modified file 'pkg/common/Cylinder.hpp'
--- pkg/common/Cylinder.hpp	2014-05-06 15:32:52 +0000
+++ pkg/common/Cylinder.hpp	2014-05-23 13:05:19 +0000
@@ -91,7 +91,7 @@
 		/*py*/
 // 		.def_readwrite("chains",&ChainedState::chains,"documentation")
 		.def_readwrite("currentChain",&ChainedState::currentChain,"Current active chain (where newly created chained bodies will be appended).")
-		.def("addToChain",&ChainedState::addToChain,(python::arg("bodyId")),"Add body to current active chain")
+		.def("addToChain",&ChainedState::addToChain,(boost::python::arg("bodyId")),"Add body to current active chain")
 	);
 	REGISTER_CLASS_INDEX(ChainedState,State);
 };

=== modified file 'pkg/common/Facet.cpp'
--- pkg/common/Facet.cpp	2013-09-08 11:12:42 +0000
+++ pkg/common/Facet.cpp	2014-05-23 13:05:19 +0000
@@ -19,7 +19,7 @@
 	// if this fails, it means someone did vertices push_back, but they are resized to 3 at Facet initialization already
 	// in the future, a fixed-size array should be used instead of vector<Vector3r> for vertices
 	// this is prevented by yade::serialization now IIRC
-	if(vertices.size()!=3){ throw runtime_error(("Facet must have exactly 3 vertices (not "+lexical_cast<string>(vertices.size())+")").c_str()); }
+	if(vertices.size()!=3){ throw runtime_error(("Facet must have exactly 3 vertices (not "+boost::lexical_cast<string>(vertices.size())+")").c_str()); }
 	if(isnan(vertices[0][0])) return;  // not initialized, nothing to do
 	Vector3r e[3] = {vertices[1]-vertices[0] ,vertices[2]-vertices[1] ,vertices[0]-vertices[2]};
 	#define CHECK_EDGE(i) if(e[i].squaredNorm()==0){LOG_FATAL("Facet has coincident vertices "<<i<<" ("<<vertices[i]<<") and "<<(i+1)%3<<" ("<<vertices[(i+1)%3]<<")!");}

=== modified file 'pkg/common/GravityEngines.cpp'
--- pkg/common/GravityEngines.cpp	2013-03-06 17:30:45 +0000
+++ pkg/common/GravityEngines.cpp	2014-05-23 13:05:19 +0000
@@ -66,7 +66,7 @@
    boost::cmatch matches;
 	if(!boost::regex_match(buf,matches,re)) throw std::runtime_error(("HdapsGravityEngine: error parsing data from "+name).c_str());
 	//cerr<<matches[1]<<","<<matches[2]<<endl;
-	return Vector2i(lexical_cast<int>(matches[1]),lexical_cast<int>(matches[2]));
+	return Vector2i(boost::lexical_cast<int>(matches[1]),boost::lexical_cast<int>(matches[2]));
 
 }
 

=== modified file 'pkg/common/Grid.hpp'
--- pkg/common/Grid.hpp	2013-06-03 15:28:41 +0000
+++ pkg/common/Grid.hpp	2014-05-23 13:05:19 +0000
@@ -63,7 +63,7 @@
 		/*ctor*/
 		createIndex();,
 		/*py*/
-		.def("addConnection",&GridNode::addConnection,(python::arg("Body")),"Add a GridConnection to the GridNode.")
+		.def("addConnection",&GridNode::addConnection,(boost::python::arg("Body")),"Add a GridConnection to the GridNode.")
 	);
 	REGISTER_CLASS_INDEX(GridNode,Sphere);
 };

=== modified file 'pkg/common/InsertionSortCollider.cpp'
--- pkg/common/InsertionSortCollider.cpp	2014-05-21 16:01:55 +0000
+++ pkg/common/InsertionSortCollider.cpp	2014-05-23 13:05:19 +0000
@@ -274,7 +274,7 @@
 		if(verletDist>0){
 			// get NewtonIntegrator, to ask for the maximum velocity value
 			if(!newton){
-				FOREACH(shared_ptr<Engine>& e, scene->engines){ newton=dynamic_pointer_cast<NewtonIntegrator>(e); if(newton) break; }
+				FOREACH(shared_ptr<Engine>& e, scene->engines){ newton=boost::dynamic_pointer_cast<NewtonIntegrator>(e); if(newton) break; }
 				if(!newton){ throw runtime_error("InsertionSortCollider.verletDist>0, but unable to locate NewtonIntegrator within O.engines."); }
 			}
 		}
@@ -546,20 +546,20 @@
 	return true;
 }
 
-python::tuple InsertionSortCollider::dumpBounds(){
-	python::list bl[3]; // 3 bound lists, inserted into the tuple at the end
+boost::python::tuple InsertionSortCollider::dumpBounds(){
+  boost::python::list bl[3]; // 3 bound lists, inserted into the tuple at the end
 	for(int axis=0; axis<3; axis++){
 		VecBounds& V=BB[axis];
 		if(periodic){
 			for(long i=0; i<V.size; i++){
 				long ii=V.norm(i); // start from the period boundary
-				bl[axis].append(python::make_tuple(V[ii].coord,(V[ii].flags.isMin?-1:1)*V[ii].id,V[ii].period));
+				bl[axis].append(boost::python::make_tuple(V[ii].coord,(V[ii].flags.isMin?-1:1)*V[ii].id,V[ii].period));
 			}
 		} else {
 			for(long i=0; i<V.size; i++){
-				bl[axis].append(python::make_tuple(V[i].coord,(V[i].flags.isMin?-1:1)*V[i].id));
+				bl[axis].append(boost::python::make_tuple(V[i].coord,(V[i].flags.isMin?-1:1)*V[i].id));
 			}
 		}
 	}
-	return python::make_tuple(bl[0],bl[1],bl[2]);
+	return boost::python::make_tuple(bl[0],bl[1],bl[2]);
 }

=== modified file 'pkg/common/InsertionSortCollider.hpp'
--- pkg/common/InsertionSortCollider.hpp	2014-05-06 15:32:52 +0000
+++ pkg/common/InsertionSortCollider.hpp	2014-05-23 13:05:19 +0000
@@ -147,7 +147,7 @@
 	bool periodic;
 
 	// return python representation of the BB struct, as ([...],[...],[...]).
-	python::tuple dumpBounds();
+  boost::python::tuple dumpBounds();
 
 	/*! sorting routine; insertion sort is very fast for strongly pre-sorted lists, which is our case
   	    http://en.wikipedia.org/wiki/Insertion_sort has the algorithm and other details

=== modified file 'pkg/common/InteractionLoop.cpp'
--- pkg/common/InteractionLoop.cpp	2014-04-16 10:30:23 +0000
+++ pkg/common/InteractionLoop.cpp	2014-05-23 13:05:19 +0000
@@ -3,20 +3,20 @@
 YADE_PLUGIN((InteractionLoop));
 CREATE_LOGGER(InteractionLoop);
 
-void InteractionLoop::pyHandleCustomCtorArgs(python::tuple& t, python::dict& d){
-	if(python::len(t)==0) return; // nothing to do
-	if(python::len(t)!=3) throw invalid_argument("Exactly 3 lists of functors must be given");
+void InteractionLoop::pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d){
+	if(boost::python::len(t)==0) return; // nothing to do
+	if(boost::python::len(t)!=3) throw invalid_argument("Exactly 3 lists of functors must be given");
 	// parse custom arguments (3 lists) and do in-place modification of args
 	typedef std::vector<shared_ptr<IGeomFunctor> > vecGeom;
 	typedef std::vector<shared_ptr<IPhysFunctor> > vecPhys;
 	typedef std::vector<shared_ptr<LawFunctor> > vecLaw;
-	vecGeom vg=python::extract<vecGeom>(t[0])();
-	vecPhys vp=python::extract<vecPhys>(t[1])();
-	vecLaw vl=python::extract<vecLaw>(t[2])();
+	vecGeom vg=boost::python::extract<vecGeom>(t[0])();
+	vecPhys vp=boost::python::extract<vecPhys>(t[1])();
+	vecLaw vl=boost::python::extract<vecLaw>(t[2])();
 	FOREACH(shared_ptr<IGeomFunctor> gf, vg) this->geomDispatcher->add(gf);
 	FOREACH(shared_ptr<IPhysFunctor> pf, vp) this->physDispatcher->add(pf);
 	FOREACH(shared_ptr<LawFunctor> cf, vl) this->lawDispatcher->add(cf);
-	t=python::tuple(); // empty the args; not sure if this is OK, as there is some refcounting in raw_constructor code
+	t=boost::python::tuple(); // empty the args; not sure if this is OK, as there is some refcounting in raw_constructor code
 }
 
 

=== modified file 'pkg/common/InteractionLoop.hpp'
--- pkg/common/InteractionLoop.hpp	2013-04-23 14:07:34 +0000
+++ pkg/common/InteractionLoop.hpp	2014-05-23 13:05:19 +0000
@@ -24,7 +24,7 @@
 		void eraseAfterLoop(Body::id_t id1,Body::id_t id2){ eraseAfterLoopIds.push_back(idPair(id1,id2)); }
 	#endif
 	public:
-		virtual void pyHandleCustomCtorArgs(python::tuple& t, python::dict& d);
+		virtual void pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d);
 		virtual void action();
 		YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(InteractionLoop,GlobalEngine,"Unified dispatcher for handling interaction loop at every step, for parallel performance reasons.\n\n.. admonition:: Special constructor\n\n\tConstructs from 3 lists of :yref:`Ig2<IGeomFunctor>`, :yref:`Ip2<IPhysFunctor>`, :yref:`Law<LawFunctor>` functors respectively; they will be passed to interal dispatchers, which you might retrieve.",
 			((shared_ptr<IGeomDispatcher>,geomDispatcher,new IGeomDispatcher,Attr::readonly,":yref:`IGeomDispatcher` object that is used for dispatch."))

=== modified file 'pkg/common/OpenGLRenderer.cpp'
--- pkg/common/OpenGLRenderer.cpp	2014-05-23 13:03:50 +0000
+++ pkg/common/OpenGLRenderer.cpp	2014-05-23 13:05:19 +0000
@@ -55,7 +55,7 @@
 	// reported http://www.mail-archive.com/yade-users@xxxxxxxxxxxxxxxxxxx/msg01482.html
 	#if 0
 		int e=glGetError();
-		if(e!=GL_NO_ERROR) throw runtime_error((string("OpenGLRenderer::init returned GL error ")+lexical_cast<string>(e)).c_str());
+		if(e!=GL_NO_ERROR) throw runtime_error((string("OpenGLRenderer::init returned GL error ")+boost::lexical_cast<string>(e)).c_str());
 	#endif
 }
 

=== modified file 'pkg/common/OpenGLRenderer.hpp'
--- pkg/common/OpenGLRenderer.hpp	2014-02-16 16:42:06 +0000
+++ pkg/common/OpenGLRenderer.hpp	2014-05-23 13:05:19 +0000
@@ -122,8 +122,8 @@
 		/*py*/
 		.def("setRefSe3",&OpenGLRenderer::setBodiesRefSe3,"Make current positions and orientation reference for scaleDisplacements and scaleRotations.")
 		.def("render",&OpenGLRenderer::pyRender,"Render the scene in the current OpenGL context.")
-		.def("hideBody",&OpenGLRenderer::hide,(python::arg("id")),"Hide body from id (see :yref:`OpenGLRenderer::showBody`)")
-		.def("showBody",&OpenGLRenderer::show,(python::arg("id")),"Make body visible (see :yref:`OpenGLRenderer::hideBody`)")
+		.def("hideBody",&OpenGLRenderer::hide,(boost::python::arg("id")),"Hide body from id (see :yref:`OpenGLRenderer::showBody`)")
+		.def("showBody",&OpenGLRenderer::show,(boost::python::arg("id")),"Make body visible (see :yref:`OpenGLRenderer::hideBody`)")
 	);
 };
 REGISTER_SERIALIZABLE(OpenGLRenderer);

=== modified file 'pkg/common/Recorder.cpp'
--- pkg/common/Recorder.cpp	2010-11-07 11:46:20 +0000
+++ pkg/common/Recorder.cpp	2014-05-23 13:05:19 +0000
@@ -7,7 +7,7 @@
 	assert(!out.is_open());
 	
 	std::string fileTemp = file;
-	if (addIterNum) fileTemp+="-" + lexical_cast<string>(scene->iter);
+	if (addIterNum) fileTemp+="-" + boost::lexical_cast<string>(scene->iter);
 	
 	if(fileTemp.empty()) throw ios_base::failure(__FILE__ ": Empty filename.");
 	out.open(fileTemp.c_str(), truncate ? fstream::trunc : fstream::app);

=== modified file 'pkg/common/ZECollider.cpp'
--- pkg/common/ZECollider.cpp	2013-03-06 17:30:45 +0000
+++ pkg/common/ZECollider.cpp	2014-05-23 13:05:19 +0000
@@ -92,7 +92,7 @@
 		if(verletDist>0){
 			// get NewtonIntegrator, to ask for the maximum velocity value
 			if(!newton){
-				FOREACH(shared_ptr<Engine>& e, scene->engines){ newton=dynamic_pointer_cast<NewtonIntegrator>(e); if(newton) break; }
+				FOREACH(shared_ptr<Engine>& e, scene->engines){ newton=boost::dynamic_pointer_cast<NewtonIntegrator>(e); if(newton) break; }
 				if(!newton){ throw runtime_error("ZECollider.verletDist>0, but unable to locate NewtonIntegrator within O.engines."); }
 			}
 		}

=== modified file 'pkg/dem/CapillaryStressRecorder.cpp'
--- pkg/dem/CapillaryStressRecorder.cpp	2013-08-20 11:13:01 +0000
+++ pkg/dem/CapillaryStressRecorder.cpp	2014-05-23 13:05:19 +0000
@@ -141,16 +141,16 @@
 	SIG_13_cap = sig13_cap/V;
 	SIG_23_cap = sig23_cap/V;
 	
-	out << lexical_cast<string> ( scene->iter ) << " "
-		<< lexical_cast<string>(SIG_11_cap) << " " 
-		<< lexical_cast<string>(SIG_22_cap) << " " 
-		<< lexical_cast<string>(SIG_33_cap) << " " 
-		<< lexical_cast<string>(SIG_12_cap) << " "
-		<< lexical_cast<string>(SIG_13_cap)<< " "
-		<< lexical_cast<string>(SIG_23_cap)<< "   "
-		<< lexical_cast<string>(capillaryPressure) << " "
-		<< lexical_cast<string>(Sr)<< " " 
-		<< lexical_cast<string>(w)<< " "
+	out << boost::lexical_cast<string> ( scene->iter ) << " "
+		<< boost::lexical_cast<string>(SIG_11_cap) << " " 
+		<< boost::lexical_cast<string>(SIG_22_cap) << " " 
+		<< boost::lexical_cast<string>(SIG_33_cap) << " " 
+		<< boost::lexical_cast<string>(SIG_12_cap) << " "
+		<< boost::lexical_cast<string>(SIG_13_cap)<< " "
+		<< boost::lexical_cast<string>(SIG_23_cap)<< "   "
+		<< boost::lexical_cast<string>(capillaryPressure) << " "
+		<< boost::lexical_cast<string>(Sr)<< " " 
+		<< boost::lexical_cast<string>(w)<< " "
 		<< endl;
 	
 }

=== modified file 'pkg/dem/CapillaryTriaxialTest.cpp'
--- pkg/dem/CapillaryTriaxialTest.cpp	2014-05-23 13:03:50 +0000
+++ pkg/dem/CapillaryTriaxialTest.cpp	2014-05-23 13:05:19 +0000
@@ -176,11 +176,11 @@
 	
 	//convert the original sphere vector (with clump info) to a BasicSphere vector.
 	vector<BasicSphere> sphere_list;
-	typedef tuple<Vector3r,Real,int> tupleVector3rRealInt;
+	typedef boost::tuple<Vector3r,Real,int> tupleVector3rRealInt;
 	if(importFilename!=""){
-		vector<tuple<Vector3r,Real,int> >sphereListClumpInfo = Shop::loadSpheresFromFile(importFilename,lowerCorner,upperCorner);
+		vector<boost::tuple<Vector3r,Real,int> >sphereListClumpInfo = Shop::loadSpheresFromFile(importFilename,lowerCorner,upperCorner);
 		FOREACH(tupleVector3rRealInt t, sphereListClumpInfo){
-			sphere_list.push_back(make_pair(get<0>(t),get<1>(t)));
+			sphere_list.push_back(make_pair(boost::get<0>(t),boost::get<1>(t)));
 		};
 	}
 	else message+=GenerateCloud_water(sphere_list, lowerCorner, upperCorner, numberOfGrains, Rdispersion, 0.75);
@@ -198,11 +198,11 @@
 	return true;
 //  	return "Generated a sample inside box of dimensions: (" 
 //  		+ lexical_cast<string>(lowerCorner[0]) + "," 
-//  		+ lexical_cast<string>(lowerCorner[1]) + "," 
-//  		+ lexical_cast<string>(lowerCorner[2]) + ") and (" 
-//  		+ lexical_cast<string>(upperCorner[0]) + "," 
-//  		+ lexical_cast<string>(upperCorner[1]) + "," 
-//  		+ lexical_cast<string>(upperCorner[2]) + ").";
+//  		+ boost::lexical_cast<string>(lowerCorner[1]) + "," 
+//  		+ boost::lexical_cast<string>(lowerCorner[2]) + ") and (" 
+//  		+ boost::lexical_cast<string>(upperCorner[0]) + "," 
+//  		+ boost::lexical_cast<string>(upperCorner[1]) + "," 
+//  		+ boost::lexical_cast<string>(upperCorner[2]) + ").";
 
 }
 
@@ -460,17 +460,17 @@
 				Rmax = std::max(Rmax,s.second);
 				break;}
 		}
-		if (t==tries) return "More than " + lexical_cast<string>(tries) +
+		if (t==tries) return "More than " + boost::lexical_cast<string>(tries) +
 					" tries while generating sphere number " +
-					lexical_cast<string>(i+1) + "/" + lexical_cast<string>(number) + ".";
+					boost::lexical_cast<string>(i+1) + "/" + boost::lexical_cast<string>(number) + ".";
 	}
-	return "Generated a sample with " + lexical_cast<string>(number) + "spheres inside box of dimensions: (" 
-			+ lexical_cast<string>(dimensions[0]) + "," 
-			+ lexical_cast<string>(dimensions[1]) + "," 
-			+ lexical_cast<string>(dimensions[2]) + ")."
-			+ "  mean radius=" + lexical_cast<string>(mean_radius) +
-			+ "  Rmin =" + lexical_cast<string>(Rmin) +
-			+ "  Rmax =" + lexical_cast<string>(Rmax) + ".";
+	return "Generated a sample with " + boost::lexical_cast<string>(number) + "spheres inside box of dimensions: (" 
+			+ boost::lexical_cast<string>(dimensions[0]) + "," 
+			+ boost::lexical_cast<string>(dimensions[1]) + "," 
+			+ boost::lexical_cast<string>(dimensions[2]) + ")."
+			+ "  mean radius=" + boost::lexical_cast<string>(mean_radius) +
+			+ "  Rmin =" + boost::lexical_cast<string>(Rmin) +
+			+ "  Rmax =" + boost::lexical_cast<string>(Rmax) + ".";
 }
 
 

=== modified file 'pkg/dem/CohesiveTriaxialTest.cpp'
--- pkg/dem/CohesiveTriaxialTest.cpp	2014-05-23 13:03:50 +0000
+++ pkg/dem/CohesiveTriaxialTest.cpp	2014-05-23 13:05:19 +0000
@@ -174,11 +174,11 @@
 	
 	//convert the original sphere vector (with clump info) to a BasicSphere vector.
 	vector<BasicSphere> sphere_list;
-	typedef tuple<Vector3r,Real,int> tupleVector3rRealInt;
+	typedef boost::tuple<Vector3r,Real,int> tupleVector3rRealInt;
 	if(importFilename!=""){
-		vector<tuple<Vector3r,Real,int> >sphereListClumpInfo = Shop::loadSpheresFromFile(importFilename,lowerCorner,upperCorner);
+		vector<boost::tuple<Vector3r,Real,int> >sphereListClumpInfo = Shop::loadSpheresFromFile(importFilename,lowerCorner,upperCorner);
 		FOREACH(tupleVector3rRealInt t, sphereListClumpInfo){
-			sphere_list.push_back(make_pair(get<0>(t),get<1>(t)));
+			sphere_list.push_back(make_pair(boost::get<0>(t),boost::get<1>(t)));
 		};
 	}
 	else message=GenerateCloud_cohesive(sphere_list, lowerCorner, upperCorner, numberOfGrains, radiusDeviation, 0.75);

=== modified file 'pkg/dem/ConcretePM.cpp'
--- pkg/dem/ConcretePM.cpp	2014-05-23 13:03:50 +0000
+++ pkg/dem/ConcretePM.cpp	2014-05-23 13:05:19 +0000
@@ -564,7 +564,7 @@
 	FOREACH(const shared_ptr<Interaction>& I, *scene->interactions){
 		if (!I) continue;
 		if (!I->isReal()) continue;
-		shared_ptr<CpmPhys> phys = dynamic_pointer_cast<CpmPhys>(I->phys);
+		shared_ptr<CpmPhys> phys = boost::dynamic_pointer_cast<CpmPhys>(I->phys);
 		if (!phys) continue;
 		const Body::id_t id1 = I->getId1(), id2 = I->getId2();
 		GenericSpheresContact* geom = YADE_CAST<GenericSpheresContact*>(I->geom.get());

=== modified file 'pkg/dem/Disp2DPropLoadEngine.cpp'
--- pkg/dem/Disp2DPropLoadEngine.cpp	2010-11-07 11:46:20 +0000
+++ pkg/dem/Disp2DPropLoadEngine.cpp	2014-05-23 13:05:19 +0000
@@ -77,7 +77,7 @@
 	else if ( (scene->iter-it_begin) == nbre_iter)
 	{
 		stopMovement();
-		string fileName=Key + "DR"+lexical_cast<string> (nbre_iter)+"ItAtV_"+lexical_cast<string> (v)+"done.xml";
+		string fileName=Key + "DR"+boost::lexical_cast<string> (nbre_iter)+"ItAtV_"+boost::lexical_cast<string> (v)+"done.xml";
 // 		Omega::instance().saveSimulation ( fileName );
 		saveData();
 	}
@@ -210,11 +210,11 @@
 		,d2W = dSigN * du + dTau * dgamma
 		;
 
-	ofile << lexical_cast<string> (theta) << " "<< lexical_cast<string> (dTau) << " " << lexical_cast<string> (dSigN) << " "
-		<< lexical_cast<string> (dgamma)<<" " << lexical_cast<string> (du) << " " << lexical_cast<string> (Tau0) << " "
-		<< lexical_cast<string> (SigN0) << " " << lexical_cast<string> (d2W) << " " 
-		<< lexical_cast<string> (coordSs0) << " " << lexical_cast<string> (coordTot0) << " "
-		<< lexical_cast<string> (coordSs) << " " << lexical_cast<string> (coordTot) <<endl;
+	ofile << boost::lexical_cast<string> (theta) << " "<< boost::lexical_cast<string> (dTau) << " " << boost::lexical_cast<string> (dSigN) << " "
+		<< boost::lexical_cast<string> (dgamma)<<" " << boost::lexical_cast<string> (du) << " " << boost::lexical_cast<string> (Tau0) << " "
+		<< boost::lexical_cast<string> (SigN0) << " " << boost::lexical_cast<string> (d2W) << " " 
+		<< boost::lexical_cast<string> (coordSs0) << " " << boost::lexical_cast<string> (coordTot0) << " "
+		<< boost::lexical_cast<string> (coordSs) << " " << boost::lexical_cast<string> (coordTot) <<endl;
 }
 
 

=== modified file 'pkg/dem/DomainLimiter.cpp'
--- pkg/dem/DomainLimiter.cpp	2014-05-22 15:26:55 +0000
+++ pkg/dem/DomainLimiter.cpp	2014-05-23 13:05:19 +0000
@@ -63,7 +63,7 @@
 	if(ids.size()!=2) throw std::invalid_argument("LawTester.ids: exactly two values must be given.");
 	LOG_DEBUG("=================== LawTester step "<<step<<" ========================");
 	const shared_ptr<Interaction> Inew=scene->interactions->find(ids[0],ids[1]);
-	string strIds("##"+lexical_cast<string>(ids[0])+"+"+lexical_cast<string>(ids[1]));
+	string strIds("##"+boost::lexical_cast<string>(ids[0])+"+"+boost::lexical_cast<string>(ids[1]));
 	// interaction not found at initialization
 	if(!I && (!Inew || !Inew->isReal())){
 		LOG_WARN("Interaction "<<strIds<<" does not exist (yet?), no-op."); return;
@@ -237,7 +237,7 @@
 	// scene object changed (after reload, for instance), for re-initialization
 	if(tester && tester->scene!=scene) tester=shared_ptr<LawTester>();
 
-	if(!tester){ FOREACH(shared_ptr<Engine> e, scene->engines){ tester=dynamic_pointer_cast<LawTester>(e); if(tester) break; } }
+	if(!tester){ FOREACH(shared_ptr<Engine> e, scene->engines){ tester=boost::dynamic_pointer_cast<LawTester>(e); if(tester) break; } }
 	if(!tester){ LOG_ERROR("No LawTester in O.engines, killing myself."); dead=true; return; }
 
 	//if(tester->renderLength<=0) return;

=== modified file 'pkg/dem/FacetTopologyAnalyzer.cpp'
--- pkg/dem/FacetTopologyAnalyzer.cpp	2011-02-14 08:05:09 +0000
+++ pkg/dem/FacetTopologyAnalyzer.cpp	2014-05-23 13:05:19 +0000
@@ -17,7 +17,7 @@
 	// minimum facet edge length (tolerance scale)
 	Real minSqLen=numeric_limits<Real>::infinity();
 	FOREACH(const shared_ptr<Body>& b, *scene->bodies){
-		shared_ptr<Facet> f=dynamic_pointer_cast<Facet>(b->shape);
+		shared_ptr<Facet> f=boost::dynamic_pointer_cast<Facet>(b->shape);
 		if(!f) continue;
 		const Vector3r& pos=b->state->pos;
 		for(size_t i=0; i<3; i++){

=== modified file 'pkg/dem/FlatGridCollider.cpp'
--- pkg/dem/FlatGridCollider.cpp	2014-02-03 11:21:42 +0000
+++ pkg/dem/FlatGridCollider.cpp	2014-05-23 13:05:19 +0000
@@ -21,7 +21,7 @@
 
 void FlatGridCollider::action(){
 	if(!newton){
-		FOREACH(const shared_ptr<Engine>& e, scene->engines){ newton=dynamic_pointer_cast<NewtonIntegrator>(e); if(newton) break; }
+		FOREACH(const shared_ptr<Engine>& e, scene->engines){ newton=boost::dynamic_pointer_cast<NewtonIntegrator>(e); if(newton) break; }
 		if(!newton){ throw runtime_error("FlatGridCollider: Unable to find NewtonIntegrator in engines."); }
 	}
 	fastestBodyMaxDist=0;

=== modified file 'pkg/dem/GeneralIntegratorInsertionSortCollider.cpp'
--- pkg/dem/GeneralIntegratorInsertionSortCollider.cpp	2014-02-17 14:31:35 +0000
+++ pkg/dem/GeneralIntegratorInsertionSortCollider.cpp	2014-05-23 13:05:19 +0000
@@ -111,7 +111,7 @@
 		if(verletDist>0){
 			// get the Integrator, to ask for the maximum velocity value
 			if(!integrator){
- 				FOREACH(shared_ptr<Engine>& e, scene->engines){ integrator=dynamic_pointer_cast<Integrator>(e); if(integrator) break; }
+ 				FOREACH(shared_ptr<Engine>& e, scene->engines){ integrator=boost::dynamic_pointer_cast<Integrator>(e); if(integrator) break; }
 				if(!integrator){ throw runtime_error("InsertionSortCollider.verletDist>0, but unable to locate any Integrator within O.engines."); }
 			}
 		}

=== modified file 'pkg/dem/GlobalStiffnessTimeStepper.cpp'
--- pkg/dem/GlobalStiffnessTimeStepper.cpp	2013-09-26 07:51:11 +0000
+++ pkg/dem/GlobalStiffnessTimeStepper.cpp	2014-05-23 13:05:19 +0000
@@ -132,7 +132,7 @@
 	else if (!computedOnce) scene->dt=defaultDt;
 	LOG_INFO("computed timestep " << newDt <<
 			(scene->dt==newDt ? string(", applied") :
-			string(", BUT timestep is ")+lexical_cast<string>(scene->dt))<<".");
+			string(", BUT timestep is ")+boost::lexical_cast<string>(scene->dt))<<".");
 }
 
 void GlobalStiffnessTimeStepper::computeStiffnesses(Scene* rb){

=== modified file 'pkg/dem/Ig2_Sphere_Sphere_ScGeom.cpp'
--- pkg/dem/Ig2_Sphere_Sphere_ScGeom.cpp	2013-04-23 14:07:34 +0000
+++ pkg/dem/Ig2_Sphere_Sphere_ScGeom.cpp	2014-05-23 13:05:19 +0000
@@ -29,7 +29,7 @@
 	else { scm=shared_ptr<ScGeom>(new ScGeom()); c->geom=scm; }
 	Real norm=normal.norm(); normal/=norm; // normal is unit vector now
 #ifdef YADE_DEBUG
-	if(norm==0) throw runtime_error(("Zero distance between spheres #"+lexical_cast<string>(c->getId1())+" and #"+lexical_cast<string>(c->getId2())+".").c_str());
+	if(norm==0) throw runtime_error(("Zero distance between spheres #"+boost::lexical_cast<string>(c->getId1())+" and #"+boost::lexical_cast<string>(c->getId2())+".").c_str());
 #endif
 	Real penetrationDepth=s1->radius+s2->radius-norm;
 	scm->contactPoint=se31.position+(s1->radius-0.5*penetrationDepth)*normal;//0.5*(pt1+pt2);

=== modified file 'pkg/dem/JointedCohesiveFrictionalPM.cpp'
--- pkg/dem/JointedCohesiveFrictionalPM.cpp	2014-03-11 18:36:24 +0000
+++ pkg/dem/JointedCohesiveFrictionalPM.cpp	2014-05-23 13:05:19 +0000
@@ -70,7 +70,7 @@
 	      if(file.tellp()==0){ file <<"i p0 p1 p2 t s norm0 norm1 norm2"<<endl; }
 	      Vector3r crackNormal=Vector3r::Zero();
 	      if ((smoothJoint) && (phys->isOnJoint)) { crackNormal=phys->jointNormal; } else {crackNormal=geom->normal;}
-	      file << lexical_cast<string> ( scene->iter )<<" "<< lexical_cast<string> ( geom->contactPoint[0] ) <<" "<< lexical_cast<string> ( geom->contactPoint[1] ) <<" "<< lexical_cast<string> ( geom->contactPoint[2] ) <<" "<< 0 <<" "<< lexical_cast<string> ( 0.5*(geom->radius1+geom->radius2) ) <<" "<< lexical_cast<string> ( crackNormal[0] ) <<" "<< lexical_cast<string> ( crackNormal[1] ) <<" "<< lexical_cast<string> ( crackNormal[2] ) << endl;
+	      file << boost::lexical_cast<string> ( scene->iter )<<" "<< boost::lexical_cast<string> ( geom->contactPoint[0] ) <<" "<< boost::lexical_cast<string> ( geom->contactPoint[1] ) <<" "<< boost::lexical_cast<string> ( geom->contactPoint[2] ) <<" "<< 0 <<" "<< boost::lexical_cast<string> ( 0.5*(geom->radius1+geom->radius2) ) <<" "<< boost::lexical_cast<string> ( crackNormal[0] ) <<" "<< boost::lexical_cast<string> ( crackNormal[1] ) <<" "<< boost::lexical_cast<string> ( crackNormal[2] ) << endl;
 	    }
 	    cracksFileExist=true;
 
@@ -133,7 +133,7 @@
 	      if(file.tellp()==0){ file <<"i p0 p1 p2 t s norm0 norm1 norm2"<<endl; }
 	      Vector3r crackNormal=Vector3r::Zero();
 	      if ((smoothJoint) && (phys->isOnJoint)) { crackNormal=phys->jointNormal; } else {crackNormal=geom->normal;}
-	      file << lexical_cast<string> ( scene->iter )<<" "<< lexical_cast<string> ( geom->contactPoint[0] ) <<" "<< lexical_cast<string> ( geom->contactPoint[1] ) <<" "<< lexical_cast<string> ( geom->contactPoint[2] ) <<" "<< 1 <<" "<< lexical_cast<string> ( 0.5*(geom->radius1+geom->radius2) ) <<" "<< lexical_cast<string> ( crackNormal[0] ) <<" "<< lexical_cast<string> ( crackNormal[1] ) <<" "<< lexical_cast<string> ( crackNormal[2] ) << endl;
+	      file << boost::lexical_cast<string> ( scene->iter )<<" "<< boost::lexical_cast<string> ( geom->contactPoint[0] ) <<" "<< boost::lexical_cast<string> ( geom->contactPoint[1] ) <<" "<< boost::lexical_cast<string> ( geom->contactPoint[2] ) <<" "<< 1 <<" "<< boost::lexical_cast<string> ( 0.5*(geom->radius1+geom->radius2) ) <<" "<< boost::lexical_cast<string> ( crackNormal[0] ) <<" "<< boost::lexical_cast<string> ( crackNormal[1] ) <<" "<< boost::lexical_cast<string> ( crackNormal[2] ) << endl;
 	    }
 	    cracksFileExist=true;
 	    

=== modified file 'pkg/dem/KinemCNDEngine.cpp'
--- pkg/dem/KinemCNDEngine.cpp	2011-05-12 15:13:50 +0000
+++ pkg/dem/KinemCNDEngine.cpp	2014-05-23 13:05:19 +0000
@@ -38,7 +38,7 @@
 		if ( ( ( (shearSpeed>0)&&(gamma > gamma_save[j]) ) || ((shearSpeed<0)&&(gamma < gamma_save[j])) ) && (temoin_save[j]==0) )
 		{
 			stopMovement();		// reset of all the speeds before the save
-			Omega::instance().saveSimulation(Key+"_"+lexical_cast<string> (floor(gamma*1000)) + "mmsheared.xml");
+			Omega::instance().saveSimulation(Key+"_"+boost::lexical_cast<string> (floor(gamma*1000)) + "mmsheared.xml");
 			temoin_save[j]=1;
 		}
 	}

=== modified file 'pkg/dem/KinemCNLEngine.cpp'
--- pkg/dem/KinemCNLEngine.cpp	2011-05-12 15:13:50 +0000
+++ pkg/dem/KinemCNLEngine.cpp	2014-05-23 13:05:19 +0000
@@ -16,7 +16,7 @@
 	if(LOG)	cout << "debut applyCondi du CNCEngine !!" << endl;
 	KinemSimpleShearBox::getBoxes_Dt();
 	
-	if(LOG)	cout << "gamma = " << lexical_cast<string>(gamma) << "  et gammalim = " << lexical_cast<string>(gammalim) << endl;
+	if(LOG)	cout << "gamma = " << boost::lexical_cast<string>(gamma) << "  et gammalim = " << boost::lexical_cast<string>(gammalim) << endl;
 	if(gamma<=gammalim)
 	{
 		if(LOG)	cout << "Je suis bien dans la partie gamma < gammalim" << endl;
@@ -41,7 +41,7 @@
 	}
 	else if (temoin==2 && (scene->iter==(it_stop+5000)) )
 	{
-		Omega::instance().saveSimulation(Key + "endShear" +lexical_cast<string> ( scene->iter ) + ".xml");
+		Omega::instance().saveSimulation(Key + "endShear" +boost::lexical_cast<string> ( scene->iter ) + ".xml");
 		Omega::instance().pause();
 	}
 
@@ -50,7 +50,7 @@
 		if ((gamma > gamma_save[j]) && (temoin_save[j]==0))
 		{
 			stopMovement();		// reset of all the speeds before the save
-			Omega::instance().saveSimulation(Key+"_"+lexical_cast<string> (floor(gamma*1000)) +"_" +lexical_cast<string> (floor(gamma*10000)-10*floor(gamma*1000))+ "mmsheared.xml");
+			Omega::instance().saveSimulation(Key+"_"+boost::lexical_cast<string> (floor(gamma*1000)) +"_" +boost::lexical_cast<string> (floor(gamma*10000)-10*floor(gamma*1000))+ "mmsheared.xml");
 			temoin_save[j]=1;
 		}
 	}

=== modified file 'pkg/dem/KinemCNSEngine.cpp'
--- pkg/dem/KinemCNSEngine.cpp	2011-05-12 15:13:50 +0000
+++ pkg/dem/KinemCNSEngine.cpp	2014-05-23 13:05:19 +0000
@@ -38,7 +38,7 @@
 	}
 	else if (temoin==2 && (scene->iter==(it_stop+5000)) )
 	{
-		Omega::instance().saveSimulation(Key + "finCis" +lexical_cast<string> (scene->iter ) + ".xml");
+		Omega::instance().saveSimulation(Key + "finCis" +boost::lexical_cast<string> (scene->iter ) + ".xml");
 		Omega::instance().pause();
 	}
 

=== modified file 'pkg/dem/KinemCTDEngine.cpp'
--- pkg/dem/KinemCTDEngine.cpp	2011-05-12 15:13:50 +0000
+++ pkg/dem/KinemCTDEngine.cpp	2014-05-23 13:05:19 +0000
@@ -29,9 +29,9 @@
 	{
 		if(temoin!=0)
 		{
-// 			cout << "j'ai ici un temoin #0 visiblement. En effet temoin =" <<lexical_cast<string>(temoin) << endl;
+// 			cout << "j'ai ici un temoin #0 visiblement. En effet temoin =" <<boost::lexical_cast<string>(temoin) << endl;
 			temoin=0;
-// 			cout << "Maintenant (toujours dans le if temoin!=0), temoin =" <<lexical_cast<string>(temoin) << endl;
+// 			cout << "Maintenant (toujours dans le if temoin!=0), temoin =" <<boost::lexical_cast<string>(temoin) << endl;
 		}
 		
 		letMove(0.0,-compSpeed*dt);
@@ -39,17 +39,17 @@
 	else if (temoin==0)
 	{
 		stopMovement();
-// 		cout << "Mouvement stoppe, temoin = " << lexical_cast<string>(temoin) << endl;
-// 		cout << " Dans le if, temoin =" << lexical_cast<string>(temoin) << endl;
+// 		cout << "Mouvement stoppe, temoin = " << boost::lexical_cast<string>(temoin) << endl;
+// 		cout << " Dans le if, temoin =" << boost::lexical_cast<string>(temoin) << endl;
 		string f;
 		if (compSpeed > 0)
 			f="Sigmax_";
 		else
 			f="Sigmin_";
 
-		Omega::instance().saveSimulation(Key + f +lexical_cast<string> (floor(targetSigma)) + "kPaReached.xml");
+		Omega::instance().saveSimulation(Key + f +boost::lexical_cast<string> (floor(targetSigma)) + "kPaReached.xml");
 		temoin=1;
-// 		cout << " Fin du if, temoin =" << lexical_cast<string>(temoin) << endl << endl;
+// 		cout << " Fin du if, temoin =" << boost::lexical_cast<string>(temoin) << endl << endl;
 	}
 
 	
@@ -58,11 +58,11 @@
 		if( (  ( (compSpeed>0)&&(current_sigma > sigma_save[j]) ) || ((compSpeed<0)&&(current_sigma < sigma_save[j])) ) && (temoin_save[j]==0))
 		{
 			stopMovement();
-			Omega::instance().saveSimulation(Key + "SigInt_" +lexical_cast<string> (floor(current_sigma)) + "kPareached.xml");
+			Omega::instance().saveSimulation(Key + "SigInt_" +boost::lexical_cast<string> (floor(current_sigma)) + "kPareached.xml");
 			temoin_save[j]=1;
 		}
 	}
-// 	cout << "Fin de ApplyCondi, temoin = " << lexical_cast<string>(temoin) << endl;
+// 	cout << "Fin de ApplyCondi, temoin = " << boost::lexical_cast<string>(temoin) << endl;
 
 }
 

=== modified file 'pkg/dem/NewtonIntegrator.cpp'
--- pkg/dem/NewtonIntegrator.cpp	2014-05-20 06:35:16 +0000
+++ pkg/dem/NewtonIntegrator.cpp	2014-05-23 13:05:19 +0000
@@ -159,10 +159,10 @@
 			//in most cases, the initial force on clumps will be zero and next line is not changing f and m, but make sure we don't miss something (e.g. user defined forces on clumps)
 			f=scene->forces.getForce(id); m=scene->forces.getTorque(id);
 			#ifdef YADE_DEBUG
-				if(isnan(f[0])||isnan(f[1])||isnan(f[2])) throw runtime_error(("NewtonIntegrator: NaN force acting on #"+lexical_cast<string>(id)+".").c_str());
-				if(isnan(m[0])||isnan(m[1])||isnan(m[2])) throw runtime_error(("NewtonIntegrator: NaN torque acting on #"+lexical_cast<string>(id)+".").c_str());
-				if(state->mass<=0 && ((state->blockedDOFs & State::DOF_XYZ) != State::DOF_XYZ)) throw runtime_error(("NewtonIntegrator: #"+lexical_cast<string>(id)+" has some linear accelerations enabled, but State::mass is non-positive."));
-				if(state->inertia.minCoeff()<=0 && ((state->blockedDOFs & State::DOF_RXRYRZ) != State::DOF_RXRYRZ)) throw runtime_error(("NewtonIntegrator: #"+lexical_cast<string>(id)+" has some angular accelerations enabled, but State::inertia contains non-positive terms."));
+				if(isnan(f[0])||isnan(f[1])||isnan(f[2])) throw runtime_error(("NewtonIntegrator: NaN force acting on #"+boost::lexical_cast<string>(id)+".").c_str());
+				if(isnan(m[0])||isnan(m[1])||isnan(m[2])) throw runtime_error(("NewtonIntegrator: NaN torque acting on #"+boost::lexical_cast<string>(id)+".").c_str());
+				if(state->mass<=0 && ((state->blockedDOFs & State::DOF_XYZ) != State::DOF_XYZ)) throw runtime_error(("NewtonIntegrator: #"+boost::lexical_cast<string>(id)+" has some linear accelerations enabled, but State::mass is non-positive."));
+				if(state->inertia.minCoeff()<=0 && ((state->blockedDOFs & State::DOF_RXRYRZ) != State::DOF_RXRYRZ)) throw runtime_error(("NewtonIntegrator: #"+boost::lexical_cast<string>(id)+" has some angular accelerations enabled, but State::inertia contains non-positive terms."));
 			#endif
 
 			// fluctuation velocity does not contain meanfield velocity in periodic boundaries

=== modified file 'pkg/dem/Polyhedra.cpp'
--- pkg/dem/Polyhedra.cpp	2014-05-16 15:26:12 +0000
+++ pkg/dem/Polyhedra.cpp	2014-05-23 13:05:19 +0000
@@ -416,7 +416,7 @@
 void PolyhedraVolumetricLaw::go(shared_ptr<IGeom>& ig, shared_ptr<IPhys>& ip, Interaction* I){
 
 		if (!I->geom) {return;} 
-		const shared_ptr<PolyhedraGeom>& contactGeom(dynamic_pointer_cast<PolyhedraGeom>(I->geom));
+		const shared_ptr<PolyhedraGeom>& contactGeom(boost::dynamic_pointer_cast<PolyhedraGeom>(I->geom));
 		if(!contactGeom) {return;} 
 		const Body::id_t idA=I->getId1(), idB=I->getId2();
 		const shared_ptr<Body>& A=Body::byId(idA), B=Body::byId(idB);

=== modified file 'pkg/dem/Polyhedra_splitter.cpp'
--- pkg/dem/Polyhedra_splitter.cpp	2014-05-16 11:58:59 +0000
+++ pkg/dem/Polyhedra_splitter.cpp	2014-05-23 13:05:19 +0000
@@ -83,8 +83,8 @@
 
 	FOREACH(const shared_ptr<Body>& b, *rb->bodies){
 		if(!b || !b->material || !b->shape) continue;
-		shared_ptr<Polyhedra> p=dynamic_pointer_cast<Polyhedra>(b->shape);
-		shared_ptr<PolyhedraMat> m=dynamic_pointer_cast<PolyhedraMat>(b->material);
+		shared_ptr<Polyhedra> p=boost::dynamic_pointer_cast<Polyhedra>(b->shape);
+		shared_ptr<PolyhedraMat> m=boost::dynamic_pointer_cast<PolyhedraMat>(b->material);
 	
 		if(p && m->IsSplitable){
 			//not real strees, to get real one, it has to be divided by body volume

=== modified file 'pkg/dem/RungeKuttaCashKarp54Integrator.cpp'
--- pkg/dem/RungeKuttaCashKarp54Integrator.cpp	2014-02-18 12:02:35 +0000
+++ pkg/dem/RungeKuttaCashKarp54Integrator.cpp	2014-05-23 13:05:19 +0000
@@ -4,7 +4,7 @@
 
 YADE_PLUGIN((RungeKuttaCashKarp54Integrator));
 
-shared_ptr<Integrator> RungeKuttaCashKarp54Integrator_ctor_list(const python::list& slaves){ shared_ptr<Integrator> instance(new RungeKuttaCashKarp54Integrator); instance->slaves_set(slaves); return instance; }
+shared_ptr<Integrator> RungeKuttaCashKarp54Integrator_ctor_list(const boost::python::list& slaves){ shared_ptr<Integrator> instance(new RungeKuttaCashKarp54Integrator); instance->slaves_set(slaves); return instance; }
 
 void RungeKuttaCashKarp54Integrator::action()
 {

=== modified file 'pkg/dem/RungeKuttaCashKarp54Integrator.hpp'
--- pkg/dem/RungeKuttaCashKarp54Integrator.hpp	2014-02-18 12:02:35 +0000
+++ pkg/dem/RungeKuttaCashKarp54Integrator.hpp	2014-05-23 13:05:19 +0000
@@ -12,7 +12,7 @@
 typedef boost::numeric::odeint::default_error_checker< error_stepper_type::value_type,error_stepper_type::algebra_type ,error_stepper_type::operations_type > error_checker_type; //Error checker type that is redefined for initialization using different tolerance values
 
 
-shared_ptr<Integrator> RungeKuttaCashKarp54Integrator_ctor_list(const python::list& slaves);
+shared_ptr<Integrator> RungeKuttaCashKarp54Integrator_ctor_list(const boost::python::list& slaves);
 class RungeKuttaCashKarp54Integrator: public Integrator {
 	
 	public:
@@ -41,7 +41,7 @@
 		/*ctor*/
 		init();
 		,
-		.def("__init__",python::make_constructor(RungeKuttaCashKarp54Integrator_ctor_list),"Construct from (possibly nested) list of slaves.")
+		.def("__init__",boost::python::make_constructor(RungeKuttaCashKarp54Integrator_ctor_list),"Construct from (possibly nested) list of slaves.")
 		/*py*/
 	);
 };

=== modified file 'pkg/dem/ScGeom.hpp'
--- pkg/dem/ScGeom.hpp	2013-03-06 20:47:43 +0000
+++ pkg/dem/ScGeom.hpp	2014-05-23 13:05:19 +0000
@@ -55,8 +55,8 @@
 		,
 		/* extra initializers */ ((radius1,GenericSpheresContact::refR1)) ((radius2,GenericSpheresContact::refR2)),
 		/* ctor */ createIndex(); twist_axis=orthonormal_axis=Vector3r::Zero();,
-		/* py */ .def("incidentVel",&ScGeom::getIncidentVel_py,(python::arg("i"),python::arg("avoidGranularRatcheting")=true),"Return incident velocity of the interaction (see also :yref:`Ig2_Sphere_Sphere_ScGeom.avoidGranularRatcheting` for explanation of the ratcheting argument).")
-		.def("relAngVel",&ScGeom::getRelAngVel_py,(python::arg("i")),"Return relative angular velocity of the interaction.")
+		/* py */ .def("incidentVel",&ScGeom::getIncidentVel_py,(boost::python::arg("i"),boost::python::arg("avoidGranularRatcheting")=true),"Return incident velocity of the interaction (see also :yref:`Ig2_Sphere_Sphere_ScGeom.avoidGranularRatcheting` for explanation of the ratcheting argument).")
+		.def("relAngVel",&ScGeom::getRelAngVel_py,(boost::python::arg("i")),"Return relative angular velocity of the interaction.")
 	);
 	REGISTER_CLASS_INDEX(ScGeom,GenericSpheresContact);
 };

=== modified file 'pkg/dem/Shop.hpp'
--- pkg/dem/Shop.hpp	2014-02-27 08:27:24 +0000
+++ pkg/dem/Shop.hpp	2014-05-23 13:05:19 +0000
@@ -47,7 +47,7 @@
 		static shared_ptr<FrictMat> defaultGranularMat();
 
 		//! Return vector of pairs (center,radius) loaded from a file with numbers inside
-		static vector<tuple<Vector3r,Real,int> > loadSpheresFromFile(const string& fname,Vector3r& minXYZ, Vector3r& maxXYZ, Vector3r* cellSize=NULL);
+		static vector<boost::tuple<Vector3r,Real,int> > loadSpheresFromFile(const string& fname,Vector3r& minXYZ, Vector3r& maxXYZ, Vector3r* cellSize=NULL);
 		
 		//! Save spheres in the current simulation into a text file
 		static void saveSpheresToFile(string fileName);

=== modified file 'pkg/dem/Shop_01.cpp'
--- pkg/dem/Shop_01.cpp	2014-05-23 13:03:50 +0000
+++ pkg/dem/Shop_01.cpp	2014-05-23 13:05:19 +0000
@@ -159,7 +159,7 @@
 	rb->forces.sync();
 	shared_ptr<NewtonIntegrator> newton;
 	Vector3r gravity = Vector3r::Zero();
-	FOREACH(shared_ptr<Engine>& e, rb->engines){ newton=dynamic_pointer_cast<NewtonIntegrator>(e); if(newton) {gravity=newton->gravity; break;} }
+	FOREACH(shared_ptr<Engine>& e, rb->engines){ newton=boost::dynamic_pointer_cast<NewtonIntegrator>(e); if(newton) {gravity=newton->gravity; break;} }
 	// 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){
@@ -293,7 +293,7 @@
 
 	FOREACH(shared_ptr<Body> b, *scene->bodies){
 		if (!b->isDynamic()) continue;
-		shared_ptr<Sphere>	intSph=dynamic_pointer_cast<Sphere>(b->shape);
+		shared_ptr<Sphere>	intSph=boost::dynamic_pointer_cast<Sphere>(b->shape);
 		if(!intSph) continue;
 		const Vector3r& pos=b->state->pos;
 		f<<pos[0]<<" "<<pos[1]<<" "<<pos[2]<<" "<<intSph->radius<<endl; // <<" "<<1<<" "<<1<<endl;
@@ -404,11 +404,11 @@
 	return ( std::pow(S,3) - Vv ) / std::pow(S,3);
 };
 
-vector<tuple<Vector3r,Real,int> > Shop::loadSpheresFromFile(const string& fname, Vector3r& minXYZ, Vector3r& maxXYZ, Vector3r* cellSize){
+vector<boost::tuple<Vector3r,Real,int> > Shop::loadSpheresFromFile(const string& fname, Vector3r& minXYZ, Vector3r& maxXYZ, Vector3r* cellSize){
 	if(!boost::filesystem::exists(fname)) {
 		throw std::invalid_argument(string("File with spheres `")+fname+"' doesn't exist.");
 	}
-	vector<tuple<Vector3r,Real,int> > spheres;
+	vector<boost::tuple<Vector3r,Real,int> > spheres;
 	ifstream sphereFile(fname.c_str());
 	if(!sphereFile.good()) throw std::runtime_error("File with spheres `"+fname+"' couldn't be opened.");
 	Vector3r C;
@@ -422,16 +422,16 @@
 		vector<string> tokens; FOREACH(const string& s, toks) tokens.push_back(s);
 		if(tokens.empty()) continue;
 		if(tokens[0]=="##PERIODIC::"){
-			if(tokens.size()!=4) throw std::invalid_argument(("Spheres file "+fname+":"+lexical_cast<string>(lineNo)+" contains ##PERIODIC::, but the line is malformed.").c_str());
-			if(cellSize){ *cellSize=Vector3r(lexical_cast<Real>(tokens[1]),lexical_cast<Real>(tokens[2]),lexical_cast<Real>(tokens[3])); }
+			if(tokens.size()!=4) throw std::invalid_argument(("Spheres file "+fname+":"+boost::lexical_cast<string>(lineNo)+" contains ##PERIODIC::, but the line is malformed.").c_str());
+			if(cellSize){ *cellSize=Vector3r(boost::lexical_cast<Real>(tokens[1]),boost::lexical_cast<Real>(tokens[2]),boost::lexical_cast<Real>(tokens[3])); }
 			continue;
 		}
-		if(tokens.size()!=5 and tokens.size()!=4) throw std::invalid_argument(("Line "+lexical_cast<string>(lineNo)+" in the spheres file "+fname+" has "+lexical_cast<string>(tokens.size())+" columns (must be 4 or 5).").c_str());
-		C=Vector3r(lexical_cast<Real>(tokens[0]),lexical_cast<Real>(tokens[1]),lexical_cast<Real>(tokens[2]));
-		r=lexical_cast<Real>(tokens[3]);
+		if(tokens.size()!=5 and tokens.size()!=4) throw std::invalid_argument(("Line "+boost::lexical_cast<string>(lineNo)+" in the spheres file "+fname+" has "+boost::lexical_cast<string>(tokens.size())+" columns (must be 4 or 5).").c_str());
+		C=Vector3r(boost::lexical_cast<Real>(tokens[0]),boost::lexical_cast<Real>(tokens[1]),boost::lexical_cast<Real>(tokens[2]));
+		r=boost::lexical_cast<Real>(tokens[3]);
 		for(int j=0; j<3; j++) { minXYZ[j]=(spheres.size()>0?min(C[j]-r,minXYZ[j]):C[j]-r); maxXYZ[j]=(spheres.size()>0?max(C[j]+r,maxXYZ[j]):C[j]+r);}
-		if(tokens.size()==5)clumpId=lexical_cast<int>(tokens[4]);
-		spheres.push_back(tuple<Vector3r,Real,int>(C,r,clumpId));
+		if(tokens.size()==5)clumpId=boost::lexical_cast<int>(tokens[4]);
+		spheres.push_back(boost::tuple<Vector3r,Real,int>(C,r,clumpId));
 	}
 	return spheres;
 }
@@ -441,8 +441,8 @@
 	Real dt=std::numeric_limits<Real>::infinity();
 	FOREACH(const shared_ptr<Body>& b, *rb->bodies){
 		if(!b || !b->material || !b->shape) continue;
-		shared_ptr<ElastMat> ebp=dynamic_pointer_cast<ElastMat>(b->material);
-		shared_ptr<Sphere> s=dynamic_pointer_cast<Sphere>(b->shape);
+		shared_ptr<ElastMat> ebp=boost::dynamic_pointer_cast<ElastMat>(b->material);
+		shared_ptr<Sphere> s=boost::dynamic_pointer_cast<Sphere>(b->shape);
 		if(!ebp || !s) continue;
 		Real density=b->state->mass/((4/3.)*Mathr::PI*pow(s->radius,3));
 		dt=min(dt,s->radius/sqrt(ebp->young/density));

=== modified file 'pkg/dem/Shop_02.cpp'
--- pkg/dem/Shop_02.cpp	2014-05-16 12:22:07 +0000
+++ pkg/dem/Shop_02.cpp	2014-05-23 13:05:19 +0000
@@ -67,8 +67,8 @@
 	FOREACH(const shared_ptr<Body>& b, *rb->bodies){
 		if(!b || !b->material || !b->shape) continue;
 		
-		shared_ptr<ElastMat> ebp=dynamic_pointer_cast<ElastMat>(b->material);
-		shared_ptr<Sphere> s=dynamic_pointer_cast<Sphere>(b->shape);
+		shared_ptr<ElastMat> ebp=boost::dynamic_pointer_cast<ElastMat>(b->material);
+		shared_ptr<Sphere> s=boost::dynamic_pointer_cast<Sphere>(b->shape);
 		if(!ebp || !s) continue;
 		
 		Real density=b->state->mass/((4/3.)*Mathr::PI*pow(s->radius,3));
@@ -118,7 +118,7 @@
 	IGeomDispatcher* geomMeta=NULL;
 	IPhysDispatcher* physMeta=NULL;
 	shared_ptr<Scene> rb=Omega::instance().getScene();
-	if(rb->interactions->find(Body::id_t(id1),Body::id_t(id2))!=0) throw runtime_error(string("Interaction #")+lexical_cast<string>(id1)+"+#"+lexical_cast<string>(id2)+" already exists.");
+	if(rb->interactions->find(Body::id_t(id1),Body::id_t(id2))!=0) throw runtime_error(string("Interaction #")+boost::lexical_cast<string>(id1)+"+#"+boost::lexical_cast<string>(id2)+" already exists.");
 	FOREACH(const shared_ptr<Engine>& e, rb->engines){
 		if(!geomMeta) { geomMeta=dynamic_cast<IGeomDispatcher*>(e.get()); if(geomMeta) continue; }
 		if(!physMeta) { physMeta=dynamic_cast<IPhysDispatcher*>(e.get()); if(physMeta) continue; }
@@ -129,8 +129,8 @@
 	if(!geomMeta) throw runtime_error("No IGeomDispatcher in engines or inside InteractionLoop.");
 	if(!physMeta) throw runtime_error("No IPhysDispatcher in engines or inside InteractionLoop.");
 	shared_ptr<Body> b1=Body::byId(id1,rb), b2=Body::byId(id2,rb);
-	if(!b1) throw runtime_error(("No body #"+lexical_cast<string>(id1)).c_str());
-	if(!b2) throw runtime_error(("No body #"+lexical_cast<string>(id2)).c_str());
+	if(!b1) throw runtime_error(("No body #"+boost::lexical_cast<string>(id1)).c_str());
+	if(!b2) throw runtime_error(("No body #"+boost::lexical_cast<string>(id2)).c_str());
 	shared_ptr<Interaction> i=geomMeta->explicitAction(b1,b2,/*force*/force);
 	assert(force && i);
 	if(!i) return i;

=== modified file 'pkg/dem/SimpleShear.cpp'
--- pkg/dem/SimpleShear.cpp	2011-05-18 10:54:46 +0000
+++ pkg/dem/SimpleShear.cpp	2014-05-23 13:05:19 +0000
@@ -262,25 +262,25 @@
 		}
 		if (t==tries) 
 		{
-		string str1="Generated a sample with " + lexical_cast<string>(i) + " spheres inside box of dimensions: (" 
-			+ lexical_cast<string>(dimensions[0]) + "," 
-			+ lexical_cast<string>(dimensions[1]) + "," 
-			+ lexical_cast<string>(dimensions[2]) + ").\n";
-		return str1 + "More than " + lexical_cast<string>(tries) +	" tries while generating sphere number " +
-					lexical_cast<string>(i+1) + "/" + lexical_cast<string>(number) + ".";
+		string str1="Generated a sample with " + boost::lexical_cast<string>(i) + " spheres inside box of dimensions: (" 
+			+ boost::lexical_cast<string>(dimensions[0]) + "," 
+			+ boost::lexical_cast<string>(dimensions[1]) + "," 
+			+ boost::lexical_cast<string>(dimensions[2]) + ").\n";
+		return str1 + "More than " + boost::lexical_cast<string>(tries) +	" tries while generating sphere number " +
+					boost::lexical_cast<string>(i+1) + "/" + boost::lexical_cast<string>(number) + ".";
 		}
 	}
-	return "Generated a sample with " + lexical_cast<string>(number) + " spheres inside box of dimensions: (" 
-			+ lexical_cast<string>(dimensions[0]) + "," 
-			+ lexical_cast<string>(dimensions[1]) + "," 
-			+ lexical_cast<string>(dimensions[2]) + ").";
+	return "Generated a sample with " + boost::lexical_cast<string>(number) + " spheres inside box of dimensions: (" 
+			+ boost::lexical_cast<string>(dimensions[0]) + "," 
+			+ boost::lexical_cast<string>(dimensions[1]) + "," 
+			+ boost::lexical_cast<string>(dimensions[2]) + ").";
 }
 
 std::pair<string,bool> SimpleShear::ImportCloud(vector<BasicSphere>& sphere_list,string importFilename)
 {
 	sphere_list.clear();
 	int nombre=0;
-	if(importFilename.size() != 0 && filesystem::exists(importFilename) )
+	if(importFilename.size() != 0 && boost::filesystem::exists(importFilename) )
 	{
 		ifstream loadFile(importFilename.c_str()); // cree l'objet loadFile de la classe ifstream qui va permettre de lire ce qu'il y a dans importFilename
 
@@ -308,7 +308,7 @@
 			sphere_list.push_back(s);
 			nombre++;
 		}		
-		return std::make_pair(std::string("Echantillon correctement genere : " + lexical_cast<string>(nombre) + " billes"),true);
+		return std::make_pair(std::string("Echantillon correctement genere : " + boost::lexical_cast<string>(nombre) + " billes"),true);
 	}
 	else
 	{

=== modified file 'pkg/dem/SpherePack.cpp'
--- pkg/dem/SpherePack.cpp	2014-05-23 13:03:50 +0000
+++ pkg/dem/SpherePack.cpp	2014-05-23 13:05:19 +0000
@@ -51,12 +51,12 @@
 };
 
 void SpherePack::fromFile(string file) {
-	typedef tuple<Vector3r,Real,int> tupleVector3rRealInt;
+	typedef boost::tuple<Vector3r,Real,int> tupleVector3rRealInt;
 	vector<tupleVector3rRealInt> ss;
 	Vector3r mn,mx;
 	ss=Shop::loadSpheresFromFile(file,mn,mx,&cellSize);
 	pack.clear();
-	FOREACH(const tupleVector3rRealInt& s, ss) pack.push_back(Sph(get<0>(s),get<1>(s),get<2>(s)));
+	FOREACH(const tupleVector3rRealInt& s, ss) pack.push_back(Sph(boost::get<0>(s),boost::get<1>(s),boost::get<2>(s)));
 }
 
 void SpherePack::toFile(const string fname) const {
@@ -75,7 +75,7 @@
 	Scene* scene=Omega::instance().getScene().get();
 	FOREACH(const shared_ptr<Body>& b, *scene->bodies){
 		if(!b) continue;
-		shared_ptr<Sphere> intSph=dynamic_pointer_cast<Sphere>(b->shape);
+		shared_ptr<Sphere> intSph=boost::dynamic_pointer_cast<Sphere>(b->shape);
 		if(!intSph) continue;
 		pack.push_back(Sph(b->state->pos,intSph->radius,(b->isClumpMember()?b->clumpId:-1)));
 	}

=== modified file 'pkg/dem/SpheresFactory.cpp'
--- pkg/dem/SpheresFactory.cpp	2012-10-10 17:00:26 +0000
+++ pkg/dem/SpheresFactory.cpp	2014-05-23 13:05:19 +0000
@@ -24,7 +24,7 @@
 void SpheresFactory::action(){
 
 	if(!collider){
-		FOREACH(const shared_ptr<Engine>& e, scene->engines){ collider=dynamic_pointer_cast<Collider>(e); if(collider) break; }
+		FOREACH(const shared_ptr<Engine>& e, scene->engines){ collider=boost::dynamic_pointer_cast<Collider>(e); if(collider) break; }
 		if(!collider) throw runtime_error("SpheresFactory: No Collider instance found in engines (needed for collision detection).");
 	}
 	
@@ -162,7 +162,7 @@
 		
 		// create particle
 		int mId=(materialId>=0 ? materialId : scene->materials.size()+materialId);
-		if(mId<0 || (size_t) mId>=scene->materials.size()) throw std::invalid_argument(("SpheresFactory: invalid material id "+lexical_cast<string>(materialId)).c_str());
+		if(mId<0 || (size_t) mId>=scene->materials.size()) throw std::invalid_argument(("SpheresFactory: invalid material id "+boost::lexical_cast<string>(materialId)).c_str());
 		const shared_ptr<Material>& material=scene->materials[mId];
 		shared_ptr<Body> b(new Body);
 		shared_ptr<Sphere> sphere(new Sphere); 

=== modified file 'pkg/dem/TesselationWrapper.cpp'
--- pkg/dem/TesselationWrapper.cpp	2014-03-21 18:47:45 +0000
+++ pkg/dem/TesselationWrapper.cpp	2014-05-23 13:05:19 +0000
@@ -344,7 +344,7 @@
 	mma.analyser->DefToFile(outputFile.c_str());
 }
 
-python::dict TesselationWrapper::getVolPoroDef(bool deformation)
+boost::python::dict TesselationWrapper::getVolPoroDef(bool deformation)
 {
 		delete Tes;
 		CGT::TriaxialState* ts;
@@ -379,7 +379,7 @@
 			if (deformation) MATRIX3R_TO_NUMPY(mma.analyser->ParticleDeformation[id],def[id]);
  			//cerr << V_it->info().v()<<" "<<ParticleDeformation[id]<<endl;
  		}
- 		python::dict ret;
+ 		boost::python::dict ret;
  		ret["vol"]=vol;
  		ret["poro"]=poro;
  		if (deformation) ret["def"]=def;

=== modified file 'pkg/dem/TesselationWrapper.hpp'
--- pkg/dem/TesselationWrapper.hpp	2014-04-01 13:18:38 +0000
+++ pkg/dem/TesselationWrapper.hpp	2014-05-23 13:05:19 +0000
@@ -124,18 +124,18 @@
 	inf=1e10;
 	mma.analyser->SetConsecutive(false);
 	,/*py*/
-	.def("triangulate",&TesselationWrapper::insertSceneSpheres,(python::arg("reset")=true),"triangulate spheres of the packing")
- 	.def("setState",&TesselationWrapper::setState,(python::arg("state")=0),"Make the current state of the simulation the initial (0) or final (1) configuration for the definition of displacement increments, use only state=0 if you just want to get  volmumes and porosity.")
- 	.def("loadState",&TesselationWrapper::loadState,(python::arg("inputFile")="state",python::arg("state")=0,python::arg("bz2")=true),"Load a file with positions to define state 0 or 1.")
- 	.def("saveState",&TesselationWrapper::saveState,(python::arg("outputFile")="state",python::arg("state")=0,python::arg("bz2")=true),"Save a file with positions, can be later reloaded in order to define state 0 or 1.")
- 	.def("volume",&TesselationWrapper::Volume,(python::arg("id")=0),"Returns the volume of Voronoi's cell of a sphere.")
- 	.def("defToVtk",&TesselationWrapper::defToVtk,(python::arg("outputFile")="def.vtk"),"Write local deformations in vtk format from states 0 and 1.")
- 	.def("defToVtkFromStates",&TesselationWrapper::defToVtkFromStates,(python::arg("input1")="state1",python::arg("input2")="state2",python::arg("outputFile")="def.vtk",python::arg("bz2")=true),"Write local deformations in vtk format from state files (since the file format is very special, consider using defToVtkFromPositions if the input files were not generated by TesselationWrapper).")
- 	.def("defToVtkFromPositions",&TesselationWrapper::defToVtkFromPositions,(python::arg("input1")="pos1",python::arg("input2")="pos2",python::arg("outputFile")="def.vtk",python::arg("bz2")=false),"Write local deformations in vtk format from positions files (one sphere per line, with x,y,z,rad separated by spaces).")
+	.def("triangulate",&TesselationWrapper::insertSceneSpheres,(boost::python::arg("reset")=true),"triangulate spheres of the packing")
+ 	.def("setState",&TesselationWrapper::setState,(boost::python::arg("state")=0),"Make the current state of the simulation the initial (0) or final (1) configuration for the definition of displacement increments, use only state=0 if you just want to get  volmumes and porosity.")
+ 	.def("loadState",&TesselationWrapper::loadState,(boost::python::arg("inputFile")="state",boost::python::arg("state")=0,boost::python::arg("bz2")=true),"Load a file with positions to define state 0 or 1.")
+ 	.def("saveState",&TesselationWrapper::saveState,(boost::python::arg("outputFile")="state",boost::python::arg("state")=0,boost::python::arg("bz2")=true),"Save a file with positions, can be later reloaded in order to define state 0 or 1.")
+ 	.def("volume",&TesselationWrapper::Volume,(boost::python::arg("id")=0),"Returns the volume of Voronoi's cell of a sphere.")
+ 	.def("defToVtk",&TesselationWrapper::defToVtk,(boost::python::arg("outputFile")="def.vtk"),"Write local deformations in vtk format from states 0 and 1.")
+ 	.def("defToVtkFromStates",&TesselationWrapper::defToVtkFromStates,(boost::python::arg("input1")="state1",boost::python::arg("input2")="state2",boost::python::arg("outputFile")="def.vtk",boost::python::arg("bz2")=true),"Write local deformations in vtk format from state files (since the file format is very special, consider using defToVtkFromPositions if the input files were not generated by TesselationWrapper).")
+ 	.def("defToVtkFromPositions",&TesselationWrapper::defToVtkFromPositions,(boost::python::arg("input1")="pos1",boost::python::arg("input2")="pos2",boost::python::arg("outputFile")="def.vtk",boost::python::arg("bz2")=false),"Write local deformations in vtk format from positions files (one sphere per line, with x,y,z,rad separated by spaces).")
  	.def("computeVolumes",&TesselationWrapper::computeVolumes,"compute volumes of all Voronoi's cells.")
-	.def("getVolPoroDef",&TesselationWrapper::getVolPoroDef,(python::arg("deformation")=false),"Return a table with per-sphere computed quantities. Include deformations on the increment defined by states 0 and 1 if deformation=True (make sure to define states 0 and 1 consistently).")
+	.def("getVolPoroDef",&TesselationWrapper::getVolPoroDef,(boost::python::arg("deformation")=false),"Return a table with per-sphere computed quantities. Include deformations on the increment defined by states 0 and 1 if deformation=True (make sure to define states 0 and 1 consistently).")
 	.def("computeDeformations",&TesselationWrapper::computeDeformations,"compute per-particle deformation. Get it with :yref:`TesselationWrapper::deformation` (id,i,j).")
-	.def("deformation",&TesselationWrapper::deformation,(python::arg("id"),python::arg("i"),python::arg("j")),"Get particle deformation")
+	.def("deformation",&TesselationWrapper::deformation,(boost::python::arg("id"),boost::python::arg("i"),boost::python::arg("j")),"Get particle deformation")
 	);
 	DECLARE_LOGGER;
 };

=== modified file 'pkg/dem/Tetra.cpp'
--- pkg/dem/Tetra.cpp	2013-10-04 12:04:43 +0000
+++ pkg/dem/Tetra.cpp	2014-05-23 13:05:19 +0000
@@ -956,14 +956,14 @@
 	FOREACH(const shared_ptr<Interaction>& I, *scene->interactions){
 		// normally, we would test isReal(), but TetraVolumetricLaw doesn't use phys at all
 		if (!I->geom) continue; // Ig2_Tetra_Tetra_TTetraGeom::go returned false for this interaction, skip it
-		const shared_ptr<TTetraGeom>& contactGeom(dynamic_pointer_cast<TTetraGeom>(I->geom));
+		const shared_ptr<TTetraGeom>& contactGeom(boost::dynamic_pointer_cast<TTetraGeom>(I->geom));
 		if(!contactGeom) continue;
 
 		const Body::id_t idA=I->getId1(), idB=I->getId2();
 		const shared_ptr<Body>& A=Body::byId(idA), B=Body::byId(idB);
 			
-		const shared_ptr<ElastMat>& physA(dynamic_pointer_cast<ElastMat>(A->material));
-		const shared_ptr<ElastMat>& physB(dynamic_pointer_cast<ElastMat>(B->material));
+		const shared_ptr<ElastMat>& physA(boost::dynamic_pointer_cast<ElastMat>(A->material));
+		const shared_ptr<ElastMat>& physB(boost::dynamic_pointer_cast<ElastMat>(B->material));
 		
 
 		/* Cross-section is volumetrically equivalent to the penetration configuration */
@@ -1143,7 +1143,7 @@
 Quaternionr TetrahedronWithLocalAxesPrincipal(shared_ptr<Body>& tetraBody){
 	//const shared_ptr<RigidBodyParameters>& rbp(YADE_PTR_CAST<RigidBodyParameters>(tetraBody->physicalParameters));
 	State* rbp=tetraBody->state.get();
-	const shared_ptr<Tetra>& tMold(dynamic_pointer_cast<Tetra>(tetraBody->shape));
+	const shared_ptr<Tetra>& tMold(boost::dynamic_pointer_cast<Tetra>(tetraBody->shape));
 
 	#define v0 tMold->v[0]
 	#define v1 tMold->v[1]

=== modified file 'pkg/dem/TriaxialCompressionEngine.cpp'
--- pkg/dem/TriaxialCompressionEngine.cpp	2013-03-06 20:39:22 +0000
+++ pkg/dem/TriaxialCompressionEngine.cpp	2014-05-23 13:05:19 +0000
@@ -129,12 +129,12 @@
 	{
 		if(!noFiles){
 			string fileName = "./"+ Key + "_" + Phase1End + "_" +
-							  lexical_cast<string> ( scene->iter ) + "_" +
-							  lexical_cast<string> ( currentState ) + ".xml";
+							  boost::lexical_cast<string> ( scene->iter ) + "_" +
+							  boost::lexical_cast<string> ( currentState ) + ".xml";
 			LOG_INFO ( "saving snapshot: "<<fileName );
 			Omega::instance().saveSimulation ( fileName );
-			fileName="./"+ Key + "_"+Phase1End+"_"+lexical_cast<string> ( scene->iter ) + "_" +
-					 lexical_cast<string> ( currentState ) +".spheres";
+			fileName="./"+ Key + "_"+Phase1End+"_"+boost::lexical_cast<string> ( scene->iter ) + "_" +
+					 boost::lexical_cast<string> ( currentState ) +".spheres";
 			LOG_INFO ( "saving spheres: "<<fileName );
 			Shop::saveSpheresToFile ( fileName );
 		}

=== modified file 'pkg/dem/TriaxialStateRecorder.cpp'
--- pkg/dem/TriaxialStateRecorder.cpp	2013-02-04 18:23:35 +0000
+++ pkg/dem/TriaxialStateRecorder.cpp	2014-05-23 13:05:19 +0000
@@ -57,16 +57,16 @@
 	}
 	porosity = ( V - Vs ) /V;
 	
-	out << lexical_cast<string> ( scene->iter ) << " "
- 	<< lexical_cast<string> ( triaxialStressController->stress[triaxialStressController->wall_right][0] ) << " "
- 	<< lexical_cast<string> ( triaxialStressController->stress[triaxialStressController->wall_top][1] ) << " "
- 	<< lexical_cast<string> ( triaxialStressController->stress[triaxialStressController->wall_front][2] ) << " "
- 	<< lexical_cast<string> ( triaxialStressController->strain[0] ) << " "
- 	<< lexical_cast<string> ( triaxialStressController->strain[1] ) << " "
- 	<< lexical_cast<string> ( triaxialStressController->strain[2] ) << " "
- 	<< lexical_cast<string> ( triaxialStressController->ComputeUnbalancedForce () ) << " "
- 	<< lexical_cast<string> ( porosity ) << " "
- 	<< lexical_cast<string> ( Shop::kineticEnergy() )
+	out << boost::lexical_cast<string> ( scene->iter ) << " "
+ 	<< boost::lexical_cast<string> ( triaxialStressController->stress[triaxialStressController->wall_right][0] ) << " "
+ 	<< boost::lexical_cast<string> ( triaxialStressController->stress[triaxialStressController->wall_top][1] ) << " "
+ 	<< boost::lexical_cast<string> ( triaxialStressController->stress[triaxialStressController->wall_front][2] ) << " "
+ 	<< boost::lexical_cast<string> ( triaxialStressController->strain[0] ) << " "
+ 	<< boost::lexical_cast<string> ( triaxialStressController->strain[1] ) << " "
+ 	<< boost::lexical_cast<string> ( triaxialStressController->strain[2] ) << " "
+ 	<< boost::lexical_cast<string> ( triaxialStressController->ComputeUnbalancedForce () ) << " "
+ 	<< boost::lexical_cast<string> ( porosity ) << " "
+ 	<< boost::lexical_cast<string> ( Shop::kineticEnergy() )
  	<< endl;
 }
 

=== modified file 'pkg/dem/TriaxialStressController.hpp'
--- pkg/dem/TriaxialStressController.hpp	2014-03-24 12:23:56 +0000
+++ pkg/dem/TriaxialStressController.hpp	2014-05-23 13:05:19 +0000
@@ -146,7 +146,7 @@
 		.def_readonly("max_vel1",&TriaxialStressController::max_vel1,"see :yref:`TriaxialStressController::max_vel` |ycomp|")
 		.def_readonly("max_vel2",&TriaxialStressController::max_vel2,"see :yref:`TriaxialStressController::max_vel` |ycomp|")
 		.def_readonly("max_vel3",&TriaxialStressController::max_vel3,"see :yref:`TriaxialStressController::max_vel` |ycomp|")
-		.def("stress",&TriaxialStressController::getStress,(python::arg("id")),"Return the mean stress vector acting on boundary 'id', with 'id' between 0 and 5.")
+		.def("stress",&TriaxialStressController::getStress,(boost::python::arg("id")),"Return the mean stress vector acting on boundary 'id', with 'id' between 0 and 5.")
 		)
 		DECLARE_LOGGER;
 };

=== modified file 'pkg/dem/TriaxialTest.cpp'
--- pkg/dem/TriaxialTest.cpp	2014-05-23 13:03:50 +0000
+++ pkg/dem/TriaxialTest.cpp	2014-05-23 13:05:19 +0000
@@ -90,10 +90,10 @@
 			upperCorner=lowerCorner+dimensions;
 			num=sphere_pack.makeCloud(lowerCorner,upperCorner,radiusMean,radiusStdDev,numberOfGrains);
 		}
-		message+="Generated a sample with " + lexical_cast<string>(num) + " spheres inside box of dimensions: ("
-			+ lexical_cast<string>(upperCorner[0]-lowerCorner[0]) + ","
-			+ lexical_cast<string>(upperCorner[1]-lowerCorner[1]) + ","
-			+ lexical_cast<string>(upperCorner[2]-lowerCorner[2]) + ").";}
+		message+="Generated a sample with " + boost::lexical_cast<string>(num) + " spheres inside box of dimensions: ("
+			+ boost::lexical_cast<string>(upperCorner[0]-lowerCorner[0]) + ","
+			+ boost::lexical_cast<string>(upperCorner[1]-lowerCorner[1]) + ","
+			+ boost::lexical_cast<string>(upperCorner[2]-lowerCorner[2]) + ").";}
 	else {
 		if(radiusMean>0) LOG_WARN("radiusMean ignored, since importFilename specified.");
 		sphere_pack.fromFile(importFilename);

=== modified file 'pkg/dem/UniaxialStrainer.cpp'
--- pkg/dem/UniaxialStrainer.cpp	2014-04-02 07:44:58 +0000
+++ pkg/dem/UniaxialStrainer.cpp	2014-05-23 13:05:19 +0000
@@ -37,7 +37,7 @@
 	originalLength=axisCoord(posIds[0])-axisCoord(negIds[0]);
 	LOG_DEBUG("Reference particles: positive #"<<posIds[0]<<" at "<<axisCoord(posIds[0])<<"; negative #"<<negIds[0]<<" at "<<axisCoord(negIds[0]));
 	LOG_INFO("Setting initial length to "<<originalLength<<" (between #"<<negIds[0]<<" and #"<<posIds[0]<<")");
-	if(originalLength<=0) throw runtime_error(("UniaxialStrainer: Initial length is negative or zero (swapped reference particles?)! "+lexical_cast<string>(originalLength)).c_str());
+	if(originalLength<=0) throw runtime_error(("UniaxialStrainer: Initial length is negative or zero (swapped reference particles?)! "+boost::lexical_cast<string>(originalLength)).c_str());
 	/* this happens is nan propagates from e.g. brefcom consitutive law in case 2 bodies have _exactly_ the same position
 	 * (the the normal strain is 0./0.=nan). That is an user's error, however and should not happen. */
 	if(isnan(originalLength)) throw logic_error("UniaxialStrainer: Initial length is NaN!");
@@ -67,7 +67,7 @@
 			case -1: v0=-absSpeed; v1=0; break;
 			case  0: v0=-absSpeed/2; v1=absSpeed/2; break;
 			case  1: v0=0; v1=absSpeed; break;
-			default: throw std::invalid_argument(("UniaxialStrainer: unknown asymmetry value "+lexical_cast<string>(asymmetry)+" (should be -1,0,1)").c_str());
+			default: throw std::invalid_argument(("UniaxialStrainer: unknown asymmetry value "+boost::lexical_cast<string>(asymmetry)+" (should be -1,0,1)").c_str());
 		}
 		assert(p1>p0);
 		// set speeds for particles on the boundary

=== modified file 'pkg/dem/VTKRecorder.cpp'
--- pkg/dem/VTKRecorder.cpp	2014-05-08 05:57:04 +0000
+++ pkg/dem/VTKRecorder.cpp	2014-05-23 13:05:19 +0000
@@ -647,7 +647,7 @@
 			vtkSmartPointer<vtkXMLUnstructuredGridWriter> writer = vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New();
 			if(compress) writer->SetCompressor(compressor);
 			if(ascii) writer->SetDataModeToAscii();
-			string fn=fileName+"spheres."+lexical_cast<string>(scene->iter)+".vtu";
+			string fn=fileName+"spheres."+boost::lexical_cast<string>(scene->iter)+".vtu";
 			writer->SetFileName(fn.c_str());
 			#ifdef YADE_VTK6
 				writer->SetInputData(spheresUg);
@@ -675,7 +675,7 @@
 			vtkSmartPointer<vtkXMLUnstructuredGridWriter> writer = vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New();
 			if(compress) writer->SetCompressor(compressor);
 			if(ascii) writer->SetDataModeToAscii();
-			string fn=fileName+"facets."+lexical_cast<string>(scene->iter)+".vtu";
+			string fn=fileName+"facets."+boost::lexical_cast<string>(scene->iter)+".vtu";
 			writer->SetFileName(fn.c_str());
 			#ifdef YADE_VTK6
 				writer->SetInputData(facetsUg);
@@ -703,7 +703,7 @@
 			vtkSmartPointer<vtkXMLUnstructuredGridWriter> writer = vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New();
 			if(compress) writer->SetCompressor(compressor);
 			if(ascii) writer->SetDataModeToAscii();
-			string fn=fileName+"boxes."+lexical_cast<string>(scene->iter)+".vtu";
+			string fn=fileName+"boxes."+boost::lexical_cast<string>(scene->iter)+".vtu";
 			writer->SetFileName(fn.c_str());
 			#ifdef YADE_VTK6
 				writer->SetInputData(boxesUg);
@@ -740,7 +740,7 @@
 			vtkSmartPointer<vtkXMLPolyDataWriter> writer = vtkSmartPointer<vtkXMLPolyDataWriter>::New();
 			if(compress) writer->SetCompressor(compressor);
 			if(ascii) writer->SetDataModeToAscii();
-			string fn=fileName+"intrs."+lexical_cast<string>(scene->iter)+".vtp";
+			string fn=fileName+"intrs."+boost::lexical_cast<string>(scene->iter)+".vtp";
 			writer->SetFileName(fn.c_str());
 			#ifdef YADE_VTK6
 				writer->SetInputData(intrPd);
@@ -761,7 +761,7 @@
 			vtkSmartPointer<vtkXMLUnstructuredGridWriter> writer = vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New();
 			if(compress) writer->SetCompressor(compressor);
 			if(ascii) writer->SetDataModeToAscii();
-			string fn=fileName+"pericell."+lexical_cast<string>(scene->iter)+".vtu";
+			string fn=fileName+"pericell."+boost::lexical_cast<string>(scene->iter)+".vtu";
 			writer->SetFileName(fn.c_str());
 			#ifdef YADE_VTK6
 				writer->SetInputData(pericellUg);
@@ -818,7 +818,7 @@
 		vtkSmartPointer<vtkXMLUnstructuredGridWriter> writer = vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New();
 		if(compress) writer->SetCompressor(compressor);
 		if(ascii) writer->SetDataModeToAscii();
-		string fn=fileName+"cracks."+lexical_cast<string>(scene->iter)+".vtu";
+		string fn=fileName+"cracks."+boost::lexical_cast<string>(scene->iter)+".vtu";
 		writer->SetFileName(fn.c_str());
 		#ifdef YADE_VTK6
 			writer->SetInputData(crackUg);
@@ -835,7 +835,7 @@
 // 		crackUgNew->GetPointData()->AddArray(crackSizeNew);
 // 		crackUgNew->GetPointData()->AddArray(crackNormNew); //same remark about the orientation...
 // 	
-// 		fn=fileName+"newcracks."+lexical_cast<string>(scene->iter)+".vtu";
+// 		fn=fileName+"newcracks."+boost::lexical_cast<string>(scene->iter)+".vtu";
 // 		writer->SetFileName(fn.c_str());
 // 		#ifdef YADE_VTK6
 // 			writer->SetInputData(crackUgNew);
@@ -855,7 +855,7 @@
 			if(recActive[REC_PERICELL]) multiblockDataset->SetBlock(i++,pericellUg);
 			vtkSmartPointer<vtkXMLMultiBlockDataWriter> writer = vtkSmartPointer<vtkXMLMultiBlockDataWriter>::New();
 			if(ascii) writer->SetDataModeToAscii();
-			string fn=fileName+lexical_cast<string>(scene->iter)+".vtm";
+			string fn=fileName+boost::lexical_cast<string>(scene->iter)+".vtm";
 			writer->SetFileName(fn.c_str());
 			#ifdef YADE_VTK6
 				writer->SetInputData(multiblockDataset);

=== modified file 'pkg/pfv/FlowEngine.hpp'
--- pkg/pfv/FlowEngine.hpp	2014-04-24 21:37:44 +0000
+++ pkg/pfv/FlowEngine.hpp	2014-05-23 13:05:19 +0000
@@ -161,13 +161,13 @@
 			return (solver->onlySpheresInteractions.size());}
 		int onlySpheresInteractions(unsigned int interaction) {
 			return (solver->onlySpheresInteractions[interaction]);}
-		python::list getConstrictions(bool all) {
-			vector<Real> csd=solver->getConstrictions(); python::list pycsd;
+		boost::python::list getConstrictions(bool all) {
+			vector<Real> csd=solver->getConstrictions(); boost::python::list pycsd;
 			for (unsigned int k=0;k<csd.size();k++) if ((all && csd[k]!=0) || csd[k]>0) pycsd.append(csd[k]); return pycsd;}
-		python::list getConstrictionsFull(bool all) {
-			vector<Constriction> csd=solver->getConstrictionsFull(); python::list pycsd;
+		boost::python::list getConstrictionsFull(bool all) {
+			vector<Constriction> csd=solver->getConstrictionsFull(); boost::python::list pycsd;
 			for (unsigned int k=0;k<csd.size();k++) if ((all && csd[k].second[0]!=0) || csd[k].second[0]>0) {
-				python::list cons;
+				boost::python::list cons;
 				cons.append(csd[k].first.first);
 				cons.append(csd[k].first.second);
 				cons.append(csd[k].second[0]);
@@ -195,8 +195,8 @@
 		double getPorePressure(Vector3r pos){return solver->getPorePressure(pos[0], pos[1], pos[2]);}
 		int getCell(double posX, double posY, double posZ){return solver->getCell(posX, posY, posZ);}
 		unsigned int nCells(){return solver->T[solver->currentTes].cellHandles.size();}
-		python::list getVertices(unsigned int id){
-			python::list ids;
+		boost::python::list getVertices(unsigned int id){
+			boost::python::list ids;
 			if (id>=solver->T[solver->currentTes].cellHandles.size()) {LOG_ERROR("id out of range, max value is "<<solver->T[solver->currentTes].cellHandles.size()); return ids;}			
 			for (unsigned int i=0;i<4;i++) ids.append(solver->T[solver->currentTes].cellHandles[id]->vertex(i)->info().id());
 			return ids;
@@ -310,49 +310,49 @@
 		ellapsedIter=0;
 		metisForced=false;
 		,
-		.def("imposeFlux",&TemplateFlowEngine::imposeFlux,(python::arg("pos"),python::arg("p")),"Impose incoming flux in boundary cell of location 'pos'.")
-		.def("imposePressure",&TemplateFlowEngine::imposePressure,(python::arg("pos"),python::arg("p")),"Impose pressure in cell of location 'pos'. The index of the condition is returned (for multiple imposed pressures at different points).")
-		.def("setImposedPressure",&TemplateFlowEngine::setImposedPressure,(python::arg("cond"),python::arg("p")),"Set pressure value at the point indexed 'cond'.")
+		.def("imposeFlux",&TemplateFlowEngine::imposeFlux,(boost::python::arg("pos"),boost::python::arg("p")),"Impose incoming flux in boundary cell of location 'pos'.")
+		.def("imposePressure",&TemplateFlowEngine::imposePressure,(boost::python::arg("pos"),boost::python::arg("p")),"Impose pressure in cell of location 'pos'. The index of the condition is returned (for multiple imposed pressures at different points).")
+		.def("setImposedPressure",&TemplateFlowEngine::setImposedPressure,(boost::python::arg("cond"),boost::python::arg("p")),"Set pressure value at the point indexed 'cond'.")
 		.def("clearImposedPressure",&TemplateFlowEngine::clearImposedPressure,"Clear the list of points with pressure imposed.")
 		.def("clearImposedFlux",&TemplateFlowEngine::clearImposedFlux,"Clear the list of points with flux imposed.")
-		.def("getCellFlux",&TemplateFlowEngine::getCellFlux,(python::arg("cond")),"Get influx in cell associated to an imposed P (indexed using 'cond').")
-		.def("getBoundaryFlux",&TemplateFlowEngine::getBoundaryFlux,(python::arg("boundary")),"Get total flux through boundary defined by its body id.\n\n.. note:: The flux may be not zero even for no-flow condition. This artifact comes from cells which are incident to two or more boundaries (along the edges of the sample, typically). Such flux evaluation on impermeable boundary is just irrelevant, it does not imply that the boundary condition is not applied properly.")
-		.def("getConstrictions",&TemplateFlowEngine::getConstrictions,(python::arg("all")=true),"Get the list of constriction radii (inscribed circle) for all finite facets (if all==True) or all facets not incident to a virtual bounding sphere (if all==False).  When all facets are returned, negative radii denote facet incident to one or more fictious spheres.")
-		.def("getConstrictionsFull",&TemplateFlowEngine::getConstrictionsFull,(python::arg("all")=true),"Get the list of constrictions (inscribed circle) for all finite facets (if all==True), or all facets not incident to a fictious bounding sphere (if all==False). When all facets are returned, negative radii denote facet incident to one or more fictious spheres. The constrictions are returned in the format {{cell1,cell2}{rad,nx,ny,nz}}")
+		.def("getCellFlux",&TemplateFlowEngine::getCellFlux,(boost::python::arg("cond")),"Get influx in cell associated to an imposed P (indexed using 'cond').")
+		.def("getBoundaryFlux",&TemplateFlowEngine::getBoundaryFlux,(boost::python::arg("boundary")),"Get total flux through boundary defined by its body id.\n\n.. note:: The flux may be not zero even for no-flow condition. This artifact comes from cells which are incident to two or more boundaries (along the edges of the sample, typically). Such flux evaluation on impermeable boundary is just irrelevant, it does not imply that the boundary condition is not applied properly.")
+		.def("getConstrictions",&TemplateFlowEngine::getConstrictions,(boost::python::arg("all")=true),"Get the list of constriction radii (inscribed circle) for all finite facets (if all==True) or all facets not incident to a virtual bounding sphere (if all==False).  When all facets are returned, negative radii denote facet incident to one or more fictious spheres.")
+		.def("getConstrictionsFull",&TemplateFlowEngine::getConstrictionsFull,(boost::python::arg("all")=true),"Get the list of constrictions (inscribed circle) for all finite facets (if all==True), or all facets not incident to a fictious bounding sphere (if all==False). When all facets are returned, negative radii denote facet incident to one or more fictious spheres. The constrictions are returned in the format {{cell1,cell2}{rad,nx,ny,nz}}")
 		.def("edgeSize",&TemplateFlowEngine::edgeSize,"Return the number of interactions.")
 		.def("OSI",&TemplateFlowEngine::OSI,"Return the number of interactions only between spheres.")
 		
-		.def("saveVtk",&TemplateFlowEngine::saveVtk,(python::arg("folder")="./VTK"),"Save pressure field in vtk format. Specify a folder name for output.")
-		.def("avFlVelOnSph",&TemplateFlowEngine::avFlVelOnSph,(python::arg("idSph")),"compute a sphere-centered average fluid velocity")
-		.def("fluidForce",&TemplateFlowEngine::fluidForce,(python::arg("idSph")),"Return the fluid force on sphere idSph.")
-		.def("shearLubForce",&TemplateFlowEngine::shearLubForce,(python::arg("idSph")),"Return the shear lubrication force on sphere idSph.")
-		.def("shearLubTorque",&TemplateFlowEngine::shearLubTorque,(python::arg("idSph")),"Return the shear lubrication torque on sphere idSph.")
-		.def("normalLubForce",&TemplateFlowEngine::normalLubForce,(python::arg("idSph")),"Return the normal lubrication force on sphere idSph.")
-		.def("bodyShearLubStress",&TemplateFlowEngine::bodyShearLubStress,(python::arg("idSph")),"Return the shear lubrication stress on sphere idSph.")
-		.def("bodyNormalLubStress",&TemplateFlowEngine::bodyNormalLubStress,(python::arg("idSph")),"Return the normal lubrication stress on sphere idSph.")
-		.def("shearVelocity",&TemplateFlowEngine::shearVelocity,(python::arg("idSph")),"Return the shear velocity of the interaction.")
-		.def("normalVelocity",&TemplateFlowEngine::normalVelocity,(python::arg("idSph")),"Return the normal velocity of the interaction.")
-		.def("normalVect",&TemplateFlowEngine::normalVect,(python::arg("idSph")),"Return the normal vector between particles.")
-		.def("surfaceDistanceParticle",&TemplateFlowEngine::surfaceDistanceParticle,(python::arg("interaction")),"Return the distance between particles.")
-		.def("onlySpheresInteractions",&TemplateFlowEngine::onlySpheresInteractions,(python::arg("interaction")),"Return the id of the interaction only between spheres.")
-		.def("pressureProfile",&TemplateFlowEngine::pressureProfile,(python::arg("wallUpY"),python::arg("wallDownY")),"Measure pore pressure in 6 equally-spaced points along the height of the sample")
-		.def("getPorePressure",&TemplateFlowEngine::getPorePressure,(python::arg("pos")),"Measure pore pressure in position pos[0],pos[1],pos[2]")
-		.def("averageSlicePressure",&TemplateFlowEngine::averageSlicePressure,(python::arg("posY")),"Measure slice-averaged pore pressure at height posY")
+		.def("saveVtk",&TemplateFlowEngine::saveVtk,(boost::python::arg("folder")="./VTK"),"Save pressure field in vtk format. Specify a folder name for output.")
+		.def("avFlVelOnSph",&TemplateFlowEngine::avFlVelOnSph,(boost::python::arg("idSph")),"compute a sphere-centered average fluid velocity")
+		.def("fluidForce",&TemplateFlowEngine::fluidForce,(boost::python::arg("idSph")),"Return the fluid force on sphere idSph.")
+		.def("shearLubForce",&TemplateFlowEngine::shearLubForce,(boost::python::arg("idSph")),"Return the shear lubrication force on sphere idSph.")
+		.def("shearLubTorque",&TemplateFlowEngine::shearLubTorque,(boost::python::arg("idSph")),"Return the shear lubrication torque on sphere idSph.")
+		.def("normalLubForce",&TemplateFlowEngine::normalLubForce,(boost::python::arg("idSph")),"Return the normal lubrication force on sphere idSph.")
+		.def("bodyShearLubStress",&TemplateFlowEngine::bodyShearLubStress,(boost::python::arg("idSph")),"Return the shear lubrication stress on sphere idSph.")
+		.def("bodyNormalLubStress",&TemplateFlowEngine::bodyNormalLubStress,(boost::python::arg("idSph")),"Return the normal lubrication stress on sphere idSph.")
+		.def("shearVelocity",&TemplateFlowEngine::shearVelocity,(boost::python::arg("idSph")),"Return the shear velocity of the interaction.")
+		.def("normalVelocity",&TemplateFlowEngine::normalVelocity,(boost::python::arg("idSph")),"Return the normal velocity of the interaction.")
+		.def("normalVect",&TemplateFlowEngine::normalVect,(boost::python::arg("idSph")),"Return the normal vector between particles.")
+		.def("surfaceDistanceParticle",&TemplateFlowEngine::surfaceDistanceParticle,(boost::python::arg("interaction")),"Return the distance between particles.")
+		.def("onlySpheresInteractions",&TemplateFlowEngine::onlySpheresInteractions,(boost::python::arg("interaction")),"Return the id of the interaction only between spheres.")
+		.def("pressureProfile",&TemplateFlowEngine::pressureProfile,(boost::python::arg("wallUpY"),boost::python::arg("wallDownY")),"Measure pore pressure in 6 equally-spaced points along the height of the sample")
+		.def("getPorePressure",&TemplateFlowEngine::getPorePressure,(boost::python::arg("pos")),"Measure pore pressure in position pos[0],pos[1],pos[2]")
+		.def("averageSlicePressure",&TemplateFlowEngine::averageSlicePressure,(boost::python::arg("posY")),"Measure slice-averaged pore pressure at height posY")
 		.def("averagePressure",&TemplateFlowEngine::averagePressure,"Measure averaged pore pressure in the entire volume")
 		.def("updateBCs",&TemplateFlowEngine::updateBCs,"tells the engine to update it's boundary conditions before running (especially useful when changing boundary pressure - should not be needed for point-wise imposed pressure)")
 		.def("emulateAction",&TemplateFlowEngine::emulateAction,"get scene and run action (may be used to manipulate an engine outside the timestepping loop).")
-		.def("getCell",&TemplateFlowEngine::getCell,(python::arg("pos")),"get id of the cell containing (X,Y,Z).")
+		.def("getCell",&TemplateFlowEngine::getCell,(boost::python::arg("pos")),"get id of the cell containing (X,Y,Z).")
 		.def("nCells",&TemplateFlowEngine::nCells,"get the total number of finite cells in the triangulation.")
-		.def("getVertices",&TemplateFlowEngine::getVertices,(python::arg("id")),"get the vertices of a cell")
+		.def("getVertices",&TemplateFlowEngine::getVertices,(boost::python::arg("id")),"get the vertices of a cell")
 		#ifdef LINSOLV
-		.def("exportMatrix",&TemplateFlowEngine::exportMatrix,(python::arg("filename")="matrix"),"Export system matrix to a file with all entries (even zeros will displayed).")
-		.def("exportTriplets",&TemplateFlowEngine::exportTriplets,(python::arg("filename")="triplets"),"Export system matrix to a file with only non-zero entries.")
+		.def("exportMatrix",&TemplateFlowEngine::exportMatrix,(boost::python::arg("filename")="matrix"),"Export system matrix to a file with all entries (even zeros will displayed).")
+		.def("exportTriplets",&TemplateFlowEngine::exportTriplets,(boost::python::arg("filename")="triplets"),"Export system matrix to a file with only non-zero entries.")
 		.def("cholmodStats",&TemplateFlowEngine::cholmodStats,"get statistics of cholmod solver activity")
 		.def("metisUsed",&TemplateFlowEngine::metisUsed,"check wether metis lib is effectively used")
 		.add_property("forceMetis",&TemplateFlowEngine::getForceMetis,&TemplateFlowEngine::setForceMetis,"If true, METIS is used for matrix preconditioning, else Cholmod is free to choose the best method (which may be METIS to, depending on the matrix). See ``nmethods`` in Cholmod documentation")
 		#endif
 		.def("compTessVolumes",&TemplateFlowEngine::compTessVolumes,"Like TesselationWrapper::computeVolumes()")
-		.def("volume",&TemplateFlowEngine::getVolume,(python::arg("id")=0),"Returns the volume of Voronoi's cell of a sphere.")
+		.def("volume",&TemplateFlowEngine::getVolume,(boost::python::arg("id")=0),"Returns the volume of Voronoi's cell of a sphere.")
 		)
 };
 // Definition of functions in a separate file for clarity 

=== modified file 'py/_polyhedra_utils.cpp'
--- py/_polyhedra_utils.cpp	2014-05-16 11:58:59 +0000
+++ py/_polyhedra_utils.cpp	2014-05-23 13:05:19 +0000
@@ -87,18 +87,18 @@
 	Real dt=std::numeric_limits<Real>::infinity();
 	FOREACH(const shared_ptr<Body>& b, *rb->bodies){
 		if(!b || !b->material || !b->shape) continue;
-		shared_ptr<Sphere> s=dynamic_pointer_cast<Sphere>(b->shape);
-		shared_ptr<Polyhedra> p=dynamic_pointer_cast<Polyhedra>(b->shape);
+		shared_ptr<Sphere> s=boost::dynamic_pointer_cast<Sphere>(b->shape);
+		shared_ptr<Polyhedra> p=boost::dynamic_pointer_cast<Polyhedra>(b->shape);
 		if(!s && !p) continue;
 		if(!p){
 			//spheres
-			shared_ptr<ElastMat> ebp=dynamic_pointer_cast<ElastMat>(b->material);
+			shared_ptr<ElastMat> ebp=boost::dynamic_pointer_cast<ElastMat>(b->material);
  			if(!ebp) continue;
 			Real density=b->state->mass/((4./3.)*Mathr::PI*pow(s->radius,3));
 			dt=min(dt,s->radius/sqrt(ebp->young/density));
 		}else{
 			//polyhedrons
-			shared_ptr<PolyhedraMat> ebp=dynamic_pointer_cast<PolyhedraMat>(b->material);
+			shared_ptr<PolyhedraMat> ebp=boost::dynamic_pointer_cast<PolyhedraMat>(b->material);
  			if(!ebp) continue;
 			Real density=b->state->mass/p->GetVolume();
 			//get equivalent radius and use same equation as for sphere
@@ -163,7 +163,7 @@
 	double total_volume = 0;
 	FOREACH(const shared_ptr<Body>& b, *rb->bodies){
 		if(!b || !b->shape) continue;
-		shared_ptr<Polyhedra> p=dynamic_pointer_cast<Polyhedra>(b->shape);
+		shared_ptr<Polyhedra> p=boost::dynamic_pointer_cast<Polyhedra>(b->shape);
 		if(p){
 			sieve_volume.push_back(std::pair<double,double>(SieveSize(p),p->GetVolume()));
 			total_volume += p->GetVolume();
@@ -191,7 +191,7 @@
   	myfile.open ("sizes.dat");
 	FOREACH(const shared_ptr<Body>& b, *rb->bodies){
 		if(!b || !b->shape) continue;
-		shared_ptr<Polyhedra> p=dynamic_pointer_cast<Polyhedra>(b->shape);
+		shared_ptr<Polyhedra> p=boost::dynamic_pointer_cast<Polyhedra>(b->shape);
 		if(p){
 			myfile << SizeOfPolyhedra(p) << endl; 
 		}

=== modified file 'py/_utils.cpp'
--- py/_utils.cpp	2014-05-22 15:26:55 +0000
+++ py/_utils.cpp	2014-05-23 13:05:19 +0000
@@ -28,7 +28,7 @@
 	Real inf=std::numeric_limits<Real>::infinity();
 	Vector3r minimum(inf,inf,inf),maximum(-inf,-inf,-inf);
 	FOREACH(const shared_ptr<Body>& b, *Omega::instance().getScene()->bodies){
-		shared_ptr<Sphere> s=dynamic_pointer_cast<Sphere>(b->shape); if(!s) continue;
+		shared_ptr<Sphere> s=boost::dynamic_pointer_cast<Sphere>(b->shape); if(!s) continue;
 		Vector3r rrr(s->radius,s->radius,s->radius);
 		minimum=minimum.cwiseMin(b->state->pos-(centers?Vector3r::Zero():rrr));
 		maximum=maximum.cwiseMax(b->state->pos+(centers?Vector3r::Zero():rrr));
@@ -42,7 +42,7 @@
 	Real minCoord=py::extract<double>(extrema[0][axis])(),maxCoord=py::extract<double>(extrema[1][axis])();
 	py::list minIds,maxIds;
 	FOREACH(const shared_ptr<Body>& b, *Omega::instance().getScene()->bodies){
-		shared_ptr<Sphere> s=dynamic_pointer_cast<Sphere>(b->shape); if(!s) continue;
+		shared_ptr<Sphere> s=boost::dynamic_pointer_cast<Sphere>(b->shape); if(!s) continue;
 		if(b->state->pos[axis]-s->radius*distFactor<=minCoord) minIds.append(b->getId());
 		if(b->state->pos[axis]+s->radius*distFactor>=maxCoord) maxIds.append(b->getId());
 	}
@@ -76,17 +76,6 @@
 Real PWaveTimeStep(){return Shop::PWaveTimeStep();};
 Real RayleighWaveTimeStep(){return Shop::RayleighWaveTimeStep();};
 
-/* return histogram ([bin1Min,bin2Min,…],[value1,value2,…]) from projections of interactions
- * to the plane perpendicular to axis∈[0,1,2]; the number of bins can be specified and they cover
- * the range (0,π), since interactions are bidirecional, hence periodically the same on (π,2π).
- *
- * Only contacts using ScGeom are considered.
- * Both bodies must be in the mask (except if mask is 0, when all bodies are considered)
- * If the projection is shorter than minProjLen, it is skipped.
- *
- * If both bodies are _outside_ the aabb (if specified), the interaction is skipped.
- *
- */
 py::tuple interactionAnglesHistogram(int axis, int mask=0, size_t bins=20, py::tuple aabb=py::tuple(), Real minProjLen=1e-6){
 	if(axis<0||axis>2) throw invalid_argument("Axis must be from {0,1,2}=x,y,z.");
 	Vector3r bbMin(Vector3r::Zero()), bbMax(Vector3r::Zero()); bool useBB=py::len(aabb)>0; if(useBB){bbMin=py::extract<Vector3r>(aabb[0])();bbMax=py::extract<Vector3r>(aabb[1])();}
@@ -245,7 +234,7 @@
 		switch(mode){
 			case none: wire=false; break;
 			case all: wire=true; break;
-			case noSpheres: wire=!(bool)(dynamic_pointer_cast<Sphere>(b->shape)); break;
+			case noSpheres: wire=!(bool)(boost::dynamic_pointer_cast<Sphere>(b->shape)); break;
 			default: throw logic_error("No such case possible");
 		}
 		b->shape->wire=wire;
@@ -475,7 +464,7 @@
 	py::def("ptInAABB",isInBB,"Return True/False whether the point p is within box given by its min and max corners");
 	py::def("negPosExtremeIds",negPosExtremeIds,negPosExtremeIds_overloads(py::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."));
 	py::def("approxSectionArea",approxSectionArea,"Compute area of convex hull when when taking (swept) spheres crossing the plane at coord, perpendicular to axis.");
-	py::def("coordsAndDisplacements",coordsAndDisplacements,(python::arg("axis"),python::arg("Aabb")=python::tuple()),"Return tuple of 2 same-length lists for coordinates and displacements (coordinate minus reference coordinate) along given axis (1st arg); if the Aabb=((x_min,y_min,z_min),(x_max,y_max,z_max)) box is given, only bodies within this box will be considered.");
+	py::def("coordsAndDisplacements",coordsAndDisplacements,(py::arg("axis"),py::arg("Aabb")=py::tuple()),"Return tuple of 2 same-length lists for coordinates and displacements (coordinate minus reference coordinate) along given axis (1st arg); if the Aabb=((x_min,y_min,z_min),(x_max,y_max,z_max)) box is given, only bodies within this box will be considered.");
 	py::def("setRefSe3",setRefSe3,"Set reference :yref:`positions<State::refPos>` and :yref:`orientations<State::refOri>` of all :yref:`bodies<Body>` equal to their current :yref:`positions<State::pos>` and :yref:`orientations<State::ori>`.");
 	py::def("interactionAnglesHistogram",interactionAnglesHistogram,interactionAnglesHistogram_overloads(py::args("axis","mask","bins","aabb")));
 	py::def("bodyNumInteractionsHistogram",bodyNumInteractionsHistogram,bodyNumInteractionsHistogram_overloads(py::args("aabb")));

=== modified file 'py/wrapper/customConverters.cpp'
--- py/wrapper/customConverters.cpp	2014-05-23 13:03:50 +0000
+++ py/wrapper/customConverters.cpp	2014-05-23 13:05:19 +0000
@@ -43,36 +43,35 @@
 #endif
 #include<yade/pkg/common/MatchMaker.hpp>
 
-using namespace boost::python;
 
 // move this to the miniEigen wrapper later
 
 /* two-way se3 handling */
 struct custom_se3_to_tuple{
 	static PyObject* convert(const Se3r& se3){
-		python::tuple ret=python::make_tuple(se3.position,se3.orientation);
-		return incref(ret.ptr());
+		boost::python::tuple ret=boost::python::make_tuple(se3.position,se3.orientation);
+		return boost::python::incref(ret.ptr());
 	}
 };
 struct custom_Se3r_from_seq{
 	custom_Se3r_from_seq(){
-		 converter::registry::push_back(&convertible,&construct,type_id<Se3r>());
+		 boost::python::converter::registry::push_back(&convertible,&construct,boost::python::type_id<Se3r>());
 	}
 	static void* convertible(PyObject* obj_ptr){
 		 if(!PySequence_Check(obj_ptr)) return 0;
 		 if(PySequence_Size(obj_ptr)!=2 && PySequence_Size(obj_ptr)!=7) return 0;
 		 return obj_ptr;
 	}
-	static void construct(PyObject* obj_ptr, converter::rvalue_from_python_stage1_data* data){
-		void* storage=((converter::rvalue_from_python_storage<Se3r>*)(data))->storage.bytes;
+	static void construct(PyObject* obj_ptr, boost::python::converter::rvalue_from_python_stage1_data* data){
+		void* storage=((boost::python::converter::rvalue_from_python_storage<Se3r>*)(data))->storage.bytes;
 		new (storage) Se3r; Se3r* se3=(Se3r*)storage;
 		if(PySequence_Size(obj_ptr)==2){ // from vector and quaternion
-			se3->position=extract<Vector3r>(PySequence_GetItem(obj_ptr,0));
-			se3->orientation=extract<Quaternionr>(PySequence_GetItem(obj_ptr,1));
+			se3->position=boost::python::extract<Vector3r>(PySequence_GetItem(obj_ptr,0));
+			se3->orientation=boost::python::extract<Quaternionr>(PySequence_GetItem(obj_ptr,1));
 		} else if(PySequence_Size(obj_ptr)==7){ // 3 vector components, 3 axis components, angle
-			se3->position=Vector3r(extract<Real>(PySequence_GetItem(obj_ptr,0)),extract<Real>(PySequence_GetItem(obj_ptr,1)),extract<Real>(PySequence_GetItem(obj_ptr,2)));
-			Vector3r axis=Vector3r(extract<Real>(PySequence_GetItem(obj_ptr,3)),extract<Real>(PySequence_GetItem(obj_ptr,4)),extract<Real>(PySequence_GetItem(obj_ptr,5)));
-			Real angle=extract<Real>(PySequence_GetItem(obj_ptr,6));
+			se3->position=Vector3r(boost::python::extract<Real>(PySequence_GetItem(obj_ptr,0)),boost::python::extract<Real>(PySequence_GetItem(obj_ptr,1)),boost::python::extract<Real>(PySequence_GetItem(obj_ptr,2)));
+			Vector3r axis=Vector3r(boost::python::extract<Real>(PySequence_GetItem(obj_ptr,3)),boost::python::extract<Real>(PySequence_GetItem(obj_ptr,4)),boost::python::extract<Real>(PySequence_GetItem(obj_ptr,5)));
+			Real angle=boost::python::extract<Real>(PySequence_GetItem(obj_ptr,6));
 			se3->orientation=Quaternionr(AngleAxisr(angle,axis));
 		} else throw std::logic_error(__FILE__ ": First, the sequence size for Se3r object was 2 or 7, but now is not? (programming error, please report!");
 		data->convertible=storage;
@@ -80,69 +79,69 @@
 };
 
 
-struct custom_OpenMPAccumulator_to_float{ static PyObject* convert(const OpenMPAccumulator<Real>& acc){ return incref(PyFloat_FromDouble(acc.get())); } };
+struct custom_OpenMPAccumulator_to_float{ static PyObject* convert(const OpenMPAccumulator<Real>& acc){ return boost::python::incref(PyFloat_FromDouble(acc.get())); } };
 struct custom_OpenMPAccumulator_from_float{
-	custom_OpenMPAccumulator_from_float(){  converter::registry::push_back(&convertible,&construct,type_id<OpenMPAccumulator<Real> >()); }
+	custom_OpenMPAccumulator_from_float(){  boost::python::converter::registry::push_back(&convertible,&construct,boost::python::type_id<OpenMPAccumulator<Real> >()); }
 	static void* convertible(PyObject* obj_ptr){ return PyFloat_Check(obj_ptr) ? obj_ptr : 0; }
-	static void construct(PyObject* obj_ptr, converter::rvalue_from_python_stage1_data* data){ void* storage=((converter::rvalue_from_python_storage<OpenMPAccumulator<Real> >*)(data))->storage.bytes; new (storage) OpenMPAccumulator<Real>; ((OpenMPAccumulator<Real>*)storage)->set(extract<Real>(obj_ptr)); data->convertible=storage; }
+	static void construct(PyObject* obj_ptr, boost::python::converter::rvalue_from_python_stage1_data* data){ void* storage=((boost::python::converter::rvalue_from_python_storage<OpenMPAccumulator<Real> >*)(data))->storage.bytes; new (storage) OpenMPAccumulator<Real>; ((OpenMPAccumulator<Real>*)storage)->set(boost::python::extract<Real>(obj_ptr)); data->convertible=storage; }
 };
-struct custom_OpenMPAccumulator_to_int  { static PyObject* convert(const OpenMPAccumulator<int>& acc){ return incref(PyInt_FromLong((long)acc.get())); } };
+struct custom_OpenMPAccumulator_to_int  { static PyObject* convert(const OpenMPAccumulator<int>& acc){ return boost::python::incref(PyInt_FromLong((long)acc.get())); } };
 struct custom_OpenMPAccumulator_from_int{
-	custom_OpenMPAccumulator_from_int(){  converter::registry::push_back(&convertible,&construct,type_id<OpenMPAccumulator<int> >()); }
+	custom_OpenMPAccumulator_from_int(){  boost::python::converter::registry::push_back(&convertible,&construct,boost::python::type_id<OpenMPAccumulator<int> >()); }
 	static void* convertible(PyObject* obj_ptr){ return PyInt_Check(obj_ptr) ? obj_ptr : 0; }
-	static void construct(PyObject* obj_ptr, converter::rvalue_from_python_stage1_data* data){ void* storage=((converter::rvalue_from_python_storage<OpenMPAccumulator<int> >*)(data))->storage.bytes; new (storage) OpenMPAccumulator<int>; ((OpenMPAccumulator<int>*)storage)->set(extract<int>(obj_ptr)); data->convertible=storage; }
+	static void construct(PyObject* obj_ptr, boost::python::converter::rvalue_from_python_stage1_data* data){ void* storage=((boost::python::converter::rvalue_from_python_storage<OpenMPAccumulator<int> >*)(data))->storage.bytes; new (storage) OpenMPAccumulator<int>; ((OpenMPAccumulator<int>*)storage)->set(boost::python::extract<int>(obj_ptr)); data->convertible=storage; }
 };
 
 template<typename T>
 struct custom_vvector_to_list{
 	static PyObject* convert(const std::vector<std::vector<T> >& vv){
-		python::list ret; FOREACH(const std::vector<T>& v, vv){
-			python::list ret2;
+		boost::python::list ret; FOREACH(const std::vector<T>& v, vv){
+			boost::python::list ret2;
 			FOREACH(const T& e, v) ret2.append(e);
 			ret.append(ret2);
 		}
-		return incref(ret.ptr());
+		return boost::python::incref(ret.ptr());
 	}
 };
 
 template<typename containedType>
 struct custom_list_to_list{
 	static PyObject* convert(const std::list<containedType>& v){
-		python::list ret; FOREACH(const containedType& e, v) ret.append(e);
-		return incref(ret.ptr());
+		boost::python::list ret; FOREACH(const containedType& e, v) ret.append(e);
+		return boost::python::incref(ret.ptr());
 	}
 };
 /*** c++-list to python-list */
 template<typename containedType>
 struct custom_vector_to_list{
 	static PyObject* convert(const std::vector<containedType>& v){
-		python::list ret; FOREACH(const containedType& e, v) ret.append(e);
-		return incref(ret.ptr());
+		boost::python::list ret; FOREACH(const containedType& e, v) ret.append(e);
+		return boost::python::incref(ret.ptr());
 	}
 };
 template<typename containedType>
 struct custom_vector_from_seq{
-	custom_vector_from_seq(){ converter::registry::push_back(&convertible,&construct,type_id<std::vector<containedType> >()); }
+	custom_vector_from_seq(){ boost::python::converter::registry::push_back(&convertible,&construct,boost::python::type_id<std::vector<containedType> >()); }
 	static void* convertible(PyObject* obj_ptr){
 		// the second condition is important, for some reason otherwise there were attempted conversions of Body to list which failed afterwards.
 		if(!PySequence_Check(obj_ptr) || !PyObject_HasAttrString(obj_ptr,"__len__")) return 0;
 		return obj_ptr;
 	}
-	static void construct(PyObject* obj_ptr, converter::rvalue_from_python_stage1_data* data){
-		 void* storage=((converter::rvalue_from_python_storage<std::vector<containedType> >*)(data))->storage.bytes;
+	static void construct(PyObject* obj_ptr, boost::python::converter::rvalue_from_python_stage1_data* data){
+		 void* storage=((boost::python::converter::rvalue_from_python_storage<std::vector<containedType> >*)(data))->storage.bytes;
 		 new (storage) std::vector<containedType>();
 		 std::vector<containedType>* v=(std::vector<containedType>*)(storage);
-		 int l=PySequence_Size(obj_ptr); if(l<0) abort(); /*std::cerr<<"l="<<l<<"; "<<typeid(containedType).name()<<std::endl;*/ v->reserve(l); for(int i=0; i<l; i++) { v->push_back(extract<containedType>(PySequence_GetItem(obj_ptr,i))); }
+		 int l=PySequence_Size(obj_ptr); if(l<0) abort(); /*std::cerr<<"l="<<l<<"; "<<typeid(containedType).name()<<std::endl;*/ v->reserve(l); for(int i=0; i<l; i++) { v->push_back(boost::python::extract<containedType>(PySequence_GetItem(obj_ptr,i))); }
 		 data->convertible=storage;
 	}
 };
 
 
 struct custom_ptrMatchMaker_from_float{
-	custom_ptrMatchMaker_from_float(){ converter::registry::push_back(&convertible,&construct,type_id<shared_ptr<MatchMaker> >()); }
+	custom_ptrMatchMaker_from_float(){ boost::python::converter::registry::push_back(&convertible,&construct,boost::python::type_id<shared_ptr<MatchMaker> >()); }
 	static void* convertible(PyObject* obj_ptr){ if(!PyNumber_Check(obj_ptr)) { cerr<<"Not convertible to MatchMaker"<<endl; return 0; } return obj_ptr; }
-	static void construct(PyObject* obj_ptr, converter::rvalue_from_python_stage1_data* data){
-		void* storage=((converter::rvalue_from_python_storage<shared_ptr<MatchMaker> >*)(data))->storage.bytes;
+	static void construct(PyObject* obj_ptr, boost::python::converter::rvalue_from_python_stage1_data* data){
+		void* storage=((boost::python::converter::rvalue_from_python_storage<shared_ptr<MatchMaker> >*)(data))->storage.bytes;
 		new (storage) shared_ptr<MatchMaker>(new MatchMaker); // allocate the object at given address
 		shared_ptr<MatchMaker>* mm=(shared_ptr<MatchMaker>*)(storage); // convert that address to our type
 		(*mm)->algo="val"; (*mm)->val=PyFloat_AsDouble(obj_ptr); (*mm)->postLoad(**mm);
@@ -152,10 +151,10 @@
 
 BOOST_PYTHON_MODULE(_customConverters){
 
-	custom_Se3r_from_seq(); to_python_converter<Se3r,custom_se3_to_tuple>();
+	custom_Se3r_from_seq(); boost::python::to_python_converter<Se3r,custom_se3_to_tuple>();
 
-	custom_OpenMPAccumulator_from_float(); to_python_converter<OpenMPAccumulator<Real>, custom_OpenMPAccumulator_to_float>(); 
-	custom_OpenMPAccumulator_from_int(); to_python_converter<OpenMPAccumulator<int>, custom_OpenMPAccumulator_to_int>(); 
+	custom_OpenMPAccumulator_from_float(); boost::python::to_python_converter<OpenMPAccumulator<Real>, custom_OpenMPAccumulator_to_float>(); 
+	custom_OpenMPAccumulator_from_int(); boost::python::to_python_converter<OpenMPAccumulator<int>, custom_OpenMPAccumulator_to_int>(); 
 	// todo: OpenMPAccumulator<int>
 
 	custom_ptrMatchMaker_from_float();
@@ -164,12 +163,12 @@
 	//custom_StrArrayMap_to_dict();
 	// register from-python converter and to-python converter
 
-	to_python_converter<std::vector<std::vector<std::string> >,custom_vvector_to_list<std::string> >();
-	//to_python_converter<std::list<shared_ptr<Functor> >, custom_list_to_list<shared_ptr<Functor> > >();
-	//to_python_converter<std::list<shared_ptr<Functor> >, custom_list_to_list<shared_ptr<Functor> > >();
+	boost::python::to_python_converter<std::vector<std::vector<std::string> >,custom_vvector_to_list<std::string> >();
+	//boost::python::to_python_converter<std::list<shared_ptr<Functor> >, custom_list_to_list<shared_ptr<Functor> > >();
+	//boost::python::to_python_converter<std::list<shared_ptr<Functor> >, custom_list_to_list<shared_ptr<Functor> > >();
 
 	// register 2-way conversion between c++ vector and python homogeneous sequence (list/tuple) of corresponding type
-	#define VECTOR_SEQ_CONV(Type) custom_vector_from_seq<Type>();  to_python_converter<std::vector<Type>, custom_vector_to_list<Type> >();
+	#define VECTOR_SEQ_CONV(Type) custom_vector_from_seq<Type>();  boost::python::to_python_converter<std::vector<Type>, custom_vector_to_list<Type> >();
 		VECTOR_SEQ_CONV(int);
 		VECTOR_SEQ_CONV(bool);
 		VECTOR_SEQ_CONV(Real);
@@ -206,15 +205,6 @@
 			VECTOR_SEQ_CONV(shared_ptr<GlExtraDrawer>);
 		#endif
 	#undef VECTOR_SEQ_CONV
-
-	#if 0
-		import_array();
-		to_python_converter<numpy_boost<Real,1>, custom_numpyBoost_to_py<Real,1> >();
-		to_python_converter<numpy_boost<Real,2>, custom_numpyBoost_to_py<Real,2> >();
-		to_python_converter<numpy_boost<int,1>, custom_numpyBoost_to_py<int,1> >();
-		to_python_converter<numpy_boost<int,2>, custom_numpyBoost_to_py<int,2> >();
-	#endif
-
 }
 
 

=== modified file 'py/wrapper/yadeWrapper.cpp'
--- py/wrapper/yadeWrapper.cpp	2014-05-23 13:03:50 +0000
+++ py/wrapper/yadeWrapper.cpp	2014-05-23 13:05:19 +0000
@@ -91,7 +91,7 @@
 	private:
 		void checkClump(shared_ptr<Body> b){
 			if (!(b->isClump())){
-				PyErr_SetString(PyExc_TypeError,("Error: Body"+lexical_cast<string>(b->getId())+" is not a clump.").c_str());
+				PyErr_SetString(PyExc_TypeError,("Error: Body"+boost::lexical_cast<string>(b->getId())+" is not a clump.").c_str());
 				py::throw_error_already_set();
 			}
 		}
@@ -107,7 +107,7 @@
 	}
 	Body::id_t append(shared_ptr<Body> b){
 		// shoud be >=0, but Body is by default created with id 0... :-|
-		if(b->getId()>=0){ PyErr_SetString(PyExc_IndexError,("Body already has id "+lexical_cast<string>(b->getId())+" set; appending such body (for the second time) is not allowed.").c_str()); py::throw_error_already_set(); }
+		if(b->getId()>=0){ PyErr_SetString(PyExc_IndexError,("Body already has id "+boost::lexical_cast<string>(b->getId())+" set; appending such body (for the second time) is not allowed.").c_str()); py::throw_error_already_set(); }
 		return proxee->insert(b);
 	}
 	vector<Body::id_t> appendList(vector<shared_ptr<Body> > bb){
@@ -175,14 +175,14 @@
 		FOREACH(Body::id_t bid, bids) {
 			shared_ptr<Body> bp = Body::byId(bid,scene);		// get body pointer
 			if (bp->isClump()){
-				if (bp == clp) {PyErr_Warn(PyExc_UserWarning,("Warning: Body "+lexical_cast<string>(bid)+" and clump "+lexical_cast<string>(cid)+" are the same bodies. Body was not added.").c_str()); return;}
+				if (bp == clp) {PyErr_Warn(PyExc_UserWarning,("Warning: Body "+boost::lexical_cast<string>(bid)+" and clump "+boost::lexical_cast<string>(cid)+" are the same bodies. Body was not added.").c_str()); return;}
 				Clump::add(clp,bp);//add clump bid to clump cid
 				eraseList.push_back(bid);
 			}
 			else if (bp->isClumpMember()){
 				Body::id_t bpClumpId = bp->clumpId;
 				shared_ptr<Body> bpClumpPointer = Body::byId(bpClumpId,scene);
-				if (bpClumpPointer == clp) {PyErr_Warn(PyExc_UserWarning,("Warning: Body "+lexical_cast<string>(bid)+" is already a clump member of clump "+lexical_cast<string>(cid)+". Body was not added.").c_str()); return;} 
+				if (bpClumpPointer == clp) {PyErr_Warn(PyExc_UserWarning,("Warning: Body "+boost::lexical_cast<string>(bid)+" is already a clump member of clump "+boost::lexical_cast<string>(cid)+". Body was not added.").c_str()); return;} 
 				Clump::add(clp,bpClumpPointer);//add clump bpClumpId to clump cid
 				eraseList.push_back(bpClumpId);
 			}
@@ -201,11 +201,11 @@
 			if (cid == bpClumpId){
 				const shared_ptr<Clump>& clump=YADE_PTR_CAST<Clump>(clp->shape);
 				std::map<Body::id_t,Se3r>& members = clump->members;
-				if (members.size() == 2) {PyErr_Warn(PyExc_UserWarning,("Warning: Body "+lexical_cast<string>(bid)+" not released from clump "+lexical_cast<string>(cid)+", because number of clump members would get < 2!").c_str()); return;}
+				if (members.size() == 2) {PyErr_Warn(PyExc_UserWarning,("Warning: Body "+boost::lexical_cast<string>(bid)+" not released from clump "+boost::lexical_cast<string>(cid)+", because number of clump members would get < 2!").c_str()); return;}
 				Clump::del(clp,bp);//release bid from cid
 				Clump::updateProperties(clp, discretization);
-			} else { PyErr_Warn(PyExc_UserWarning,("Warning: Body "+lexical_cast<string>(bid)+" must be a clump member of clump "+lexical_cast<string>(cid)+". Body was not released.").c_str()); return;}
-		} else { PyErr_Warn(PyExc_UserWarning,("Warning: Body "+lexical_cast<string>(bid)+" is not a clump member. Body was not released.").c_str()); return;}
+			} else { PyErr_Warn(PyExc_UserWarning,("Warning: Body "+boost::lexical_cast<string>(bid)+" must be a clump member of clump "+boost::lexical_cast<string>(cid)+". Body was not released.").c_str()); return;}
+		} else { PyErr_Warn(PyExc_UserWarning,("Warning: Body "+boost::lexical_cast<string>(bid)+" is not a clump member. Body was not released.").c_str()); return;}
 	}
 	py::list replaceByClumps(py::list ctList, vector<Real> amounts, unsigned int discretization){
 		py::list ret;
@@ -218,11 +218,11 @@
 			else checkSum += amount;
 		}
 		if (checkSum > 1.0){
-			PyErr_SetString(PyExc_ValueError,("Error: Sum of amounts "+lexical_cast<string>(checkSum)+" should not be bigger than 1.0!").c_str()); 
+			PyErr_SetString(PyExc_ValueError,("Error: Sum of amounts "+boost::lexical_cast<string>(checkSum)+" should not be bigger than 1.0!").c_str()); 
 			py::throw_error_already_set();
 		}
 		if (py::len(ctList) != (unsigned) amounts.size()) {//avoid unsigned comparison warning
-			PyErr_SetString(PyExc_ValueError,("Error: Length of amounts list ("+lexical_cast<string>(amounts.size())+") differs from length of template list ("+lexical_cast<string>(py::len(ctList))+").").c_str()); 
+			PyErr_SetString(PyExc_ValueError,("Error: Length of amounts list ("+boost::lexical_cast<string>(amounts.size())+") differs from length of template list ("+boost::lexical_cast<string>(py::len(ctList))+").").c_str()); 
 			py::throw_error_already_set();
 		}
 		//set a random generator (code copied from pkg/dem/SpherePack.cpp):
@@ -437,10 +437,10 @@
 	public:
 		pyTags(const shared_ptr<Scene> _mb): mb(_mb){}
 		const shared_ptr<Scene> mb;
-		bool hasKey(const string& key){ FOREACH(string val, mb->tags){ if(algorithm::starts_with(val,key+"=")){ return true;} } return false; }
+		bool hasKey(const string& key){ FOREACH(string val, mb->tags){ if(boost::algorithm::starts_with(val,key+"=")){ return true;} } return false; }
 		string getItem(const string& key){
 			FOREACH(string& val, mb->tags){
-				if(algorithm::starts_with(val,key+"=")){ string val1(val); algorithm::erase_head(val1,key.size()+1); return val1;}
+				if(boost::algorithm::starts_with(val,key+"=")){ string val1(val); boost::algorithm::erase_head(val1,key.size()+1); return val1;}
 			}
 			PyErr_SetString(PyExc_KeyError,("Invalid key: "+key+".").c_str());
 			py::throw_error_already_set(); /* make compiler happy; never reached */ return string();
@@ -450,7 +450,7 @@
 				PyErr_SetString(PyExc_KeyError, "Key must not contain the '=' character (implementation limitation; sorry).");
 				py::throw_error_already_set();
 			}
-			FOREACH(string& val, mb->tags){if(algorithm::starts_with(val,key+"=")){ val=key+"="+item; return; } }
+			FOREACH(string& val, mb->tags){if(boost::algorithm::starts_with(val,key+"=")){ val=key+"="+item; return; } }
 			mb->tags.push_back(key+"="+item);
 			}
 		py::list keys(){
@@ -458,7 +458,7 @@
 			FOREACH(string val, mb->tags){
 				size_t i=val.find("=");
 				if(i==string::npos) throw runtime_error("Tags must be in the key=value format (internal error?)");
-				algorithm::erase_tail(val,val.size()-i); ret.append(val);
+				boost::algorithm::erase_tail(val,val.size()-i); ret.append(val);
 			}
 			return ret;
 		}
@@ -498,7 +498,7 @@
 		/* return nth _real_ iteration from the container (0-based index); this is to facilitate picking random interaction */
 		shared_ptr<Interaction> pyNth(long n){
 			long i=0; FOREACH(shared_ptr<Interaction> I, *proxee){ if(!I->isReal()) continue; if(i++==n) return I; }
-			PyErr_SetString(PyExc_IndexError,(string("Interaction number out of range (")+lexical_cast<string>(n)+">="+lexical_cast<string>(i)+").").c_str());
+			PyErr_SetString(PyExc_IndexError,(string("Interaction number out of range (")+boost::lexical_cast<string>(n)+">="+boost::lexical_cast<string>(i)+").").c_str());
 			py::throw_error_already_set(); /* make compiler happy; never reached */ return shared_ptr<Interaction>();
 		}
 		long len(){return proxee->size();}
@@ -575,7 +575,7 @@
 		// a call to this functions would have to be added to pyMaterialContainer::append
 		#if 0
 			FOREACH(const shared_ptr<Material>& m, OMEGA.getScene()->materials){
-				if(!m->label.empty()) { PyGILState_STATE gstate; gstate = PyGILState_Ensure(); PyRun_SimpleString(("__builtins__."+m->label+"=Omega().materials["+lexical_cast<string>(m->id)+"]").c_str()); PyGILState_Release(gstate); }
+				if(!m->label.empty()) { PyGILState_STATE gstate; gstate = PyGILState_Ensure(); PyRun_SimpleString(("__builtins__."+m->label+"=Omega().materials["+boost::lexical_cast<string>(m->id)+"]").c_str()); PyGILState_Release(gstate); }
 			}
 		#endif
 		FOREACH(const shared_ptr<Engine>& e, OMEGA.getScene()->engines){
@@ -653,7 +653,7 @@
 		OMEGA.run();
 		// timespec t1,t2; t1.tv_sec=0; t1.tv_nsec=40000000; /* 40 ms */
 		// while(!OMEGA.isRunning()) nanosleep(&t1,&t2); // wait till we start, so that calling wait() immediately afterwards doesn't return immediately
-		LOG_DEBUG("RUN"<<((scene->stopAtIter-scene->iter)>0?string(" ("+lexical_cast<string>(scene->stopAtIter-scene->iter)+" to go)"):string(""))<<"!");
+		LOG_DEBUG("RUN"<<((scene->stopAtIter-scene->iter)>0?string(" ("+boost::lexical_cast<string>(scene->stopAtIter-scene->iter)+" to go)"):string(""))<<"!");
 		if(doWait) wait();
 	}
 	void pause(){Py_BEGIN_ALLOW_THREADS; OMEGA.pause(); Py_END_ALLOW_THREADS; LOG_DEBUG("PAUSE!");}
@@ -678,9 +678,9 @@
 	py::list lsTmp(){ py::list ret; typedef pair<std::string,string> strstr; FOREACH(const strstr& sim,OMEGA.memSavedSimulations){ string mark=sim.first; boost::algorithm::replace_first(mark,":memory:",""); ret.append(mark); } return ret; }
 	void tmpToFile(string mark, string filename){
 		if(OMEGA.memSavedSimulations.count(":memory:"+mark)==0) throw runtime_error("No memory-saved simulation named "+mark);
-		iostreams::filtering_ostream out;
-		if(algorithm::ends_with(filename,".bz2")) out.push(iostreams::bzip2_compressor());
-		out.push(iostreams::file_sink(filename));
+		boost::iostreams::filtering_ostream out;
+		if(boost::algorithm::ends_with(filename,".bz2")) out.push(boost::iostreams::bzip2_compressor());
+		out.push(boost::iostreams::file_sink(filename));
 		if(!out.good()) throw runtime_error("Error while opening file `"+filename+"' for writing.");
 		LOG_INFO("Saving :memory:"<<mark<<" to "<<filename);
 		out<<OMEGA.memSavedSimulations[":memory:"+mark];
@@ -776,7 +776,7 @@
 	void interactionContainer_set(string clss){
 		Scene* rb=OMEGA.getScene().get();
 		if(rb->interactions->size()>0) throw std::runtime_error("Interaction container not empty, will not change its class.");
-		shared_ptr<InteractionContainer> ic=dynamic_pointer_cast<InteractionContainer>(ClassFactory::instance().createShared(clss));
+		shared_ptr<InteractionContainer> ic=boost::dynamic_pointer_cast<InteractionContainer>(ClassFactory::instance().createShared(clss));
 		rb->interactions=ic;
 	}
 	string interactionContainer_get(string clss){ return OMEGA.getScene()->interactions->getClassName(); }
@@ -784,7 +784,7 @@
 	void bodyContainer_set(string clss){
 		Scene* rb=OMEGA.getScene().get();
 		if(rb->bodies->size()>0) throw std::runtime_error("Body container not empty, will not change its class.");
-		shared_ptr<BodyContainer> bc=dynamic_pointer_cast<BodyContainer>(ClassFactory::instance().createShared(clss));
+		shared_ptr<BodyContainer> bc=boost::dynamic_pointer_cast<BodyContainer>(ClassFactory::instance().createShared(clss));
 		rb->bodies=bc;
 	}
 	string bodyContainer_get(string clss){ return OMEGA.getScene()->bodies->getClassName(); }
@@ -968,7 +968,7 @@
 ///////////// proxyless wrappers 
 	Serializable().pyRegisterClass(py::scope());
 
-	py::class_<TimingDeltas, shared_ptr<TimingDeltas>, noncopyable >("TimingDeltas").add_property("data",&TimingDeltas::pyData,"Get timing data as list of tuples (label, execTime[nsec], execCount) (one tuple per checkpoint)").def("reset",&TimingDeltas::reset,"Reset timing information");
+	py::class_<TimingDeltas, shared_ptr<TimingDeltas>, boost::noncopyable >("TimingDeltas").add_property("data",&TimingDeltas::pyData,"Get timing data as list of tuples (label, execTime[nsec], execCount) (one tuple per checkpoint)").def("reset",&TimingDeltas::reset,"Reset timing information");
 
 	py::scope().attr("O")=pyOmega();
 }