yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #01039
[svn] r1692 - in trunk: core pkg/common/Engine/DeusExMachina
Author: eudoxos
Date: 2009-02-25 21:26:37 +0100 (Wed, 25 Feb 2009)
New Revision: 1692
Modified:
trunk/core/yade.cpp
trunk/pkg/common/Engine/DeusExMachina/ForceEngine.cpp
Log:
1. Adapt ForceEngine to BexContainer
2. Add BEX_CONTAINER and YADE_OPENMP flags to be reported by -h.
Modified: trunk/core/yade.cpp
===================================================================
--- trunk/core/yade.cpp 2009-02-25 15:49:21 UTC (rev 1691)
+++ trunk/core/yade.cpp 2009-02-25 20:26:37 UTC (rev 1692)
@@ -111,15 +111,6 @@
void printHelp()
{
- string flags("");
- flags=flags+" PREFIX=" PREFIX "\n";
- flags=flags+" SUFFIX=" SUFFIX "\n";
- #ifdef YADE_DEBUG
- flags+=" YADE_DEBUG (debug information)\n";
- #endif
- #ifdef NDEBUG
- flags+=" NDEBUG (heavy optimizations, static_casts everywhere, asserts() are no-ops)\n";
- #endif
cerr <<
"\n" << Omega::instance().yadeVersionName << "\n\
\n\
@@ -135,8 +126,23 @@
\n\
-- : pass all remaining options to the selected GUI\n\
";
- if(flags!="")
- cout << "compilation flags:\n"+ flags +"\n\n";
+ cerr <<
+ "compilation flags:\n"
+ " PREFIX=" PREFIX "\n"
+ " SUFFIX=" SUFFIX "\n"
+ #ifdef YADE_DEBUG
+ " YADE_DEBUG (debug information, crash traces)\n"
+ #endif
+ #ifdef NDEBUG
+ " NDEBUG (heavy optimizations, no assertions and debugging features)\n"
+ #endif
+ #ifdef YADE_OPENMP
+ " YADE_OPENMP (supports openMP; set OMP_NUM_THREADS env. var to control parallelism.\n"
+ #endif
+ #ifdef BEX_CONTAINER
+ " BEX_CONTAINER (uses BexContainer instead of PhysicalActionContainer)\n"
+ #endif
+ "\n\n";
}
Modified: trunk/pkg/common/Engine/DeusExMachina/ForceEngine.cpp
===================================================================
--- trunk/pkg/common/Engine/DeusExMachina/ForceEngine.cpp 2009-02-25 15:49:21 UTC (rev 1691)
+++ trunk/pkg/common/Engine/DeusExMachina/ForceEngine.cpp 2009-02-25 20:26:37 UTC (rev 1692)
@@ -33,7 +33,11 @@
void ForceEngine::applyCondition(MetaBody* ncb){
FOREACH(body_id_t id, subscribedBodies){
assert(ncb->bodies->exists(id));
- static_pointer_cast<Force>(ncb->physicalActions->find(id,actionParameterForce->getClassIndex()))->force+=force;
+ #ifdef BEX_CONTAINER
+ ncb->bex.addForce(id,force);
+ #else
+ static_pointer_cast<Force>(ncb->physicalActions->find(id,actionParameterForce->getClassIndex()))->force+=force;
+ #endif
}
}