← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3751: Remove deprecated findBoundDispatcherInEnginesIfNoFunctorsAndWarn

 

------------------------------------------------------------
revno: 3751
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Wed 2015-12-09 08:35:43 +0100
message:
  Remove deprecated findBoundDispatcherInEnginesIfNoFunctorsAndWarn
modified:
  pkg/common/Collider.cpp
  pkg/common/Collider.hpp
  pkg/common/InsertionSortCollider.cpp
  pkg/common/PersistentTriangulationCollider.cpp
  pkg/common/SpatialQuickSortCollider.cpp
  pkg/common/ZECollider.cpp
  pkg/dem/GeneralIntegratorInsertionSortCollider.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 'pkg/common/Collider.cpp'
--- pkg/common/Collider.cpp	2015-06-10 11:04:02 +0000
+++ pkg/common/Collider.cpp	2015-12-09 07:35:43 +0000
@@ -40,14 +40,3 @@
 	FOREACH(shared_ptr<BoundFunctor> bf, vb) this->boundDispatcher->add(bf);
 	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=YADE_PTR_DYN_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;
-	boundDispatcher->activated=false; // deactivate in the engine loop, the collider will call it itself
-}
-

=== modified file 'pkg/common/Collider.hpp'
--- pkg/common/Collider.hpp	2014-10-15 06:44:01 +0000
+++ pkg/common/Collider.hpp	2015-12-09 07:35:43 +0000
@@ -33,9 +33,6 @@
 
 		// ctor with functors for the integrated BoundDispatcher
 		virtual void pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d);
-
-		// backwards-compatility func, can be removed later
-		void findBoundDispatcherInEnginesIfNoFunctorsAndWarn();
 		
 		int get_avoidSelfInteractionMask(){return avoidSelfInteractionMask;}
 		void set_avoidSelfInteractionMask(const int &v){avoidSelfInteractionMask = v;}
@@ -44,8 +41,6 @@
 		((shared_ptr<BoundDispatcher>,boundDispatcher,new BoundDispatcher,Attr::readonly,":yref:`BoundDispatcher` object that is used for creating :yref:`bounds <Body.bound>` on collider's request as necessary.")),
 		/*ctor*/,
 		.add_property("avoidSelfInteractionMask",&Collider::get_avoidSelfInteractionMask,&Collider::set_avoidSelfInteractionMask,"This mask is used to avoid the interactions inside a group of particles. To do so, the particles must have the same mask and this mask have to be compatible with this one.")
-	
-		
 	);
 };
 REGISTER_SERIALIZABLE(Collider);

=== modified file 'pkg/common/InsertionSortCollider.cpp'
--- pkg/common/InsertionSortCollider.cpp	2015-06-15 06:33:01 +0000
+++ pkg/common/InsertionSortCollider.cpp	2015-12-09 07:35:43 +0000
@@ -230,9 +230,6 @@
 		assert(BB[0].axis==0); assert(BB[1].axis==1); assert(BB[2].axis==2);
 		if(periodic) for(int i=0; i<3; i++) BB[i].updatePeriodicity(scene);
 
-		// compatibility block, can be removed later
-		findBoundDispatcherInEnginesIfNoFunctorsAndWarn();
-
 		if(verletDist<0){
 			Real minR=std::numeric_limits<Real>::infinity();
 			FOREACH(const shared_ptr<Body>& b, *scene->bodies){

=== modified file 'pkg/common/PersistentTriangulationCollider.cpp'
--- pkg/common/PersistentTriangulationCollider.cpp	2014-10-15 06:44:01 +0000
+++ pkg/common/PersistentTriangulationCollider.cpp	2015-12-09 07:35:43 +0000
@@ -35,8 +35,6 @@
 
 void PersistentTriangulationCollider::action ()
 {
-	// compatibility func, can be removed later
-	findBoundDispatcherInEnginesIfNoFunctorsAndWarn();
 	// update bounds
 	boundDispatcher->scene=scene; boundDispatcher->action();
 

=== modified file 'pkg/common/SpatialQuickSortCollider.cpp'
--- pkg/common/SpatialQuickSortCollider.cpp	2015-04-30 16:53:30 +0000
+++ pkg/common/SpatialQuickSortCollider.cpp	2015-12-09 07:35:43 +0000
@@ -17,8 +17,6 @@
 {
 	if(scene->isPeriodic){ throw runtime_error("SpatialQuickSortCollider doesn't handle periodic boundaries."); }
 
-	// compatibility func, can be removed later
-	findBoundDispatcherInEnginesIfNoFunctorsAndWarn();
 	// update bounds
 	boundDispatcher->scene=scene; boundDispatcher->action();
 

=== modified file 'pkg/common/ZECollider.cpp'
--- pkg/common/ZECollider.cpp	2014-10-15 06:44:01 +0000
+++ pkg/common/ZECollider.cpp	2015-12-09 07:35:43 +0000
@@ -57,8 +57,6 @@
 		periodic=scene->isPeriodic;
 	}
 
-		findBoundDispatcherInEnginesIfNoFunctorsAndWarn();
-
 		if(verletDist<0){
 			Real minR=std::numeric_limits<Real>::infinity();
 			FOREACH(const shared_ptr<Body>& b, *scene->bodies){

=== modified file 'pkg/dem/GeneralIntegratorInsertionSortCollider.cpp'
--- pkg/dem/GeneralIntegratorInsertionSortCollider.cpp	2015-06-15 06:33:01 +0000
+++ pkg/dem/GeneralIntegratorInsertionSortCollider.cpp	2015-12-09 07:35:43 +0000
@@ -75,9 +75,6 @@
 		assert(BB[0].axis==0); assert(BB[1].axis==1); assert(BB[2].axis==2);
 		if(periodic) for(int i=0; i<3; i++) BB[i].updatePeriodicity(scene);
 
-		// compatibility block, can be removed later
-		findBoundDispatcherInEnginesIfNoFunctorsAndWarn();
-
 		if(verletDist<0){
 			Real minR=std::numeric_limits<Real>::infinity();
 			FOREACH(const shared_ptr<Body>& b, *scene->bodies){