diff --git a/extern/mantaflow/preprocessed/fileio/iovdb.cpp b/extern/mantaflow/preprocessed/fileio/iovdb.cpp index e615741e0f771988fa3621b0dd19f6732ebf8a69..1846ef7ecbb0dd437faacf1330ade542f3c85ded 100644 --- a/extern/mantaflow/preprocessed/fileio/iovdb.cpp +++ b/extern/mantaflow/preprocessed/fileio/iovdb.cpp @@ -29,10 +29,10 @@ #if OPENVDB == 1 # include "openvdb/openvdb.h" -# include <openvdb/points/PointConversion.h> -# include <openvdb/points/PointCount.h> -# include <openvdb/tools/Clip.h> -# include <openvdb/tools/Dense.h> +# include "openvdb/points/PointConversion.h" +# include "openvdb/points/PointCount.h" +# include "openvdb/tools/Clip.h" +# include "openvdb/tools/Dense.h" #endif #define POSITION_NAME "P" @@ -519,7 +519,7 @@ int writeObjectsVDB(const string &filename, } } - // Write only if the is at least one grid, optionally write with compression. + // Write only if there is at least one grid, optionally write with compression. if (gridsVDB.size()) { int vdb_flags = openvdb::io::COMPRESS_ACTIVE_MASK; switch (compression) { @@ -534,7 +534,8 @@ int writeObjectsVDB(const string &filename, } case COMPRESSION_BLOSC: { # if OPENVDB_BLOSC == 1 - vdb_flags |= openvdb::io::COMPRESS_BLOSC; + // Cannot use |= here, causes segfault with blosc 1.5.0 (== recommended version) + vdb_flags = openvdb::io::COMPRESS_BLOSC; # else debMsg("OpenVDB was built without Blosc support, using Zip compression instead", 1); vdb_flags |= openvdb::io::COMPRESS_ZIP; diff --git a/extern/mantaflow/preprocessed/fluidsolver.h b/extern/mantaflow/preprocessed/fluidsolver.h index 0c871bca3a1ed3cff5b7fa1d80a7500b84e9c88c..6770f8b7b05b772cc9bfe5f83ffdd5bb3e9fb1c5 100644 --- a/extern/mantaflow/preprocessed/fluidsolver.h +++ b/extern/mantaflow/preprocessed/fluidsolver.h @@ -384,6 +384,7 @@ class FluidSolver : public PbClass { GridStorage<Real> mGrids4dReal; GridStorage<Vec3> mGrids4dVec; GridStorage<Vec4> mGrids4dVec4; + public: PbArgs _args; } diff --git a/extern/mantaflow/preprocessed/general.h b/extern/mantaflow/preprocessed/general.h index 50eac71e87eaa85e7e0bf12a91e24a88d1dc7a82..8bf1c2e25de8e510f04baa8ea1ae836b20a05768 100644 --- a/extern/mantaflow/preprocessed/general.h +++ b/extern/mantaflow/preprocessed/general.h @@ -42,7 +42,7 @@ inline void updateQtGui(bool full, int frame, float time, const std::string &cur # ifdef _DEBUG # define DEBUG 1 # endif // _DEBUG -#endif // DEBUG +#endif // DEBUG // Standard exception class Error : public std::exception { diff --git a/extern/mantaflow/preprocessed/gitinfo.h b/extern/mantaflow/preprocessed/gitinfo.h index 1bb96fe3baa2fbb431d55eae94a8f29146384da8..03fd0112095078fbab8b0cfb8b66681effeaa50d 100644 --- a/extern/mantaflow/preprocessed/gitinfo.h +++ b/extern/mantaflow/preprocessed/gitinfo.h @@ -1,3 +1,3 @@ -#define MANTA_GIT_VERSION "commit 39b7a415721ecbf6643612a24e8eadd221aeb934" +#define MANTA_GIT_VERSION "commit 9c505cd22e289b98c9aa717efba8ef3201c7e458" diff --git a/extern/mantaflow/preprocessed/grid.h b/extern/mantaflow/preprocessed/grid.h index 9c3d954771e70badba5cdeb32815cd002ecadbfc..2c4296e78dd49e7ca80c076c30431161abe3b27d 100644 --- a/extern/mantaflow/preprocessed/grid.h +++ b/extern/mantaflow/preprocessed/grid.h @@ -389,6 +389,7 @@ class GridBase : public PbClass { Real mDx; bool m3D; // precomputed Z shift: to ensure 2D compatibility, always use this instead of sx*sy ! IndexInt mStrideZ; + public: PbArgs _args; } diff --git a/extern/mantaflow/preprocessed/grid4d.h b/extern/mantaflow/preprocessed/grid4d.h index 9b64116fc9df9d21d5f73ca5a14c5780f33980f1..1741db590b7b54b1b79a6877a3f42465c74f26c2 100644 --- a/extern/mantaflow/preprocessed/grid4d.h +++ b/extern/mantaflow/preprocessed/grid4d.h @@ -326,6 +326,7 @@ class Grid4dBase : public PbClass { // precomputed Z,T shift: to ensure 2D compatibility, always use this instead of sx*sy ! IndexInt mStrideZ; IndexInt mStrideT; + public: PbArgs _args; } @@ -950,6 +951,7 @@ template<class T> class Grid4d : public Grid4dBase { protected: T *mData; + public: PbArgs _args; } diff --git a/extern/mantaflow/preprocessed/levelset.h b/extern/mantaflow/preprocessed/levelset.h index db542bb1fe61cccf4180fc16264d8bc1db8ba680..ae162f73c3db776cdb79f18cb8d79956657a5722 100644 --- a/extern/mantaflow/preprocessed/levelset.h +++ b/extern/mantaflow/preprocessed/levelset.h @@ -266,6 +266,7 @@ class LevelsetGrid : public Grid<Real> { } static Real invalidTimeValue(); + public: PbArgs _args; } diff --git a/extern/mantaflow/preprocessed/mesh.h b/extern/mantaflow/preprocessed/mesh.h index d3a69abc4eac2c7fc0441f3b467d7aa49fd413af..b5de66ce095e016496684f65c336277390c907ef 100644 --- a/extern/mantaflow/preprocessed/mesh.h +++ b/extern/mantaflow/preprocessed/mesh.h @@ -796,6 +796,7 @@ class Mesh : public PbClass { std::vector<MeshDataImpl<int> *> mMdataInt; //! indicate that mdata of this mesh is copied, and needs to be freed bool mFreeMdata; + public: PbArgs _args; } @@ -881,6 +882,7 @@ class MeshDataBase : public PbClass { protected: Mesh *mMesh; + public: PbArgs _args; } @@ -1645,6 +1647,7 @@ template<class T> class MeshDataImpl : public MeshDataBase { //! optionally , we might have an associated grid from which to grab new data Grid<T> *mpGridSource; //! unfortunately , we need to distinguish mac vs regular vec3 bool mGridSourceMAC; + public: PbArgs _args; } diff --git a/extern/mantaflow/preprocessed/movingobs.h b/extern/mantaflow/preprocessed/movingobs.h index 0661ddf5b376426e0ca56f6d06f12b68258c29cb..83ef6ed0c9f95b209914cc6c04f605222c442e5e 100644 --- a/extern/mantaflow/preprocessed/movingobs.h +++ b/extern/mantaflow/preprocessed/movingobs.h @@ -154,6 +154,7 @@ class MovingObstacle : public PbClass { int mEmptyType; int mID; static int sIDcnt; + public: PbArgs _args; } diff --git a/extern/mantaflow/preprocessed/noisefield.h b/extern/mantaflow/preprocessed/noisefield.h index 73c9de779ef29592646f3d40bb66742625b09d6b..6ed8ac0012d6ff4c1331ce8f733e8ebef435caaf 100644 --- a/extern/mantaflow/preprocessed/noisefield.h +++ b/extern/mantaflow/preprocessed/noisefield.h @@ -236,6 +236,7 @@ class WaveletNoiseField : public PbClass { static int randomSeed; // global reference count for noise tile static std::atomic<int> mNoiseReferenceCount; + public: PbArgs _args; } diff --git a/extern/mantaflow/preprocessed/particle.h b/extern/mantaflow/preprocessed/particle.h index 7fcc7e5ca3234ab49c499c787fb080b65ed6b72e..7e0c64e6d030c2f3c446e0df9d06ad82a276c46b 100644 --- a/extern/mantaflow/preprocessed/particle.h +++ b/extern/mantaflow/preprocessed/particle.h @@ -205,6 +205,7 @@ class ParticleBase : public PbClass { //! custom seed for particle systems, used by plugins int mSeed; //! fix global random seed storage, used mainly by functions in this class static int globalSeed; + public: PbArgs _args; } @@ -628,6 +629,7 @@ template<class S> class ParticleSystem : public ParticleBase { std::vector<S> mData; //! reduce storage , called by doCompress virtual void compress(); + public: PbArgs _args; } @@ -918,6 +920,7 @@ class ParticleIndexSystem : public ParticleSystem<ParticleIndexData> { return -1; } }; + public: PbArgs _args; } @@ -982,6 +985,7 @@ template<class DATA, class CON> class ConnectedParticleSystem : public ParticleS protected: std::vector<CON> mSegments; virtual void compress(); + public: PbArgs _args; } @@ -1071,6 +1075,7 @@ class ParticleDataBase : public PbClass { protected: ParticleBase *mpParticleSys; + public: PbArgs _args; } @@ -1843,6 +1848,7 @@ template<class T> class ParticleDataImpl : public ParticleDataBase { //! optionally , we might have an associated grid from which to grab new data Grid<T> *mpGridSource; //! unfortunately , we need to distinguish mac vs regular vec3 bool mGridSourceMAC; + public: PbArgs _args; } diff --git a/extern/mantaflow/preprocessed/plugin/meshplugins.cpp b/extern/mantaflow/preprocessed/plugin/meshplugins.cpp index 043660db20b18315ad8b507c58e79276f62724c0..cf315429d6569e93f4d589bbc4d7dfc7621cf3f7 100644 --- a/extern/mantaflow/preprocessed/plugin/meshplugins.cpp +++ b/extern/mantaflow/preprocessed/plugin/meshplugins.cpp @@ -234,10 +234,10 @@ void subdivideMesh( normalize(ne2); // Real thisArea = sqrMag(cross(-e2,e0)); - // small angle approximation says sin(x) = arcsin(x) = x, - // arccos(x) = pi/2 - arcsin(x), - // cos(x) = dot(A,B), - // so angle is approximately 1 - dot(A,B). + // small angle approximation says sin(x) = arcsin(x) = x, + // arccos(x) = pi/2 - arcsin(x), + // cos(x) = dot(A,B), + // so angle is approximately 1 - dot(A,B). Real angle[3]; angle[0] = 1.0 - dot(ne0, -ne2); angle[1] = 1.0 - dot(ne1, -ne0); diff --git a/extern/mantaflow/preprocessed/plugin/secondaryparticles.cpp b/extern/mantaflow/preprocessed/plugin/secondaryparticles.cpp index 7a1d8224d94be888fee731ccae97f9590a031564..2f876376f53a3faf0a69f52158b5ea2fcd641236 100644 --- a/extern/mantaflow/preprocessed/plugin/secondaryparticles.cpp +++ b/extern/mantaflow/preprocessed/plugin/secondaryparticles.cpp @@ -2287,9 +2287,10 @@ struct knFlipComputePotentialTrappedAir : public KernelBase { const Vec3 &vj = scaleFromManta * v.getCentered(x, y, z); const Vec3 xij = xi - xj; const Vec3 vij = vi - vj; - Real h = !pot.is3D() ? 1.414 * radius : - 1.732 * radius; // estimate sqrt(2)*radius resp. sqrt(3)*radius - // for h, due to squared resp. cubic neighbor area + Real h = !pot.is3D() ? + 1.414 * radius : + 1.732 * radius; // estimate sqrt(2)*radius resp. sqrt(3)*radius for h, due + // to squared resp. cubic neighbor area vdiff += norm(vij) * (1 - dot(getNormalized(vij), getNormalized(xij))) * (1 - norm(xij) / h); } diff --git a/extern/mantaflow/preprocessed/shapes.h b/extern/mantaflow/preprocessed/shapes.h index fa645389bfe4b04ce632b918fdc4d691a3b4d469..5a400eaed095caf1ba9d00ef88d24a904b1a1eb5 100644 --- a/extern/mantaflow/preprocessed/shapes.h +++ b/extern/mantaflow/preprocessed/shapes.h @@ -269,6 +269,7 @@ class Shape : public PbClass { protected: GridType mType; + public: PbArgs _args; } @@ -319,6 +320,7 @@ class NullShape : public Shape { { gridSetConst<Real>(phi, 1000.0f); } + public: PbArgs _args; } @@ -394,6 +396,7 @@ class Box : public Shape { protected: Vec3 mP0, mP1; + public: PbArgs _args; } @@ -455,6 +458,7 @@ class Sphere : public Shape { protected: Vec3 mCenter, mScale; Real mRadius; + public: PbArgs _args; } @@ -579,6 +583,7 @@ class Cylinder : public Shape { protected: Vec3 mCenter, mZDir; Real mRadius, mZ; + public: PbArgs _args; } @@ -655,6 +660,7 @@ class Slope : public Shape { Real mAnglexy, mAngleyz; Real mOrigin; Vec3 mGs; + public: PbArgs _args; } diff --git a/extern/mantaflow/preprocessed/turbulencepart.h b/extern/mantaflow/preprocessed/turbulencepart.h index 81c94d77722ce395f5f8f29dc96141774a29a8aa..5177aeb2d96b04108f351f3238d1b4c22e9c7456 100644 --- a/extern/mantaflow/preprocessed/turbulencepart.h +++ b/extern/mantaflow/preprocessed/turbulencepart.h @@ -199,6 +199,7 @@ class TurbulenceParticleSystem : public ParticleSystem<TurbulenceParticleData> { private: WaveletNoiseField &noise; + public: PbArgs _args; } diff --git a/extern/mantaflow/preprocessed/vortexpart.h b/extern/mantaflow/preprocessed/vortexpart.h index e48fbc7f50787e63cd63d452f6880f9e05e6dcea..8f80cf910ebc57eb266ac94df7a68a33c94b36a5 100644 --- a/extern/mantaflow/preprocessed/vortexpart.h +++ b/extern/mantaflow/preprocessed/vortexpart.h @@ -127,6 +127,7 @@ class VortexParticleSystem : public ParticleSystem<VortexParticleData> { } virtual ParticleBase *clone(); + public: PbArgs _args; } diff --git a/extern/mantaflow/preprocessed/vortexsheet.h b/extern/mantaflow/preprocessed/vortexsheet.h index 01c32e4e8065548fa7fef6ff13a4037fb6809d38..0fc0f3a12583b1fbc90d69dac71d3b07d30ef2e9 100644 --- a/extern/mantaflow/preprocessed/vortexsheet.h +++ b/extern/mantaflow/preprocessed/vortexsheet.h @@ -240,6 +240,7 @@ class VortexSheetMesh : public Mesh { VorticityChannel mVorticity; TexCoord3Channel mTex1, mTex2; TurbulenceChannel mTurb; + public: PbArgs _args; }