yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #01596
[svn] r1910 - in trunk: gui/py pkg/common/Engine/DeusExMachina
Author: gladky_anton
Date: 2009-07-31 16:32:36 +0200 (Fri, 31 Jul 2009)
New Revision: 1910
Modified:
trunk/gui/py/PythonUI_rc.py
trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.cpp
trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.hpp
Log:
1. Changes on PressTestEngine. Now it defines the destruction moment more precisely
2. YADE CONSOLE emblem shows now without upper row shifted.
Modified: trunk/gui/py/PythonUI_rc.py
===================================================================
--- trunk/gui/py/PythonUI_rc.py 2009-07-31 10:56:33 UTC (rev 1909)
+++ trunk/gui/py/PythonUI_rc.py 2009-07-31 14:32:36 UTC (rev 1910)
@@ -126,7 +126,8 @@
else:
sys.argv[0]='<embedded python interpreter>'
from IPython.Shell import IPShellEmbed
- ipshell = IPShellEmbed(banner=r"""__ __ ____ ____ _
+ ipshell = IPShellEmbed(banner=r"""
+ __ __ ____ ____ _
\ \ / /_ _| _ \ ___ / ___|___ _ __ ___ ___ | | ___
\ V / _` | | | |/ _ \ | | / _ \| '_ \/ __|/ _ \| |/ _ \
| | (_| | |_| | __/ | |__| (_) | | | \__ \ (_) | | __/
Modified: trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.cpp
===================================================================
--- trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.cpp 2009-07-31 10:56:33 UTC (rev 1909)
+++ trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.cpp 2009-07-31 14:32:36 UTC (rev 1910)
@@ -26,10 +26,11 @@
FOREACH(body_id_t id, subscribedBodies){
assert(ncb->bodies->exists(id));
currentVerticalForce = ncb->bex.getForce(id)[2]; //Define current vertical force
- minimalForce = maxVerticalForce*0.1; //Define minimal edge of te force (10% from Maximal)
+ minimalForce = maxVerticalForce*0.1; //Define minimal edge of the force (10% from Maximal)
+ minimalPredictedForce = predictedForce*0.1; //Define minimal edge of the Predicted force (10% from Predicted)
if (currentVerticalForce > maxVerticalForce) { //Force increasing. Press is working normally
maxVerticalForce = currentVerticalForce;
- } else if ((currentVerticalForce<=(minimalForce))&&(maxVerticalForce !=0)) {
+ } else if ((currentVerticalForce<=(minimalForce))&&(maxVerticalForce>minimalPredictedForce)) {
/*
* Force is decreased lower, than minimal. The body seems "cracked".
* Starting the countdown
Modified: trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.hpp
===================================================================
--- trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.hpp 2009-07-31 10:56:33 UTC (rev 1909)
+++ trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.hpp 2009-07-31 14:32:36 UTC (rev 1910)
@@ -29,14 +29,14 @@
public:
enum motionDirection {forward, backward, stop};
motionDirection curentDirection;
- Real currentVerticalForce, maxVerticalForce, minimalForce;
+ Real currentVerticalForce, maxVerticalForce, minimalForce, predictedForce, minimalPredictedForce;
long int numberIterationAfterDestruction, currentIterationAfterDestruction;
int pressVelocityForw2Back;
PressTestEngine(): curentDirection(forward), currentVerticalForce(0), maxVerticalForce(0), currentIterationAfterDestruction(0), pressVelocityForw2Back(25) {};
virtual ~PressTestEngine(){};
virtual void applyCondition(MetaBody*);
REGISTER_CLASS_AND_BASE(PressTestEngine,TranslationEngine);
- REGISTER_ATTRIBUTES(TranslationEngine, (numberIterationAfterDestruction));
+ REGISTER_ATTRIBUTES(TranslationEngine, (numberIterationAfterDestruction) (predictedForce));
DECLARE_LOGGER;
};
REGISTER_SERIALIZABLE(PressTestEngine);