[Bf-blender-cvs] [5c70eda] fluid-mantaflow: cleanup and naming changes

Sebastián Barschkis noreply at git.blender.org
Thu Jan 28 12:37:16 CET 2016


Commit: 5c70edab8895319b657c59fdb04eb86e5726eb47
Author: Sebastián Barschkis
Date:   Sun Jan 3 01:07:48 2016 +0100
Branches: fluid-mantaflow
https://developer.blender.org/rB5c70edab8895319b657c59fdb04eb86e5726eb47

cleanup and naming changes

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

M	intern/smoke/intern/FLUID_3D.cpp
M	intern/smoke/intern/scenarios/smoke.h

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

diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp
index b86d6fc..0cb3581 100644
--- a/intern/smoke/intern/FLUID_3D.cpp
+++ b/intern/smoke/intern/FLUID_3D.cpp
@@ -789,7 +789,7 @@ void FLUID_3D::processBurn(float *fuel, float *smoke, float *react, float *heat,
 	initColors(0.0f, 0.0f, 0.0f);
 
 	PyGILState_STATE gilstate = PyGILState_Ensure();
-	std::string py_string_0 = string("process_burn()");
+	std::string py_string_0 = string("process_burn_low()");
 	PyRun_SimpleString(py_string_0.c_str());
 	PyGILState_Release(gilstate);
 	Manta_API::updatePointers(this);
@@ -804,7 +804,7 @@ void FLUID_3D::updateFlame(float *react, float *flame, int total_cells)
 	clock_t start = clock();
 
 	PyGILState_STATE gilstate = PyGILState_Ensure();
-	std::string py_string_0 = string("update_flame()");
+	std::string py_string_0 = string("update_flame_low()");
 	PyRun_SimpleString(py_string_0.c_str());
 	PyGILState_Release(gilstate);
 	Manta_API::updatePointers(this);
diff --git a/intern/smoke/intern/scenarios/smoke.h b/intern/smoke/intern/scenarios/smoke.h
index f8c045f..3e9a299 100644
--- a/intern/smoke/intern/scenarios/smoke.h
+++ b/intern/smoke/intern/scenarios/smoke.h
@@ -244,10 +244,10 @@ def step_low():\n\
   \n\
   s.step()\n\
 \n\
-def process_burn():\n\
+def process_burn_low():\n\
   processBurn(fuel=fuel_low, density=density, react=react_low, red=color_r_low, green=color_g_low, blue=color_b_low, heat=heat_low, burningRate=$BURNING_RATE$, flameSmoke=$FLAME_SMOKE$, ignitionTemp=$IGNITION_TEMP$, maxTemp=$MAX_TEMP$, dt=$DT$, flameSmokeColor=vec3($FLAME_SMOKE_COLOR_X$,$FLAME_SMOKE_COLOR_Y$,$FLAME_SMOKE_COLOR_Z$))\n\
 \n\
-def update_flame():\n\
+def update_flame_low():\n\
   updateFlame(react=react_low, flame=flame_low)\n\
 ";
 
@@ -262,17 +262,22 @@ def step_high():\n\
       applyNoiseVec3(flags=xl_flags, target=xl_vel, noise=xl_wltnoise, scale=sStr * uvWeight, scaleSpatial=sPos , weight=energy, uv=uv[i])\n\
     sStr *= 0.06 # magic kolmogorov factor \n\
     sPos *= 2.0 \n\
+  \n\
   for substep in range(upres):\n\
-    advectSemiLagrange(flags=xl_flags, vel=xl_vel, grid=xl_density, order=$ADVECT_ORDER$)\n\
     if using_colors: \n\
       print ('Advecting colors high')\n\
       advectSemiLagrange(flags=xl_flags, vel=xl_vel, grid=color_r_high, order=$ADVECT_ORDER$)\n\
       advectSemiLagrange(flags=xl_flags, vel=xl_vel, grid=color_g_high, order=$ADVECT_ORDER$)\n\
       advectSemiLagrange(flags=xl_flags, vel=xl_vel, grid=color_b_high, order=$ADVECT_ORDER$)\n\
+    \n\
     if using_fire: \n\
       print ('Advecting fire high')\n\
       advectSemiLagrange(flags=xl_flags, vel=xl_vel, grid=fuel_high, order=$ADVECT_ORDER$)\n\
       advectSemiLagrange(flags=xl_flags, vel=xl_vel, grid=react_high, order=$ADVECT_ORDER$)\n\
+    \n\
+    print('Advecting density high')\n\
+    advectSemiLagrange(flags=xl_flags, vel=xl_vel, grid=xl_density, order=$ADVECT_ORDER$)\n\
+  \n\
   xl.step()\n\
 \n\
 def process_burn_high():\n\




More information about the Bf-blender-cvs mailing list