Commit: 5e2a1bfe3d5735b730353e606c6d2d949b251f0d
Author: Sebastián Barschkis
Date:   Mon May 2 11:21:54 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB5e2a1bfe3d5735b730353e606c6d2d949b251f0d

cleaned up manta api and script

===================================================================

M       intern/mantaflow/intern/MANTA.cpp
M       intern/mantaflow/intern/strings/smoke.h

===================================================================

diff --git a/intern/mantaflow/intern/MANTA.cpp 
b/intern/mantaflow/intern/MANTA.cpp
index b8e7de3..cee697b 100644
--- a/intern/mantaflow/intern/MANTA.cpp
+++ b/intern/mantaflow/intern/MANTA.cpp
@@ -50,10 +50,6 @@ MANTA::MANTA(int *res, SmokeModifierData *smd)
        smd->domain->fluid = this;
        smd->domain->manta_solver_res = 3; // Why do we need to set this 
explicitly? When not set, fluidsolver throws exception (occurs when loading a 
new .blend file)
        
-       // General variables used for low and high res
-       std::string tmpScript   = "";
-       std::string finalScript = "";
-
        mUsingHeat    = smd->domain->active_fields & SM_ACTIVE_HEAT;
        mUsingFire    = smd->domain->active_fields & SM_ACTIVE_FIRE;
        mUsingColors  = smd->domain->active_fields & SM_ACTIVE_COLORS;
@@ -464,13 +460,13 @@ std::string MANTA::parseLine(const std::string& line, 
SmokeModifierData *smd)
        int currPos = 0, start_del = 0, end_del = -1;
        bool readingVar = false;
        const char delimiter = '$';
-       while (currPos < line.size()){
+       while (currPos < line.size()) {
                if (line[currPos] == delimiter && ! readingVar) {
                        readingVar  = true;
                        start_del   = currPos + 1;
                        res        += line.substr(end_del + 1, currPos - 
end_del -1);
                }
-               else if (line[currPos] == delimiter && readingVar){
+               else if (line[currPos] == delimiter && readingVar) {
                        readingVar  = false;
                        end_del     = currPos;
                        res        += getRealValue(line.substr(start_del, 
currPos - start_del), smd);
diff --git a/intern/mantaflow/intern/strings/smoke.h 
b/intern/mantaflow/intern/strings/smoke.h
index 90fe470..dc3cb73 100644
--- a/intern/mantaflow/intern/strings/smoke.h
+++ b/intern/mantaflow/intern/strings/smoke.h
@@ -68,7 +68,7 @@ res = $RES$\n\
 gs = vec3($RESX$,$RESY$,$RESZ$)\n\
 if dim == 2:\n\
   gs.z = 1\n\
-s = FluidSolver(name='main', gridSize=gs, dim=dim)\n\
+s = Solver(name='main', gridSize=gs, dim=dim)\n\
 dt_default = 0.1\n\
 dt_factor = $DT_FACTOR$\n\
 fps = $FPS$\n\
@@ -78,7 +78,6 @@ s.timestepMin = dt0 / 10\n\
 s.timestepMax = dt0\n\
 s.cfl = 4.0\n\
 s.timestep = dt0\n\
-timings = Timings()\n\
 vorticity = $VORTICITY$\n\
 boundaryWidth = 1\n";
 
@@ -327,7 +326,6 @@ if 'fps' in globals() : del fps\n\
 if 'dt0' in globals() : del dt0\n\
 if 'vorticity' in globals() : del vorticity\n\
 if 'boundaryWidth' in globals() : del boundaryWidth\n\
-if 'timings' in globals() : del timings\n\
 if 'using_colors' in globals() : del using_colors\n\
 if 'using_heat' in globals() : del using_heat\n\
 if 'using_fire' in globals() : del using_fire\n\
@@ -353,7 +351,7 @@ mantaMsg('Deleting solver high')\n\
 if 'xl' in globals() : del xl\n";
 
 //////////////////////////////////////////////////////////////////////
-// MANTA STEP
+// ADAPTIVE STEP
 //////////////////////////////////////////////////////////////////////
 
 const std::string manta_step = "\n\
@@ -425,7 +423,7 @@ def step_low():\n\
   \n\
   if using_heat:\n\
     mantaMsg('Adding heat buoyancy')\n\
-    gravity=vec3(0,0,-1) if dim==3 else vec3(0,-0.0981,0)\n\
+    gravity=vec3(0,0,-1) if dim==3 else vec3(0,-1,0)\n\
     addBuoyancy(flags=flags, density=density, vel=vel, gravity=gravity, 
coefficient=$ALPHA$)\n\
     addBuoyancy(flags=flags, density=heat, vel=vel, gravity=gravity, 
coefficient=$BETA$)\n\
   else:\n\

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to