Removing control define
authorDaniel Genrich <daniel.genrich@gmx.net>
Mon, 22 Sep 2008 10:21:57 +0000 (10:21 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Mon, 22 Sep 2008 10:21:57 +0000 (10:21 +0000)
intern/elbeem/CMakeLists.txt
intern/elbeem/SConscript
intern/elbeem/intern/solver_class.h
intern/elbeem/intern/solver_control.h
intern/elbeem/intern/solver_init.cpp
intern/elbeem/intern/solver_main.cpp
intern/elbeem/intern/solver_relax.h

index d73d0c3e06dabc117d1671d83f794e7c9cc79ebc..03fd4a3fefc75bd6c24da487f8e8ef9672d6d99a 100644 (file)
@@ -28,7 +28,7 @@ SET(INC ${PNG_INC} ${ZLIB_INC} ${SDL_INC} extern)
 
 FILE(GLOB SRC intern/*.cpp)
 
-ADD_DEFINITIONS(-DNOGUI -DELBEEM_BLENDER=1 -DLBM_INCLUDE_CONTROL=1)
+ADD_DEFINITIONS(-DNOGUI -DELBEEM_BLENDER=1)
 IF(WINDOWS)
     ADD_DEFINITIONS(-DUSE_MSVC6FIXES)
 ENDIF(WINDOWS)
index 5ee8da8a071494a195f6b64b4d441f2e2667b290..68892ac261cdd45295fdbdc9262fbf8a9b9ef822 100644 (file)
@@ -5,7 +5,7 @@ Import('env')
 
 sources = env.Glob('intern/*.cpp')
 
-defs = 'NOGUI ELBEEM_BLENDER=1 LBM_INCLUDE_CONTROL=1'
+defs = 'NOGUI ELBEEM_BLENDER=1'
 
 if env['WITH_BF_OPENMP'] == 1:
     defs += ' PARALLEL'
index 310dd50617dc381b90747fbc58b6bfc51da7871b..acfa095e1d87259d0430dbfe8cbe8b2994907da4 100644 (file)
 #endif
 #endif
 
-#if LBM_INCLUDE_CONTROL==1
 #include "solver_control.h"
-#endif 
 
 #if LBM_INCLUDE_TESTSOLVERS==1
 #include "solver_test.h"
@@ -501,13 +499,11 @@ class LbmFsgrSolver :
                LbmFloat& debRAC(LbmFloat* s,int l);
 #              endif // FSGR_STRICT_DEBUG==1
 
-#              if LBM_INCLUDE_CONTROL==1
                LbmControlData *mpControl;
 
                void initCpdata();
                void handleCpdata();
                void cpDebugDisplay(int dispset); 
-#              endif // LBM_INCLUDE_CONTROL==1
 
                bool mUseTestdata;
 #              if LBM_INCLUDE_TESTSOLVERS==1
index 0f45d2133ffa3afe937c6f9f6cc8c50562ff9dde..57112b365ce59112c6159eb48415906e31f35ccd 100644 (file)
@@ -29,11 +29,6 @@ class ControlForces;
 #define FARF_SEPSWE  2
 
 // relaxation macros for solver_relax.h
-#if LBM_INCLUDE_CONTROL!=1
-
-// defined in relax.h
-
-#else // LBM_INCLUDE_TESTSOLVERS!=1
 
 // WARNING has to match controlparts.h
 #define CPF_ENTRIES     12
@@ -119,8 +114,6 @@ class ControlForces;
                        if(mass<rho*1.0) mass = rho*1.0; myfrac = 1.0; \
                }
 
-#endif // LBM_INCLUDE_TESTSOLVERS!=1
-
 
 // a single set of control particles and params
 class LbmControlSet {
index b1222d48ce54508be9ba42d57ebca51ae0519dd4..270531d80be9a9b8119cb33166d593bfe75605b0 100644 (file)
@@ -328,9 +328,7 @@ LbmFsgrSolver::LbmFsgrSolver() :
        mInit2dYZ(false),
        mForceTadapRefine(-1), mCutoff(-1)
 {
-#if LBM_INCLUDE_CONTROL==1
        mpControl = new LbmControlData();
-#endif
 
 #if LBM_INCLUDE_TESTSOLVERS==1
        mpTest = new LbmTestdata();
@@ -442,9 +440,7 @@ LbmFsgrSolver::~LbmFsgrSolver()
        if(mpPreviewSurface) delete mpPreviewSurface;
        // cleanup done during scene deletion...
        
-#if LBM_INCLUDE_CONTROL==1
        if(mpControl) delete mpControl;
-#endif
 
        // always output performance estimate
        debMsgStd("LbmFsgrSolver::~LbmFsgrSolver",DM_MSG," Avg. MLSUPS:"<<(mAvgMLSUPS/mAvgMLSUPSCnt), 5);
@@ -495,9 +491,7 @@ void LbmFsgrSolver::parseAttrList()
        mSimulationTime += starttimeskip;
        if(starttimeskip>0.) debMsgStd("LbmFsgrSolver::parseStdAttrList",DM_NOTIFY,"Used starttimeskip="<<starttimeskip<<", t="<<mSimulationTime, 1);
 
-#if LBM_INCLUDE_CONTROL==1
        mpControl->parseControldataAttrList(mpSifAttrs);
-#endif
 
 #if LBM_INCLUDE_TESTSOLVERS==1
        mUseTestdata = 0;
@@ -1275,9 +1269,8 @@ bool LbmFsgrSolver::initializeSolverPostinit() {
   debMsgStd("LbmFsgrSolver::initialize",DM_MSG,"Init done ... ",10);
        mInitDone = 1;
 
-#if LBM_INCLUDE_CONTROL==1
+       // init fluid control
        initCpdata();
-#endif // LBM_INCLUDE_CONTROL==1
 
 #if LBM_INCLUDE_TESTSOLVERS==1
        initTestdata();
index 616ac0e2a237f20af67afd89bcf5096ed90db24e..9df53a824d45d633bc8261dead0ae217cc5203dc 100644 (file)
@@ -53,9 +53,9 @@ void LbmFsgrSolver::stepMain() {
 
        // init moving bc's, can change mMaxVlen
        initMovingObstacles(false);
-#if LBM_INCLUDE_CONTROL==1
+       
+       // handle fluid control 
        handleCpdata();
-#endif
 
        // important - keep for tadap
        LbmFloat lastMass = mCurrentMass;
index db6e537aff3f1727a9fac30ab5366f02c2e9c3bf..c28e7aacd298e8154b4a48071f8ff73814d2e607 100644 (file)
 #else // FSGR_STRICT_DEBUG==1
 #define CAUSE_PANIC { this->mPanic=1; } /*set flag*/
 #endif // FSGR_STRICT_DEBUG==1
-
-// #if LBM_INCLUDE_TESTSOLVERS!=1
-#if LBM_INCLUDE_CONTROL!=1
-
-#define PRECOLLIDE_MODS(rho,ux,uy,uz, grav) \
-       ux += (grav)[0]; \
-       uy += (grav)[1]; \
-       uz += (grav)[2]; 
-
-#define TEST_IF_CHECK 
-
-#else // LBM_INCLUDE_CONTROL!=1
-// defined in solver_control.h 
-#endif // LBM_INCLUDE_CONTROL!=1
-
        
 /******************************************************************************
  * normal relaxation