yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00697
[svn] r1535 - in trunk: gui/py pkg/dem/PreProcessor
Author: eudoxos
Date: 2008-10-01 11:41:03 +0200 (Wed, 01 Oct 2008)
New Revision: 1535
Modified:
trunk/gui/py/_utils.cpp
trunk/gui/py/eudoxos.py
trunk/gui/py/utils.py
trunk/pkg/dem/PreProcessor/TriaxialTest.cpp
Log:
1. Fix adding empty engine if record wall stress interval <= 0 in TriaxialTest (bug introduced yesterday)
Modified: trunk/gui/py/_utils.cpp
===================================================================
--- trunk/gui/py/_utils.cpp 2008-09-30 18:38:52 UTC (rev 1534)
+++ trunk/gui/py/_utils.cpp 2008-10-01 09:41:03 UTC (rev 1535)
@@ -24,8 +24,8 @@
FOREACH(const shared_ptr<Body>& b, *Omega::instance().getRootBody()->bodies){
shared_ptr<Sphere> s=dynamic_pointer_cast<Sphere>(b->geometricalModel); if(!s) continue;
Vector3r rrr(s->radius,s->radius,s->radius);
- minimum=componentMinVector(minimum,b->physicalParameters->se3.position-(centers?0:rrr));
- maximum=componentMaxVector(maximum,b->physicalParameters->se3.position+(centers?0:rrr));
+ minimum=componentMinVector(minimum,b->physicalParameters->se3.position-(centers?Vector3r::ZERO:rrr));
+ maximum=componentMaxVector(maximum,b->physicalParameters->se3.position+(centers?Vector3r::ZERO:rrr));
}
Vector3r dim=maximum-minimum;
return python::make_tuple(vec2tuple(minimum+.5*cutoff*dim),vec2tuple(maximum-.5*cutoff*dim));
Modified: trunk/gui/py/eudoxos.py
===================================================================
--- trunk/gui/py/eudoxos.py 2008-09-30 18:38:52 UTC (rev 1534)
+++ trunk/gui/py/eudoxos.py 2008-10-01 09:41:03 UTC (rev 1535)
@@ -9,7 +9,7 @@
# E=(1/2)σεAl # global stored energy
# σ=EE/(.5εAl)=EE/(.5εV)
from yade import utils
- dim=utils.aabbDim(cutoff,centers=True)
+ dim=utils.aabbDim(cutoff,centers=False)
return utils.elasticEnergy(utils.aabbExtrema(cutoff))/(.5*strain*dim[0]*dim[1]*dim[2])
def estimatePoissonYoung(principalAxis,stress=0,plot=False,cutoff=0.):
Modified: trunk/gui/py/utils.py
===================================================================
--- trunk/gui/py/utils.py 2008-09-30 18:38:52 UTC (rev 1534)
+++ trunk/gui/py/utils.py 2008-10-01 09:41:03 UTC (rev 1535)
@@ -79,9 +79,9 @@
return walls
-def aabbDim(cutoff=0.):
+def aabbDim(cutoff=0.,centers=False):
"""return dimensions of the bounding box, optionally cut."""
- a=aabbExtrema(cutoff)
+ a=aabbExtrema(cutoff,centers)
return (a[1][0]-a[0][0],a[1][1]-a[0][1],a[1][2]-a[0][2])
def perpendicularArea(axis):
Modified: trunk/pkg/dem/PreProcessor/TriaxialTest.cpp
===================================================================
--- trunk/pkg/dem/PreProcessor/TriaxialTest.cpp 2008-09-30 18:38:52 UTC (rev 1534)
+++ trunk/pkg/dem/PreProcessor/TriaxialTest.cpp 2008-10-01 09:41:03 UTC (rev 1535)
@@ -659,7 +659,7 @@
rootBody->engines.push_back(globalStiffnessCounter);
rootBody->engines.push_back(globalStiffnessTimeStepper);
rootBody->engines.push_back(triaxialcompressionEngine);
- rootBody->engines.push_back(triaxialStateRecorder);
+ if(recordIntervalIter>0) rootBody->engines.push_back(triaxialStateRecorder);
//rootBody->engines.push_back(gravityCondition);
rootBody->engines.push_back(shared_ptr<Engine> (new NewtonsDampedLaw));
@@ -673,9 +673,10 @@
if (saveAnimationSnapshots) {
- shared_ptr<PositionOrientationRecorder> positionOrientationRecorder(new PositionOrientationRecorder);
- positionOrientationRecorder->outputFile = AnimationSnapshotsBaseName;
- rootBody->engines.push_back(positionOrientationRecorder);}
+ shared_ptr<PositionOrientationRecorder> positionOrientationRecorder(new PositionOrientationRecorder);
+ positionOrientationRecorder->outputFile = AnimationSnapshotsBaseName;
+ rootBody->engines.push_back(positionOrientationRecorder);
+ }
rootBody->initializers.clear();
rootBody->initializers.push_back(physicalActionInitializer);