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:
Diffstat (limited to 'extern/mantaflow')
-rw-r--r--extern/mantaflow/preprocessed/gitinfo.h2
-rw-r--r--extern/mantaflow/preprocessed/grid.h67
-rw-r--r--extern/mantaflow/preprocessed/grid.h.reg.cpp176
-rw-r--r--extern/mantaflow/preprocessed/plugin/extforces.cpp160
-rw-r--r--extern/mantaflow/preprocessed/plugin/initplugins.cpp252
-rw-r--r--extern/mantaflow/preprocessed/registration.cpp2
6 files changed, 516 insertions, 143 deletions
diff --git a/extern/mantaflow/preprocessed/gitinfo.h b/extern/mantaflow/preprocessed/gitinfo.h
index aa88515494e..216aaf4e2bc 100644
--- a/extern/mantaflow/preprocessed/gitinfo.h
+++ b/extern/mantaflow/preprocessed/gitinfo.h
@@ -1,3 +1,3 @@
-#define MANTA_GIT_VERSION "commit 3701f32027ab499401581ed70b6999b284635ad8"
+#define MANTA_GIT_VERSION "commit 8d19f1096a4d8e115d9d1ec6024c65d53a94f47b"
diff --git a/extern/mantaflow/preprocessed/grid.h b/extern/mantaflow/preprocessed/grid.h
index bd4e0f99f85..6abe3a2b08a 100644
--- a/extern/mantaflow/preprocessed/grid.h
+++ b/extern/mantaflow/preprocessed/grid.h
@@ -826,9 +826,35 @@ template<class T> class Grid : public GridBase {
}
}
+ //! safely divide contents of grid (with zero check)
+ Grid<T> &safeDivide(const Grid<T> &a);
+ static PyObject *_W_22(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ {
+ try {
+ PbArgs _args(_linargs, _kwds);
+ Grid *pbo = dynamic_cast<Grid *>(Pb::objFromPy(_self));
+ bool noTiming = _args.getOpt<bool>("notiming", -1, 0);
+ pbPreparePlugin(pbo->getParent(), "Grid::safeDivide", !noTiming);
+ PyObject *_retval = 0;
+ {
+ ArgLocker _lock;
+ const Grid<T> &a = *_args.getPtr<Grid<T>>("a", 0, &_lock);
+ pbo->_args.copy(_args);
+ _retval = toPy(pbo->safeDivide(a));
+ pbo->_args.check();
+ }
+ pbFinalizePlugin(pbo->getParent(), "Grid::safeDivide", !noTiming);
+ return _retval;
+ }
+ catch (std::exception &e) {
+ pbSetError("Grid::safeDivide", e.what());
+ return 0;
+ }
+ }
+
//! clamp content to range (for vec3, clamps each component separately)
void clamp(Real min, Real max);
- static PyObject *_W_22(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_23(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -856,7 +882,7 @@ template<class T> class Grid : public GridBase {
//! reduce small values to zero
void stomp(const T &threshold);
- static PyObject *_W_23(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_24(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -883,7 +909,7 @@ template<class T> class Grid : public GridBase {
//! permute grid axes, e.g. switch y with z (0,2,1)
void permuteAxes(int axis0, int axis1, int axis2);
- static PyObject *_W_24(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_25(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -912,7 +938,7 @@ template<class T> class Grid : public GridBase {
//! permute grid axes, e.g. switch y with z (0,2,1)
void permuteAxesCopyToGrid(int axis0, int axis1, int axis2, Grid<T> &out);
- static PyObject *_W_25(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_26(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -943,7 +969,7 @@ template<class T> class Grid : public GridBase {
// common compound operators
//! get absolute max value in grid
Real getMaxAbs() const;
- static PyObject *_W_26(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_27(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -968,7 +994,7 @@ template<class T> class Grid : public GridBase {
//! get max value in grid
Real getMax() const;
- static PyObject *_W_27(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_28(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -993,7 +1019,7 @@ template<class T> class Grid : public GridBase {
//! get min value in grid
Real getMin() const;
- static PyObject *_W_28(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_29(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1018,7 +1044,7 @@ template<class T> class Grid : public GridBase {
//! calculate L1 norm of grid content
Real getL1(int bnd = 0);
- static PyObject *_W_29(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_30(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1044,7 +1070,7 @@ template<class T> class Grid : public GridBase {
//! calculate L2 norm of grid content
Real getL2(int bnd = 0);
- static PyObject *_W_30(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_31(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1070,7 +1096,7 @@ template<class T> class Grid : public GridBase {
//! set all boundary cells to constant value (Dirichlet)
void setBound(T value, int boundaryWidth = 1);
- static PyObject *_W_31(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_32(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1098,7 +1124,7 @@ template<class T> class Grid : public GridBase {
//! set all boundary cells to last inner value (Neumann)
void setBoundNeumann(int boundaryWidth = 1);
- static PyObject *_W_32(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_33(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1125,7 +1151,7 @@ template<class T> class Grid : public GridBase {
//! get data pointer of grid
std::string getDataPointer();
- static PyObject *_W_33(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_34(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1150,7 +1176,7 @@ template<class T> class Grid : public GridBase {
//! debugging helper, print grid from python. skip boundary of width bnd
void printGrid(int zSlice = -1, bool printIndex = false, int bnd = 1);
- static PyObject *_W_34(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_35(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1186,7 +1212,6 @@ template<class T> class Grid : public GridBase {
template<class S> Grid<T> &operator*=(const S &a);
template<class S> Grid<T> &operator/=(const Grid<S> &a);
template<class S> Grid<T> &operator/=(const S &a);
- Grid<T> &safeDivide(const Grid<T> &a);
//! Swap data with another grid (no actual data is moved)
void swap(Grid<T> &other);
@@ -1219,7 +1244,7 @@ class MACGrid : public Grid<Vec3> {
{
mType = (GridType)(TypeMAC | TypeVec3);
}
- static int _W_35(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static int _W_36(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
PbClass *obj = Pb::objFromPy(_self);
if (obj)
@@ -1301,7 +1326,7 @@ class MACGrid : public Grid<Vec3> {
//! set all boundary cells of a MAC grid to certain value (Dirchlet). Respects staggered grid
//! locations optionally, only set normal components
void setBoundMAC(Vec3 value, int boundaryWidth, bool normalOnly = false);
- static PyObject *_W_36(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_37(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1342,7 +1367,7 @@ class FlagGrid : public Grid<int> {
{
mType = (GridType)(TypeFlags | TypeInt);
}
- static int _W_37(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static int _W_38(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
PbClass *obj = Pb::objFromPy(_self);
if (obj)
@@ -1522,7 +1547,7 @@ class FlagGrid : public Grid<int> {
const std::string &inflow = " ",
const std::string &outflow = " ",
Grid<Real> *phiWalls = 0x00);
- static PyObject *_W_38(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_39(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1556,7 +1581,7 @@ class FlagGrid : public Grid<int> {
//! set fluid flags inside levelset (liquids)
void updateFromLevelset(LevelsetGrid &levelset);
- static PyObject *_W_39(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_40(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1583,7 +1608,7 @@ class FlagGrid : public Grid<int> {
//! set all cells (except obs/in/outflow) to type (fluid by default)
void fillGrid(int type = TypeFluid);
- static PyObject *_W_40(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_41(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1612,7 +1637,7 @@ class FlagGrid : public Grid<int> {
//! warning for large grids! only regular int returned (due to python interface)
//! optionally creates mask in RealGrid (1 where flag matches, 0 otherwise)
int countCells(int flag, int bnd = 0, Grid<Real> *mask = NULL);
- static PyObject *_W_41(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+ static PyObject *_W_42(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
diff --git a/extern/mantaflow/preprocessed/grid.h.reg.cpp b/extern/mantaflow/preprocessed/grid.h.reg.cpp
index d7f87604edf..70c4d8de453 100644
--- a/extern/mantaflow/preprocessed/grid.h.reg.cpp
+++ b/extern/mantaflow/preprocessed/grid.h.reg.cpp
@@ -8,11 +8,11 @@ namespace Manta {
#ifdef _C_FlagGrid
static const Pb::Register _R_26("FlagGrid", "FlagGrid", "Grid<int>");
template<> const char *Namify<FlagGrid>::S = "FlagGrid";
-static const Pb::Register _R_27("FlagGrid", "FlagGrid", FlagGrid::_W_37);
-static const Pb::Register _R_28("FlagGrid", "initDomain", FlagGrid::_W_38);
-static const Pb::Register _R_29("FlagGrid", "updateFromLevelset", FlagGrid::_W_39);
-static const Pb::Register _R_30("FlagGrid", "fillGrid", FlagGrid::_W_40);
-static const Pb::Register _R_31("FlagGrid", "countCells", FlagGrid::_W_41);
+static const Pb::Register _R_27("FlagGrid", "FlagGrid", FlagGrid::_W_38);
+static const Pb::Register _R_28("FlagGrid", "initDomain", FlagGrid::_W_39);
+static const Pb::Register _R_29("FlagGrid", "updateFromLevelset", FlagGrid::_W_40);
+static const Pb::Register _R_30("FlagGrid", "fillGrid", FlagGrid::_W_41);
+static const Pb::Register _R_31("FlagGrid", "countCells", FlagGrid::_W_42);
#endif
#ifdef _C_Grid
static const Pb::Register _R_32("Grid<int>", "Grid<int>", "GridBase");
@@ -30,94 +30,97 @@ static const Pb::Register _R_42("Grid<int>", "addConst", Grid<int>::_W_18);
static const Pb::Register _R_43("Grid<int>", "addScaled", Grid<int>::_W_19);
static const Pb::Register _R_44("Grid<int>", "mult", Grid<int>::_W_20);
static const Pb::Register _R_45("Grid<int>", "multConst", Grid<int>::_W_21);
-static const Pb::Register _R_46("Grid<int>", "clamp", Grid<int>::_W_22);
-static const Pb::Register _R_47("Grid<int>", "stomp", Grid<int>::_W_23);
-static const Pb::Register _R_48("Grid<int>", "permuteAxes", Grid<int>::_W_24);
-static const Pb::Register _R_49("Grid<int>", "permuteAxesCopyToGrid", Grid<int>::_W_25);
-static const Pb::Register _R_50("Grid<int>", "getMaxAbs", Grid<int>::_W_26);
-static const Pb::Register _R_51("Grid<int>", "getMax", Grid<int>::_W_27);
-static const Pb::Register _R_52("Grid<int>", "getMin", Grid<int>::_W_28);
-static const Pb::Register _R_53("Grid<int>", "getL1", Grid<int>::_W_29);
-static const Pb::Register _R_54("Grid<int>", "getL2", Grid<int>::_W_30);
-static const Pb::Register _R_55("Grid<int>", "setBound", Grid<int>::_W_31);
-static const Pb::Register _R_56("Grid<int>", "setBoundNeumann", Grid<int>::_W_32);
-static const Pb::Register _R_57("Grid<int>", "getDataPointer", Grid<int>::_W_33);
-static const Pb::Register _R_58("Grid<int>", "printGrid", Grid<int>::_W_34);
-static const Pb::Register _R_59("Grid<Real>", "Grid<Real>", "GridBase");
+static const Pb::Register _R_46("Grid<int>", "safeDivide", Grid<int>::_W_22);
+static const Pb::Register _R_47("Grid<int>", "clamp", Grid<int>::_W_23);
+static const Pb::Register _R_48("Grid<int>", "stomp", Grid<int>::_W_24);
+static const Pb::Register _R_49("Grid<int>", "permuteAxes", Grid<int>::_W_25);
+static const Pb::Register _R_50("Grid<int>", "permuteAxesCopyToGrid", Grid<int>::_W_26);
+static const Pb::Register _R_51("Grid<int>", "getMaxAbs", Grid<int>::_W_27);
+static const Pb::Register _R_52("Grid<int>", "getMax", Grid<int>::_W_28);
+static const Pb::Register _R_53("Grid<int>", "getMin", Grid<int>::_W_29);
+static const Pb::Register _R_54("Grid<int>", "getL1", Grid<int>::_W_30);
+static const Pb::Register _R_55("Grid<int>", "getL2", Grid<int>::_W_31);
+static const Pb::Register _R_56("Grid<int>", "setBound", Grid<int>::_W_32);
+static const Pb::Register _R_57("Grid<int>", "setBoundNeumann", Grid<int>::_W_33);
+static const Pb::Register _R_58("Grid<int>", "getDataPointer", Grid<int>::_W_34);
+static const Pb::Register _R_59("Grid<int>", "printGrid", Grid<int>::_W_35);
+static const Pb::Register _R_60("Grid<Real>", "Grid<Real>", "GridBase");
template<> const char *Namify<Grid<Real>>::S = "Grid<Real>";
-static const Pb::Register _R_60("Grid<Real>", "Grid", Grid<Real>::_W_9);
-static const Pb::Register _R_61("Grid<Real>", "save", Grid<Real>::_W_10);
-static const Pb::Register _R_62("Grid<Real>", "load", Grid<Real>::_W_11);
-static const Pb::Register _R_63("Grid<Real>", "clear", Grid<Real>::_W_12);
-static const Pb::Register _R_64("Grid<Real>", "copyFrom", Grid<Real>::_W_13);
-static const Pb::Register _R_65("Grid<Real>", "getGridType", Grid<Real>::_W_14);
-static const Pb::Register _R_66("Grid<Real>", "add", Grid<Real>::_W_15);
-static const Pb::Register _R_67("Grid<Real>", "sub", Grid<Real>::_W_16);
-static const Pb::Register _R_68("Grid<Real>", "setConst", Grid<Real>::_W_17);
-static const Pb::Register _R_69("Grid<Real>", "addConst", Grid<Real>::_W_18);
-static const Pb::Register _R_70("Grid<Real>", "addScaled", Grid<Real>::_W_19);
-static const Pb::Register _R_71("Grid<Real>", "mult", Grid<Real>::_W_20);
-static const Pb::Register _R_72("Grid<Real>", "multConst", Grid<Real>::_W_21);
-static const Pb::Register _R_73("Grid<Real>", "clamp", Grid<Real>::_W_22);
-static const Pb::Register _R_74("Grid<Real>", "stomp", Grid<Real>::_W_23);
-static const Pb::Register _R_75("Grid<Real>", "permuteAxes", Grid<Real>::_W_24);
-static const Pb::Register _R_76("Grid<Real>", "permuteAxesCopyToGrid", Grid<Real>::_W_25);
-static const Pb::Register _R_77("Grid<Real>", "getMaxAbs", Grid<Real>::_W_26);
-static const Pb::Register _R_78("Grid<Real>", "getMax", Grid<Real>::_W_27);
-static const Pb::Register _R_79("Grid<Real>", "getMin", Grid<Real>::_W_28);
-static const Pb::Register _R_80("Grid<Real>", "getL1", Grid<Real>::_W_29);
-static const Pb::Register _R_81("Grid<Real>", "getL2", Grid<Real>::_W_30);
-static const Pb::Register _R_82("Grid<Real>", "setBound", Grid<Real>::_W_31);
-static const Pb::Register _R_83("Grid<Real>", "setBoundNeumann", Grid<Real>::_W_32);
-static const Pb::Register _R_84("Grid<Real>", "getDataPointer", Grid<Real>::_W_33);
-static const Pb::Register _R_85("Grid<Real>", "printGrid", Grid<Real>::_W_34);
-static const Pb::Register _R_86("Grid<Vec3>", "Grid<Vec3>", "GridBase");
+static const Pb::Register _R_61("Grid<Real>", "Grid", Grid<Real>::_W_9);
+static const Pb::Register _R_62("Grid<Real>", "save", Grid<Real>::_W_10);
+static const Pb::Register _R_63("Grid<Real>", "load", Grid<Real>::_W_11);
+static const Pb::Register _R_64("Grid<Real>", "clear", Grid<Real>::_W_12);
+static const Pb::Register _R_65("Grid<Real>", "copyFrom", Grid<Real>::_W_13);
+static const Pb::Register _R_66("Grid<Real>", "getGridType", Grid<Real>::_W_14);
+static const Pb::Register _R_67("Grid<Real>", "add", Grid<Real>::_W_15);
+static const Pb::Register _R_68("Grid<Real>", "sub", Grid<Real>::_W_16);
+static const Pb::Register _R_69("Grid<Real>", "setConst", Grid<Real>::_W_17);
+static const Pb::Register _R_70("Grid<Real>", "addConst", Grid<Real>::_W_18);
+static const Pb::Register _R_71("Grid<Real>", "addScaled", Grid<Real>::_W_19);
+static const Pb::Register _R_72("Grid<Real>", "mult", Grid<Real>::_W_20);
+static const Pb::Register _R_73("Grid<Real>", "multConst", Grid<Real>::_W_21);
+static const Pb::Register _R_74("Grid<Real>", "safeDivide", Grid<Real>::_W_22);
+static const Pb::Register _R_75("Grid<Real>", "clamp", Grid<Real>::_W_23);
+static const Pb::Register _R_76("Grid<Real>", "stomp", Grid<Real>::_W_24);
+static const Pb::Register _R_77("Grid<Real>", "permuteAxes", Grid<Real>::_W_25);
+static const Pb::Register _R_78("Grid<Real>", "permuteAxesCopyToGrid", Grid<Real>::_W_26);
+static const Pb::Register _R_79("Grid<Real>", "getMaxAbs", Grid<Real>::_W_27);
+static const Pb::Register _R_80("Grid<Real>", "getMax", Grid<Real>::_W_28);
+static const Pb::Register _R_81("Grid<Real>", "getMin", Grid<Real>::_W_29);
+static const Pb::Register _R_82("Grid<Real>", "getL1", Grid<Real>::_W_30);
+static const Pb::Register _R_83("Grid<Real>", "getL2", Grid<Real>::_W_31);
+static const Pb::Register _R_84("Grid<Real>", "setBound", Grid<Real>::_W_32);
+static const Pb::Register _R_85("Grid<Real>", "setBoundNeumann", Grid<Real>::_W_33);
+static const Pb::Register _R_86("Grid<Real>", "getDataPointer", Grid<Real>::_W_34);
+static const Pb::Register _R_87("Grid<Real>", "printGrid", Grid<Real>::_W_35);
+static const Pb::Register _R_88("Grid<Vec3>", "Grid<Vec3>", "GridBase");
template<> const char *Namify<Grid<Vec3>>::S = "Grid<Vec3>";
-static const Pb::Register _R_87("Grid<Vec3>", "Grid", Grid<Vec3>::_W_9);
-static const Pb::Register _R_88("Grid<Vec3>", "save", Grid<Vec3>::_W_10);
-static const Pb::Register _R_89("Grid<Vec3>", "load", Grid<Vec3>::_W_11);
-static const Pb::Register _R_90("Grid<Vec3>", "clear", Grid<Vec3>::_W_12);
-static const Pb::Register _R_91("Grid<Vec3>", "copyFrom", Grid<Vec3>::_W_13);
-static const Pb::Register _R_92("Grid<Vec3>", "getGridType", Grid<Vec3>::_W_14);
-static const Pb::Register _R_93("Grid<Vec3>", "add", Grid<Vec3>::_W_15);
-static const Pb::Register _R_94("Grid<Vec3>", "sub", Grid<Vec3>::_W_16);
-static const Pb::Register _R_95("Grid<Vec3>", "setConst", Grid<Vec3>::_W_17);
-static const Pb::Register _R_96("Grid<Vec3>", "addConst", Grid<Vec3>::_W_18);
-static const Pb::Register _R_97("Grid<Vec3>", "addScaled", Grid<Vec3>::_W_19);
-static const Pb::Register _R_98("Grid<Vec3>", "mult", Grid<Vec3>::_W_20);
-static const Pb::Register _R_99("Grid<Vec3>", "multConst", Grid<Vec3>::_W_21);
-static const Pb::Register _R_100("Grid<Vec3>", "clamp", Grid<Vec3>::_W_22);
-static const Pb::Register _R_101("Grid<Vec3>", "stomp", Grid<Vec3>::_W_23);
-static const Pb::Register _R_102("Grid<Vec3>", "permuteAxes", Grid<Vec3>::_W_24);
-static const Pb::Register _R_103("Grid<Vec3>", "permuteAxesCopyToGrid", Grid<Vec3>::_W_25);
-static const Pb::Register _R_104("Grid<Vec3>", "getMaxAbs", Grid<Vec3>::_W_26);
-static const Pb::Register _R_105("Grid<Vec3>", "getMax", Grid<Vec3>::_W_27);
-static const Pb::Register _R_106("Grid<Vec3>", "getMin", Grid<Vec3>::_W_28);
-static const Pb::Register _R_107("Grid<Vec3>", "getL1", Grid<Vec3>::_W_29);
-static const Pb::Register _R_108("Grid<Vec3>", "getL2", Grid<Vec3>::_W_30);
-static const Pb::Register _R_109("Grid<Vec3>", "setBound", Grid<Vec3>::_W_31);
-static const Pb::Register _R_110("Grid<Vec3>", "setBoundNeumann", Grid<Vec3>::_W_32);
-static const Pb::Register _R_111("Grid<Vec3>", "getDataPointer", Grid<Vec3>::_W_33);
-static const Pb::Register _R_112("Grid<Vec3>", "printGrid", Grid<Vec3>::_W_34);
+static const Pb::Register _R_89("Grid<Vec3>", "Grid", Grid<Vec3>::_W_9);
+static const Pb::Register _R_90("Grid<Vec3>", "save", Grid<Vec3>::_W_10);
+static const Pb::Register _R_91("Grid<Vec3>", "load", Grid<Vec3>::_W_11);
+static const Pb::Register _R_92("Grid<Vec3>", "clear", Grid<Vec3>::_W_12);
+static const Pb::Register _R_93("Grid<Vec3>", "copyFrom", Grid<Vec3>::_W_13);
+static const Pb::Register _R_94("Grid<Vec3>", "getGridType", Grid<Vec3>::_W_14);
+static const Pb::Register _R_95("Grid<Vec3>", "add", Grid<Vec3>::_W_15);
+static const Pb::Register _R_96("Grid<Vec3>", "sub", Grid<Vec3>::_W_16);
+static const Pb::Register _R_97("Grid<Vec3>", "setConst", Grid<Vec3>::_W_17);
+static const Pb::Register _R_98("Grid<Vec3>", "addConst", Grid<Vec3>::_W_18);
+static const Pb::Register _R_99("Grid<Vec3>", "addScaled", Grid<Vec3>::_W_19);
+static const Pb::Register _R_100("Grid<Vec3>", "mult", Grid<Vec3>::_W_20);
+static const Pb::Register _R_101("Grid<Vec3>", "multConst", Grid<Vec3>::_W_21);
+static const Pb::Register _R_102("Grid<Vec3>", "safeDivide", Grid<Vec3>::_W_22);
+static const Pb::Register _R_103("Grid<Vec3>", "clamp", Grid<Vec3>::_W_23);
+static const Pb::Register _R_104("Grid<Vec3>", "stomp", Grid<Vec3>::_W_24);
+static const Pb::Register _R_105("Grid<Vec3>", "permuteAxes", Grid<Vec3>::_W_25);
+static const Pb::Register _R_106("Grid<Vec3>", "permuteAxesCopyToGrid", Grid<Vec3>::_W_26);
+static const Pb::Register _R_107("Grid<Vec3>", "getMaxAbs", Grid<Vec3>::_W_27);
+static const Pb::Register _R_108("Grid<Vec3>", "getMax", Grid<Vec3>::_W_28);
+static const Pb::Register _R_109("Grid<Vec3>", "getMin", Grid<Vec3>::_W_29);
+static const Pb::Register _R_110("Grid<Vec3>", "getL1", Grid<Vec3>::_W_30);
+static const Pb::Register _R_111("Grid<Vec3>", "getL2", Grid<Vec3>::_W_31);
+static const Pb::Register _R_112("Grid<Vec3>", "setBound", Grid<Vec3>::_W_32);
+static const Pb::Register _R_113("Grid<Vec3>", "setBoundNeumann", Grid<Vec3>::_W_33);
+static const Pb::Register _R_114("Grid<Vec3>", "getDataPointer", Grid<Vec3>::_W_34);
+static const Pb::Register _R_115("Grid<Vec3>", "printGrid", Grid<Vec3>::_W_35);
#endif
#ifdef _C_GridBase
-static const Pb::Register _R_113("GridBase", "GridBase", "PbClass");
+static const Pb::Register _R_116("GridBase", "GridBase", "PbClass");
template<> const char *Namify<GridBase>::S = "GridBase";
-static const Pb::Register _R_114("GridBase", "GridBase", GridBase::_W_0);
-static const Pb::Register _R_115("GridBase", "getSizeX", GridBase::_W_1);
-static const Pb::Register _R_116("GridBase", "getSizeY", GridBase::_W_2);
-static const Pb::Register _R_117("GridBase", "getSizeZ", GridBase::_W_3);
-static const Pb::Register _R_118("GridBase", "getSize", GridBase::_W_4);
-static const Pb::Register _R_119("GridBase", "is3D", GridBase::_W_5);
-static const Pb::Register _R_120("GridBase", "is4D", GridBase::_W_6);
-static const Pb::Register _R_121("GridBase", "getSizeT", GridBase::_W_7);
-static const Pb::Register _R_122("GridBase", "getStrideT", GridBase::_W_8);
+static const Pb::Register _R_117("GridBase", "GridBase", GridBase::_W_0);
+static const Pb::Register _R_118("GridBase", "getSizeX", GridBase::_W_1);
+static const Pb::Register _R_119("GridBase", "getSizeY", GridBase::_W_2);
+static const Pb::Register _R_120("GridBase", "getSizeZ", GridBase::_W_3);
+static const Pb::Register _R_121("GridBase", "getSize", GridBase::_W_4);
+static const Pb::Register _R_122("GridBase", "is3D", GridBase::_W_5);
+static const Pb::Register _R_123("GridBase", "is4D", GridBase::_W_6);
+static const Pb::Register _R_124("GridBase", "getSizeT", GridBase::_W_7);
+static const Pb::Register _R_125("GridBase", "getStrideT", GridBase::_W_8);
#endif
#ifdef _C_MACGrid
-static const Pb::Register _R_123("MACGrid", "MACGrid", "Grid<Vec3>");
+static const Pb::Register _R_126("MACGrid", "MACGrid", "Grid<Vec3>");
template<> const char *Namify<MACGrid>::S = "MACGrid";
-static const Pb::Register _R_124("MACGrid", "MACGrid", MACGrid::_W_35);
-static const Pb::Register _R_125("MACGrid", "setBoundMAC", MACGrid::_W_36);
+static const Pb::Register _R_127("MACGrid", "MACGrid", MACGrid::_W_36);
+static const Pb::Register _R_128("MACGrid", "setBoundMAC", MACGrid::_W_37);
#endif
static const Pb::Register _R_7("GridType_TypeNone", 0);
static const Pb::Register _R_8("GridType_TypeReal", 1);
@@ -241,6 +244,9 @@ void PbRegister_file_7()
KEEP_UNUSED(_R_123);
KEEP_UNUSED(_R_124);
KEEP_UNUSED(_R_125);
+ KEEP_UNUSED(_R_126);
+ KEEP_UNUSED(_R_127);
+ KEEP_UNUSED(_R_128);
}
}
} // namespace Manta \ No newline at end of file
diff --git a/extern/mantaflow/preprocessed/plugin/extforces.cpp b/extern/mantaflow/preprocessed/plugin/extforces.cpp
index 3e1e5733257..df0ddb15b33 100644
--- a/extern/mantaflow/preprocessed/plugin/extforces.cpp
+++ b/extern/mantaflow/preprocessed/plugin/extforces.cpp
@@ -1468,23 +1468,50 @@ void PbRegister_setForceField()
}
}
-void dissolveSmoke(const FlagGrid &flags,
- Grid<Real> &density,
- Grid<Real> *heat = NULL,
- Grid<Real> *red = NULL,
- Grid<Real> *green = NULL,
- Grid<Real> *blue = NULL,
- int speed = 5,
- bool logFalloff = true)
-{
- float dydx = 1.0f / (float)speed; // max density/speed = dydx
- float fac = 1.0f - dydx;
-
- FOR_IJK_BND(density, 0)
+struct KnDissolveSmoke : public KernelBase {
+ KnDissolveSmoke(const FlagGrid &flags,
+ Grid<Real> &density,
+ Grid<Real> *heat,
+ Grid<Real> *red,
+ Grid<Real> *green,
+ Grid<Real> *blue,
+ int speed,
+ bool logFalloff,
+ float dydx,
+ float fac)
+ : KernelBase(&flags, 0),
+ flags(flags),
+ density(density),
+ heat(heat),
+ red(red),
+ green(green),
+ blue(blue),
+ speed(speed),
+ logFalloff(logFalloff),
+ dydx(dydx),
+ fac(fac)
{
+ runMessage();
+ run();
+ }
+ inline void op(int i,
+ int j,
+ int k,
+ const FlagGrid &flags,
+ Grid<Real> &density,
+ Grid<Real> *heat,
+ Grid<Real> *red,
+ Grid<Real> *green,
+ Grid<Real> *blue,
+ int speed,
+ bool logFalloff,
+ float dydx,
+ float fac) const
+ {
+
bool curFluid = flags.isFluid(i, j, k);
if (!curFluid)
- continue;
+ return;
if (logFalloff) {
density(i, j, k) *= fac;
@@ -1517,6 +1544,111 @@ void dissolveSmoke(const FlagGrid &flags,
}
}
}
+ inline const FlagGrid &getArg0()
+ {
+ return flags;
+ }
+ typedef FlagGrid type0;
+ inline Grid<Real> &getArg1()
+ {
+ return density;
+ }
+ typedef Grid<Real> type1;
+ inline Grid<Real> *getArg2()
+ {
+ return heat;
+ }
+ typedef Grid<Real> type2;
+ inline Grid<Real> *getArg3()
+ {
+ return red;
+ }
+ typedef Grid<Real> type3;
+ inline Grid<Real> *getArg4()
+ {
+ return green;
+ }
+ typedef Grid<Real> type4;
+ inline Grid<Real> *getArg5()
+ {
+ return blue;
+ }
+ typedef Grid<Real> type5;
+ inline int &getArg6()
+ {
+ return speed;
+ }
+ typedef int type6;
+ inline bool &getArg7()
+ {
+ return logFalloff;
+ }
+ typedef bool type7;
+ inline float &getArg8()
+ {
+ return dydx;
+ }
+ typedef float type8;
+ inline float &getArg9()
+ {
+ return fac;
+ }
+ typedef float type9;
+ void runMessage()
+ {
+ debMsg("Executing kernel KnDissolveSmoke ", 3);
+ debMsg("Kernel range"
+ << " x " << maxX << " y " << maxY << " z " << minZ << " - " << maxZ << " ",
+ 4);
+ };
+ void operator()(const tbb::blocked_range<IndexInt> &__r) const
+ {
+ const int _maxX = maxX;
+ const int _maxY = maxY;
+ if (maxZ > 1) {
+ for (int k = __r.begin(); k != (int)__r.end(); k++)
+ for (int j = 0; j < _maxY; j++)
+ for (int i = 0; i < _maxX; i++)
+ op(i, j, k, flags, density, heat, red, green, blue, speed, logFalloff, dydx, fac);
+ }
+ else {
+ const int k = 0;
+ for (int j = __r.begin(); j != (int)__r.end(); j++)
+ for (int i = 0; i < _maxX; i++)
+ op(i, j, k, flags, density, heat, red, green, blue, speed, logFalloff, dydx, fac);
+ }
+ }
+ void run()
+ {
+ if (maxZ > 1)
+ tbb::parallel_for(tbb::blocked_range<IndexInt>(minZ, maxZ), *this);
+ else
+ tbb::parallel_for(tbb::blocked_range<IndexInt>(0, maxY), *this);
+ }
+ const FlagGrid &flags;
+ Grid<Real> &density;
+ Grid<Real> *heat;
+ Grid<Real> *red;
+ Grid<Real> *green;
+ Grid<Real> *blue;
+ int speed;
+ bool logFalloff;
+ float dydx;
+ float fac;
+};
+
+void dissolveSmoke(const FlagGrid &flags,
+ Grid<Real> &density,
+ Grid<Real> *heat = NULL,
+ Grid<Real> *red = NULL,
+ Grid<Real> *green = NULL,
+ Grid<Real> *blue = NULL,
+ int speed = 5,
+ bool logFalloff = true)
+{
+ float dydx = 1.0f / (float)speed; // max density/speed = dydx
+ float fac = 1.0f - dydx;
+ KnDissolveSmoke(flags, density, heat, red, green, blue, speed, logFalloff, dydx, fac);
}
static PyObject *_W_11(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
diff --git a/extern/mantaflow/preprocessed/plugin/initplugins.cpp b/extern/mantaflow/preprocessed/plugin/initplugins.cpp
index 3e28c947424..519aa41a08d 100644
--- a/extern/mantaflow/preprocessed/plugin/initplugins.cpp
+++ b/extern/mantaflow/preprocessed/plugin/initplugins.cpp
@@ -1003,6 +1003,214 @@ void PbRegister_densityInflowMesh()
}
}
+struct KnResetInObstacle : public KernelBase {
+ KnResetInObstacle(FlagGrid &flags,
+ MACGrid &vel,
+ Grid<Real> *density,
+ Grid<Real> *heat,
+ Grid<Real> *fuel,
+ Grid<Real> *flame,
+ Grid<Real> *red,
+ Grid<Real> *green,
+ Grid<Real> *blue,
+ Real resetValue)
+ : KernelBase(&flags, 0),
+ flags(flags),
+ vel(vel),
+ density(density),
+ heat(heat),
+ fuel(fuel),
+ flame(flame),
+ red(red),
+ green(green),
+ blue(blue),
+ resetValue(resetValue)
+ {
+ runMessage();
+ run();
+ }
+ inline void op(int i,
+ int j,
+ int k,
+ FlagGrid &flags,
+ MACGrid &vel,
+ Grid<Real> *density,
+ Grid<Real> *heat,
+ Grid<Real> *fuel,
+ Grid<Real> *flame,
+ Grid<Real> *red,
+ Grid<Real> *green,
+ Grid<Real> *blue,
+ Real resetValue) const
+ {
+ if (!flags.isObstacle(i, j, k))
+ return;
+ vel(i, j, k).x = resetValue;
+ vel(i, j, k).y = resetValue;
+ vel(i, j, k).z = resetValue;
+
+ if (density) {
+ (*density)(i, j, k) = resetValue;
+ }
+ if (heat) {
+ (*heat)(i, j, k) = resetValue;
+ }
+ if (fuel) {
+ (*fuel)(i, j, k) = resetValue;
+ (*flame)(i, j, k) = resetValue;
+ }
+ if (red) {
+ (*red)(i, j, k) = resetValue;
+ (*green)(i, j, k) = resetValue;
+ (*blue)(i, j, k) = resetValue;
+ }
+ }
+ inline FlagGrid &getArg0()
+ {
+ return flags;
+ }
+ typedef FlagGrid type0;
+ inline MACGrid &getArg1()
+ {
+ return vel;
+ }
+ typedef MACGrid type1;
+ inline Grid<Real> *getArg2()
+ {
+ return density;
+ }
+ typedef Grid<Real> type2;
+ inline Grid<Real> *getArg3()
+ {
+ return heat;
+ }
+ typedef Grid<Real> type3;
+ inline Grid<Real> *getArg4()
+ {
+ return fuel;
+ }
+ typedef Grid<Real> type4;
+ inline Grid<Real> *getArg5()
+ {
+ return flame;
+ }
+ typedef Grid<Real> type5;
+ inline Grid<Real> *getArg6()
+ {
+ return red;
+ }
+ typedef Grid<Real> type6;
+ inline Grid<Real> *getArg7()
+ {
+ return green;
+ }
+ typedef Grid<Real> type7;
+ inline Grid<Real> *getArg8()
+ {
+ return blue;
+ }
+ typedef Grid<Real> type8;
+ inline Real &getArg9()
+ {
+ return resetValue;
+ }
+ typedef Real type9;
+ void runMessage()
+ {
+ debMsg("Executing kernel KnResetInObstacle ", 3);
+ debMsg("Kernel range"
+ << " x " << maxX << " y " << maxY << " z " << minZ << " - " << maxZ << " ",
+ 4);
+ };
+ void operator()(const tbb::blocked_range<IndexInt> &__r) const
+ {
+ const int _maxX = maxX;
+ const int _maxY = maxY;
+ if (maxZ > 1) {
+ for (int k = __r.begin(); k != (int)__r.end(); k++)
+ for (int j = 0; j < _maxY; j++)
+ for (int i = 0; i < _maxX; i++)
+ op(i, j, k, flags, vel, density, heat, fuel, flame, red, green, blue, resetValue);
+ }
+ else {
+ const int k = 0;
+ for (int j = __r.begin(); j != (int)__r.end(); j++)
+ for (int i = 0; i < _maxX; i++)
+ op(i, j, k, flags, vel, density, heat, fuel, flame, red, green, blue, resetValue);
+ }
+ }
+ void run()
+ {
+ if (maxZ > 1)
+ tbb::parallel_for(tbb::blocked_range<IndexInt>(minZ, maxZ), *this);
+ else
+ tbb::parallel_for(tbb::blocked_range<IndexInt>(0, maxY), *this);
+ }
+ FlagGrid &flags;
+ MACGrid &vel;
+ Grid<Real> *density;
+ Grid<Real> *heat;
+ Grid<Real> *fuel;
+ Grid<Real> *flame;
+ Grid<Real> *red;
+ Grid<Real> *green;
+ Grid<Real> *blue;
+ Real resetValue;
+};
+
+void resetInObstacle(FlagGrid &flags,
+ MACGrid &vel,
+ Grid<Real> *density,
+ Grid<Real> *heat = NULL,
+ Grid<Real> *fuel = NULL,
+ Grid<Real> *flame = NULL,
+ Grid<Real> *red = NULL,
+ Grid<Real> *green = NULL,
+ Grid<Real> *blue = NULL,
+ Real resetValue = 0)
+{
+ KnResetInObstacle(flags, vel, density, heat, fuel, flame, red, green, blue, resetValue);
+}
+static PyObject *_W_10(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+{
+ try {
+ PbArgs _args(_linargs, _kwds);
+ FluidSolver *parent = _args.obtainParent();
+ bool noTiming = _args.getOpt<bool>("notiming", -1, 0);
+ pbPreparePlugin(parent, "resetInObstacle", !noTiming);
+ PyObject *_retval = 0;
+ {
+ ArgLocker _lock;
+ FlagGrid &flags = *_args.getPtr<FlagGrid>("flags", 0, &_lock);
+ MACGrid &vel = *_args.getPtr<MACGrid>("vel", 1, &_lock);
+ Grid<Real> *density = _args.getPtr<Grid<Real>>("density", 2, &_lock);
+ Grid<Real> *heat = _args.getPtrOpt<Grid<Real>>("heat", 3, NULL, &_lock);
+ Grid<Real> *fuel = _args.getPtrOpt<Grid<Real>>("fuel", 4, NULL, &_lock);
+ Grid<Real> *flame = _args.getPtrOpt<Grid<Real>>("flame", 5, NULL, &_lock);
+ Grid<Real> *red = _args.getPtrOpt<Grid<Real>>("red", 6, NULL, &_lock);
+ Grid<Real> *green = _args.getPtrOpt<Grid<Real>>("green", 7, NULL, &_lock);
+ Grid<Real> *blue = _args.getPtrOpt<Grid<Real>>("blue", 8, NULL, &_lock);
+ Real resetValue = _args.getOpt<Real>("resetValue", 9, 0, &_lock);
+ _retval = getPyNone();
+ resetInObstacle(flags, vel, density, heat, fuel, flame, red, green, blue, resetValue);
+ _args.check();
+ }
+ pbFinalizePlugin(parent, "resetInObstacle", !noTiming);
+ return _retval;
+ }
+ catch (std::exception &e) {
+ pbSetError("resetInObstacle", e.what());
+ return 0;
+ }
+}
+static const Pb::Register _RP_resetInObstacle("", "resetInObstacle", _W_10);
+extern "C" {
+void PbRegister_resetInObstacle()
+{
+ KEEP_UNUSED(_RP_resetInObstacle);
+}
+}
+
//*****************************************************************************
//! check for symmetry , optionally enfore by copying
@@ -1026,7 +1234,7 @@ void checkSymmetry(
}
}
}
-static PyObject *_W_10(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+static PyObject *_W_11(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1053,7 +1261,7 @@ static PyObject *_W_10(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
return 0;
}
}
-static const Pb::Register _RP_checkSymmetry("", "checkSymmetry", _W_10);
+static const Pb::Register _RP_checkSymmetry("", "checkSymmetry", _W_11);
extern "C" {
void PbRegister_checkSymmetry()
{
@@ -1144,7 +1352,7 @@ void checkSymmetryVec3(Grid<Vec3> &a,
}
}
}
-static PyObject *_W_11(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+static PyObject *_W_12(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1172,7 +1380,7 @@ static PyObject *_W_11(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
return 0;
}
}
-static const Pb::Register _RP_checkSymmetryVec3("", "checkSymmetryVec3", _W_11);
+static const Pb::Register _RP_checkSymmetryVec3("", "checkSymmetryVec3", _W_12);
extern "C" {
void PbRegister_checkSymmetryVec3()
{
@@ -1192,7 +1400,7 @@ void projectPpmFull(const Grid<Real> &val, string name, int shadeMode = 0, Real
projectImg(img, val, shadeMode, scale);
img.writePpm(name);
}
-static PyObject *_W_12(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+static PyObject *_W_13(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1218,7 +1426,7 @@ static PyObject *_W_12(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
return 0;
}
}
-static const Pb::Register _RP_projectPpmFull("", "projectPpmFull", _W_12);
+static const Pb::Register _RP_projectPpmFull("", "projectPpmFull", _W_13);
extern "C" {
void PbRegister_projectPpmFull()
{
@@ -1238,7 +1446,7 @@ void addTestParts(BasicParticleSystem &parts, int num)
parts.doCompress();
parts.insertBufferedParticles();
}
-static PyObject *_W_13(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+static PyObject *_W_14(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1262,7 +1470,7 @@ static PyObject *_W_13(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
return 0;
}
}
-static const Pb::Register _RP_addTestParts("", "addTestParts", _W_13);
+static const Pb::Register _RP_addTestParts("", "addTestParts", _W_14);
extern "C" {
void PbRegister_addTestParts()
{
@@ -1313,7 +1521,7 @@ Real pdataMaxDiff(const ParticleDataBase *a, const ParticleDataBase *b)
return maxVal;
}
-static PyObject *_W_14(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+static PyObject *_W_15(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1336,7 +1544,7 @@ static PyObject *_W_14(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
return 0;
}
}
-static const Pb::Register _RP_pdataMaxDiff("", "pdataMaxDiff", _W_14);
+static const Pb::Register _RP_pdataMaxDiff("", "pdataMaxDiff", _W_15);
extern "C" {
void PbRegister_pdataMaxDiff()
{
@@ -1359,7 +1567,7 @@ Vec3 calcCenterOfMass(const Grid<Real> &density)
p /= w;
return p;
}
-static PyObject *_W_15(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+static PyObject *_W_16(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1381,7 +1589,7 @@ static PyObject *_W_15(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
return 0;
}
}
-static const Pb::Register _RP_calcCenterOfMass("", "calcCenterOfMass", _W_15);
+static const Pb::Register _RP_calcCenterOfMass("", "calcCenterOfMass", _W_16);
extern "C" {
void PbRegister_calcCenterOfMass()
{
@@ -1581,7 +1789,7 @@ void updateFractions(const FlagGrid &flags,
fractions.setConst(Vec3(0.));
KnUpdateFractions(flags, phiObs, fractions, boundaryWidth, fracThreshold);
}
-static PyObject *_W_16(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+static PyObject *_W_17(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1608,7 +1816,7 @@ static PyObject *_W_16(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
return 0;
}
}
-static const Pb::Register _RP_updateFractions("", "updateFractions", _W_16);
+static const Pb::Register _RP_updateFractions("", "updateFractions", _W_17);
extern "C" {
void PbRegister_updateFractions()
{
@@ -1750,7 +1958,7 @@ void setObstacleFlags(FlagGrid &flags,
{
KnUpdateFlagsObs(flags, fractions, phiObs, phiOut, phiIn);
}
-static PyObject *_W_17(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+static PyObject *_W_18(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1777,7 +1985,7 @@ static PyObject *_W_17(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
return 0;
}
}
-static const Pb::Register _RP_setObstacleFlags("", "setObstacleFlags", _W_17);
+static const Pb::Register _RP_setObstacleFlags("", "setObstacleFlags", _W_18);
extern "C" {
void PbRegister_setObstacleFlags()
{
@@ -1894,7 +2102,7 @@ void initVortexVelocity(const Grid<Real> &phiObs,
{
kninitVortexVelocity(phiObs, vel, center, radius);
}
-static PyObject *_W_18(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+static PyObject *_W_19(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -1920,7 +2128,7 @@ static PyObject *_W_18(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
return 0;
}
}
-static const Pb::Register _RP_initVortexVelocity("", "initVortexVelocity", _W_18);
+static const Pb::Register _RP_initVortexVelocity("", "initVortexVelocity", _W_19);
extern "C" {
void PbRegister_initVortexVelocity()
{
@@ -2246,7 +2454,7 @@ int blurMacGrid(MACGrid &oG, MACGrid &tG, float si)
}
return tmGK.mDim;
}
-static PyObject *_W_19(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+static PyObject *_W_20(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -2270,7 +2478,7 @@ static PyObject *_W_19(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
return 0;
}
}
-static const Pb::Register _RP_blurMacGrid("", "blurMacGrid", _W_19);
+static const Pb::Register _RP_blurMacGrid("", "blurMacGrid", _W_20);
extern "C" {
void PbRegister_blurMacGrid()
{
@@ -2282,7 +2490,7 @@ int blurRealGrid(Grid<Real> &oG, Grid<Real> &tG, float si)
{
return blurGrid<Real>(oG, tG, si);
}
-static PyObject *_W_20(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
+static PyObject *_W_21(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
{
try {
PbArgs _args(_linargs, _kwds);
@@ -2306,7 +2514,7 @@ static PyObject *_W_20(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
return 0;
}
}
-static const Pb::Register _RP_blurRealGrid("", "blurRealGrid", _W_20);
+static const Pb::Register _RP_blurRealGrid("", "blurRealGrid", _W_21);
extern "C" {
void PbRegister_blurRealGrid()
{
diff --git a/extern/mantaflow/preprocessed/registration.cpp b/extern/mantaflow/preprocessed/registration.cpp
index e86d19f7f7a..c5bdddf4a18 100644
--- a/extern/mantaflow/preprocessed/registration.cpp
+++ b/extern/mantaflow/preprocessed/registration.cpp
@@ -103,6 +103,7 @@ extern void PbRegister_obstacleLevelset();
extern void PbRegister_applyEmission();
extern void PbRegister_densityInflowMeshNoise();
extern void PbRegister_densityInflowMesh();
+extern void PbRegister_resetInObstacle();
extern void PbRegister_checkSymmetry();
extern void PbRegister_checkSymmetryVec3();
extern void PbRegister_projectPpmFull();
@@ -295,6 +296,7 @@ void MantaEnsureRegistration()
PbRegister_applyEmission();
PbRegister_densityInflowMeshNoise();
PbRegister_densityInflowMesh();
+ PbRegister_resetInObstacle();
PbRegister_checkSymmetry();
PbRegister_checkSymmetryVec3();
PbRegister_projectPpmFull();