← Back to team overview

yade-dev team mailing list archive

[svn] r1934 - in trunk: extra pkg/dem/DataClass/InteractionGeometry pkg/dem/PreProcessor

 

Author: eudoxos
Date: 2009-08-10 14:11:49 +0200 (Mon, 10 Aug 2009)
New Revision: 1934

Modified:
   trunk/extra/PeriodicInsertionSortCollider.cpp
   trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.cpp
   trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp
   trunk/pkg/dem/PreProcessor/TriaxialTest.cpp
Log:
1. Fix missing vtable for GenericSphereContact (crasher with debugging)
2. Fix collider stride for TriaxialTest with unspecified radius


Modified: trunk/extra/PeriodicInsertionSortCollider.cpp
===================================================================
--- trunk/extra/PeriodicInsertionSortCollider.cpp	2009-08-10 11:32:23 UTC (rev 1933)
+++ trunk/extra/PeriodicInsertionSortCollider.cpp	2009-08-10 12:11:49 UTC (rev 1934)
@@ -388,7 +388,7 @@
 	for(int axis=0; axis<3; axis++){
 		// Δσ=ΔεE=(Δl/l)×(l×K/A) ↔ Δl=Δσ×A/K
 		// FIXME: either NormalShearInteraction::{kn,ks} is computed wrong or we have dimensionality problem here
-		// FIXME: that is why the fixup 1e-2 is needed here
+		// FIXME: that is why the fixup 1e-4 is needed here
 		// FIXME: or perhaps maxDisplaPerStep=1e-2*charLen is too big??
 		cellGrow[axis]=1e-4*(sigma[axis]-sigmaGoal)*cellArea[axis]/(avgStiffness>0?avgStiffness:1);
 		if(abs(cellGrow[axis])>maxDisplPerStep) cellGrow[axis]=Mathr::Sign(cellGrow[axis])*maxDisplPerStep;

Modified: trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.cpp
===================================================================
--- trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.cpp	2009-08-10 11:32:23 UTC (rev 1933)
+++ trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.cpp	2009-08-10 12:11:49 UTC (rev 1934)
@@ -1,4 +1,5 @@
 #include"DemXDofGeom.hpp"
 YADE_PLUGIN((Dem3DofGeom));
 Real Dem3DofGeom::displacementN(){throw;}
+GenericSpheresContact::~GenericSpheresContact(){}
 

Modified: trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp
===================================================================
--- trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp	2009-08-10 11:32:23 UTC (rev 1933)
+++ trunk/pkg/dem/DataClass/InteractionGeometry/DemXDofGeom.hpp	2009-08-10 12:11:49 UTC (rev 1934)
@@ -11,6 +11,7 @@
 	public:
 		Vector3r normal;
 		Real refR1, refR2;
+	virtual ~GenericSpheresContact(); // vtable
 };
 
 /*! Abstract base class for representing contact geometry of 2 elements that has 3 degrees of freedom:

Modified: trunk/pkg/dem/PreProcessor/TriaxialTest.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/TriaxialTest.cpp	2009-08-10 11:32:23 UTC (rev 1933)
+++ trunk/pkg/dem/PreProcessor/TriaxialTest.cpp	2009-08-10 12:11:49 UTC (rev 1934)
@@ -195,26 +195,13 @@
 		fast=true;
 	}
 	
-	rootBody = shared_ptr<MetaBody>(new MetaBody);
-	positionRootBody(rootBody);
-
-	//rootBody->transientInteractions		= shared_ptr<InteractionContainer>(new InteractionHashMap);
-
-	//rootBody->bodies 			= shared_ptr<BodyContainer>(new BodyRedirectionVector);
-
-	createActors(rootBody);
-
 	shared_ptr<Body> body;
 
-
-
 	/* if _mean_radius is not given (i.e. <=0), then calculate it from box size;
 	 * OTOH, if it is specified, scale the box preserving its ratio and lowerCorner so that the radius can be as requested
 	 */
 	Real porosity=.75;
-	
 	vector<BasicSphere> sphere_list;
-
 	if(importFilename==""){
 		Vector3r dimensions=upperCorner-lowerCorner; Real volume=dimensions.X()*dimensions.Y()*dimensions.Z();
 		if(radiusMean<=0) radiusMean=pow(volume*(1-porosity)/(Mathr::PI*(4/3.)*numberOfGrains),1/3.);
@@ -235,6 +222,12 @@
 		sphere_list=Shop::loadSpheresFromFile(importFilename,lowerCorner,upperCorner);
 	}
 
+	// setup rootBody here, since radiusMean is now at its true value (if it was negative)
+	rootBody = shared_ptr<MetaBody>(new MetaBody);
+	positionRootBody(rootBody);
+	createActors(rootBody);
+
+
 	if(thickness<0) thickness=radiusMean;
 	if(facetWalls) thickness=0;