Author: eudoxos
Date: 2009-08-05 10:32:18 +0200 (Wed, 05 Aug 2009)
New Revision: 1920

Modified:
   trunk/gui/py/PythonUI_rc.py
   trunk/pkg/common/Engine/StandAloneEngine/DistantPersistentSAPCollider.cpp
   trunk/pkg/common/Engine/StandAloneEngine/PersistentSAPCollider.cpp
   trunk/pkg/common/Engine/StandAloneEngine/PersistentSAPCollider.hpp
   trunk/pkg/dem/DataClass/Clump.hpp
   trunk/pkg/dem/Engine/EngineUnit/InteractingMyTetrahedron2AABB.hpp
   trunk/pkg/dem/Engine/StandAloneEngine/NewtonsDampedLaw.cpp
   trunk/pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp
   trunk/pkg/dem/PreProcessor/DirectShearCis.cpp
   trunk/pkg/dem/PreProcessor/Funnel.cpp
   trunk/pkg/dem/PreProcessor/MembraneTest.cpp
   trunk/pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp
   trunk/pkg/dem/PreProcessor/SDECImpactTest.cpp
   trunk/pkg/dem/PreProcessor/SDECLinkedSpheres.cpp
   trunk/pkg/dem/PreProcessor/SDECMovingWall.cpp
   trunk/pkg/dem/PreProcessor/SDECSpheresPlane.cpp
   trunk/pkg/dem/PreProcessor/SimpleScene.cpp
   trunk/pkg/dem/PreProcessor/SimpleShear.cpp
   trunk/pkg/dem/PreProcessor/TestSimpleViscoelastic.cpp
   trunk/pkg/dem/PreProcessor/TetrahedronsTest.cpp
   trunk/pkg/dem/PreProcessor/TetrahedronsTest.hpp
   trunk/pkg/dem/PreProcessor/ThreePointBending.cpp
   trunk/pkg/dem/PreProcessor/TriaxialTest.cpp
   trunk/pkg/dem/PreProcessor/TriaxialTestWater.cpp
   trunk/pkg/dem/PreProcessor/UniaxialStrainerGen.cpp
   trunk/pkg/dem/meta/Shop.cpp
   trunk/pkg/mass-spring/PreProcessor/HangingCloth.cpp
   trunk/pkg/realtime-rigidbody/PreProcessor/BoxStack.cpp
   trunk/pkg/realtime-rigidbody/PreProcessor/RotatingBox.cpp
   trunk/pkg/snow/PreProcessor/SnowCreepTest.cpp
   trunk/pkg/snow/PreProcessor/SnowVoxelsLoader.cpp
   trunk/py/tests/__init__.py
   trunk/py/tests/wrapper.py
   trunk/scripts/regression-tests.py
   trunk/scripts/simple-scene.py
   trunk/scripts/test/wm3-wrap.py
Log:
1. Replace PersistentSAPCollider and DistantPersistentSAPCollider by 
InsertionSortCollider everywhere. The two are still in the sources, but are not 
compiled. Will be removed in near future. Added to deprecated table in python 
so that old scripts still work.
2. Add some more regression tests for the python wrapper.
3. Fix timestep in HangingCloth (it does some weird things, can someone check 
it or just remove mass-spring from the tree?)



Modified: trunk/gui/py/PythonUI_rc.py
===================================================================
--- trunk/gui/py/PythonUI_rc.py 2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/gui/py/PythonUI_rc.py 2009-08-05 08:32:18 UTC (rev 1920)
@@ -76,14 +76,15 @@
        'BrefcomDamageColorizer':'CpmPhysDamageColorizer',
        'BrefcomGlobalCharacteristics':'CpmGlobalCharacteristics',
        # renamed back to comply with the c++ name, 4.8.2009
-       'Preprocessor':'FileGenerator'
+       'Preprocessor':'FileGenerator',
+       'PersistentSAPCollider':'InsertionSortCollider',
 }
 
 for oldName in renamed:
        class warnWrap:
                def __init__(self,_old,_new): self.old,self.new=_old,_new
                def __call__(self,*args,**kw):
-                       import warnings; warnings.warn("Class `%s' was renamed 
to `%s', update your 
code!"%(self.old,self.new),DeprecationWarning,stacklevel=2);
+                       import warnings; warnings.warn("Class `%s' was renamed 
to (or replaced by) `%s', update your 
code!"%(self.old,self.new),DeprecationWarning,stacklevel=3);
                        return _proxyNamespace[self.new](*args,**kw)
        _proxyNamespace[oldName]=warnWrap(oldName,renamed[oldName])
 

Modified: 
trunk/pkg/common/Engine/StandAloneEngine/DistantPersistentSAPCollider.cpp
===================================================================
--- trunk/pkg/common/Engine/StandAloneEngine/DistantPersistentSAPCollider.cpp   
2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/pkg/common/Engine/StandAloneEngine/DistantPersistentSAPCollider.cpp   
2009-08-05 08:32:18 UTC (rev 1920)
@@ -6,7 +6,9 @@
 *  GNU General Public License v2 or later. See file LICENSE for details. *
 *************************************************************************/
 
-#include "DistantPersistentSAPCollider.hpp"
+YADE_REQUIRE_FEATURE(Say goodbye to this piece of crappy code!)
+
+#include"DistantPersistentSAPCollider.hpp"
 #include<yade/core/Body.hpp>
 #include<yade/core/MetaBody.hpp>
 #include<yade/core/BodyContainer.hpp>
@@ -252,4 +254,4 @@
        }
 }
 
-YADE_PLUGIN((DistantPersistentSAPCollider));
\ No newline at end of file
+YADE_PLUGIN((DistantPersistentSAPCollider));

Modified: trunk/pkg/common/Engine/StandAloneEngine/PersistentSAPCollider.cpp
===================================================================
--- trunk/pkg/common/Engine/StandAloneEngine/PersistentSAPCollider.cpp  
2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/pkg/common/Engine/StandAloneEngine/PersistentSAPCollider.cpp  
2009-08-05 08:32:18 UTC (rev 1920)
@@ -8,6 +8,8 @@
 *  GNU General Public License v2 or later. See file LICENSE for details. *
 *************************************************************************/
 
+YADE_REQUIRE_FEATURE(Say goodbye to this piece of crappy code!)
+
 #include"PersistentSAPCollider.hpp"
 #include<yade/core/Body.hpp>
 #include<yade/core/MetaBody.hpp>
@@ -314,4 +316,4 @@
        }
 }
 
-YADE_PLUGIN((PersistentSAPCollider));
\ No newline at end of file
+YADE_PLUGIN((PersistentSAPCollider));

Modified: trunk/pkg/common/Engine/StandAloneEngine/PersistentSAPCollider.hpp
===================================================================
--- trunk/pkg/common/Engine/StandAloneEngine/PersistentSAPCollider.hpp  
2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/pkg/common/Engine/StandAloneEngine/PersistentSAPCollider.hpp  
2009-08-05 08:32:18 UTC (rev 1920)
@@ -8,6 +8,8 @@
 
 #pragma once
 
+#error PersistentSAPCollider is forbidden
+
 #include<yade/core/Collider.hpp>
 #include<yade/core/InteractionContainer.hpp>
 #include <list>

Modified: trunk/pkg/dem/DataClass/Clump.hpp
===================================================================
--- trunk/pkg/dem/DataClass/Clump.hpp   2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/pkg/dem/DataClass/Clump.hpp   2009-08-05 08:32:18 UTC (rev 1920)
@@ -52,7 +52,7 @@
 
        @todo GravityEngine should be applied to members, not to clump as 
such?! Still not sure. Perhaps Clumps should have mass and inertia set to zeros 
so that engines unaware of clumps do not act on it. It would have some private 
mass and insertia that would be used in NewtonsForceLaw etc for clumps 
specially...
 
-       @note PersistentSAPCollider bypass Clumps explicitly. This no longer 
depends on the absence of boundingVolume.
+       @note Collider::mayCollide (should be used by all colliders) bypasses 
Clumps explicitly. This no longer depends on the absence of boundingVolume.
        @note Clump relies on its id being assigned (as well as id of its 
components); therefore, only bodies that have already been inserted to the 
container may be added to Clump which has been itself already added to the 
container. We further requier that clump id is greater than ids of clumped 
bodies
  
  */

Modified: trunk/pkg/dem/Engine/EngineUnit/InteractingMyTetrahedron2AABB.hpp
===================================================================
--- trunk/pkg/dem/Engine/EngineUnit/InteractingMyTetrahedron2AABB.hpp   
2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/pkg/dem/Engine/EngineUnit/InteractingMyTetrahedron2AABB.hpp   
2009-08-05 08:32:18 UTC (rev 1920)
@@ -13,7 +13,7 @@
  * \brief This class exists for the sole purpose of creating AABB
  * (AxisAligneBoundingBox) from class InteractingMyTetrahedron
  *
- * AABB is used by class PersistentSAPCollider to detect possible interaction 
between two
+ * AABB is used by class InsertionSortCollider to detect possible interaction 
between two
  * bodies. Once you write this class for your InteractingGeometry, interactions
  * will be automatically detected and created for you.
  *

Modified: trunk/pkg/dem/Engine/StandAloneEngine/NewtonsDampedLaw.cpp
===================================================================
--- trunk/pkg/dem/Engine/StandAloneEngine/NewtonsDampedLaw.cpp  2009-08-04 
18:12:39 UTC (rev 1919)
+++ trunk/pkg/dem/Engine/StandAloneEngine/NewtonsDampedLaw.cpp  2009-08-05 
08:32:18 UTC (rev 1920)
@@ -94,10 +94,13 @@
                        }
 
                        // blocking DOFs
-                       if(rb->blockedDOFs==0){ /* same as: 
rb->blockedDOFs==PhysicalParameters::DOF_NONE */
+                       if(rb->blockedDOFs==PhysicalParameters::DOF_NONE){
                                
rb->angularVelocity=rb->angularVelocity+dt*rb->angularAcceleration;
                                rb->velocity=rb->velocity+dt*rb->acceleration;
+                       } else if(rb->blockedDOFs==PhysicalParameters::DOF_ALL){
+                               /* do nothing */
                        } else {
+                               // handle more complicated cases here
                                if((rb->blockedDOFs & 
PhysicalParameters::DOF_X)==0) rb->velocity[0]+=dt*rb->acceleration[0];
                                if((rb->blockedDOFs & 
PhysicalParameters::DOF_Y)==0) rb->velocity[1]+=dt*rb->acceleration[1];
                                if((rb->blockedDOFs & 
PhysicalParameters::DOF_Z)==0) rb->velocity[2]+=dt*rb->acceleration[2];

Modified: trunk/pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp 2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp 2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -30,7 +30,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/DistantPersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -590,7 +590,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
 //     rootBody->engines.push_back(sdecTimeStepper);   
        rootBody->engines.push_back(boundingVolumeDispatcher);
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
DistantPersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(cohesiveFrictionalContactLaw);
@@ -697,4 +697,4 @@
 
 
 
-YADE_PLUGIN((CohesiveTriaxialTest));
\ No newline at end of file
+YADE_PLUGIN((CohesiveTriaxialTest));

Modified: trunk/pkg/dem/PreProcessor/DirectShearCis.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/DirectShearCis.cpp       2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/DirectShearCis.cpp       2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -31,7 +31,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -319,7 +319,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(sdecTimeStepper);
        rootBody->engines.push_back(boundingVolumeDispatcher);  
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(shared_ptr<Engine>(new ElasticContactLaw));

Modified: trunk/pkg/dem/PreProcessor/Funnel.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/Funnel.cpp       2009-08-04 18:12:39 UTC (rev 
1919)
+++ trunk/pkg/dem/PreProcessor/Funnel.cpp       2009-08-05 08:32:18 UTC (rev 
1920)
@@ -18,7 +18,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -275,7 +275,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(sdecTimeStepper);
        rootBody->engines.push_back(boundingVolumeDispatcher);  
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(shared_ptr<Engine>(new ElasticContactLaw));
@@ -316,4 +316,4 @@
 }
 
 
-YADE_PLUGIN((Funnel));
\ No newline at end of file
+YADE_PLUGIN((Funnel));

Modified: trunk/pkg/dem/PreProcessor/MembraneTest.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/MembraneTest.cpp 2009-08-04 18:12:39 UTC (rev 
1919)
+++ trunk/pkg/dem/PreProcessor/MembraneTest.cpp 2009-08-05 08:32:18 UTC (rev 
1920)
@@ -27,7 +27,7 @@
 
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 
@@ -310,7 +310,7 @@
        rootBody->engines.clear();
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(boundingVolumeDispatcher);  
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
         rootBody->engines.push_back(constitutiveLaw);
@@ -352,4 +352,4 @@
 
 
 
-YADE_PLUGIN((MembraneTest));
\ No newline at end of file
+YADE_PLUGIN((MembraneTest));

Modified: trunk/pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp 2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp 2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -32,7 +32,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -583,7 +583,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
 //     rootBody->engines.push_back(sdecTimeStepper);   
        rootBody->engines.push_back(boundingVolumeDispatcher);
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(elasticContactLaw);
@@ -691,4 +691,4 @@
 
 
 
-YADE_PLUGIN((ModifiedTriaxialTest));
\ No newline at end of file
+YADE_PLUGIN((ModifiedTriaxialTest));

Modified: trunk/pkg/dem/PreProcessor/SDECImpactTest.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/SDECImpactTest.cpp       2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/SDECImpactTest.cpp       2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -24,7 +24,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -449,7 +449,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(sdecTimeStepper);
        rootBody->engines.push_back(boundingVolumeDispatcher);
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(elasticContactLaw);
@@ -494,4 +494,4 @@
        
 }
 
-YADE_PLUGIN((SDECImpactTest));
\ No newline at end of file
+YADE_PLUGIN((SDECImpactTest));

Modified: trunk/pkg/dem/PreProcessor/SDECLinkedSpheres.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/SDECLinkedSpheres.cpp    2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/SDECLinkedSpheres.cpp    2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -28,7 +28,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -326,7 +326,7 @@
        rootBody->engines.push_back(sdecTimeStepper);
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(boundingVolumeDispatcher);
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(constitutiveLaw);
@@ -367,4 +367,4 @@
        
 }
 
-YADE_PLUGIN((SDECLinkedSpheres));
\ No newline at end of file
+YADE_PLUGIN((SDECLinkedSpheres));

Modified: trunk/pkg/dem/PreProcessor/SDECMovingWall.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/SDECMovingWall.cpp       2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/SDECMovingWall.cpp       2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -21,7 +21,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -348,7 +348,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(sdecTimeStepper);
        rootBody->engines.push_back(boundingVolumeDispatcher);  
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(shared_ptr<Engine>(new ElasticContactLaw));
@@ -395,4 +395,4 @@
 }
 
 
-YADE_PLUGIN((SDECMovingWall));
\ No newline at end of file
+YADE_PLUGIN((SDECMovingWall));

Modified: trunk/pkg/dem/PreProcessor/SDECSpheresPlane.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/SDECSpheresPlane.cpp     2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/SDECSpheresPlane.cpp     2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -22,7 +22,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -327,7 +327,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(sdecTimeStepper);
        rootBody->engines.push_back(boundingVolumeDispatcher);  
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(shared_ptr<Engine>(new ElasticContactLaw));
@@ -372,4 +372,4 @@
 }
 
 
-YADE_PLUGIN((SDECSpheresPlane));
\ No newline at end of file
+YADE_PLUGIN((SDECSpheresPlane));

Modified: trunk/pkg/dem/PreProcessor/SimpleScene.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/SimpleScene.cpp  2009-08-04 18:12:39 UTC (rev 
1919)
+++ trunk/pkg/dem/PreProcessor/SimpleScene.cpp  2009-08-05 08:32:18 UTC (rev 
1920)
@@ -29,7 +29,7 @@
 #include<yade/pkg-dem/ElasticContactLaw.hpp>
 #include<yade/pkg-dem/SpheresContactGeometry.hpp>
 #include<yade/pkg-dem/SimpleElasticRelationships.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 
 
 
@@ -56,7 +56,7 @@
                // use boundingVolumeDispatcher that we defined above
                rootBody->engines.push_back(boundingVolumeDispatcher);
                //@
-               shared_ptr<PersistentSAPCollider> collider(new 
PersistentSAPCollider);
+               shared_ptr<InsertionSortCollider> collider(new 
InsertionSortCollider);
                        rootBody->engines.push_back(collider);
                //@
                shared_ptr<InteractionGeometryMetaEngine> igeomDispatcher(new 
InteractionGeometryMetaEngine);

Modified: trunk/pkg/dem/PreProcessor/SimpleShear.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/SimpleShear.cpp  2009-08-04 18:12:39 UTC (rev 
1919)
+++ trunk/pkg/dem/PreProcessor/SimpleShear.cpp  2009-08-05 08:32:18 UTC (rev 
1920)
@@ -30,7 +30,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -301,7 +301,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(globalStiffnessTimeStepper);
        rootBody->engines.push_back(boundingVolumeDispatcher);  
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(shared_ptr<Engine>(new ContactLaw1));

Modified: trunk/pkg/dem/PreProcessor/TestSimpleViscoelastic.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/TestSimpleViscoelastic.cpp       2009-08-04 
18:12:39 UTC (rev 1919)
+++ trunk/pkg/dem/PreProcessor/TestSimpleViscoelastic.cpp       2009-08-05 
08:32:18 UTC (rev 1920)
@@ -21,7 +21,7 @@
 #include<yade/pkg-common/InteractionPhysicsMetaEngine.hpp>
 #include<yade/pkg-common/MetaInteractingGeometry.hpp>
 #include<yade/pkg-common/MetaInteractingGeometry2AABB.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/pkg-common/PhysicalActionApplier.hpp>
 #include<yade/pkg-common/PhysicalActionContainerReseter.hpp>
 #include<yade/pkg-common/PhysicalParametersMetaEngine.hpp>
@@ -166,7 +166,7 @@
     rootBody->engines.clear();
     rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
     rootBody->engines.push_back(boundingVolumeDispatcher);     
-    rootBody->engines.push_back(shared_ptr<Engine>(new PersistentSAPCollider));
+    rootBody->engines.push_back(shared_ptr<Engine>(new InsertionSortCollider));
     rootBody->engines.push_back(interactionGeometryDispatcher);
     rootBody->engines.push_back(interactionPhysicsDispatcher);
     rootBody->engines.push_back(constitutiveLaw);

Modified: trunk/pkg/dem/PreProcessor/TetrahedronsTest.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/TetrahedronsTest.cpp     2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/TetrahedronsTest.cpp     2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -20,7 +20,7 @@
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 
@@ -344,7 +344,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        //rootBody->engines.push_back(sdecTimeStepper);
        rootBody->engines.push_back(boundingVolumeDispatcher);  
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(shared_ptr<Engine>(new MyTetrahedronLaw));
@@ -394,4 +394,4 @@
        tet->v[3]=size*(Mathr::UnitRandom()*0.7+1.0)*Vector3r(0.16,0.93,-0.33);
 }
 
-YADE_PLUGIN((TetrahedronsTest));
\ No newline at end of file
+YADE_PLUGIN((TetrahedronsTest));

Modified: trunk/pkg/dem/PreProcessor/TetrahedronsTest.hpp
===================================================================
--- trunk/pkg/dem/PreProcessor/TetrahedronsTest.hpp     2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/TetrahedronsTest.hpp     2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -24,7 +24,7 @@
  *  - with class InteractingMyTetrahedron2AABB registered in TetrahedronsTest 
inside an MetaEngine called
  *     boundigVolumeDispatcher yade will automatically create AABB from 
InteractingMyTetrahedron
  *
- *  - with AABB available, the PersistentSAPCollider will be able to detect 
that two bodies are interacting
+ *  - with AABB available, the InsertionSortCollider will be able to detect 
that two bodies are interacting
  *
  *  - if interaction is detected, an appropriate EngineUnit will be called, in
  *    this small example I have just two of them:

Modified: trunk/pkg/dem/PreProcessor/ThreePointBending.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/ThreePointBending.cpp    2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/ThreePointBending.cpp    2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -26,7 +26,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -313,7 +313,7 @@
        rootBody->engines.push_back(sdecTimeStepper);
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(boundingVolumeDispatcher);
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(constitutiveLaw);
@@ -354,4 +354,4 @@
        
 }
 
-YADE_PLUGIN((ThreePointBending));
\ No newline at end of file
+YADE_PLUGIN((ThreePointBending));

Modified: trunk/pkg/dem/PreProcessor/TriaxialTest.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/TriaxialTest.cpp 2009-08-04 18:12:39 UTC (rev 
1919)
+++ trunk/pkg/dem/PreProcessor/TriaxialTest.cpp 2009-08-05 08:32:18 UTC (rev 
1920)
@@ -30,8 +30,8 @@
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/pkg-common/Facet.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -694,4 +694,4 @@
 
 
 
-YADE_PLUGIN((TriaxialTest));
\ No newline at end of file
+YADE_PLUGIN((TriaxialTest));

Modified: trunk/pkg/dem/PreProcessor/TriaxialTestWater.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/TriaxialTestWater.cpp    2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/TriaxialTestWater.cpp    2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -36,7 +36,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -563,7 +563,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
 //     rootBody->engines.push_back(sdecTimeStepper);   
        rootBody->engines.push_back(boundingVolumeDispatcher);
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(elasticContactLaw);
@@ -682,4 +682,4 @@
 
 
 
-YADE_PLUGIN((TriaxialTestWater));
\ No newline at end of file
+YADE_PLUGIN((TriaxialTestWater));

Modified: trunk/pkg/dem/PreProcessor/UniaxialStrainerGen.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/UniaxialStrainerGen.cpp  2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/dem/PreProcessor/UniaxialStrainerGen.cpp  2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -16,7 +16,7 @@
 #include<yade/pkg-common/InteractionPhysicsMetaEngine.hpp>
 #include<yade/pkg-common/PhysicalActionApplier.hpp>
 #include<yade/pkg-common/PhysicalParametersMetaEngine.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/pkg-common/ConstitutiveLawDispatcher.hpp>
 #include<yade/pkg-dem/NewtonsDampedLaw.hpp>
 #include<yade/pkg-dem/BodyMacroParameters.hpp>
@@ -95,8 +95,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(boundingVolumeDispatcher);
 
-       shared_ptr<PersistentSAPCollider> collider(new PersistentSAPCollider);
-               collider->haveDistantTransient=true;
+       shared_ptr<InsertionSortCollider> collider(new InsertionSortCollider);
                rootBody->engines.push_back(collider);
 
        shared_ptr<InteractionGeometryMetaEngine> igeomDispatcher(new 
InteractionGeometryMetaEngine);

Modified: trunk/pkg/dem/meta/Shop.cpp
===================================================================
--- trunk/pkg/dem/meta/Shop.cpp 2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/pkg/dem/meta/Shop.cpp 2009-08-05 08:32:18 UTC (rev 1920)
@@ -14,7 +14,7 @@
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 
 #include<yade/pkg-common/InteractingBox.hpp>
 #include<yade/pkg-common/InteractingSphere.hpp>
@@ -221,7 +221,7 @@
 
        rootBody->engines.push_back(boundingVolumeDispatcher);
 
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
 
        shared_ptr<InteractionGeometryMetaEngine> 
interactionGeometryDispatcher(new InteractionGeometryMetaEngine);
        interactionGeometryDispatcher->add(new 
InteractingSphere2InteractingSphere4SpheresContactGeometry);

Modified: trunk/pkg/mass-spring/PreProcessor/HangingCloth.cpp
===================================================================
--- trunk/pkg/mass-spring/PreProcessor/HangingCloth.cpp 2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/mass-spring/PreProcessor/HangingCloth.cpp 2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -23,7 +23,7 @@
 #include<yade/pkg-common/InteractingBox.hpp>
 #include<yade/core/MetaBody.hpp>
 //#include<yade/pkg-common/FrictionLessElasticContactLaw.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 //#include<yade/pkg-common/MassSpringBody2RigidBodyLaw.hpp>
 
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -157,7 +157,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(boundingVolumeDispatcher);
        rootBody->engines.push_back(geometricalModelDispatcher);
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(explicitMassSpringConstitutiveLaw);
@@ -181,6 +181,7 @@
        physics2->se3           = Se3r(Vector3r(0,0,0),q);
 
        rootBody->isDynamic     = false;
+       rootBody->dt=1e-2;
 
        shared_ptr<MetaInteractingGeometry> set(new MetaInteractingGeometry());
        set->diffuseColor       = Vector3r(0,0,1);
@@ -505,4 +506,4 @@
        body->physicalParameters        = physics;
 }
 
-YADE_PLUGIN((HangingCloth));
\ No newline at end of file
+YADE_PLUGIN((HangingCloth));

Modified: trunk/pkg/realtime-rigidbody/PreProcessor/BoxStack.cpp
===================================================================
--- trunk/pkg/realtime-rigidbody/PreProcessor/BoxStack.cpp      2009-08-04 
18:12:39 UTC (rev 1919)
+++ trunk/pkg/realtime-rigidbody/PreProcessor/BoxStack.cpp      2009-08-05 
08:32:18 UTC (rev 1920)
@@ -16,7 +16,7 @@
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
 #include<yade/core/Body.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/pkg-common/RigidBodyParameters.hpp>
 #include<yade/pkg-common/TranslationEngine.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -258,7 +258,7 @@
        rootBody->engines.clear();
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(boundingVolumeDispatcher);
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(shared_ptr<Engine>(new 
FrictionLessElasticContactLaw));
        rootBody->engines.push_back(gravityCondition);
@@ -296,4 +296,4 @@
        rootBody->physicalParameters            = physics;
 }
 
-YADE_PLUGIN((BoxStack));
\ No newline at end of file
+YADE_PLUGIN((BoxStack));

Modified: trunk/pkg/realtime-rigidbody/PreProcessor/RotatingBox.cpp
===================================================================
--- trunk/pkg/realtime-rigidbody/PreProcessor/RotatingBox.cpp   2009-08-04 
18:12:39 UTC (rev 1919)
+++ trunk/pkg/realtime-rigidbody/PreProcessor/RotatingBox.cpp   2009-08-05 
08:32:18 UTC (rev 1920)
@@ -14,7 +14,7 @@
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
 #include<yade/core/Body.hpp>
-#include<yade/pkg-common/PersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/pkg-common/RigidBodyParameters.hpp>
 #include<yade/pkg-common/RotationEngine.hpp>
 
@@ -278,7 +278,7 @@
        rootBody->engines.clear();
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
        rootBody->engines.push_back(boundingVolumeDispatcher);
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
PersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(shared_ptr<Engine>(new 
FrictionLessElasticContactLaw));
        rootBody->engines.push_back(gravityCondition);
@@ -317,4 +317,4 @@
 }
 
 
-YADE_PLUGIN((RotatingBox));
\ No newline at end of file
+YADE_PLUGIN((RotatingBox));

Modified: trunk/pkg/snow/PreProcessor/SnowCreepTest.cpp
===================================================================
--- trunk/pkg/snow/PreProcessor/SnowCreepTest.cpp       2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/snow/PreProcessor/SnowCreepTest.cpp       2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -30,7 +30,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/DistantPersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -602,7 +602,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
 //     rootBody->engines.push_back(sdecTimeStepper);   
        rootBody->engines.push_back(boundingVolumeDispatcher);
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
DistantPersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(cohesiveFrictionalContactLaw);
@@ -709,4 +709,4 @@
 
 
 
-YADE_PLUGIN((SnowCreepTest));
\ No newline at end of file
+YADE_PLUGIN((SnowCreepTest));

Modified: trunk/pkg/snow/PreProcessor/SnowVoxelsLoader.cpp
===================================================================
--- trunk/pkg/snow/PreProcessor/SnowVoxelsLoader.cpp    2009-08-04 18:12:39 UTC 
(rev 1919)
+++ trunk/pkg/snow/PreProcessor/SnowVoxelsLoader.cpp    2009-08-05 08:32:18 UTC 
(rev 1920)
@@ -23,7 +23,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #include<yade/pkg-common/Sphere.hpp>
 #include<yade/core/MetaBody.hpp>
-#include<yade/pkg-common/DistantPersistentSAPCollider.hpp>
+#include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
 #include<yade/pkg-common/BoundingVolumeMetaEngine.hpp>
@@ -474,7 +474,7 @@
        rootBody->engines.push_back(shared_ptr<Engine>(new 
PhysicalActionContainerReseter));
 //     rootBody->engines.push_back(sdecTimeStepper);   
        rootBody->engines.push_back(boundingVolumeDispatcher);
-       rootBody->engines.push_back(shared_ptr<Engine>(new 
DistantPersistentSAPCollider));
+       rootBody->engines.push_back(shared_ptr<Engine>(new 
InsertionSortCollider));
        rootBody->engines.push_back(interactionGeometryDispatcher);
        rootBody->engines.push_back(interactionPhysicsDispatcher);
        rootBody->engines.push_back(cohesiveFrictionalContactLaw);

Modified: trunk/py/tests/__init__.py
===================================================================
--- trunk/py/tests/__init__.py  2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/py/tests/__init__.py  2009-08-05 08:32:18 UTC (rev 1920)
@@ -1 +1,26 @@
-# python knows by this file that this directory is an importable module
+import unittest 
+
+# add any new test suites to the list here, so that they are picked up by 
testAll
+allTests=['wrapper',]
+
+# fully qualified module names
+allTestsFQ=['yade.tests.'+test for test in allTests]
+
+def testModule(module):
+       """Run all tests defined in the module specified, return TestResult 
object 
+       
(http://www.python.org/doc/2.6/lib/unittest.html#testresult-objects.html)
+       for further processing.
+
+       @param module: fully-qualified module name, e.g. yade.tests.wrapper
+       """
+       suite=unittest.defaultTestLoader().loadTestsFromName(module)
+       return unittest.TextTestRunner(verbosity=2).run(suite)
+
+def testAll():
+       """Run all tests defined in all yade.tests.* modules and return
+       TestResult object for further examination."""
+       suite=unittest.defaultTestLoader.loadTestsFromNames(allTestsFQ)
+       return unittest.TextTestRunner(verbosity=2).run(suite)
+
+       
+

Modified: trunk/py/tests/wrapper.py
===================================================================
--- trunk/py/tests/wrapper.py   2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/py/tests/wrapper.py   2009-08-05 08:32:18 UTC (rev 1920)
@@ -1,6 +1,14 @@
 import unittest
 from yade.wrapper import *
+from miniWm3Wrap import *
+from yade._customConverters import *
+from math import *
 
+"""
+This test module covers python/c++ transitions, for both classes deriving from 
Serializable,
+but also for other classes that we wrap (like Wm3).
+"""
+
 # copied from PythonUI_rc, should be in some common place (utils? runtime?)
 def listChildClassesRecursive(base):
        ret=set(O.childClasses(base)); ret2=set()
@@ -54,14 +62,64 @@
                
self.assert_(id.physDispatcher.functors[0].name=='SimpleElasticRelationships')
                
self.assert_(id.constLawDispatcher.functors[0].name=='Law2_Dem3Dof_Elastic_Elastic')
        def testParallelEngineCtor(self):
-               pass
-       ## test what shold fail:
-       ## passing wrong EngineUnit type to a dispatcher
-       ## reading/writing non-existent attribute
-
-def run():
-       
suite=unittest.TestLoader().loadTestsFromTestCase(TestObjectInstantiation)
-       unittest.TextTestRunner(verbosity=2).run(suite)
+               
pe=ParallelEngine([InsertionSortCollider(),[BoundingVolumeMetaEngine(),BexResetter()]])
+               self.assert_(pe.slaves[0].name=='InsertionSortCollider')
+               self.assert_(len(pe.slaves[1])==2)
+               pe.slaves=[]
+               self.assert_(len(pe.slaves)==0)
+       ##              
+       ## testing incorrect operations that should raise exceptions
+       ##
+       def testWrongFunctorType(self):
+               # dispatchers accept only correct functors
+               self.assertRaises(TypeError,lambda: 
ConstitutiveLawDispatcher([InteractingSphere2AABB()]))
+       def testInvalidAttr(self):
+               # accessing invalid attributes raises KeyError
+               self.assertRaises(KeyError,lambda: 
Sphere(attributeThatDoesntExist=42))
+               self.assertRaises(KeyError,lambda: 
Sphere()['attributeThatDoesntExist'])
        
-
+class TestWm3Wrapper(unittest.TestCase):
+       def assertVQAlmostEqual(self,v1,v2):
+               "floating-point comparison of vectors/quaterions"
+               self.assertEqual(len(v1),len(v2));
+               for i in range(len(v1)): 
self.assertAlmostEqual(v1[i],v2[i],msg='Component '+str(i)+' of '+str(v1)+' and 
'+str(v2))
+       def testVector2(self):
+               v=Vector2(1,2); v2=Vector2(3,4)
+               self.assert_(v+v2==Vector2(4,6))
+               self.assert_(Vector2.UNIT_X.Dot(Vector2.UNIT_Y)==0)
+               self.assert_(Vector2.ZERO.Length()==0)
+       def testVector3(self):
+               v=Vector3(3,4,5); v2=Vector3(3,4,5)
+               self.assert_(v[0]==3 and v[1]==4 and v[2]==5)
+               self.assert_(v.SquaredLength()==50)
+               self.assert_(v==(3,4,5)) # comparison with list/tuple
+               self.assert_(v==[3,4,5])
+               self.assert_(v==v2)
+               
x,y,z,one=Vector3.UNIT_X,Vector3.UNIT_Y,Vector3.UNIT_Z,Vector3.ONE
+               self.assert_(x+y+z==one)
+               self.assert_(x.Dot(y)==0)
+               self.assert_(x.Cross(y)==z)
+       def testQuaternion(self):
+               # construction
+               q1=Quaternion((0,0,1),pi/2)
+               q2=Quaternion(Vector3(0,0,1),pi/2)
+               q1==q2
+               
x,y,z,one=Vector3.UNIT_X,Vector3.UNIT_Y,Vector3.UNIT_Z,Vector3.ONE
+               self.assertVQAlmostEqual(q1*x,y)
+               self.assertVQAlmostEqual(q1*q1*x,-x)
+               self.assertVQAlmostEqual(q1*q1.Conjugate(),Quaternion.IDENTITY)
+               self.assertVQAlmostEqual(q1.ToAxisAngle()[0],(0,0,1))
+               self.assertAlmostEqual(q1.ToAxisAngle()[1],pi/2)
+       # not really wm3 thing, but closely related
+       def testSe3Conversion(self):
+               pp=PhysicalParameters()
+               pp['se3']=(Vector3.ZERO,Quaternion.IDENTITY)
+               self.assert_(pp['se3'][0]==Vector3.ZERO)
+               self.assert_(pp['se3'][1]==Quaternion.IDENTITY)
+               pp['se3']=((1,2,3),Quaternion((1,1,1),pi/4))
+               self.assert_(pp['se3'][0]==(1,2,3))
+               self.assert_(pp['se3'][0]==pp.pos)
+               self.assert_(pp['se3'][1]==Quaternion((1,1,1),pi/4))
+               self.assert_(pp['se3'][1]==pp.ori)
                
+       

Modified: trunk/scripts/regression-tests.py
===================================================================
--- trunk/scripts/regression-tests.py   2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/scripts/regression-tests.py   2009-08-05 08:32:18 UTC (rev 1920)
@@ -1,4 +1,11 @@
-# Run regression tests
-# All of them should be enumerated here, so that we can run them at once.
-from yade.tests import wrapper # add module2,module3 as they become available
-wrapper.run()
+"""
+Run all defined regression tests, then exit.
+Exit status is 0 on success and nonzero on failure.
+"""
+import yade.tests
+result=yade.tests.testAll()
+if result.wasSuccessful():
+       print "*** ALL TESTS PASSED ***"
+else:
+       print "********************** SOME TESTS FAILED 
************************"
+sys.exit(0 if result.wasSuccessful() else 1)

Modified: trunk/scripts/simple-scene.py
===================================================================
--- trunk/scripts/simple-scene.py       2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/scripts/simple-scene.py       2009-08-05 08:32:18 UTC (rev 1920)
@@ -31,7 +31,7 @@
        ]),
        ## Using bounding boxes created by the previous engine, find possible 
body collisions.
        ## These possible collisions are inserted in Omega.interactions 
container (MetaBody::transientInteractions in c++).
-       PersistentSAPCollider(),
+       InsertionSortCollider(),
        ## Decide whether the potential collisions are real; if so, create 
geometry information about each potential collision.
        ## Here, the decision about which EngineUnit to use depends on types of 
_both_ bodies.
        ## Note that there is no EngineUnit for box-box collision. They are not 
implemented.

Modified: trunk/scripts/test/wm3-wrap.py
===================================================================
--- trunk/scripts/test/wm3-wrap.py      2009-08-04 18:12:39 UTC (rev 1919)
+++ trunk/scripts/test/wm3-wrap.py      2009-08-05 08:32:18 UTC (rev 1920)
@@ -6,8 +6,8 @@
 tuple(x2)
 # operations and operators
 x+y+z==one
-x.Dot(y)==z
-x.Cross(y)==0
+x.Dot(y)==0
+x.Cross(y)==z
 # methods
 one.Length()
 


_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : yade-...@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp
_______________________________________________
yade-dev mailing list
yade-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/yade-dev

Reply via email to