35 using std::istringstream;
37 using std::ostringstream;
44 : mCurrentID(++solverID), mMaxRes(fmd->domain->maxres)
47 cout <<
"FLUID: " << mCurrentID <<
" with res(" << res[0] <<
", " << res[1] <<
", " << res[2]
78 mTotalCells = mResX * mResY * mResZ;
79 mResGuiding = fds->
res;
105 mEmissionIn =
nullptr;
109 mDensityHigh =
nullptr;
110 mFlameHigh =
nullptr;
112 mReactHigh =
nullptr;
113 mColorRHigh =
nullptr;
114 mColorGHigh =
nullptr;
115 mColorBHigh =
nullptr;
119 mTextureU2 =
nullptr;
120 mTextureV2 =
nullptr;
121 mTextureW2 =
nullptr;
125 mPhiStaticIn =
nullptr;
127 mPhiOutStaticIn =
nullptr;
131 mMeshNodes =
nullptr;
132 mMeshTriangles =
nullptr;
133 mMeshVelocities =
nullptr;
137 mPhiObsStaticIn =
nullptr;
138 mNumObstacle =
nullptr;
139 mObVelocityX =
nullptr;
140 mObVelocityY =
nullptr;
141 mObVelocityZ =
nullptr;
144 mPhiGuideIn =
nullptr;
146 mGuideVelocityX =
nullptr;
147 mGuideVelocityY =
nullptr;
148 mGuideVelocityZ =
nullptr;
151 mInVelocityX =
nullptr;
152 mInVelocityY =
nullptr;
153 mInVelocityZ =
nullptr;
156 mFlipParticleData =
nullptr;
157 mFlipParticleVelocity =
nullptr;
158 mParticleData =
nullptr;
159 mParticleVelocity =
nullptr;
160 mParticleLife =
nullptr;
163 mFlipFromFile =
false;
164 mMeshFromFile =
false;
165 mParticlesFromFile =
false;
168 initializeMantaflow();
171 initializeRNAMap(fmd);
173 bool initSuccess =
true;
177 initSuccess &= initDomain();
186 if (mUsingDrops || mUsingBubbles || mUsingFloats || mUsingTracers) {
188 mResXParticle = mUpresParticle * mResX;
189 mResYParticle = mUpresParticle * mResY;
190 mResZParticle = mUpresParticle * mResZ;
191 mTotalCellsParticles = mResXParticle * mResYParticle * mResZParticle;
199 mResXMesh = mUpresMesh * mResX;
200 mResYMesh = mUpresMesh * mResY;
201 mResZMesh = mUpresMesh * mResZ;
202 mTotalCellsMesh = mResXMesh * mResYMesh * mResZMesh;
205 initSuccess &= initMesh();
209 if (mUsingViscosity) {
213 if (mUsingDiffusion) {
221 if (mUsingFractions) {
228 initSuccess &= initDomain();
229 initSuccess &= initSmoke();
250 mResXNoise = amplify * mResX;
251 mResYNoise = amplify * mResY;
252 mResZNoise = amplify * mResZ;
253 mTotalCellsHigh = mResXNoise * mResYNoise * mResZNoise;
256 initSuccess &= initNoise();
257 initSuccess &= initSmokeNoise();
280 ss <<
"set_manta_debuglevel(" <<
with_debug <<
")";
281 pythonCommands.push_back(ss.str());
289 string finalString = parseScript(tmpString, fmd);
290 pythonCommands.push_back(finalString);
291 return runPythonString(pythonCommands);
298 string finalString = parseScript(tmpString, fmd);
299 pythonCommands.push_back(finalString);
301 return runPythonString(pythonCommands);
309 string finalString = parseScript(tmpString, fmd);
310 pythonCommands.push_back(finalString);
312 return runPythonString(pythonCommands);
320 string finalString = parseScript(tmpString, fmd);
321 pythonCommands.push_back(finalString);
324 return runPythonString(pythonCommands);
332 string finalString = parseScript(tmpString, fmd);
333 pythonCommands.push_back(finalString);
336 return runPythonString(pythonCommands);
346 string finalString = parseScript(tmpString, fmd);
347 pythonCommands.push_back(finalString);
350 return runPythonString(pythonCommands);
360 string finalString = parseScript(tmpString, fmd);
361 pythonCommands.push_back(finalString);
364 return runPythonString(pythonCommands);
374 string finalString = parseScript(tmpString, fmd);
375 pythonCommands.push_back(finalString);
378 return runPythonString(pythonCommands);
388 string finalString = parseScript(tmpString, fmd);
389 pythonCommands.push_back(finalString);
392 return runPythonString(pythonCommands);
403 string finalString = parseScript(tmpString, fmd);
404 pythonCommands.push_back(finalString);
407 return runPythonString(pythonCommands);
416 string finalString = parseScript(tmpString, fmd);
417 pythonCommands.push_back(finalString);
420 return runPythonString(pythonCommands);
427 string finalString = parseScript(tmpString, fmd);
428 pythonCommands.push_back(finalString);
431 return runPythonString(pythonCommands);
438 string finalString = parseScript(tmpString, fmd);
439 pythonCommands.push_back(finalString);
441 mUsingViscosity =
true;
442 return runPythonString(pythonCommands);
447 std::vector<std::string> pythonCommands;
449 pythonCommands.push_back(finalString);
451 mUsingDiffusion =
true;
452 return runPythonString(pythonCommands);
460 string finalString = parseScript(tmpString, fmd);
461 pythonCommands.push_back(finalString);
463 return (mUsingObstacle = runPythonString(pythonCommands));
474 string finalString = parseScript(tmpString, fmd);
475 pythonCommands.push_back(finalString);
477 return (mUsingGuiding = runPythonString(pythonCommands));
486 string finalString = parseScript(tmpString, fmd);
487 pythonCommands.push_back(finalString);
489 return (mUsingFractions = runPythonString(pythonCommands));
497 string finalString = parseScript(tmpString, fmd);
498 pythonCommands.push_back(finalString);
500 return (mUsingInvel = runPythonString(pythonCommands));
510 string finalString = parseScript(tmpString, fmd);
511 pythonCommands.push_back(finalString);
513 return (mUsingOutflow = runPythonString(pythonCommands));
522 string finalString = parseScript(tmpString, fmd);
523 pythonCommands.push_back(finalString);
525 return runPythonString(pythonCommands);
530 if (!mParticleData) {
535 string finalString = parseScript(tmpString, fmd);
536 pythonCommands.push_back(finalString);
538 return runPythonString(pythonCommands);
546 cout <<
"~FLUID: " << mCurrentID <<
" with res(" << mResX <<
", " << mResY <<
", " << mResZ
550 string tmpString =
"";
561 string finalString = parseScript(tmpString);
562 pythonCommands.push_back(finalString);
563 result = runPythonString(pythonCommands);
570 MANTA::terminateMantaflow();
585 PyObject *builtins = PyEval_GetBuiltins();
586 PyObject *mod_main = PyModule_New(
"__main__");
587 PyModule_AddStringConstant(mod_main,
"__name__",
"__main__");
591 PyModule_AddObject(mod_main,
"__file__", PyUnicode_InternFromString(filename));
593 PyModule_AddObject(mod_main,
"__builtins__", builtins);
600 PyObject *modules = PyImport_GetModuleDict();
601 PyObject *main_mod_cmp = PyDict_GetItemString(modules,
"__main__");
602 if (mod_main == main_mod_cmp) {
607 PyDict_SetItemString(modules,
"__main__", mod_main);
612 PyObject *modules = PyImport_GetModuleDict();
613 *r_main_mod = PyDict_GetItemString(modules,
"__main__");
614 Py_XINCREF(*r_main_mod);
619 PyObject *modules = PyImport_GetModuleDict();
620 PyDict_SetItemString(modules,
"__main__", main_mod);
621 Py_XDECREF(main_mod);
652 PyGILState_STATE gilstate = PyGILState_Ensure();
655 PyObject *main_mod_backup;
664 string command = *it;
667 PyObject *return_value = PyRun_String(
668 command.c_str(), Py_file_input, globals_dict, globals_dict);
670 if (return_value ==
nullptr) {
672 if (PyErr_Occurred()) {
677 Py_DECREF(return_value);
683 PyGILState_Release(gilstate);
689 void MANTA::initializeMantaflow()
692 cout <<
"Fluid: Initializing Mantaflow framework" << endl;
694 string filename =
"manta_scene_" +
to_string(mCurrentID) +
".py";
699 PyGILState_STATE gilstate = PyGILState_Ensure();
703 Pb::setup(
false, filename, fill, globals_dict);
704 PyGILState_Release(gilstate);
707 void MANTA::terminateMantaflow()
710 cout <<
"Fluid: Releasing Mantaflow framework" << endl;
712 PyGILState_STATE gilstate = PyGILState_Ensure();
715 PyGILState_Release(gilstate);
721 cout <<
"MANTA::getCacheFileEnding()" << endl;
723 switch (cache_format) {
735 cerr <<
"Fluid Error -- Could not find file extension. Using default file extension."
743 return (value) ?
"True" :
"False";
749 cout <<
"MANTA::initializeRNAMap()" << endl;
755 cout <<
"Fluid: No modifier data given in RNA map setup - returning early" << endl;
762 string borderCollisions =
"";
764 borderCollisions +=
"x";
766 borderCollisions +=
"X";
768 borderCollisions +=
"y";
770 borderCollisions +=
"Y";
772 borderCollisions +=
"z";
774 borderCollisions +=
"Z";
776 string particleTypesStr =
"";
778 particleTypesStr +=
"PtypeSpray";
780 if (!particleTypesStr.empty())
781 particleTypesStr +=
"|";
782 particleTypesStr +=
"PtypeBubble";
785 if (!particleTypesStr.empty())
786 particleTypesStr +=
"|";
787 particleTypesStr +=
"PtypeFoam";
790 if (!particleTypesStr.empty())
791 particleTypesStr +=
"|";
792 particleTypesStr +=
"PtypeTracer";
794 if (particleTypesStr.empty())
795 particleTypesStr =
"0";
805 string vdbCompressionMethod =
"Compression_None";
807 vdbCompressionMethod =
"Compression_None";
809 vdbCompressionMethod =
"Compression_Zip";
811 vdbCompressionMethod =
"Compression_Blosc";
813 string vdbPrecisionHalf =
"Precision_Half";
815 vdbPrecisionHalf =
"Precision_Full";
817 vdbPrecisionHalf =
"Precision_Half";
819 vdbPrecisionHalf =
"Precision_Mini";
833 mRNAMap[
"DOMAIN_CLOSED"] =
getBooleanString(borderCollisions.compare(
"") == 0);
850 mRNAMap[
"BOUND_CONDITIONS"] = borderCollisions;
869 mRNAMap[
"NOISE_RESX"] =
to_string(mResXNoise);
872 mRNAMap[
"MESH_RESX"] =
to_string(mResXMesh);
875 mRNAMap[
"PARTICLE_RESX"] =
to_string(mResXParticle);
876 mRNAMap[
"PARTICLE_RESY"] = (is2D) ?
to_string(mResZParticle) :
to_string(mResYParticle);
878 mRNAMap[
"GUIDING_RESX"] =
to_string(mResGuiding[0]);
879 mRNAMap[
"GUIDING_RESY"] = (is2D) ?
to_string(mResGuiding[2]) :
to_string(mResGuiding[1]);
940 mRNAMap[
"FLUID_VISCOSITY"] =
to_string(viscosity);
941 mRNAMap[
"FLUID_DOMAIN_SIZE"] =
to_string(domainSize);
945 mRNAMap[
"SNDPARTICLE_TYPES"] = particleTypesStr;
952 mRNAMap[
"CACHE_DIR"] = cacheDirectory;
953 mRNAMap[
"COMPRESSION_OPENVDB"] = vdbCompressionMethod;
954 mRNAMap[
"PRECISION_OPENVDB"] = vdbPrecisionHalf;
1106 string MANTA::getRealValue(
const string &varName)
1108 unordered_map<string, string>::iterator it;
1109 it = mRNAMap.find(varName);
1111 if (it == mRNAMap.end()) {
1112 cerr <<
"Fluid Error -- variable " << varName <<
" not found in RNA map " << it->second
1120 string MANTA::parseLine(
const string &line)
1122 if (line.size() == 0)
1125 int currPos = 0, start_del = 0, end_del = -1;
1126 bool readingVar =
false;
1127 const char delimiter =
'$';
1128 while (currPos < line.size()) {
1129 if (line[currPos] == delimiter && !readingVar) {
1131 start_del = currPos + 1;
1132 res += line.substr(end_del + 1, currPos - end_del - 1);
1134 else if (line[currPos] == delimiter && readingVar) {
1137 res += getRealValue(line.substr(start_del, currPos - start_del));
1141 res += line.substr(end_del + 1, line.size() - end_del);
1148 cout <<
"MANTA::parseScript()" << endl;
1150 istringstream f(setup_string);
1156 initializeRNAMap(fmd);
1158 while (getline(f, line)) {
1159 res << parseLine(line) <<
"\n";
1172 else if (
c ==
'\'') {
1185 cout <<
"MANTA::writeConfiguration()" << endl;
1199 cerr <<
"Fluid Error -- Cannot open file " <<
file << endl;
1204 gzwrite(gzf, &fds->
res, 3 *
sizeof(
int));
1205 gzwrite(gzf, &fds->
dx,
sizeof(
float));
1206 gzwrite(gzf, &fds->
dt,
sizeof(
float));
1207 gzwrite(gzf, &fds->
p0, 3 *
sizeof(
float));
1208 gzwrite(gzf, &fds->
p1, 3 *
sizeof(
float));
1209 gzwrite(gzf, &fds->
dp0, 3 *
sizeof(
float));
1210 gzwrite(gzf, &fds->
shift, 3 *
sizeof(
int));
1211 gzwrite(gzf, &fds->
obj_shift_f, 3 *
sizeof(
float));
1212 gzwrite(gzf, &fds->
obmat, 16 *
sizeof(
float));
1213 gzwrite(gzf, &fds->
base_res, 3 *
sizeof(
int));
1214 gzwrite(gzf, &fds->
res_min, 3 *
sizeof(
int));
1215 gzwrite(gzf, &fds->
res_max, 3 *
sizeof(
int));
1220 return (gzclose(gzf) == Z_OK);
1226 cout <<
"MANTA::writeData()" << endl;
1238 ss <<
"smoke_save_data_" << mCurrentID <<
"('" <<
escapePath(directory) <<
"', " << framenr
1239 <<
", '" << volume_format <<
"', " << resumable_cache <<
")";
1240 pythonCommands.push_back(ss.str());
1244 ss <<
"liquid_save_data_" << mCurrentID <<
"('" <<
escapePath(directory) <<
"', " << framenr
1245 <<
", '" << volume_format <<
"', " << resumable_cache <<
")";
1246 pythonCommands.push_back(ss.str());
1248 return runPythonString(pythonCommands);
1254 cout <<
"MANTA::writeNoise()" << endl;
1264 if (mUsingSmoke && mUsingNoise) {
1266 ss <<
"smoke_save_noise_" << mCurrentID <<
"('" <<
escapePath(directory) <<
"', " << framenr
1267 <<
", '" << volume_format <<
"', " << resumable_cache <<
")";
1268 pythonCommands.push_back(ss.str());
1270 return runPythonString(pythonCommands);
1276 cout <<
"MANTA::readConfiguration()" << endl;
1290 cerr <<
"Fluid Error -- Cannot open file " <<
file << endl;
1295 gzread(gzf, &fds->
res, 3 *
sizeof(
int));
1296 gzread(gzf, &fds->
dx,
sizeof(
float));
1297 gzread(gzf, &dummy,
sizeof(
float));
1298 gzread(gzf, &fds->
p0, 3 *
sizeof(
float));
1299 gzread(gzf, &fds->
p1, 3 *
sizeof(
float));
1300 gzread(gzf, &fds->
dp0, 3 *
sizeof(
float));
1301 gzread(gzf, &fds->
shift, 3 *
sizeof(
int));
1302 gzread(gzf, &fds->
obj_shift_f, 3 *
sizeof(
float));
1303 gzread(gzf, &fds->
obmat, 16 *
sizeof(
float));
1304 gzread(gzf, &fds->
base_res, 3 *
sizeof(
int));
1305 gzread(gzf, &fds->
res_min, 3 *
sizeof(
int));
1306 gzread(gzf, &fds->
res_max, 3 *
sizeof(
int));
1309 gzread(gzf, &fds->
cache_id, 4 *
sizeof(
char));
1313 return (gzclose(gzf) == Z_OK);
1319 cout <<
"MANTA::readData()" << endl;
1321 if (!mUsingSmoke && !mUsingLiquid)
1331 string resumable_cache = (!resumable) ?
"False" :
"True";
1339 ss <<
"smoke_load_data_" << mCurrentID <<
"('" <<
escapePath(directory) <<
"', " << framenr
1340 <<
", '" << volume_format <<
"', " << resumable_cache <<
")";
1341 pythonCommands.push_back(ss.str());
1342 result &= runPythonString(pythonCommands);
1343 return (mSmokeFromFile =
result);
1347 ss <<
"liquid_load_data_" << mCurrentID <<
"('" <<
escapePath(directory) <<
"', " << framenr
1348 <<
", '" << volume_format <<
"', " << resumable_cache <<
")";
1349 pythonCommands.push_back(ss.str());
1350 result &= runPythonString(pythonCommands);
1351 return (mFlipFromFile =
result);
1359 cout <<
"MANTA::readNoise()" << endl;
1361 if (!mUsingSmoke || !mUsingNoise)
1369 string resumable_cache = (!resumable) ?
"False" :
"True";
1381 ss <<
"smoke_load_noise_" << mCurrentID <<
"('" <<
escapePath(directory) <<
"', " << framenr
1382 <<
", '" << volume_format <<
"', " << resumable_cache <<
")";
1383 pythonCommands.push_back(ss.str());
1385 return (mNoiseFromFile = runPythonString(pythonCommands));
1391 cout <<
"MANTA::readMesh()" << endl;
1393 if (!mUsingLiquid || !mUsingMesh)
1409 ss <<
"liquid_load_mesh_" << mCurrentID <<
"('" <<
escapePath(directory) <<
"', " << framenr
1410 <<
", '" << mesh_format <<
"')";
1411 pythonCommands.push_back(ss.str());
1415 ss <<
"liquid_load_meshvel_" << mCurrentID <<
"('" <<
escapePath(directory) <<
"', " << framenr
1416 <<
", '" << volume_format <<
"')";
1417 pythonCommands.push_back(ss.str());
1420 return (mMeshFromFile = runPythonString(pythonCommands));
1426 cout <<
"MANTA::readParticles()" << endl;
1430 if (!mUsingDrops && !mUsingBubbles && !mUsingFloats && !mUsingTracers)
1438 string resumable_cache = (!resumable) ?
"False" :
"True";
1450 ss <<
"liquid_load_particles_" << mCurrentID <<
"('" <<
escapePath(directory) <<
"', " << framenr
1451 <<
", '" << volume_format <<
"', " << resumable_cache <<
")";
1452 pythonCommands.push_back(ss.str());
1454 return (mParticlesFromFile = runPythonString(pythonCommands));
1460 cout <<
"MANTA::readGuiding()" << endl;
1481 ss <<
"fluid_load_vel_" << mCurrentID <<
"('" <<
escapePath(directory) <<
"', " << framenr
1482 <<
", '" << volume_format <<
"')";
1486 ss <<
"fluid_load_guiding_" << mCurrentID <<
"('" <<
escapePath(directory) <<
"', " << framenr
1487 <<
", '" << volume_format <<
"')";
1489 pythonCommands.push_back(ss.str());
1491 return runPythonString(pythonCommands);
1497 cout <<
"MANTA::bakeData()" << endl;
1499 string tmpString, finalString;
1505 cacheDirData[0] =
'\0';
1506 cacheDirGuiding[0] =
'\0';
1513 sizeof(cacheDirGuiding),
1521 ss <<
"bake_fluid_data_" << mCurrentID <<
"('" <<
escapePath(cacheDirData) <<
"', " << framenr
1522 <<
", '" << volume_format <<
"')";
1523 pythonCommands.push_back(ss.str());
1525 return runPythonString(pythonCommands);
1531 cout <<
"MANTA::bakeNoise()" << endl;
1538 cacheDirNoise[0] =
'\0';
1547 ss <<
"bake_noise_" << mCurrentID <<
"('" <<
escapePath(cacheDirNoise) <<
"', " << framenr
1548 <<
", '" << volume_format <<
"')";
1549 pythonCommands.push_back(ss.str());
1551 return runPythonString(pythonCommands);
1557 cout <<
"MANTA::bakeMesh()" << endl;
1564 cacheDirMesh[0] =
'\0';
1574 ss <<
"bake_mesh_" << mCurrentID <<
"('" <<
escapePath(cacheDirMesh) <<
"', " << framenr <<
", '"
1575 << volume_format <<
"', '" << mesh_format <<
"')";
1576 pythonCommands.push_back(ss.str());
1578 return runPythonString(pythonCommands);
1584 cout <<
"MANTA::bakeParticles()" << endl;
1591 cacheDirParticles[0] =
'\0';
1597 sizeof(cacheDirParticles),
1604 ss <<
"bake_particles_" << mCurrentID <<
"('" <<
escapePath(cacheDirParticles) <<
"', "
1605 << framenr <<
", '" << volume_format <<
"', " << resumable_cache <<
")";
1606 pythonCommands.push_back(ss.str());
1608 return runPythonString(pythonCommands);
1614 cout <<
"MANTA::bakeGuiding()" << endl;
1621 cacheDirGuiding[0] =
'\0';
1627 sizeof(cacheDirGuiding),
1634 ss <<
"bake_guiding_" << mCurrentID <<
"('" <<
escapePath(cacheDirGuiding) <<
"', " << framenr
1635 <<
", '" << volume_format <<
"', " << resumable_cache <<
")";
1636 pythonCommands.push_back(ss.str());
1638 return runPythonString(pythonCommands);
1643 string tmpString, finalString;
1658 if (mUsingDrops || mUsingBubbles || mUsingFloats || mUsingTracers) {
1665 finalString = parseScript(tmpString, fmd);
1666 pythonCommands.push_back(finalString);
1668 return runPythonString(pythonCommands);
1674 cout <<
"MANTA::exportSmokeScript()" << endl;
1677 char cacheDirScript[
FILE_MAX] =
"\0";
1699 string manta_script;
1770 string final_script = MANTA::parseScript(manta_script, fmd);
1774 myfile.open(cacheDirScript);
1775 myfile << final_script;
1778 cerr <<
"Fluid Error -- Could not export standalone Mantaflow smoke domain script";
1787 cout <<
"MANTA::exportLiquidScript()" << endl;
1790 char cacheDirScript[
FILE_MAX] =
"\0";
1815 string manta_script;
1824 if (drops || bubble || floater || tracer)
1835 if (drops || bubble || floater || tracer)
1846 if (drops || bubble || floater || tracer)
1871 if (drops || bubble || floater || tracer)
1883 if (drops || bubble || floater || tracer)
1890 string final_script = MANTA::parseScript(manta_script, fmd);
1894 myfile.open(cacheDirScript);
1895 myfile << final_script;
1898 cerr <<
"Fluid Error -- Could not export standalone Mantaflow liquid domain script";
1913 if ((varName ==
"") || (functionName ==
"")) {
1915 cout <<
"Fluid: Missing Python variable name and/or function name -- name is: " << varName
1916 <<
", function name is: " << functionName << endl;
1920 PyGILState_STATE gilstate = PyGILState_Ensure();
1921 PyObject *var =
nullptr, *func =
nullptr, *returnedValue =
nullptr;
1928 PyGILState_Release(gilstate);
1934 PyGILState_Release(gilstate);
1940 PyGILState_Release(gilstate);
1944 func = PyObject_GetAttrString(var, functionName.c_str());
1948 PyGILState_Release(gilstate);
1953 returnedValue = PyObject_CallObject(func,
nullptr);
1957 PyGILState_Release(gilstate);
1958 return (!isAttribute) ? returnedValue : func;
1968 PyGILState_STATE gilstate = PyGILState_Ensure();
1970 PyObject *encoded = PyUnicode_AsUTF8String(inputObject);
1971 char *
result = PyBytes_AsString(encoded);
1973 Py_DECREF(inputObject);
1976 istringstream in(
str);
1977 void *dataPointer =
nullptr;
1982 PyGILState_Release(gilstate);
1993 PyGILState_STATE gilstate = PyGILState_Ensure();
1997 double result = PyFloat_AS_DOUBLE(inputObject);
1998 Py_DECREF(inputObject);
2000 PyGILState_Release(gilstate);
2011 PyGILState_STATE gilstate = PyGILState_Ensure();
2013 long result = PyLong_AsLong(inputObject);
2014 Py_DECREF(inputObject);
2016 PyGILState_Release(gilstate);
2020 template<
class T>
static T *
getPointer(
string pyObjectName,
string pyFunctionName)
2028 cout <<
"MANTA::getFrame()" << endl;
2030 string func =
"frame";
2032 string solver =
"s" +
id;
2040 cout <<
"MANTA::getTimestep()" << endl;
2042 string func =
"timestep";
2044 string solver =
"s" +
id;
2060 cout <<
"MANTA::adaptTimestep()" << endl;
2065 ss <<
"fluid_adapt_time_step_" << mCurrentID <<
"()";
2066 pythonCommands.push_back(ss.str());
2068 runPythonString(pythonCommands);
2074 cout <<
"MANTA::updatePointers()" << endl;
2092 bool parts = !flush && liquid && (drops | bubble | floater | tracer);
2096 string func =
"getDataPointer";
2097 string funcNodes =
"getNodesDataPointer";
2098 string funcTris =
"getTrisDataPointer";
2101 string s_ext =
"_s" +
id;
2102 string pp_ext =
"_pp" +
id;
2103 string snd_ext =
"_sp" +
id;
2104 string sm_ext =
"_sm" +
id;
2105 string mesh_ext =
"_mesh" +
id;
2106 string sn_ext =
"_sn" +
id;
2108 mFlags = (smoke || liquid) ? getPointer<int>(
"flags" + s_ext, func) :
nullptr;
2109 mPhiIn = (smoke || liquid) ? getPointer<float>(
"phiIn" + s_ext, func) :
nullptr;
2110 mPhiStaticIn = (smoke || liquid) ? getPointer<float>(
"phiSIn" + s_ext, func) :
nullptr;
2111 mVelocityX = (smoke || liquid) ? getPointer<float>(
"x_vel" + s_ext, func) :
nullptr;
2112 mVelocityY = (smoke || liquid) ? getPointer<float>(
"y_vel" + s_ext, func) :
nullptr;
2113 mVelocityZ = (smoke || liquid) ? getPointer<float>(
"z_vel" + s_ext, func) :
nullptr;
2114 mForceX = (smoke || liquid) ? getPointer<float>(
"x_force" + s_ext, func) :
nullptr;
2115 mForceY = (smoke || liquid) ? getPointer<float>(
"y_force" + s_ext, func) :
nullptr;
2116 mForceZ = (smoke || liquid) ? getPointer<float>(
"z_force" + s_ext, func) :
nullptr;
2117 mPressure = (smoke || liquid) ? getPointer<float>(
"pressure" + s_ext, func) :
nullptr;
2120 mPhiOutIn = (outflow) ? getPointer<float>(
"phiOutIn" + s_ext, func) :
nullptr;
2121 mPhiOutStaticIn = (outflow) ? getPointer<float>(
"phiOutSIn" + s_ext, func) :
nullptr;
2124 mPhiObsIn = (obstacle) ? getPointer<float>(
"phiObsIn" + s_ext, func) :
nullptr;
2125 mPhiObsStaticIn = (obstacle) ? getPointer<float>(
"phiObsSIn" + s_ext, func) :
nullptr;
2126 mObVelocityX = (obstacle) ? getPointer<float>(
"x_obvel" + s_ext, func) :
nullptr;
2127 mObVelocityY = (obstacle) ? getPointer<float>(
"y_obvel" + s_ext, func) :
nullptr;
2128 mObVelocityZ = (obstacle) ? getPointer<float>(
"z_obvel" + s_ext, func) :
nullptr;
2129 mNumObstacle = (obstacle) ? getPointer<float>(
"numObs" + s_ext, func) :
nullptr;
2132 mPhiGuideIn = (guiding) ? getPointer<float>(
"phiGuideIn" + s_ext, func) :
nullptr;
2133 mGuideVelocityX = (guiding) ? getPointer<float>(
"x_guidevel" + s_ext, func) :
nullptr;
2134 mGuideVelocityY = (guiding) ? getPointer<float>(
"y_guidevel" + s_ext, func) :
nullptr;
2135 mGuideVelocityZ = (guiding) ? getPointer<float>(
"z_guidevel" + s_ext, func) :
nullptr;
2136 mNumGuide = (guiding) ? getPointer<float>(
"numGuides" + s_ext, func) :
nullptr;
2139 mInVelocityX = (invel) ? getPointer<float>(
"x_invel" + s_ext, func) :
nullptr;
2140 mInVelocityY = (invel) ? getPointer<float>(
"y_invel" + s_ext, func) :
nullptr;
2141 mInVelocityZ = (invel) ? getPointer<float>(
"z_invel" + s_ext, func) :
nullptr;
2144 mDensity = (smoke) ? getPointer<float>(
"density" + s_ext, func) :
nullptr;
2145 mDensityIn = (smoke) ? getPointer<float>(
"densityIn" + s_ext, func) :
nullptr;
2146 mShadow = (smoke) ? getPointer<float>(
"shadow" + s_ext, func) :
nullptr;
2147 mEmissionIn = (smoke) ? getPointer<float>(
"emissionIn" + s_ext, func) :
nullptr;
2150 mHeat = (heat) ? getPointer<float>(
"heat" + s_ext, func) :
nullptr;
2151 mHeatIn = (heat) ? getPointer<float>(
"heatIn" + s_ext, func) :
nullptr;
2154 mFlame = (fire) ? getPointer<float>(
"flame" + s_ext, func) :
nullptr;
2155 mFuel = (fire) ? getPointer<float>(
"fuel" + s_ext, func) :
nullptr;
2156 mReact = (fire) ? getPointer<float>(
"react" + s_ext, func) :
nullptr;
2157 mFuelIn = (fire) ? getPointer<float>(
"fuelIn" + s_ext, func) :
nullptr;
2158 mReactIn = (fire) ? getPointer<float>(
"reactIn" + s_ext, func) :
nullptr;
2161 mColorR = (colors) ? getPointer<float>(
"color_r" + s_ext, func) :
nullptr;
2162 mColorG = (colors) ? getPointer<float>(
"color_g" + s_ext, func) :
nullptr;
2163 mColorB = (colors) ? getPointer<float>(
"color_b" + s_ext, func) :
nullptr;
2164 mColorRIn = (colors) ? getPointer<float>(
"color_r_in" + s_ext, func) :
nullptr;
2165 mColorGIn = (colors) ? getPointer<float>(
"color_g_in" + s_ext, func) :
nullptr;
2166 mColorBIn = (colors) ? getPointer<float>(
"color_b_in" + s_ext, func) :
nullptr;
2169 mDensityHigh = (
noise) ? getPointer<float>(
"density" + sn_ext, func) :
nullptr;
2170 mTextureU = (
noise) ? getPointer<float>(
"texture_u" + s_ext, func) :
nullptr;
2171 mTextureV = (
noise) ? getPointer<float>(
"texture_v" + s_ext, func) :
nullptr;
2172 mTextureW = (
noise) ? getPointer<float>(
"texture_w" + s_ext, func) :
nullptr;
2173 mTextureU2 = (
noise) ? getPointer<float>(
"texture_u2" + s_ext, func) :
nullptr;
2174 mTextureV2 = (
noise) ? getPointer<float>(
"texture_v2" + s_ext, func) :
nullptr;
2175 mTextureW2 = (
noise) ? getPointer<float>(
"texture_w2" + s_ext, func) :
nullptr;
2178 mFlameHigh = (
noise && fire) ? getPointer<float>(
"flame" + sn_ext, func) :
nullptr;
2179 mFuelHigh = (
noise && fire) ? getPointer<float>(
"fuel" + sn_ext, func) :
nullptr;
2180 mReactHigh = (
noise && fire) ? getPointer<float>(
"react" + sn_ext, func) :
nullptr;
2183 mColorRHigh = (
noise && colors) ? getPointer<float>(
"color_r" + sn_ext, func) :
nullptr;
2184 mColorGHigh = (
noise && colors) ? getPointer<float>(
"color_g" + sn_ext, func) :
nullptr;
2185 mColorBHigh = (
noise && colors) ? getPointer<float>(
"color_b" + sn_ext, func) :
nullptr;
2188 mPhi = (liquid) ? getPointer<float>(
"phi" + s_ext, func) :
nullptr;
2204 mFlipFromFile =
false;
2205 mMeshFromFile =
false;
2206 mParticlesFromFile =
false;
2207 mSmokeFromFile =
false;
2208 mNoiseFromFile =
false;
2230 cout <<
"Fluid: Has Data: " << exists << endl;
2256 cout <<
"Fluid: Has Noise: " << exists << endl;
2273 cout <<
"Fluid: Has Mesh: " << exists << endl;
2299 cout <<
"Fluid: Has Particles: " << exists << endl;
2309 bool exists =
BLI_exists(getFile(fmd, subdirectory, filename, extension, framenr).c_str());
2314 exists =
BLI_exists(getFile(fmd, subdirectory, filename, extension, framenr).c_str());
2318 cout <<
"Fluid: Has Guiding: " << exists << endl;
2332 string MANTA::getFile(
2333 FluidModifierData *fmd,
string subdirectory,
string fname,
string extension,
int framenr)
2336 string path = getDirectory(fmd, subdirectory);
2337 string filename = fname +
"_####" + extension;
2338 BLI_join_dirfile(targetFile,
sizeof(targetFile), path.c_str(), filename.c_str());
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void * BLI_gzopen(const char *filepath, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BLI_dir_create_recursive(const char *dir) ATTR_NONNULL()
bool BLI_path_make_safe(char *path) ATTR_NONNULL(1)
bool BLI_path_frame(char *path, int frame, int digits) ATTR_NONNULL()
size_t BLI_path_join(char *__restrict dst, size_t dst_len, const char *path_first,...) ATTR_NONNULL(1
void BLI_join_dirfile(char *__restrict dst, size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
#define FLUID_DOMAIN_LIQUID_SCRIPT
#define FLUID_NAME_EMISSION
#define FLUID_NAME_TRAPPEDAIR_PARTICLES
#define FLUID_CACHE_VERSION
#define FLUID_NAME_FUEL_NOISE
#define FLUID_NAME_COLORG_NOISE
#define FLUID_NAME_COLORB_NOISE
#define FLUID_NAME_FLAGS_MESH
#define FLUID_DOMAIN_DIR_DATA
#define FLUID_NAME_PHIPARTS_MESH
#define FLUID_DOMAIN_DIR_PARTICLES
#define FLUID_NAME_TMPFLAGS
@ FLUID_DOMAIN_TYPE_LIQUID
#define FLUID_NAME_PHIOBS_PARTICLES
#define FLUID_NAME_FORCES
#define FLUID_NAME_PHIIN_NOISE
#define FLUID_NAME_WAVECREST_PARTICLES
#define FLUID_NAME_VELOCITY_PARTICLES
#define FLUID_NAME_EMISSIONIN
#define FLUID_NAME_PHIGUIDEIN
#define FLUID_NAME_PLIFE_PARTICLES
#define FLUID_NAME_PFORCE_PARTICLES
#define FLUID_NAME_PHITMP
#define FLUID_NAME_VELOCITYOLD
#define FLUID_NAME_PHIOBSSIN
@ FLUID_DOMAIN_MESH_IMPROVED
#define FLUID_NAME_PP_PARTICLES
#define FLUID_NAME_KINETICENERGY_PARTICLES
#define FLUID_NAME_FORCE_Y
#define FLUID_NAME_PINDEX
#define FLUID_NAME_FUELIN
#define FLUID_NAME_PARTICLES
#define FLUID_DOMAIN_EXTENSION_BINOBJ
#define FLUID_NAME_FORCE_Z
#define FLUID_DOMAIN_SMOKE_SCRIPT
#define FLUID_NAME_GUIDEVEL_Z
#define FLUID_NAME_PVEL_PARTICLES
#define FLUID_NAME_GUIDEVEL_X
#define FLUID_NAME_TEXTURE_U
#define FLUID_DOMAIN_DIR_MESH
#define FLUID_DOMAIN_DIR_GUIDE
#define FLUID_DOMAIN_DIR_SCRIPT
#define FLUID_NAME_PARTSVEL_PARTICLES
#define FLUID_NAME_TMPIN_NOISE
#define FLUID_NAME_OBVEL_X
#define FLUID_NAME_PHIOBS
@ FLUID_DOMAIN_PARTICLE_SPRAY
@ FLUID_DOMAIN_PARTICLE_FOAM
@ FLUID_DOMAIN_PARTICLE_TRACER
@ FLUID_DOMAIN_PARTICLE_BUBBLE
#define FLUID_NAME_CONFIG
#define FLUID_NAME_COLORR_NOISE
#define FLUID_DOMAIN_EXTENSION_OPENVDB
#define FLUID_NAME_GPI_MESH
#define FLUID_NAME_VELOCITYZ
#define FLUID_NAME_GUIDEVELC
#define FLUID_NAME_VELOCITYTMP
#define FLUID_NAME_VELOCITYY
#define FLUID_NAME_PINDEX_MESH
#define FLUID_NAME_PHIOUT_PARTICLES
#define FLUID_NAME_CURVATURE
#define FLUID_NAME_PHISIN
@ FLUID_DOMAIN_METHOD_APIC
#define FLUID_NAME_VELOCITY_MESH
#define FLUID_DOMAIN_EXTENSION_OBJ
#define FLUID_NAME_INVEL_Z
#define FLUID_NAME_INVELC
@ FLUID_DOMAIN_DELETE_IN_OBSTACLE
@ FLUID_DOMAIN_USE_RESUMABLE_CACHE
@ FLUID_DOMAIN_USE_DISSOLVE_LOG
@ FLUID_DOMAIN_USE_DIFFUSION
@ FLUID_DOMAIN_USE_ADAPTIVE_TIME
@ FLUID_DOMAIN_USE_VISCOSITY
@ FLUID_DOMAIN_USE_SPEED_VECTORS
@ FLUID_DOMAIN_USE_FRACTIONS
@ FLUID_DOMAIN_USE_DISSOLVE
#define FLUID_NAME_FLAGS_NOISE
#define FLUID_NAME_PARTSLIFE_PARTICLES
@ FLUID_DOMAIN_ACTIVE_COLORS
@ FLUID_DOMAIN_ACTIVE_FIRE
@ FLUID_DOMAIN_ACTIVE_INVEL
@ FLUID_DOMAIN_ACTIVE_GUIDE
@ FLUID_DOMAIN_ACTIVE_OUTFLOW
@ FLUID_DOMAIN_ACTIVE_HEAT
@ FLUID_DOMAIN_ACTIVE_OBSTACLE
#define FLUID_NAME_COLORR
#define FLUID_NAME_TEXTURE_U2
#define FLUID_NAME_PHIOUT
@ VDB_PRECISION_MINI_FLOAT
@ VDB_PRECISION_FULL_FLOAT
@ VDB_PRECISION_HALF_FLOAT
#define FLUID_NAME_TEXTURE_V2
#define FLUID_NAME_EMISSIONIN_NOISE
#define FLUID_NAME_GUIDEVEL_Y
#define FLUID_NAME_TEXTURE_W2
#define FLUID_NAME_DENSITY_NOISE
#define FLUID_NAME_PHIOUTIN
#define FLUID_NAME_NUMOBS
#define FLUID_NAME_COLORG
#define FLUID_NAME_PHIOUTSIN
#define FLUID_NAME_GUIDEVEL
#define FLUID_NAME_VELOCITYPARTS
#define FLUID_DOMAIN_DIR_CONFIG
#define FLUID_NAME_PHIOBS_NOISE
#define FLUID_NAME_INVEL_Y
@ SNDPARTICLE_BOUNDARY_DELETE
@ SNDPARTICLE_BOUNDARY_PUSHOUT
#define FLUID_NAME_SHADOW
#define FLUID_NAME_PARTSVELOCITY
#define FLUID_NAME_OBVEL_Y
@ FLUID_DOMAIN_BORDER_BOTTOM
@ FLUID_DOMAIN_BORDER_LEFT
@ FLUID_DOMAIN_BORDER_RIGHT
@ FLUID_DOMAIN_BORDER_FRONT
@ FLUID_DOMAIN_BORDER_TOP
@ FLUID_DOMAIN_BORDER_BACK
#define FLUID_NAME_VELOCITYVEC_MESH
#define FLUID_NAME_COLORB
#define FLUID_NAME_OBVELC
#define FLUID_NAME_COLORGIN
#define FLUID_NAME_VELOCITY
#define FLUID_NAME_PHIOBSIN
#define FLUID_NAME_PHI_PARTICLES
@ FLUID_DOMAIN_FILE_BIN_OBJECT
@ FLUID_DOMAIN_FILE_OBJECT
@ FLUID_DOMAIN_FILE_OPENVDB
#define FLUID_NAME_FORCE_X
#define FLUID_NAME_NEIGHBORRATIO_PARTICLES
#define FLUID_NAME_PARTS_PARTICLES
#define FLUID_NAME_COLORBIN
#define FLUID_NAME_GUIDING
#define FLUID_NAME_DENSITY
#define FLUID_NAME_PARTSFORCE_PARTICLES
#define FLUID_NAME_VELOCITY_GUIDE
#define FLUID_DOMAIN_EXTENSION_UNI
#define FLUID_NAME_TEMPERATUREIN
#define FLUID_NAME_INVEL_X
#define FLUID_NAME_REACTIN
#define FLUID_NAME_PRESSURE
#define FLUID_NAME_MAPWEIGHTS
#define FLUID_NAME_FLAME_NOISE
#define FLUID_NAME_PHIOUT_NOISE
#define FLUID_NAME_VELOCITY_NOISE
#define FLUID_NAME_TEXTURE_W
#define FLUID_NAME_PP_MESH
#define FLUID_DOMAIN_DIR_NOISE
#define FLUID_NAME_OBVEL_Z
#define FLUID_NAME_PHIPARTS
#define FLUID_NAME_NUMGUIDES
#define FLUID_NAME_HEATIN
#define FLUID_NAME_FLAGS_PARTICLES
#define FLUID_NAME_TEMPERATURE
#define FLUID_NAME_PHI_MESH
#define FLUID_NAME_FRACTIONS
#define FLUID_NAME_REACT_NOISE
#define FLUID_NAME_TEXTURE_V
#define FLUID_NAME_COLORRIN
#define FLUID_NAME_ENERGY
#define FLUID_NAME_VELOCITYX
#define FLUID_NAME_DENSITYIN
#define FLUID_NAME_NORMAL_PARTICLES
#define FLUID_NAME_WEIGHTGUIDE
#define FLUID_DOMAIN_EXTENSION_RAW
static string getBooleanString(int value)
static string getCacheFileEnding(char cache_format)
static PyObject * manta_main_module
static PyObject * manta_python_main_module_ensure()
static string escapePath(string const &s)
static void manta_python_main_module_restore(PyObject *main_mod)
static PyObject * manta_python_main_module_create(const char *filename)
static void manta_python_main_module_clear()
static void manta_python_main_module_backup(PyObject **r_main_mod)
static void manta_python_main_module_activate(PyObject *mod_main)
static T * getPointer(string pyObjectName, string pyFunctionName)
static double pyObjectToDouble(PyObject *inputObject)
static long pyObjectToLong(PyObject *inputObject)
static void * pyObjectToPointer(PyObject *inputObject)
static PyObject * callPythonFunction(string varName, string functionName, bool isAttribute=false)
Read Guarded memory(de)allocation.
SyclQueue void void size_t num_bytes void
const std::string header_import
const std::string fluid_save_guiding
const std::string fluid_file_import
const std::string fluid_alloc_fractions
const std::string fluid_pre_step
const std::string header_gridinit
const std::string fluid_with_outflow
const std::string header_main
const std::string fluid_alloc
const std::string fluid_bake_data
const std::string fluid_standalone
const std::string fluid_variables_noise
const std::string fluid_with_fractions
const std::string header_steps
const std::string fluid_alloc_invel
const std::string fluid_solver_viscosity
const std::string fluid_variables_particles
const std::string fluid_with_invel
const std::string fluid_solver_particles
const std::string fluid_solver_mesh
const std::string fluid_alloc_obstacle
const std::string manta_import
const std::string fluid_load_vel
const std::string fluid_file_export
const std::string fluid_bake_noise
const std::string fluid_alloc_outflow
const std::string fluid_bake_guiding
const std::string fluid_delete_all
const std::string manta_debuglevel
const std::string header_grids
const std::string fluid_bake_multiprocessing
const std::string fluid_with_sndparts
const std::string header_time
const std::string header_libraries
const std::string fluid_variables
const std::string header_solvers
const std::string fluid_adapt_time_step
const std::string header_variables
const std::string header_prepost
const std::string fluid_solver_noise
const std::string fluid_alloc_guiding
const std::string fluid_variables_viscosity
const std::string fluid_cache_helper
const std::string fluid_time_stepping
const std::string fluid_bake_mesh
const std::string fluid_solver
const std::string fluid_bake_particles
const std::string fluid_solver_guiding
const std::string fluid_post_step
const std::string fluid_load_guiding
const std::string fluid_variables_guiding
const std::string fluid_variables_mesh
const std::string fluid_with_obstacle
static const char * to_string(const Interpolation &interp)
const std::string liquid_load_data
const std::string liquid_save_data
const std::string liquid_alloc_viscosity
const std::string liquid_variables
const std::string liquid_save_particles
const std::string liquid_standalone
const std::string liquid_variables_particles
const std::string liquid_load_mesh
const std::string liquid_alloc_particles
const std::string liquid_step
const std::string liquid_alloc
const std::string liquid_alloc_curvature
const std::string liquid_adaptive_step
const std::string liquid_load_particles
const std::string liquid_step_mesh
const std::string liquid_step_particles
const std::string liquid_alloc_mesh
const std::string liquid_init_phi
const std::string liquid_save_mesh
ccl_device_inline float3 pow(float3 v, float e)
std::string to_string(const T &n)
static float noise(int n)
const std::string smoke_alloc_noise
const std::string smoke_alloc_heat
const std::string smoke_alloc_colors
const std::string smoke_alloc_fire_noise
const std::string smoke_save_noise
const std::string smoke_adaptive_step
const std::string smoke_standalone
const std::string smoke_with_colors
const std::string smoke_load_data
const std::string smoke_with_fire
const std::string smoke_with_heat
const std::string smoke_variables
const std::string smoke_variables_noise
const std::string smoke_save_data
const std::string smoke_alloc_colors_noise
const std::string smoke_load_noise
const std::string smoke_init_colors_noise
const std::string smoke_step_noise
const std::string smoke_init_colors
const std::string smoke_wavelet_noise
const std::string smoke_alloc_fire
const std::string smoke_alloc
const std::string smoke_step
float sndparticle_tau_min_wc
int sndparticle_update_radius
char sndparticle_boundary
float fractions_threshold
char cache_particle_format
float particle_randomness
int sndparticle_potential_radius
float mesh_particle_radius
float flame_smoke_color[3]
float sndparticle_tau_max_wc
float sndparticle_tau_max_ta
float sndparticle_tau_min_ta
float particle_band_width
float sndparticle_tau_min_k
char cache_directory[1024]
struct Object * guide_parent
float sndparticle_tau_max_k
struct FluidDomainSettings * domain
bool exportSmokeScript(struct FluidModifierData *fmd)
bool bakeNoise(FluidModifierData *fmd, int framenr)
bool writeNoise(FluidModifierData *fmd, int framenr)
bool initFireHigh(struct FluidModifierData *fmd=nullptr)
bool hasNoise(FluidModifierData *fmd, int framenr)
bool exportLiquidScript(struct FluidModifierData *fmd)
bool readData(FluidModifierData *fmd, int framenr, bool resumable)
bool initOutflow(FluidModifierData *fmd=nullptr)
bool writeConfiguration(FluidModifierData *fmd, int framenr)
bool initFire(struct FluidModifierData *fmd=nullptr)
bool writeData(FluidModifierData *fmd, int framenr)
bool needsRealloc(FluidModifierData *fmd)
bool readParticles(FluidModifierData *fmd, int framenr, bool resumable)
bool readMesh(FluidModifierData *fmd, int framenr)
bool readGuiding(FluidModifierData *fmd, int framenr, bool sourceDomain)
bool initLiquidViscosity(FluidModifierData *fmd=nullptr)
bool bakeMesh(FluidModifierData *fmd, int framenr)
bool initLiquid(FluidModifierData *fmd=nullptr)
bool initFractions(FluidModifierData *fmd=nullptr)
bool initLiquidMesh(FluidModifierData *fmd=nullptr)
bool hasMesh(FluidModifierData *fmd, int framenr)
bool initGuiding(FluidModifierData *fmd=nullptr)
bool readConfiguration(FluidModifierData *fmd, int framenr)
bool bakeGuiding(FluidModifierData *fmd, int framenr)
static atomic< int > solverID
bool hasParticles(FluidModifierData *fmd, int framenr)
bool initColorsHigh(struct FluidModifierData *fmd=nullptr)
bool initObstacle(FluidModifierData *fmd=nullptr)
bool initColors(struct FluidModifierData *fmd=nullptr)
bool readNoise(FluidModifierData *fmd, int framenr, bool resumable)
bool initSndParts(FluidModifierData *fmd=nullptr)
bool initCurvature(FluidModifierData *fmd=nullptr)
bool hasGuiding(FluidModifierData *fmd, int framenr, bool sourceDomain)
bool initHeat(struct FluidModifierData *fmd=nullptr)
bool bakeParticles(FluidModifierData *fmd, int framenr)
MANTA(int *res, struct FluidModifierData *fmd)
bool bakeData(FluidModifierData *fmd, int framenr)
bool initInVelocity(FluidModifierData *fmd=nullptr)
void updatePointers(FluidModifierData *fmd, bool flush=false)
bool hasData(FluidModifierData *fmd, int framenr)
bool updateVariables(FluidModifierData *fmd)
bool hasConfig(FluidModifierData *fmd, int framenr)
bool initLiquidSndParts(FluidModifierData *fmd=nullptr)