← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1890: 1. Rename Sphere (as GeometricalModel) to SphereModel (to facilitate InteractingSphere -> Sphere ...

 

------------------------------------------------------------
revno: 1890
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Fri 2009-12-11 13:37:44 +0100
message:
  1. Rename Sphere (as GeometricalModel) to SphereModel (to facilitate InteractingSphere -> Sphere soon)
  2. Initialized density to 1000 in Material, to avoid weird explosions
  3. Add scripts/tests/triax-basic.py, a TriaxialTest in python
added:
  scripts/test/triax-basic.py
renamed:
  pkg/common/DataClass/GeometricalModel/Sphere.cpp => pkg/common/DataClass/GeometricalModel/SphereModel.cpp
  pkg/common/DataClass/GeometricalModel/Sphere.hpp => pkg/common/DataClass/GeometricalModel/SphereModel.hpp
modified:
  core/Material.hpp
  pkg/common/Engine/GlobalEngine/SpheresFactory.cpp
  pkg/common/RenderingEngine/GLDrawSphere.cpp
  pkg/common/RenderingEngine/GLDrawSphere.hpp
  pkg/common/RenderingEngine/GLDrawSphereShadowVolume.cpp
  pkg/common/RenderingEngine/GLDrawSphereShadowVolume.hpp
  pkg/dem/Engine/GlobalEngine/GlobalStiffnessTimeStepper.cpp
  pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.cpp
  pkg/dem/Engine/PartialEngine/TriaxialStressController.cpp
  pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp
  pkg/dem/PreProcessor/DirectShearCis.cpp
  pkg/dem/PreProcessor/Funnel.cpp
  pkg/dem/PreProcessor/HydraulicTest.cpp
  pkg/dem/PreProcessor/MembraneTest.cpp
  pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp
  pkg/dem/PreProcessor/SDECImpactTest.cpp
  pkg/dem/PreProcessor/SDECLinkedSpheres.cpp
  pkg/dem/PreProcessor/SDECMovingWall.cpp
  pkg/dem/PreProcessor/SDECSpheresPlane.cpp
  pkg/dem/PreProcessor/STLImporterTest.cpp
  pkg/dem/PreProcessor/SimpleShear.cpp
  pkg/dem/PreProcessor/TestSimpleViscoelastic.cpp
  pkg/dem/PreProcessor/ThreePointBending.cpp
  pkg/dem/PreProcessor/TriaxialTest.cpp
  pkg/dem/meta/Shop.cpp
  pkg/lattice/PreProcessor/LatticeExample.cpp
  pkg/lattice/PreProcessor/LatticeExampleCTData.cpp
  pkg/lattice/PreProcessor/LatticeExampleSimple.cpp
  pkg/snow/PreProcessor/SnowCreepTest.cpp
  pkg/snow/PreProcessor/SnowVoxelsLoader.cpp
  py/yadeWrapper/yadeWrapper.cpp
  scripts/rename-class.py
  pkg/common/DataClass/GeometricalModel/SphereModel.cpp
  pkg/common/DataClass/GeometricalModel/SphereModel.hpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'core/Material.hpp'
--- core/Material.hpp	2009-12-11 11:38:18 +0000
+++ core/Material.hpp	2009-12-11 12:37:44 +0000
@@ -14,7 +14,7 @@
 */
 class Material: public Serializable, public Indexable{
 	public:
-		Material(): id(-1), density(-1){ }
+		Material(): id(-1), density(1000){ }
 		~Material();
 		//! global id of the material; if >= 0, the material is shared and can be found under this index in Scene::materials
 		//! (necessary since yade::serialization doesn't track shared pointers)

=== renamed file 'pkg/common/DataClass/GeometricalModel/Sphere.cpp' => 'pkg/common/DataClass/GeometricalModel/SphereModel.cpp'
--- pkg/common/DataClass/GeometricalModel/Sphere.cpp	2009-12-04 23:07:34 +0000
+++ pkg/common/DataClass/GeometricalModel/SphereModel.cpp	2009-12-11 12:37:44 +0000
@@ -6,22 +6,22 @@
 *  GNU General Public License v2 or later. See file LICENSE for details. *
 *************************************************************************/
 
-#include "Sphere.hpp"
+#include "SphereModel.hpp"
 
 YADE_REQUIRE_FEATURE(geometricalmodel);
 
-Sphere::Sphere () : GeometricalModel()
+SphereModel::SphereModel () : GeometricalModel()
 {
 	createIndex();
 }
 
 
-Sphere::~Sphere ()
+SphereModel::~SphereModel ()
 {
 }
 
 
-YADE_PLUGIN((Sphere));
+YADE_PLUGIN((SphereModel));
 
 
 YADE_REQUIRE_FEATURE(PHYSPAR);

=== renamed file 'pkg/common/DataClass/GeometricalModel/Sphere.hpp' => 'pkg/common/DataClass/GeometricalModel/SphereModel.hpp'
--- pkg/common/DataClass/GeometricalModel/Sphere.hpp	2009-12-04 23:07:34 +0000
+++ pkg/common/DataClass/GeometricalModel/SphereModel.hpp	2009-12-11 12:37:44 +0000
@@ -11,20 +11,20 @@
 
 #ifdef YADE_GEOMETRICALMODEL
 #include<yade/core/GeometricalModel.hpp>
-class Sphere : public GeometricalModel
+class SphereModel : public GeometricalModel
 {
 	public :
 		Real radius;
 
-		Sphere ();
-		virtual ~Sphere ();
+		SphereModel ();
+		virtual ~SphereModel ();
 
 	REGISTER_ATTRIBUTES(GeometricalModel,(radius));
-	REGISTER_CLASS_AND_BASE(Sphere,GeometricalModel);
-	REGISTER_CLASS_INDEX(Sphere,GeometricalModel);
+	REGISTER_CLASS_AND_BASE(SphereModel,GeometricalModel);
+	REGISTER_CLASS_INDEX(SphereModel,GeometricalModel);
 };
 
-REGISTER_SERIALIZABLE(Sphere);
+REGISTER_SERIALIZABLE(SphereModel);
 #else
 	#error This file may be included only with the shape feature enabled.
 #endif

=== modified file 'pkg/common/Engine/GlobalEngine/SpheresFactory.cpp'
--- pkg/common/Engine/GlobalEngine/SpheresFactory.cpp	2009-12-06 22:02:12 +0000
+++ pkg/common/Engine/GlobalEngine/SpheresFactory.cpp	2009-12-11 12:37:44 +0000
@@ -13,7 +13,7 @@
 #include<yade/pkg-common/InteractingFacet.hpp>
 #ifdef YADE_GEOMETRICALMODEL
 	#include<yade/pkg-common/Facet.hpp>
-	#include<yade/pkg-common/Sphere.hpp>
+	#include<yade/pkg-common/SphereModel.hpp>
 #endif
 #include<yade/pkg-dem/BodyMacroParameters.hpp>
 #include"SpheresFactory.hpp"
@@ -175,7 +175,7 @@
 	aabb->diffuseColor		= Vector3r(0,1,0);
 
 	#ifdef YADE_GEOMETRICALMODEL
-		shared_ptr<Sphere> gSphere(new Sphere);
+		shared_ptr<SphereModel> gSphere(new SphereModel);
 		gSphere->radius			= r;
 		gSphere->diffuseColor	= color;
 		gSphere->wire			= false;

=== modified file 'pkg/common/RenderingEngine/GLDrawSphere.cpp'
--- pkg/common/RenderingEngine/GLDrawSphere.cpp	2009-12-04 23:07:34 +0000
+++ pkg/common/RenderingEngine/GLDrawSphere.cpp	2009-12-11 12:37:44 +0000
@@ -7,7 +7,7 @@
 *************************************************************************/
 
 #include "GLDrawSphere.hpp"
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/lib-opengl/OpenGLWrapper.hpp>
 
 YADE_REQUIRE_FEATURE(geometricalmodel);
@@ -39,7 +39,7 @@
 void GLDrawSphere::go(const shared_ptr<GeometricalModel>& gm, const shared_ptr<PhysicalParameters>& ph,bool wire)
 {
 	if(glutUse){
-		Real r= (static_cast<Sphere*>(gm.get()))->radius;
+		Real r= (static_cast<SphereModel*>(gm.get()))->radius;
 		glMaterialv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, Vector3f(gm->diffuseColor[0],gm->diffuseColor[1],gm->diffuseColor[2]));
 		glColor3v(gm->diffuseColor);
 		if(glutNormalize)	glPushAttrib(GL_NORMALIZE); // as per http://lists.apple.com/archives/Mac-opengl/2002/Jul/msg00085.html
@@ -103,7 +103,7 @@
 		first = false;
 	}
 	
-	Real radius = (static_cast<Sphere*>(gm.get()))->radius;
+	Real radius = (static_cast<SphereModel*>(gm.get()))->radius;
 	
 	glMaterialv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, Vector3f(gm->diffuseColor[0],gm->diffuseColor[1],gm->diffuseColor[2]));
 	glColor3v(gm->diffuseColor);

=== modified file 'pkg/common/RenderingEngine/GLDrawSphere.hpp'
--- pkg/common/RenderingEngine/GLDrawSphere.hpp	2009-11-18 13:34:36 +0000
+++ pkg/common/RenderingEngine/GLDrawSphere.hpp	2009-12-11 12:37:44 +0000
@@ -33,7 +33,7 @@
 	protected :
 		virtual void postProcessAttributes(bool deserializing){if(deserializing){first=true;};};
 	REGISTER_ATTRIBUTES(Serializable,(glutUse)(glutNormalize)(glutSlices)(glutStacks));
-	RENDERS(Sphere);
+	RENDERS(SphereModel);
 	REGISTER_CLASS_NAME(GLDrawSphere);
 	REGISTER_BASE_CLASS_NAME(GLDrawGeometricalModelFunctor);
 };

=== modified file 'pkg/common/RenderingEngine/GLDrawSphereShadowVolume.cpp'
--- pkg/common/RenderingEngine/GLDrawSphereShadowVolume.cpp	2009-12-04 23:07:34 +0000
+++ pkg/common/RenderingEngine/GLDrawSphereShadowVolume.cpp	2009-12-11 12:37:44 +0000
@@ -7,7 +7,7 @@
 *************************************************************************/
 
 #include "GLDrawSphereShadowVolume.hpp"
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/lib-opengl/OpenGLWrapper.hpp>
 
 YADE_REQUIRE_FEATURE(geometricalmodel);
@@ -17,7 +17,7 @@
 	//FIXME : do not cast on RigidBodyParameters but use Parameters instead
 	//Vector3r center = (static_cast<ParticleParameters*>(pp.get()))->se3.position;
 	Vector3r center = pp->se3.position;
-	Real radius = (static_cast<Sphere*>(gm.get()))->radius;
+	Real radius = (static_cast<SphereModel*>(gm.get()))->radius;
 	
 	Vector3r dir = lightPos-center;
 	Vector3r normalDir(-dir[1],dir[0],0);

=== modified file 'pkg/common/RenderingEngine/GLDrawSphereShadowVolume.hpp'
--- pkg/common/RenderingEngine/GLDrawSphereShadowVolume.hpp	2009-11-18 13:34:36 +0000
+++ pkg/common/RenderingEngine/GLDrawSphereShadowVolume.hpp	2009-12-11 12:37:44 +0000
@@ -15,7 +15,7 @@
 	public :
 		virtual void go(const shared_ptr<GeometricalModel>&, const shared_ptr<PhysicalParameters>&, const Vector3r&);
 
-	RENDERS(Sphere);
+	RENDERS(SphereModel);
 	REGISTER_CLASS_NAME(GLDrawSphereShadowVolume);
 	REGISTER_BASE_CLASS_NAME(GLDrawShadowVolumeFunctor);
 };

=== modified file 'pkg/dem/Engine/GlobalEngine/GlobalStiffnessTimeStepper.cpp'
--- pkg/dem/Engine/GlobalEngine/GlobalStiffnessTimeStepper.cpp	2009-12-04 23:07:34 +0000
+++ pkg/dem/Engine/GlobalEngine/GlobalStiffnessTimeStepper.cpp	2009-12-11 12:37:44 +0000
@@ -39,7 +39,7 @@
 {
 	const State* sdec=body->state.get();
 	
-	// Sphere* sphere = static_cast<Sphere*>(body->geometricalModel.get());
+	// SphereModel* sphere = static_cast<SphereModel*>(body->geometricalModel.get());
 	
 	Vector3r&  stiffness= stiffnesses[body->getId()];
 	Vector3r& Rstiffness=Rstiffnesses[body->getId()];

=== modified file 'pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.cpp'
--- pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/Engine/PartialEngine/TriaxialStateRecorder.cpp	2009-12-11 12:37:44 +0000
@@ -13,7 +13,7 @@
 //#include <yade/pkg-dem/TriaxialStressController.hpp>
 #include <yade/pkg-dem/TriaxialCompressionEngine.hpp>
 #include<yade/pkg-common/InteractingSphere.hpp>
-//#include <yade/pkg-common/Sphere.hpp>
+//#include <yade/pkg-common/SphereModel.hpp>
 
 //#include <yade/pkg-dem/SpheresContactGeometry.hpp>
 //#include <yade/pkg-dem/ElasticContactInteraction.hpp>

=== modified file 'pkg/dem/Engine/PartialEngine/TriaxialStressController.cpp'
--- pkg/dem/Engine/PartialEngine/TriaxialStressController.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/Engine/PartialEngine/TriaxialStressController.cpp	2009-12-11 12:37:44 +0000
@@ -17,7 +17,7 @@
 
 #include<yade/core/Scene.hpp>
 #ifdef YADE_GEOMETRICALMODEL
-	#include<yade/pkg-common/Sphere.hpp>
+	#include<yade/pkg-common/SphereModel.hpp>
 #endif
 
 CREATE_LOGGER(TriaxialStressController);
@@ -322,12 +322,10 @@
 		if ( ( *bi )->isDynamic )
 		{
 			( static_cast<InteractingSphere*> ( ( *bi )->shape.get() ) )->radius *= multiplier;
-			//( static_cast<Sphere*> ( ( *bi )->geometricalModel.get() ) )->radius *= multiplier;
+			//( static_cast<SphereModel*> ( ( *bi )->geometricalModel.get() ) )->radius *= multiplier;
 			#ifdef YADE_GEOMETRICALMODEL
-				Sphere* s = dynamic_cast<Sphere*> ( ( *bi )->geometricalModel.get() ); if(s) s->radius *= multiplier;
+				SphereModel* s = dynamic_cast<SphereModel*> ( ( *bi )->geometricalModel.get() ); if(s) s->radius *= multiplier;
 			#endif
-				//( static_cast<ParticleParameters*> ( ( *bi )->physicalParameters.get() ) )->mass *= pow ( multiplier,3 );
-				//( static_cast<RigidBodyParameters*> ( ( *bi )->physicalParameters.get() ) )->inertia *= pow ( multiplier,5 );
 				(*bi)->state->mass*=pow(multiplier,3);
 				(*bi)->state->inertia*=pow(multiplier,5);
 

=== modified file 'pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp'
--- pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp	2009-12-09 17:11:51 +0000
+++ pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp	2009-12-11 12:37:44 +0000
@@ -20,7 +20,7 @@
 
 #include<yade/pkg-common/AABB.hpp>
 #ifdef YADE_GEOMETRICALMODEL
-	#include<yade/pkg-common/Sphere.hpp>
+	#include<yade/pkg-common/SphereModel.hpp>
 	#include<yade/pkg-common/Box.hpp>
 #endif
 #include<yade/core/Scene.hpp>
@@ -293,7 +293,7 @@
 	shared_ptr<CohesiveFrictionalMat> physics(new CohesiveFrictionalMat);
 	shared_ptr<AABB> aabb(new AABB);
 // 	#ifdef YADE_GEOMETRICALMODEL
-// 		shared_ptr<Sphere> gSphere(new Sphere);
+// 		shared_ptr<SphereModel> gSphere(new SphereModel);
 // 	#endif
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	

=== modified file 'pkg/dem/PreProcessor/DirectShearCis.cpp'
--- pkg/dem/PreProcessor/DirectShearCis.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/DirectShearCis.cpp	2009-12-11 12:37:44 +0000
@@ -29,7 +29,7 @@
 
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -177,7 +177,7 @@
 	body = shared_ptr<Body>(new Body(0,1));
 	shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
 	Quaternionr q;

=== modified file 'pkg/dem/PreProcessor/Funnel.cpp'
--- pkg/dem/PreProcessor/Funnel.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/Funnel.cpp	2009-12-11 12:37:44 +0000
@@ -16,7 +16,7 @@
 
 #include<yade/pkg-common/AABB.hpp>
 #ifdef YADE_GEOMETRICALMODEL
-	#include<yade/pkg-common/Sphere.hpp>
+	#include<yade/pkg-common/SphereModel.hpp>
 	#include<yade/pkg-common/Box.hpp>
 #endif
 #include<yade/core/Scene.hpp>
@@ -174,7 +174,7 @@
 	aabb->diffuseColor		= Vector3r(0,1,0);
 
 	#ifdef YADE_GEOMETRICALMODEL
-		shared_ptr<Sphere> gSphere(new Sphere);
+		shared_ptr<SphereModel> gSphere(new SphereModel);
 		gSphere->radius			= radius;
 		gSphere->diffuseColor		= Vector3r(Mathr::UnitRandom(),Mathr::UnitRandom(),Mathr::UnitRandom());
 		gSphere->wire			= false;

=== modified file 'pkg/dem/PreProcessor/HydraulicTest.cpp'
--- pkg/dem/PreProcessor/HydraulicTest.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/HydraulicTest.cpp	2009-12-11 12:37:44 +0000
@@ -21,7 +21,7 @@
 
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
 #include<yade/core/Interaction.hpp>
@@ -124,11 +124,11 @@
 		BodyContainer::iterator biEnd = metaBodyWithSpheres->bodies->end();
 		for ( ; bi!=biEnd ; ++bi )
 		{
-			if ( ( *bi )->geometricalModel->getClassName() == "Sphere" )
+			if ( ( *bi )->geometricalModel->getClassName() == "SphereModel" )
 			{
 				shared_ptr<Body> b = *bi;
-				min = componentMinVector ( min,b->physicalParameters->se3.position - static_cast<Sphere*> ( b->geometricalModel.get() )->radius * Vector3r ( 1,1,1 ) );
-				max = componentMaxVector ( max,b->physicalParameters->se3.position + static_cast<Sphere*> ( b->geometricalModel.get() )->radius * Vector3r ( 1,1,1 ) );
+				min = componentMinVector ( min,b->physicalParameters->se3.position - static_cast<SphereModel*> ( b->geometricalModel.get() )->radius * Vector3r ( 1,1,1 ) );
+				max = componentMaxVector ( max,b->physicalParameters->se3.position + static_cast<SphereModel*> ( b->geometricalModel.get() )->radius * Vector3r ( 1,1,1 ) );
 
 				BodyMacroParameters* bm = dynamic_cast<BodyMacroParameters*> ( b->physicalParameters.get() );
 				if ( !bm ) {message="Error: spheres don't use BodyMacroParameters for physical parameters"; return false;}
@@ -146,7 +146,7 @@
 		BodyContainer::iterator biEnd = metaBodyWithSpheres->bodies->end();
 		for ( ; bi!=biEnd ; ++bi )
 		{
-			if ( ( *bi )->geometricalModel->getClassName() == "Sphere" )
+			if ( ( *bi )->geometricalModel->getClassName() == "SphereModel" )
 			{
 				if ( inside ( ( *bi )->physicalParameters->se3.position ) )
 				{
@@ -182,9 +182,9 @@
 		BodyContainer::iterator biEnd = rootBody->bodies->end();
 		for ( ; bi!=biEnd ; ++bi )
 		{
-			if ( ( *bi )->geometricalModel->getClassName() == "Sphere" )
+			if ( ( *bi )->geometricalModel->getClassName() == "SphereModel" )
 			{
-				saveFile << ( *bi )->getId() << " " << YADE_PTR_CAST<Sphere> ( ( *bi )->geometricalModel )->radius  << " " << ( *bi )->physicalParameters->se3.position << std::endl;
+				saveFile << ( *bi )->getId() << " " << YADE_PTR_CAST<SphereModel> ( ( *bi )->geometricalModel )->radius  << " " << ( *bi )->physicalParameters->se3.position << std::endl;
 
 			}
 		}
@@ -213,8 +213,8 @@
 //   ++bi2;
 //   for( ; bi2!=biEnd ; ++bi2 )
 //   {
-//    if(   (*bi)->geometricalModel->getClassName() == "Sphere"
-//       && (*bi2)->geometricalModel->getClassName() == "Sphere")
+//    if(   (*bi)->geometricalModel->getClassName() == "SphereModel"
+//       && (*bi2)->geometricalModel->getClassName() == "SphereModel")
 //    {
 //    shared_ptr<Body> bodyB = *bi2;
 //

=== modified file 'pkg/dem/PreProcessor/MembraneTest.cpp'
--- pkg/dem/PreProcessor/MembraneTest.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/MembraneTest.cpp	2009-12-11 12:37:44 +0000
@@ -16,7 +16,7 @@
 //#include<yade/pkg-dem/ElasticBodyParameters2BcpConnection4ElasticContactInteraction.hpp>
 #include<yade/pkg-common/LawDispatcher.hpp>
 #include<yade/pkg-common/ParticleParameters.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/pkg-common/ef2_BshTube_BssSweptSphereLineSegment_makeBssSweptSphereLineSegment.hpp>
 #include<yade/pkg-common/ef2_BssSweptSphereLineSegment_AABB_makeAABB.hpp>
 #include<yade/pkg-common/BcpConnection.hpp>
@@ -206,7 +206,7 @@
   body = shared_ptr<Body>(new Body(body_id_t(0),1));
   shared_ptr<SimpleViscoelasticBodyParameters> physics(new SimpleViscoelasticBodyParameters); // Bcp + Bst
   shared_ptr<AABB> aabb(new AABB);                                      // Bbv
-  shared_ptr<Sphere> gSphere(new Sphere);                               // Bsh
+  shared_ptr<SphereModel> gSphere(new SphereModel);                               // Bsh
   shared_ptr<InteractingSphere> iSphere(new InteractingSphere);         // Bss
         
   Quaternionr q(Mathr::SymmetricRandom(),Mathr::SymmetricRandom(),Mathr::SymmetricRandom(),Mathr::SymmetricRandom());
@@ -246,7 +246,7 @@
 	body = shared_ptr<Body>(new Body(body_id_t(0),2));
 	shared_ptr<ParticleParameters> physics(new ParticleParameters); // Bcp + Bst
 	shared_ptr<AABB> aabb(new AABB);                                // Bbv (not needed?)
-	shared_ptr<Sphere> node(new Sphere);                            // Bsh
+	shared_ptr<SphereModel> node(new SphereModel);                            // Bsh
         shared_ptr<InteractingNode> inode(new InteractingNode);         // Bss
         
 // 	if ((i==0 && j==0)||(i==0 && j==nbZ)||(i==nbX && j==nbZ)||(i==nbX && j==0))

=== modified file 'pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp'
--- pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/ModifiedTriaxialTest.cpp	2009-12-11 12:37:44 +0000
@@ -30,7 +30,7 @@
 
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -380,7 +380,7 @@
 	body = shared_ptr<Body>(new Body(body_id_t(0),2));
 	shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
 	Quaternionr q;

=== modified file 'pkg/dem/PreProcessor/SDECImpactTest.cpp'
--- pkg/dem/PreProcessor/SDECImpactTest.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/SDECImpactTest.cpp	2009-12-11 12:37:44 +0000
@@ -22,7 +22,7 @@
 
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -296,7 +296,7 @@
 	body = shared_ptr<Body>(new Body(body_id_t(0),2));
 	shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
 	Quaternionr q;

=== modified file 'pkg/dem/PreProcessor/SDECLinkedSpheres.cpp'
--- pkg/dem/PreProcessor/SDECLinkedSpheres.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/SDECLinkedSpheres.cpp	2009-12-11 12:37:44 +0000
@@ -26,7 +26,7 @@
 
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -188,7 +188,7 @@
 	body = shared_ptr<Body>(new Body(body_id_t(0),55));
 	shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
 	Quaternionr q;

=== modified file 'pkg/dem/PreProcessor/SDECMovingWall.cpp'
--- pkg/dem/PreProcessor/SDECMovingWall.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/SDECMovingWall.cpp	2009-12-11 12:37:44 +0000
@@ -19,7 +19,7 @@
 
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -170,7 +170,7 @@
 	body = shared_ptr<Body>(new Body(body_id_t(0),1));
 	shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
 	Quaternionr q;
@@ -211,7 +211,7 @@
 	body = shared_ptr<Body>(new Body(body_id_t(0),1));
 	shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
 	Quaternionr q;

=== modified file 'pkg/dem/PreProcessor/SDECSpheresPlane.cpp'
--- pkg/dem/PreProcessor/SDECSpheresPlane.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/SDECSpheresPlane.cpp	2009-12-11 12:37:44 +0000
@@ -20,7 +20,7 @@
 
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -154,7 +154,7 @@
 	body = shared_ptr<Body>(new Body(body_id_t(0),1));
 	shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
 	Quaternionr q;
@@ -195,7 +195,7 @@
 	body = shared_ptr<Body>(new Body(body_id_t(0),1));
 	shared_ptr<BodyMacroParameters> physics(new BodyMacroParameters);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
 	Quaternionr q;

=== modified file 'pkg/dem/PreProcessor/STLImporterTest.cpp'
--- pkg/dem/PreProcessor/STLImporterTest.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/STLImporterTest.cpp	2009-12-11 12:37:44 +0000
@@ -13,7 +13,7 @@
 #include<yade/pkg-common/InteractingFacet.hpp>
 #ifdef YADE_GEOMETRICALMODEL
 	#include<yade/pkg-common/Facet.hpp>
-	#include<yade/pkg-common/Sphere.hpp>
+	#include<yade/pkg-common/SphereModel.hpp>
 #endif
 #include<yade/core/Body.hpp>
 #include<yade/core/Interaction.hpp>
@@ -182,7 +182,7 @@
 	aabb->diffuseColor		= Vector3r(0,1,0);
 
 	#ifdef YADE_GEOMETRICALMODEL
-		shared_ptr<Sphere> gSphere(new Sphere);
+		shared_ptr<SphereModel> gSphere(new SphereModel);
 		gSphere->radius			= radius;
 		gSphere->diffuseColor		= Vector3r(Mathr::UnitRandom(),Mathr::UnitRandom(),Mathr::UnitRandom());
 		gSphere->wire			= false;

=== modified file 'pkg/dem/PreProcessor/SimpleShear.cpp'
--- pkg/dem/PreProcessor/SimpleShear.cpp	2009-12-09 17:11:51 +0000
+++ pkg/dem/PreProcessor/SimpleShear.cpp	2009-12-11 12:37:44 +0000
@@ -28,7 +28,7 @@
 
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -169,7 +169,7 @@
 	body = shared_ptr<Body>(new Body(0,1));
 	shared_ptr<CohesiveFrictionalMat> physics(new CohesiveFrictionalMat);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
 	Quaternionr q;

=== modified file 'pkg/dem/PreProcessor/TestSimpleViscoelastic.cpp'
--- pkg/dem/PreProcessor/TestSimpleViscoelastic.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/TestSimpleViscoelastic.cpp	2009-12-11 12:37:44 +0000
@@ -24,7 +24,7 @@
 #include<yade/pkg-common/PhysicalActionApplier.hpp>
 #include<yade/pkg-common/PhysicalActionContainerReseter.hpp>
 #include<yade/pkg-common/StateMetaEngine.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/LawDispatcher.hpp>
 #include<yade/pkg-dem/RigidBodyRecorder.hpp>
@@ -195,7 +195,7 @@
 	body = shared_ptr<Body>(new Body(body_id_t(0),1));
 	shared_ptr<SimpleViscoelasticBodyParameters> physics(new SimpleViscoelasticBodyParameters);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
 	Quaternionr q;

=== modified file 'pkg/dem/PreProcessor/ThreePointBending.cpp'
--- pkg/dem/PreProcessor/ThreePointBending.cpp	2009-12-04 23:46:45 +0000
+++ pkg/dem/PreProcessor/ThreePointBending.cpp	2009-12-11 12:37:44 +0000
@@ -24,7 +24,7 @@
 
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -108,9 +108,9 @@
 		assert(metaBodyWithSpheres->getClassName()=="Scene");
 
 		FOREACH(shared_ptr<Body> b, *metaBodyWithSpheres->bodies){
-			if(b->geometricalModel->getClassName()!="Sphere") continue;
-			min = componentMinVector(min,b->physicalParameters->se3.position - static_cast<Sphere*>(b->geometricalModel.get())->radius * Vector3r(1,1,1));
-			max = componentMaxVector(max,b->physicalParameters->se3.position + static_cast<Sphere*>(b->geometricalModel.get())->radius * Vector3r(1,1,1));
+			if(b->geometricalModel->getClassName()!="SphereModel") continue;
+			min = componentMinVector(min,b->physicalParameters->se3.position - static_cast<SphereModel*>(b->geometricalModel.get())->radius * Vector3r(1,1,1));
+			max = componentMaxVector(max,b->physicalParameters->se3.position + static_cast<SphereModel*>(b->geometricalModel.get())->radius * Vector3r(1,1,1));
 			BodyMacroParameters* bm = dynamic_cast<BodyMacroParameters*>(b->physicalParameters.get());
 			if(!bm) {message="Error: spheres don't use BodyMacroParameters for physical parameters"; return false;}
 			bm->young		= sphereYoungModulus;

=== modified file 'pkg/dem/PreProcessor/TriaxialTest.cpp'
--- pkg/dem/PreProcessor/TriaxialTest.cpp	2009-12-09 17:11:51 +0000
+++ pkg/dem/PreProcessor/TriaxialTest.cpp	2009-12-11 12:37:44 +0000
@@ -28,7 +28,7 @@
 #include<yade/pkg-common/AABB.hpp>
 #ifdef YADE_GEOMETRICALMODEL
 	#include<yade/pkg-common/Box.hpp>
-	#include<yade/pkg-common/Sphere.hpp>
+	#include<yade/pkg-common/SphereModel.hpp>
 	#include<yade/pkg-common/Facet.hpp>
 #endif
 #include<yade/core/Scene.hpp>
@@ -394,7 +394,7 @@
 	aabb->diffuseColor		= Vector3r(0,1,0);
 
 	#ifdef YADE_GEOMETRICALMODEL
-		shared_ptr<Sphere> gSphere(new Sphere);
+		shared_ptr<SphereModel> gSphere(new SphereModel);
 		gSphere->radius			= radius;
 		gSphere->diffuseColor		= spheresColor;
 		gSphere->wire			= false;

=== modified file 'pkg/dem/meta/Shop.cpp'
--- pkg/dem/meta/Shop.cpp	2009-12-09 17:11:51 +0000
+++ pkg/dem/meta/Shop.cpp	2009-12-11 12:37:44 +0000
@@ -16,7 +16,7 @@
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 
 #ifdef YADE_GEOMETRICALMODEL
-	#include<yade/pkg-common/Sphere.hpp>
+	#include<yade/pkg-common/SphereModel.hpp>
 	#include<yade/pkg-common/Box.hpp>
 #endif
 

=== modified file 'pkg/lattice/PreProcessor/LatticeExample.cpp'
--- pkg/lattice/PreProcessor/LatticeExample.cpp	2009-12-04 23:46:45 +0000
+++ pkg/lattice/PreProcessor/LatticeExample.cpp	2009-12-11 12:37:44 +0000
@@ -25,7 +25,7 @@
 
 #include<yade/pkg-lattice/LatticeInteractingGeometry.hpp>
 
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 
 #include<yade/core/Body.hpp>
 #include<yade/core/BodyVector.hpp>
@@ -717,7 +717,7 @@
 {
 	body = shared_ptr<Body>(new Body(body_id_t(0),nodeGroupMask));
 	shared_ptr<LatticeNodeParameters> physics(new LatticeNodeParameters);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	
 	Quaternionr q;
 	q.FromAxisAngle( Vector3r(Mathr::UnitRandom(),Mathr::UnitRandom(),Mathr::UnitRandom()) , Mathr::UnitRandom()*Mathr::PI );
@@ -754,7 +754,7 @@
 {
 	body = shared_ptr<Body>(new Body(body_id_t(0),nodeGroupMask));
 	shared_ptr<LatticeNodeParameters> physics(new LatticeNodeParameters);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	
 	Quaternionr q;
 	q.FromAxisAngle( Vector3r(Mathr::UnitRandom(),Mathr::UnitRandom(),Mathr::UnitRandom()) , Mathr::UnitRandom()*Mathr::PI );

=== modified file 'pkg/lattice/PreProcessor/LatticeExampleCTData.cpp'
--- pkg/lattice/PreProcessor/LatticeExampleCTData.cpp	2009-12-04 23:46:45 +0000
+++ pkg/lattice/PreProcessor/LatticeExampleCTData.cpp	2009-12-11 12:37:44 +0000
@@ -13,7 +13,7 @@
 #include<yade/pkg-common/BoundDispatcher.hpp>
 #include<yade/pkg-common/GeometricalModelMetaEngine.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/pkg-common/DisplacementEngine.hpp>
 #include<yade/pkg-lattice/LatticeLaw.hpp>
 #include<yade/pkg-lattice/LatticeSetParameters.hpp>
@@ -296,7 +296,7 @@
 {
 	body = shared_ptr<Body>(new Body(body_id_t(0),nodeGroupMask));
 	shared_ptr<LatticeNodeParameters> physics(new LatticeNodeParameters);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	
 	Quaternionr q;
 	q.FromAxisAngle( Vector3r(Mathr::UnitRandom(),Mathr::UnitRandom(),Mathr::UnitRandom()) , Mathr::UnitRandom()*Mathr::PI );

=== modified file 'pkg/lattice/PreProcessor/LatticeExampleSimple.cpp'
--- pkg/lattice/PreProcessor/LatticeExampleSimple.cpp	2009-12-04 23:46:45 +0000
+++ pkg/lattice/PreProcessor/LatticeExampleSimple.cpp	2009-12-11 12:37:44 +0000
@@ -11,7 +11,7 @@
 #include<yade/pkg-common/BoundDispatcher.hpp>
 #include<yade/pkg-common/GeometricalModelMetaEngine.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/pkg-common/DisplacementEngine.hpp>
 #include<yade/pkg-lattice/LatticeLaw.hpp>
 #include<yade/pkg-lattice/LatticeSetParameters.hpp>
@@ -253,7 +253,7 @@
 {
 	body = shared_ptr<Body>(new Body(body_id_t(0),nodeGroupMask));
 	shared_ptr<LatticeNodeParameters> physics(new LatticeNodeParameters);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	
 	Quaternionr q;
 	q.FromAxisAngle( Vector3r(Mathr::UnitRandom(),Mathr::UnitRandom(),Mathr::UnitRandom()) , Mathr::UnitRandom()*Mathr::PI );

=== modified file 'pkg/snow/PreProcessor/SnowCreepTest.cpp'
--- pkg/snow/PreProcessor/SnowCreepTest.cpp	2009-12-07 19:41:08 +0000
+++ pkg/snow/PreProcessor/SnowCreepTest.cpp	2009-12-11 12:37:44 +0000
@@ -28,7 +28,7 @@
 
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>
@@ -377,7 +377,7 @@
 	body = shared_ptr<Body>(new Body(body_id_t(0),2));
 	shared_ptr<CohesiveFrictionalMat> physics(new CohesiveFrictionalMat);
 	shared_ptr<AABB> aabb(new AABB);
-	shared_ptr<Sphere> gSphere(new Sphere);
+	shared_ptr<SphereModel> gSphere(new SphereModel);
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	
 	Quaternionr q(Mathr::SymmetricRandom(),Mathr::SymmetricRandom(),Mathr::SymmetricRandom(),Mathr::SymmetricRandom());

=== modified file 'pkg/snow/PreProcessor/SnowVoxelsLoader.cpp'
--- pkg/snow/PreProcessor/SnowVoxelsLoader.cpp	2009-12-07 19:41:08 +0000
+++ pkg/snow/PreProcessor/SnowVoxelsLoader.cpp	2009-12-11 12:37:44 +0000
@@ -21,7 +21,7 @@
 
 #include<yade/pkg-common/Box.hpp>
 #include<yade/pkg-common/AABB.hpp>
-#include<yade/pkg-common/Sphere.hpp>
+#include<yade/pkg-common/SphereModel.hpp>
 #include<yade/core/Scene.hpp>
 #include<yade/pkg-common/InsertionSortCollider.hpp>
 #include<yade/lib-serialization/IOFormatManager.hpp>

=== modified file 'py/yadeWrapper/yadeWrapper.cpp'
--- py/yadeWrapper/yadeWrapper.cpp	2009-12-11 11:38:18 +0000
+++ py/yadeWrapper/yadeWrapper.cpp	2009-12-11 12:37:44 +0000
@@ -101,7 +101,7 @@
 		
 		b=Body()
 		b.mold=Shape("InteractingSphere",radius=1)
-		b.shape=GeometricalModel("Sphere",radius=1)
+		b.shape=GeometricalModel("SphereModel",radius=1)
 		b.mold # will give you the shape of body
 	
 	Instances can be queried about attributes and data members they have:

=== modified file 'scripts/rename-class.py'
--- scripts/rename-class.py	2009-12-09 17:11:51 +0000
+++ scripts/rename-class.py	2009-12-11 12:37:44 +0000
@@ -9,6 +9,7 @@
 		if os.path.isdir(root+'/'+name): continue
 		if not name.endswith('pp') and name!='SConscript': continue
 		modified=False; new=[]; fullName=root+'/'+name
+		if fullName.startswith('./lib/') or fullName.startswith('./extra'): continue
 		for l in open(fullName):
 			nl,cnt=re.subn(r'\b'+oldClass+r'\b',newClass,l)
 			if cnt>0:

=== added file 'scripts/test/triax-basic.py'
--- scripts/test/triax-basic.py	1970-01-01 00:00:00 +0000
+++ scripts/test/triax-basic.py	2009-12-11 12:37:44 +0000
@@ -0,0 +1,60 @@
+# encoding: utf-8
+from yade import pack
+
+sp=pack.SpherePack()
+## corners of the initial packing
+mn,mx=Vector3(0,0,0),Vector3(10,10,10)
+
+# makeCloud parameters "documented" only by the argument names in the c++ signature now:
+# http://beta.arcig.cz/~eudoxos/yade/epydoc/yade._packSpheres.SpherePack-class.html#makeCloud
+## box between mn and mx, avg radius .5 ± ½(.5*.2), 10k spheres (will be less, obviously), not periodic
+sp.makeCloud(mn,mx,.5,.2,10000,False)
+
+## create material #0, which will be used as default
+O.materials.append(GranularMat(young=150e6,poisson=.4,frictionAngle=.4,density=2600))
+O.materials.append(GranularMat(young=150e6,poisson=.4,frictionAngle=.2,density=2600,label='frictionless'))
+
+
+## copy spheres from the packing into the scene
+## use default material, don't care about that for now
+O.bodies.append([utils.sphere(center,rad) for center,rad in sp])
+## create walls around the packing
+walls=utils.aabbWalls(thickness=.1,material='frictionless')
+wallIds=O.bodies.append(walls)
+
+## hope that we got the ids right?!
+triax=TriaxialCompressionEngine(
+	wall_bottom_id=wallIds[2],
+	wall_top_id=wallIds[3],
+	wall_left_id=wallIds[0],
+	wall_right_id=wallIds[1],
+	wall_back_id=wallIds[4],
+	wall_front_id=wallIds[5],
+	## important! (otherwise it sets inertia to infinity and crashes??)
+	internalCompaction=False,
+	## define the rest of triax params here
+	## see in pkg/dem/PreProcessor/TriaxialTest.cpp:524 etc
+	## which are assigned in the c++ preprocessor actually
+	sigmaIsoCompaction=50e3,
+	sigmaLateralConfinement=50e3,
+	max_vel=10,
+)
+
+O.engines=[
+	BexResetter(),
+	BoundDispatcher([InteractingSphere2AABB(),InteractingBox2AABB()]),
+	InsertionSortCollider(nBins=5,sweepLength=.05),
+	InteractionDispatchers(
+		[InteractingSphere2InteractingSphere4SpheresContactGeometry(),InteractingBox2InteractingSphere4SpheresContactGeometry()],
+		[SimpleElasticRelationships()],
+		[ef2_Spheres_Elastic_ElasticLaw()]
+	),
+	GlobalStiffnessTimeStepper(),
+	triax,
+	# you can add TriaxialStateRecorder and such here…
+	NewtonIntegrator(damping=.4)
+]
+
+O.dt=.5*utils.PWaveTimeStep() # initial timestep, to not explode right away
+
+O.saveTmp()