Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastián Barschkis <sebbas@sebbas.org>2020-03-04 19:50:55 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-03-04 20:46:48 +0300
commit3c74d45c9e90b72184c2af810684dcf21bf72713 (patch)
treed316109cb988762d46d20aedc94f5de6944ce65c /intern/mantaflow
parent8f1876b4f01a62063bd2fe019cab90872812136f (diff)
Fluid: Added sanity grid initializations in smoke / liquid scripts
Just a sanity check.
Diffstat (limited to 'intern/mantaflow')
-rw-r--r--intern/mantaflow/intern/strings/fluid_script.h10
-rw-r--r--intern/mantaflow/intern/strings/liquid_script.h10
2 files changed, 20 insertions, 0 deletions
diff --git a/intern/mantaflow/intern/strings/fluid_script.h b/intern/mantaflow/intern/strings/fluid_script.h
index 0442609a15d..4d0909d9464 100644
--- a/intern/mantaflow/intern/strings/fluid_script.h
+++ b/intern/mantaflow/intern/strings/fluid_script.h
@@ -238,6 +238,12 @@ y_force_s$ID$ = s$ID$.create(RealGrid)\n\
z_force_s$ID$ = s$ID$.create(RealGrid)\n\
obvel_s$ID$ = None\n\
\n\
+# Set some initial values\n\
+phiObs_s$ID$.setConst(9999)\n\
+phiSIn_s$ID$.setConst(9999)\n\
+phiIn_s$ID$.setConst(9999)\n\
+phiOut_s$ID$.setConst(9999)\n\
+\n\
# Keep track of important objects in dict to load them later on\n\
fluid_data_dict_final_s$ID$ = dict(vel=vel_s$ID$)\n\
fluid_data_dict_resume_s$ID$ = dict(phiObs=phiObs_s$ID$, phiIn=phiIn_s$ID$, phiOut=phiOut_s$ID$, flags=flags_s$ID$)\n";
@@ -253,6 +259,10 @@ x_obvel_s$ID$ = s$ID$.create(RealGrid)\n\
y_obvel_s$ID$ = s$ID$.create(RealGrid)\n\
z_obvel_s$ID$ = s$ID$.create(RealGrid)\n\
\n\
+# Set some initial values\n\
+phiObsSIn_s$ID$.setConst(9999)\n\
+phiObsIn_s$ID$.setConst(9999)\n\
+\n\
if 'fluid_data_dict_resume_s$ID$' in globals():\n\
fluid_data_dict_resume_s$ID$.update(phiObsIn=phiObsIn_s$ID$)\n";
diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h
index 0d20c4cb204..2226eabe55f 100644
--- a/intern/mantaflow/intern/strings/liquid_script.h
+++ b/intern/mantaflow/intern/strings/liquid_script.h
@@ -114,6 +114,10 @@ if using_speedvectors_s$ID$:\n\
pindex_sm$ID$ = sm$ID$.create(ParticleIndexSystem)\n\
gpi_sm$ID$ = sm$ID$.create(IntGrid)\n\
\n\
+# Set some initial values\n\
+phiParts_sm$ID$.setConst(9999)\n\
+phi_sm$ID$.setConst(9999)\n\
+\n\
# Keep track of important objects in dict to load them later on\n\
liquid_mesh_dict_s$ID$ = dict(lMesh=mesh_sm$ID$)\n\
\n\
@@ -138,6 +142,12 @@ trappedAir_sp$ID$ = sp$ID$.create(RealGrid)\n\
waveCrest_sp$ID$ = sp$ID$.create(RealGrid)\n\
kineticEnergy_sp$ID$ = sp$ID$.create(RealGrid)\n\
\n\
+# Set some initial values\n\
+phi_sp$ID$.setConst(9999)\n\
+phiIn_sp$ID$.setConst(9999)\n\
+phiObs_sp$ID$.setConst(9999)\n\
+phiObsIn_sp$ID$.setConst(9999)\n\
+\n\
# Keep track of important objects in dict to load them later on\n\
liquid_particles_dict_final_s$ID$ = dict(ppSnd=ppSnd_sp$ID$, pVelSnd=pVelSnd_pp$ID$, pLifeSnd=pLifeSnd_pp$ID$)\n\
liquid_particles_dict_resume_s$ID$ = dict(trappedAir=trappedAir_sp$ID$, waveCrest=waveCrest_sp$ID$, kineticEnergy=kineticEnergy_sp$ID$)\n";