diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/elbeem/extern/elbeem.h | 8 | ||||
-rw-r--r-- | intern/elbeem/intern/simulation_object.cpp | 3 | ||||
-rw-r--r-- | intern/elbeem/intern/solver_class.h | 3 | ||||
-rw-r--r-- | intern/elbeem/intern/solver_init.cpp | 9 | ||||
-rw-r--r-- | intern/elbeem/intern/solver_interface.h | 3 |
5 files changed, 25 insertions, 1 deletions
diff --git a/intern/elbeem/extern/elbeem.h b/intern/elbeem/extern/elbeem.h index f5538df8805..6df08ccebd2 100644 --- a/intern/elbeem/extern/elbeem.h +++ b/intern/elbeem/extern/elbeem.h @@ -77,6 +77,10 @@ typedef struct elbeemSimulationSettings { /* boundary types and settings for domain walls */ short domainobsType; float domainobsPartslip; + + /* what surfaces to generate */ + int mFsSurfGenSetting; + /* generate speed vectors for vertices (e.g. for image based motion blur)*/ short generateVertexVectors; /* strength of surface smoothing */ @@ -108,10 +112,12 @@ typedef struct elbeemSimulationSettings { #define OB_FLUIDSIM_PARTICLE 64 #define OB_FLUIDSIM_CONTROL 128 -// defines for elbeemMesh->obstacleType below +// defines for elbeemMesh->obstacleType below (low bits) high bits (>=64) are reserved for mFsSurfGenSetting flags which are defined in solver_class.h #define FLUIDSIM_OBSTACLE_NOSLIP 1 #define FLUIDSIM_OBSTACLE_PARTSLIP 2 #define FLUIDSIM_OBSTACLE_FREESLIP 3 +#define FLUIDSIM_FSSG_NOOBS 64 + #define OB_VOLUMEINIT_VOLUME 1 #define OB_VOLUMEINIT_SHELL 2 diff --git a/intern/elbeem/intern/simulation_object.cpp b/intern/elbeem/intern/simulation_object.cpp index 2544b8fe29c..87828b26088 100644 --- a/intern/elbeem/intern/simulation_object.cpp +++ b/intern/elbeem/intern/simulation_object.cpp @@ -181,6 +181,9 @@ int SimulationObject::initializeLbmSimulation(ntlRenderGlobals *glob) mpLbm->setGenerateParticles(mpElbeemSettings->generateParticles); // set initial particles mpParts->setNumInitialParticles(mpElbeemSettings->numTracerParticles); + + // surface generation flag + mpLbm->setSurfGenSettings(mpElbeemSettings->mFsSurfGenSetting); string dinitType = string("no"); if (mpElbeemSettings->domainobsType==FLUIDSIM_OBSTACLE_PARTSLIP) dinitType = string("part"); diff --git a/intern/elbeem/intern/solver_class.h b/intern/elbeem/intern/solver_class.h index 8662ac3f12a..1548aaa19bc 100644 --- a/intern/elbeem/intern/solver_class.h +++ b/intern/elbeem/intern/solver_class.h @@ -308,6 +308,9 @@ class LbmFsgrSolver : //! for raytracing, preprocess void prepareVisualization( void ); + /* surface generation settings */ + virtual void setSurfGenSettings(short value); + protected: //! internal quick print function (for debugging) diff --git a/intern/elbeem/intern/solver_init.cpp b/intern/elbeem/intern/solver_init.cpp index 899b1e0ecbc..7e9f5e7f420 100644 --- a/intern/elbeem/intern/solver_init.cpp +++ b/intern/elbeem/intern/solver_init.cpp @@ -539,6 +539,15 @@ void LbmFsgrSolver::parseAttrList() /****************************************************************************** + * (part of enabling chapter 6 of "Free Surface Flows with Moving and Deforming Objects for LBM") + *****************************************************************************/ +void LbmFsgrSolver::setSurfGenSettings(short value) +{ + mFsSurfGenSetting = value; +} + + +/****************************************************************************** * Initialize omegas and forces on all levels (for init/timestep change) *****************************************************************************/ void LbmFsgrSolver::initLevelOmegas() diff --git a/intern/elbeem/intern/solver_interface.h b/intern/elbeem/intern/solver_interface.h index 71b347d683d..8f3181a307d 100644 --- a/intern/elbeem/intern/solver_interface.h +++ b/intern/elbeem/intern/solver_interface.h @@ -271,6 +271,9 @@ class LbmSolverInterface /*! debug object display */ virtual vector<ntlGeometryObject*> getDebugObjects() { vector<ntlGeometryObject*> empty(0); return empty; } + /* surface generation settings */ + virtual void setSurfGenSettings(short value) = 0; + #if LBM_USE_GUI==1 /*! show simulation info */ virtual void debugDisplay(int) = 0; |