[Bf-blender-cvs] [8e38037be2a] fluid-mantaflow: cleanup for adaptive time stepping
Sebastián Barschkis
noreply at git.blender.org
Tue Oct 3 14:11:08 CEST 2017
Commit: 8e38037be2a1780da923e8ed3293cab693639c87
Author: Sebastián Barschkis
Date: Wed Sep 27 14:39:06 2017 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB8e38037be2a1780da923e8ed3293cab693639c87
cleanup for adaptive time stepping
especially the timestep was too big and resulted in adaptive steps when adaptive stepping was actually disabled.
===================================================================
M intern/mantaflow/intern/strings/shared_script.h
===================================================================
diff --git a/intern/mantaflow/intern/strings/shared_script.h b/intern/mantaflow/intern/strings/shared_script.h
index f6f7bdc7da8..344c0f76dad 100644
--- a/intern/mantaflow/intern/strings/shared_script.h
+++ b/intern/mantaflow/intern/strings/shared_script.h
@@ -110,15 +110,15 @@ using_invel_s$ID$ = True\n";
const std::string fluid_adaptive_time_stepping_low = "\n\
mantaMsg('Adaptive time stepping low')\n\
-dt_default_s$ID$ = 0.1\n\
+dt_default_s$ID$ = 0.1 # dt is 0.1 at 25fps\n\
dt_factor_s$ID$ = $DT_FACTOR$\n\
fps_s$ID$ = $FPS$\n\
dt0_s$ID$ = dt_default_s$ID$ * (25.0 / fps_s$ID$) * dt_factor_s$ID$\n\
-s$ID$.frameLength = dt0_s$ID$\n\
-s$ID$.timestepMin = dt0_s$ID$ / 10\n\
-s$ID$.timestepMax = dt0_s$ID$\n\
+s$ID$.frameLength = dt0_s$ID$ \n\
+s$ID$.timestepMin = s$ID$.frameLength / 10.\n\
+s$ID$.timestepMax = s$ID$.frameLength\n\
s$ID$.cfl = $CFL$\n\
-s$ID$.timestep = (s$ID$.timestepMax+s$ID$.timestepMin)*0.5\n";
+s$ID$.timestep = s$ID$.frameLength\n";
const std::string fluid_adaptive_time_stepping_high = "\n\
mantaMsg('Adaptive time stepping high')\n\
More information about the Bf-blender-cvs
mailing list