← Back to team overview

yade-dev team mailing list archive

[svn] r1617 - in trunk: gui/qt3 pkg/dem/Engine/DeusExMachina pkg/snow pkg/snow/Engine pkg/snow/PreProcessor

 

Author: cosurgi
Date: 2009-01-09 12:44:44 +0100 (Fri, 09 Jan 2009)
New Revision: 1617

Modified:
   trunk/gui/qt3/GLViewer.cpp
   trunk/pkg/dem/Engine/DeusExMachina/TriaxialStressController.cpp
   trunk/pkg/snow/Engine/Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry.cpp
   trunk/pkg/snow/Engine/Ef2_InteractingBox_BssSnowGrain_makeSpheresContactGeometry.cpp
   trunk/pkg/snow/PreProcessor/SnowVoxelsLoader.cpp
   trunk/pkg/snow/SConscript
Log:
small snow update



Modified: trunk/gui/qt3/GLViewer.cpp
===================================================================
--- trunk/gui/qt3/GLViewer.cpp	2009-01-08 15:58:45 UTC (rev 1616)
+++ trunk/gui/qt3/GLViewer.cpp	2009-01-09 11:44:44 UTC (rev 1617)
@@ -534,6 +534,7 @@
 			y-=lineHt;
 		}
 		if(drawGridXYZ[0] || drawGridXYZ[1] || drawGridXYZ[2]){
+			glColor3v(Vector3r(1,1,0));
 			QGLViewer::drawText(x,y,std::string("grid: "+boost::lexical_cast<std::string>(gridStep))+(grid_subdivision?(std::string(" ,subdivision: "+boost::lexical_cast<std::string>(gridStep*0.1))):(std::string(""))));
 			y-=lineHt;
 		}

Modified: trunk/pkg/dem/Engine/DeusExMachina/TriaxialStressController.cpp
===================================================================
--- trunk/pkg/dem/Engine/DeusExMachina/TriaxialStressController.cpp	2009-01-08 15:58:45 UTC (rev 1616)
+++ trunk/pkg/dem/Engine/DeusExMachina/TriaxialStressController.cpp	2009-01-09 11:44:44 UTC (rev 1617)
@@ -358,7 +358,8 @@
 		if ( ( *bi )->isDynamic )
 		{
 			( static_cast<InteractingSphere*> ( ( *bi )->interactingGeometry.get() ) )->radius *= multiplier;
-			( static_cast<Sphere*> ( ( *bi )->geometricalModel.get() ) )->radius *= multiplier;
+			//( static_cast<Sphere*> ( ( *bi )->geometricalModel.get() ) )->radius *= multiplier;
+			Sphere* s = dynamic_cast<Sphere*> ( ( *bi )->geometricalModel.get() ); if(s) s->radius *= multiplier;
 			( static_cast<ParticleParameters*> ( ( *bi )->physicalParameters.get() ) )->mass *= pow ( multiplier,3 );
 			( static_cast<RigidBodyParameters*> ( ( *bi )->physicalParameters.get() ) )->inertia *= pow ( multiplier,5 );
 

Modified: trunk/pkg/snow/Engine/Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry.cpp
===================================================================
--- trunk/pkg/snow/Engine/Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry.cpp	2009-01-08 15:58:45 UTC (rev 1616)
+++ trunk/pkg/snow/Engine/Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry.cpp	2009-01-09 11:44:44 UTC (rev 1617)
@@ -26,6 +26,7 @@
 							const shared_ptr<Interaction>& c)
 {
 	bool result = g.go(cm1,cm2,se32,se32,c);
+	std::cerr << "-------------------1a\n";
 	return result;
 }
 
@@ -36,6 +37,7 @@
 								const Se3r& se32,
 								const shared_ptr<Interaction>& c)
 {
+	std::cerr << "-------------------2a\n";
 	return g.goReverse(cm1,cm2,se31,se32,c);
 }
 

Modified: trunk/pkg/snow/Engine/Ef2_InteractingBox_BssSnowGrain_makeSpheresContactGeometry.cpp
===================================================================
--- trunk/pkg/snow/Engine/Ef2_InteractingBox_BssSnowGrain_makeSpheresContactGeometry.cpp	2009-01-08 15:58:45 UTC (rev 1616)
+++ trunk/pkg/snow/Engine/Ef2_InteractingBox_BssSnowGrain_makeSpheresContactGeometry.cpp	2009-01-09 11:44:44 UTC (rev 1617)
@@ -16,7 +16,6 @@
 #include<yade/lib-base/yadeWm3Extra.hpp>
 
 
-
 bool Ef2_InteractingBox_BssSnowGrain_makeSpheresContactGeometry::go(
 		const shared_ptr<InteractingGeometry>& cm1,
 		const shared_ptr<InteractingGeometry>& cm2,
@@ -25,6 +24,7 @@
 		const shared_ptr<Interaction>& c)
 {
 	bool result = g.go(cm1,cm2,se32,se32,c);
+	std::cerr << "-------------------1\n";
 	return result;
 }
 
@@ -36,6 +36,7 @@
 						const shared_ptr<Interaction>& c)
 {
 	bool result = g.goReverse(cm1,cm2,se32,se32,c);
+	std::cerr << "-------------------2\n";
 	return result;
 }
 

Modified: trunk/pkg/snow/PreProcessor/SnowVoxelsLoader.cpp
===================================================================
--- trunk/pkg/snow/PreProcessor/SnowVoxelsLoader.cpp	2009-01-08 15:58:45 UTC (rev 1616)
+++ trunk/pkg/snow/PreProcessor/SnowVoxelsLoader.cpp	2009-01-09 11:44:44 UTC (rev 1617)
@@ -356,18 +356,14 @@
 	physicalActionInitializer->physicalActionNames.push_back("Momentum");
 	physicalActionInitializer->physicalActionNames.push_back("GlobalStiffness");
 	
-	/* GRR
 	shared_ptr<InteractionGeometryMetaEngine> interactionGeometryDispatcher(new InteractionGeometryMetaEngine);
-	shared_ptr<InteractionGeometryEngineUnit> s1(new Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry);
-	interactionGeometryDispatcher->add(s1);
-	shared_ptr<InteractionGeometryEngineUnit> s2(new Ef2_InteractingBox_BssSnowGrain_makeSpheresContactGeometry);
-	interactionGeometryDispatcher->add(s2);
-	*/
 
-	shared_ptr<InteractionGeometryMetaEngine> interactionGeometryDispatcher(new InteractionGeometryMetaEngine);
+	//shared_ptr<InteractionGeometryEngineUnit> s1(new Ef2_BssSnowGrain_BssSnowGrain_makeSpheresContactGeometry);  //GRR 
+	//shared_ptr<InteractionGeometryEngineUnit> s2(new Ef2_InteractingBox_BssSnowGrain_makeSpheresContactGeometry);//GRR 
 	shared_ptr<InteractionGeometryEngineUnit> s1(new InteractingSphere2InteractingSphere4SpheresContactGeometry);
-	interactionGeometryDispatcher->add(s1);
 	shared_ptr<InteractionGeometryEngineUnit> s2(new InteractingBox2InteractingSphere4SpheresContactGeometry);
+	
+	interactionGeometryDispatcher->add(s1);
 	interactionGeometryDispatcher->add(s2);
 
 	shared_ptr<CohesiveFrictionalRelationships> cohesiveFrictionalRelationships = shared_ptr<CohesiveFrictionalRelationships> (new CohesiveFrictionalRelationships);
@@ -537,8 +533,8 @@
 	shared_ptr<BshSnowGrain> gSnowGrain(grain);
 	
 
-	//GRR shared_ptr<BssSnowGrain> iSphere(new BssSnowGrain(gSnowGrain.get(),one_voxel_in_meters_is));
-	//GRR Real radius = iSphere->radius;
+	//shared_ptr<BssSnowGrain> iSphere(new BssSnowGrain(gSnowGrain.get(),one_voxel_in_meters_is));//GRR 
+	//Real radius = iSphere->radius;                                                              //GRR 
 	shared_ptr<InteractingSphere> iSphere(new InteractingSphere);
 	Real radius = (grain->start-grain->end).Length()*0.5;
 	

Modified: trunk/pkg/snow/SConscript
===================================================================
--- trunk/pkg/snow/SConscript	2009-01-08 15:58:45 UTC (rev 1616)
+++ trunk/pkg/snow/SConscript	2009-01-09 11:44:44 UTC (rev 1617)
@@ -1,3 +1,5 @@
+# vim: set filetype=python :
+
 Import('*')
 env.Install('$PREFIX/lib/yade$SUFFIX/pkg-snow',[