Removing control define

This commit is contained in:
Daniel Genrich
2008-09-22 10:21:57 +00:00
parent eb37006e53
commit 80f4b5b94f
7 changed files with 5 additions and 38 deletions

View File

@@ -28,7 +28,7 @@ SET(INC ${PNG_INC} ${ZLIB_INC} ${SDL_INC} extern)
FILE(GLOB SRC intern/*.cpp) FILE(GLOB SRC intern/*.cpp)
ADD_DEFINITIONS(-DNOGUI -DELBEEM_BLENDER=1 -DLBM_INCLUDE_CONTROL=1) ADD_DEFINITIONS(-DNOGUI -DELBEEM_BLENDER=1)
IF(WINDOWS) IF(WINDOWS)
ADD_DEFINITIONS(-DUSE_MSVC6FIXES) ADD_DEFINITIONS(-DUSE_MSVC6FIXES)
ENDIF(WINDOWS) ENDIF(WINDOWS)

View File

@@ -5,7 +5,7 @@ Import('env')
sources = env.Glob('intern/*.cpp') 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: if env['WITH_BF_OPENMP'] == 1:
defs += ' PARALLEL' defs += ' PARALLEL'

View File

@@ -105,9 +105,7 @@
#endif #endif
#endif #endif
#if LBM_INCLUDE_CONTROL==1
#include "solver_control.h" #include "solver_control.h"
#endif
#if LBM_INCLUDE_TESTSOLVERS==1 #if LBM_INCLUDE_TESTSOLVERS==1
#include "solver_test.h" #include "solver_test.h"
@@ -501,13 +499,11 @@ class LbmFsgrSolver :
LbmFloat& debRAC(LbmFloat* s,int l); LbmFloat& debRAC(LbmFloat* s,int l);
# endif // FSGR_STRICT_DEBUG==1 # endif // FSGR_STRICT_DEBUG==1
# if LBM_INCLUDE_CONTROL==1
LbmControlData *mpControl; LbmControlData *mpControl;
void initCpdata(); void initCpdata();
void handleCpdata(); void handleCpdata();
void cpDebugDisplay(int dispset); void cpDebugDisplay(int dispset);
# endif // LBM_INCLUDE_CONTROL==1
bool mUseTestdata; bool mUseTestdata;
# if LBM_INCLUDE_TESTSOLVERS==1 # if LBM_INCLUDE_TESTSOLVERS==1

View File

@@ -29,11 +29,6 @@ class ControlForces;
#define FARF_SEPSWE 2 #define FARF_SEPSWE 2
// relaxation macros for solver_relax.h // 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 // WARNING has to match controlparts.h
#define CPF_ENTRIES 12 #define CPF_ENTRIES 12
@@ -119,8 +114,6 @@ class ControlForces;
if(mass<rho*1.0) mass = rho*1.0; myfrac = 1.0; \ 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 // a single set of control particles and params
class LbmControlSet { class LbmControlSet {

View File

@@ -328,9 +328,7 @@ LbmFsgrSolver::LbmFsgrSolver() :
mInit2dYZ(false), mInit2dYZ(false),
mForceTadapRefine(-1), mCutoff(-1) mForceTadapRefine(-1), mCutoff(-1)
{ {
#if LBM_INCLUDE_CONTROL==1
mpControl = new LbmControlData(); mpControl = new LbmControlData();
#endif
#if LBM_INCLUDE_TESTSOLVERS==1 #if LBM_INCLUDE_TESTSOLVERS==1
mpTest = new LbmTestdata(); mpTest = new LbmTestdata();
@@ -442,9 +440,7 @@ LbmFsgrSolver::~LbmFsgrSolver()
if(mpPreviewSurface) delete mpPreviewSurface; if(mpPreviewSurface) delete mpPreviewSurface;
// cleanup done during scene deletion... // cleanup done during scene deletion...
#if LBM_INCLUDE_CONTROL==1
if(mpControl) delete mpControl; if(mpControl) delete mpControl;
#endif
// always output performance estimate // always output performance estimate
debMsgStd("LbmFsgrSolver::~LbmFsgrSolver",DM_MSG," Avg. MLSUPS:"<<(mAvgMLSUPS/mAvgMLSUPSCnt), 5); debMsgStd("LbmFsgrSolver::~LbmFsgrSolver",DM_MSG," Avg. MLSUPS:"<<(mAvgMLSUPS/mAvgMLSUPSCnt), 5);
@@ -495,9 +491,7 @@ void LbmFsgrSolver::parseAttrList()
mSimulationTime += starttimeskip; mSimulationTime += starttimeskip;
if(starttimeskip>0.) debMsgStd("LbmFsgrSolver::parseStdAttrList",DM_NOTIFY,"Used starttimeskip="<<starttimeskip<<", t="<<mSimulationTime, 1); if(starttimeskip>0.) debMsgStd("LbmFsgrSolver::parseStdAttrList",DM_NOTIFY,"Used starttimeskip="<<starttimeskip<<", t="<<mSimulationTime, 1);
#if LBM_INCLUDE_CONTROL==1
mpControl->parseControldataAttrList(mpSifAttrs); mpControl->parseControldataAttrList(mpSifAttrs);
#endif
#if LBM_INCLUDE_TESTSOLVERS==1 #if LBM_INCLUDE_TESTSOLVERS==1
mUseTestdata = 0; mUseTestdata = 0;
@@ -1275,9 +1269,8 @@ bool LbmFsgrSolver::initializeSolverPostinit() {
debMsgStd("LbmFsgrSolver::initialize",DM_MSG,"Init done ... ",10); debMsgStd("LbmFsgrSolver::initialize",DM_MSG,"Init done ... ",10);
mInitDone = 1; mInitDone = 1;
#if LBM_INCLUDE_CONTROL==1 // init fluid control
initCpdata(); initCpdata();
#endif // LBM_INCLUDE_CONTROL==1
#if LBM_INCLUDE_TESTSOLVERS==1 #if LBM_INCLUDE_TESTSOLVERS==1
initTestdata(); initTestdata();

View File

@@ -53,9 +53,9 @@ void LbmFsgrSolver::stepMain() {
// init moving bc's, can change mMaxVlen // init moving bc's, can change mMaxVlen
initMovingObstacles(false); initMovingObstacles(false);
#if LBM_INCLUDE_CONTROL==1
// handle fluid control
handleCpdata(); handleCpdata();
#endif
// important - keep for tadap // important - keep for tadap
LbmFloat lastMass = mCurrentMass; LbmFloat lastMass = mCurrentMass;

View File

@@ -15,21 +15,6 @@
#define CAUSE_PANIC { this->mPanic=1; } /*set flag*/ #define CAUSE_PANIC { this->mPanic=1; } /*set flag*/
#endif // FSGR_STRICT_DEBUG==1 #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 * normal relaxation
*****************************************************************************/ *****************************************************************************/