mantaflow
0.10
A framework for fluid simulation
|
Functions | |
void | Manta::InvertCheckFluid (FlagGrid &flags, Grid< Real > &grid) |
double | Manta::GridSumSqr (Grid< Real > &grid) |
void | Manta::CurlOp (const Grid< Vec3 > &grid, Grid< Vec3 > &dst) |
void | Manta::DivergenceOpMAC (Grid< Real > &div, const MACGrid &grid) |
void | Manta::GradientOpMAC (MACGrid &gradient, const Grid< Real > &grid) |
void | Manta::GradientOp (Grid< Vec3 > &gradient, const Grid< Real > &grid) |
void | Manta::LaplaceOp (Grid< Real > &laplace, const Grid< Real > &grid) |
void | Manta::GetShiftedComponent (const Grid< Vec3 > &grid, Grid< Real > &comp, int dim) |
void | Manta::GetComponent (const Grid< Vec3 > &grid, Grid< Real > &comp, int dim) |
void | Manta::GridNorm (Grid< Real > &n, const Grid< Vec3 > &grid) |
void | Manta::SetComponent (Grid< Vec3 > &grid, const Grid< Real > &comp, int dim) |
void | Manta::GetCentered (Grid< Vec3 > ¢er, const MACGrid &vel) |
void | Manta::GetMAC (MACGrid &vel, const Grid< Vec3 > ¢er) |
void | Manta::FillInBoundary (Grid< Vec3 > &grid, int g) |
void | Manta::kn_conv_mex_in_to_MAC (const double *p_lin_array, MACGrid *p_result) |
void | Manta::kn_conv_MAC_to_mex_out (const MACGrid *p_mac, double *p_result) |
void | Manta::kn_conv_mex_in_to_Vec3 (const double *p_lin_array, Grid< Vec3 > *p_result) |
void | Manta::kn_conv_Vec3_to_mex_out (const Grid< Vec3 > *p_Vec3, double *p_result) |
void | Manta::kn_conv_mex_in_to_Real (const double *p_lin_array, Grid< Real > *p_result) |
void | Manta::kn_conv_Real_to_mex_out (const Grid< Real > *p_grid, double *p_result) |
double | Manta::GridDotProduct (const Grid< Real > &a, const Grid< Real > &b) |
Kernel: Compute the dot product between two Real grids. More... | |
double | Manta::InitSigma (FlagGrid &flags, Grid< Real > &dst, Grid< Real > &rhs, Grid< Real > &temp) |
void | Manta::UpdateSearchVec (Grid< Real > &dst, Grid< Real > &src, Real factor) |
void | Manta::ApplyMatrix (FlagGrid &flags, Grid< Real > &dst, Grid< Real > &src, Grid< Real > &A0, Grid< Real > &Ai, Grid< Real > &Aj, Grid< Real > &Ak) |
void | Manta::ApplyMatrix2D (FlagGrid &flags, Grid< Real > &dst, Grid< Real > &src, Grid< Real > &A0, Grid< Real > &Ai, Grid< Real > &Aj, Grid< Real > &Ak) |
void | Manta::MakeLaplaceMatrix (FlagGrid &flags, Grid< Real > &A0, Grid< Real > &Ai, Grid< Real > &Aj, Grid< Real > &Ak, MACGrid *fractions=0) |
void | Manta::SetLevelsetBoundaries (Grid< Real > &phi) |
void | Manta::knExtrapolateMACSimple (MACGrid &vel, int distance, Grid< int > &tmp, const int d, const int c) |
void | Manta::knExtrapolateIntoBnd (FlagGrid &flags, MACGrid &vel, const MACGrid &velTmp) |
void | Manta::knUnprojectNormalComp (FlagGrid &flags, MACGrid &vel, Grid< Real > &phi, Real maxDist) |
void | Manta::knExtrapolateMACFromWeight (MACGrid &vel, Grid< Vec3 > &weight, int distance, const int d, const int c) |
void | Manta::knExtrapolateLsSimple (Grid< S > &val, int distance, Grid< int > &tmp, const int d, S direction) |
void | Manta::knSetRemaining (Grid< S > &phi, Grid< int > &tmp, S distance) |
void | Manta::knQuantize (Grid< Real > &grid, Real step) |
void | Manta::knQuantizeVec3 (Grid< Vec3 > &grid, Real step) |
Real | Manta::CompMinReal (Grid< Real > &val) |
Real | Manta::CompMaxReal (Grid< Real > &val) |
int | Manta::CompMinInt (Grid< int > &val) |
int | Manta::CompMaxInt (Grid< int > &val) |
Real | Manta::CompMinVec (Grid< Vec3 > &val) |
Real | Manta::CompMaxVec (Grid< Vec3 > &val) |
void | Manta::knGridSetConstReal (Grid< T > &me, T val) |
void | Manta::knGridAddConstReal (Grid< T > &me, T val) |
void | Manta::knGridMultConst (Grid< T > &me, T val) |
void | Manta::knGridSafeDiv (Grid< T > &me, const Grid< T > &other) |
void | Manta::knGridClamp (Grid< T > &me, const T &min, const T &max) |
void | Manta::knGridStomp (Grid< T > &me, const T &threshold) |
int | Manta::knCountCells (const FlagGrid &flags, int flag, int bnd, Grid< Real > *mask) |
void | Manta::knResetUvGrid (Grid< Vec3 > &target) |
void | Manta::knSetBoundary (Grid< T > &grid, T value, int w) |
void | Manta::knSetBoundaryNeumann (Grid< T > &grid, int w) |
void | Manta::knSetBoundaryMAC (Grid< Vec3 > &grid, Vec3 value, int w) |
void | Manta::knSetBoundaryMACNorm (Grid< Vec3 > &grid, Vec3 value, int w) |
double | Manta::knGridTotalSum (const Grid< Real > &a, FlagGrid *flags) |
int | Manta::knCountFluidCells (FlagGrid &flags) |
void | Manta::knGetComponent (const Grid< Vec3 > &source, Grid< Real > &target, int component) |
transfer data between real and vec3 grids More... | |
void | Manta::knSetComponent (const Grid< Real > &source, Grid< Vec3 > &target, int component) |
void | Manta::gridAdd (Grid< T > &me, const Grid< S > &other) |
void | Manta::gridSub (Grid< T > &me, const Grid< S > &other) |
void | Manta::gridMult (Grid< T > &me, const Grid< S > &other) |
void | Manta::gridDiv (Grid< T > &me, const Grid< S > &other) |
void | Manta::gridAddScalar (Grid< T > &me, const S &other) |
void | Manta::gridMultScalar (Grid< T > &me, const S &other) |
void | Manta::gridScaledAdd (Grid< T > &me, const Grid< T > &other, const S &factor) |
void | Manta::gridSetConst (Grid< T > &grid, T value) |
void | Manta::knInterpolateGridTempl (Grid< S > &target, Grid< S > &source, const Vec3 &sourceFactor, Vec3 offset, int orderSpace=1) |
Real | Manta::kn4dMinReal (Grid4d< Real > &val) |
Real | Manta::kn4dMaxReal (Grid4d< Real > &val) |
int | Manta::kn4dMinInt (Grid4d< int > &val) |
int | Manta::kn4dMaxInt (Grid4d< int > &val) |
template<class VEC > | |
Real | Manta::kn4dMinVec (Grid4d< VEC > &val) |
template<class VEC > | |
Real | Manta::kn4dMaxVec (Grid4d< VEC > &val) |
void | Manta::kn4dSetConstReal (Grid4d< T > &me, T val) |
void | Manta::kn4dAddConstReal (Grid4d< T > &me, T val) |
void | Manta::kn4dMultConst (Grid4d< T > &me, T val) |
void | Manta::kn4dClamp (Grid4d< T > &me, T min, T max) |
void | Manta::knGetComp4d (const Grid4d< Vec4 > &src, Grid4d< Real > &dst, int c) |
void | Manta::knSetComp4d (const Grid4d< Real > &src, Grid4d< Vec4 > &dst, int c) |
void | Manta::knSetBnd4d (Grid4d< T > &grid, T value, int w) |
void | Manta::knSetBnd4dNeumann (Grid4d< T > &grid, int w) |
void | Manta::knSetRegion4d (Grid4d< S > &dst, Vec4 start, Vec4 end, S value) |
void | Manta::knInterpol4d (Grid4d< S > &target, Grid4d< S > &source, const Vec4 &srcFac, const Vec4 &offset) |
interpolate 4d grid from one size to another size More... | |
void | Manta::Grid4dAdd (Grid4d< T > &me, const Grid4d< S > &other) |
void | Manta::Grid4dSub (Grid4d< T > &me, const Grid4d< S > &other) |
void | Manta::Grid4dMult (Grid4d< T > &me, const Grid4d< S > &other) |
void | Manta::Grid4dDiv (Grid4d< T > &me, const Grid4d< S > &other) |
void | Manta::Grid4dAddScalar (Grid4d< T > &me, const S &other) |
void | Manta::Grid4dMultScalar (Grid4d< T > &me, const S &other) |
void | Manta::Grid4dScaledAdd (Grid4d< T > &me, const Grid4d< T > &other, const S &factor) |
void | Manta::Grid4dSafeDiv (Grid4d< T > &me, const Grid4d< T > &other) |
void | Manta::Grid4dSetConst (Grid4d< T > &me, T value) |
void | Manta::KnInterpolateGrid4dTempl (Grid4d< S > &target, Grid4d< S > &source, const Vec4 &sourceFactor, Vec4 offset) |
void | Manta::InitFmIn (const FlagGrid &flags, Grid< int > &fmFlags, Grid< Real > &phi, bool ignoreWalls, int obstacleType) |
void | Manta::InitFmOut (const FlagGrid &flags, Grid< int > &fmFlags, Grid< Real > &phi, bool ignoreWalls, int obstacleType) |
void | Manta::SetUninitialized (const Grid< int > &flags, Grid< int > &fmFlags, Grid< Real > &phi, const Real val, int ignoreWalls, int obstacleType) |
void | Manta::KnJoin (Grid< Real > &a, const Grid< Real > &b) |
void | Manta::KnSubtract (Grid< Real > &a, const Grid< Real > &b) |
vector< Vec3 > | Manta::KnAdvectMeshInGrid (vector< Node > &nodes, const FlagGrid &flags, const MACGrid &vel, const Real dt) |
void | Manta::ApplyMeshToGrid (Grid< T > *grid, Grid< Real > &sdf, T value, FlagGrid *respectFlags) |
void | Manta::knCopyA (std::vector< Real > &sizeRef, std::vector< Real > &A0, int stencilSize0, bool is3D, const Grid< Real > *pA0, const Grid< Real > *pAi, const Grid< Real > *pAj, const Grid< Real > *pAk) |
void | Manta::knActivateVertices (std::vector< GridMg::VertexType > &type_0, std::vector< Real > &A0, bool &nonZeroStencilSumFound, bool &trivialEquationsFound, const GridMg &mg) |
void | Manta::knSetRhs (std::vector< Real > &b, const Grid< Real > &rhs, const GridMg &mg) |
void | Manta::knSet (std::vector< T > &data, T value) |
void | Manta::knCopyToVector (std::vector< T > &dst, const Grid< T > &src) |
void | Manta::knCopyToGrid (const std::vector< T > &src, Grid< T > &dst) |
void | Manta::knAddAssign (std::vector< T > &dst, const std::vector< T > &src) |
void | Manta::knActivateCoarseVertices (std::vector< GridMg::VertexType > &type, int unused) |
void | Manta::knGenCoarseGridOperator (std::vector< Real > &sizeRef, std::vector< Real > &A, int l, const GridMg &mg) |
void | Manta::knSmoothColor (ThreadSize &numBlocks, std::vector< Real > &x, const Vec3i &blockSize, const std::vector< Vec3i > &colorOffs, int l, const GridMg &mg) |
void | Manta::knCalcResidual (std::vector< Real > &r, int l, const GridMg &mg) |
Real | Manta::knResidualNormSumSqr (const vector< Real > &r, int l, const GridMg &mg) |
void | Manta::knRestrict (std::vector< Real > &dst, const std::vector< Real > &src, int l_dst, const GridMg &mg) |
void | Manta::knInterpolate (std::vector< Real > &dst, const std::vector< Real > &src, int l_dst, const GridMg &mg) |
void | Manta::knSetPdataConst (ParticleDataImpl< T > &pdata, T value) |
void | Manta::knPdataSet (ParticleDataImpl< T > &me, const ParticleDataImpl< S > &other) |
void | Manta::knPdataAdd (ParticleDataImpl< T > &me, const ParticleDataImpl< S > &other) |
void | Manta::knPdataSub (ParticleDataImpl< T > &me, const ParticleDataImpl< S > &other) |
void | Manta::knPdataMult (ParticleDataImpl< T > &me, const ParticleDataImpl< S > &other) |
void | Manta::knPdataDiv (ParticleDataImpl< T > &me, const ParticleDataImpl< S > &other) |
void | Manta::knPdataSetScalar (ParticleDataImpl< T > &me, const S &other) |
void | Manta::knPdataAddScalar (ParticleDataImpl< T > &me, const S &other) |
void | Manta::knPdataMultScalar (ParticleDataImpl< T > &me, const S &other) |
void | Manta::knPdataScaledAdd (ParticleDataImpl< T > &me, const ParticleDataImpl< T > &other, const S &factor) |
void | Manta::knPdataSafeDiv (ParticleDataImpl< T > &me, const ParticleDataImpl< T > &other) |
void | Manta::knPdataSetConst (ParticleDataImpl< T > &pdata, T value) |
void | Manta::knPdataClamp (ParticleDataImpl< T > &me, T min, T max) |
void | Manta::knPdataClampMin (ParticleDataImpl< T > &me, const T vmin) |
void | Manta::knPdataClampMax (ParticleDataImpl< T > &me, const T vmax) |
void | Manta::knPdataClampMinVec3 (ParticleDataImpl< Vec3 > &me, const Real vmin) |
void | Manta::knPdataClampMaxVec3 (ParticleDataImpl< Vec3 > &me, const Real vmax) |
void | Manta::knPdataSetScalarIntFlag (ParticleDataImpl< T > &me, const S &other, const ParticleDataImpl< int > &t, const int itype) |
template<typename T > | |
T | Manta::KnPtsSum (const ParticleDataImpl< T > &val, const ParticleDataImpl< int > *t, const int itype) |
template<typename T > | |
Real | Manta::KnPtsSumSquare (const ParticleDataImpl< T > &val) |
template<typename T > | |
Real | Manta::KnPtsSumMagnitude (const ParticleDataImpl< T > &val) |
template<typename T > | |
Real | Manta::CompPdata_Min (const ParticleDataImpl< T > &val) |
template<typename T > | |
Real | Manta::CompPdata_Max (const ParticleDataImpl< T > &val) |
Real | Manta::CompPdata_MinVec3 (const ParticleDataImpl< Vec3 > &val) |
Real | Manta::CompPdata_MaxVec3 (const ParticleDataImpl< Vec3 > &val) |
template<class S > | |
std::vector< Vec3 > | Manta::GridAdvectKernel (std::vector< S > &p, const MACGrid &vel, const FlagGrid &flags, Real dt, bool deleteInObstacle, bool stopInObstacle, const ParticleDataImpl< int > *ptype, const int exclude) |
void | Manta::KnDeleteInObstacle (std::vector< S > &p, const FlagGrid &flags) |
void | Manta::KnClampPositions (std::vector< S > &p, const FlagGrid &flags, ParticleDataImpl< Vec3 > *posOld=NULL, bool stopInObstacle=true, const ParticleDataImpl< int > *ptype=NULL, const int exclude=0) |
void | Manta::KnProjectParticles (ParticleSystem< S > &part, Grid< Vec3 > &gradient) |
void | Manta::KnProjectOutOfBnd (ParticleSystem< S > &part, const FlagGrid &flags, const Real bnd, const bool *axis, const ParticleDataImpl< int > *ptype, const int exclude) |
void | Manta::SemiLagrange (FlagGrid &flags, MACGrid &vel, Grid< T > &dst, Grid< T > &src, Real dt, bool isLevelset, int orderSpace) |
void | Manta::SemiLagrangeMAC (FlagGrid &flags, MACGrid &vel, MACGrid &dst, MACGrid &src, Real dt, int orderSpace) |
void | Manta::MacCormackCorrect (FlagGrid &flags, Grid< T > &dst, Grid< T > &old, Grid< T > &fwd, Grid< T > &bwd, Real strength, bool isLevelSet, bool isMAC=false) |
void | Manta::MacCormackCorrectMAC (FlagGrid &flags, Grid< T > &dst, Grid< T > &old, Grid< T > &fwd, Grid< T > &bwd, Real strength, bool isLevelSet, bool isMAC=false) |
void | Manta::MacCormackClamp (FlagGrid &flags, MACGrid &vel, Grid< T > &dst, Grid< T > &orig, Grid< T > &fwd, Real dt, const int clampMode) |
Kernel: Clamp obtained value to min/max in source area, and reset values that point out of grid or into boundaries. More... | |
void | Manta::MacCormackClampMAC (FlagGrid &flags, MACGrid &vel, MACGrid &dst, MACGrid &orig, MACGrid &fwd, Real dt, const int clampMode) |
void | Manta::extrapolateVelConvectiveBC (FlagGrid &flags, MACGrid &vel, MACGrid &velDst, MACGrid &velPrev, Real timeStep, int bWidth) |
void | Manta::copyChangedVels (FlagGrid &flags, MACGrid &velDst, MACGrid &vel) |
void | Manta::knResetPhiInObs (FlagGrid &flags, Grid< Real > &sdf) |
void | Manta::KnAddForceField (FlagGrid &flags, MACGrid &vel, Grid< Vec3 > &force) |
void | Manta::KnAddForce (FlagGrid &flags, MACGrid &vel, Vec3 force) |
void | Manta::KnAddBuoyancy (FlagGrid &flags, Grid< Real > &factor, MACGrid &vel, Vec3 strength) |
void | Manta::KnSetInflow (MACGrid &vel, int dim, int p0, const Vec3 &val) |
void | Manta::KnSetWallBcs (FlagGrid &flags, MACGrid &vel) |
void | Manta::KnSetWallBcsFrac (FlagGrid &flags, MACGrid &vel, MACGrid &velTarget, Grid< Real > *phiObs, const int &boundaryWidth=0) |
void | Manta::KnSetObstacleVelocity (FlagGrid &flags, MACGrid &vel, Grid< Vec3 > &obsvel, int borderWidth) |
void | Manta::KnConfForce (Grid< Vec3 > &force, const Grid< Real > &grid, const Grid< Vec3 > &curl, Real str) |
void | Manta::KnProcessBurn (Grid< Real > &fuel, Grid< Real > &density, Grid< Real > &react, Grid< Real > *red, Grid< Real > *green, Grid< Real > *blue, Grid< Real > *heat, Real burningRate, Real flameSmoke, Real ignitionTemp, Real maxTemp, Real dt, Vec3 flameSmokeColor) |
void | Manta::KnUpdateFlame (Grid< Real > &react, Grid< Real > &flame) |
void | Manta::knClearFluidFlags (FlagGrid &flags, int dummy=0) |
void | Manta::knSetNbObstacle (FlagGrid &nflags, const FlagGrid &flags, const Grid< Real > &phiObs) |
void | Manta::ComputeUnionLevelsetPindex (const Grid< int > &index, const BasicParticleSystem &parts, const ParticleIndexSystem &indexSys, LevelsetGrid &phi, const Real radius, const ParticleDataImpl< int > *ptype, const int exclude) |
void | Manta::ComputeAveragedLevelsetWeight (const BasicParticleSystem &parts, const Grid< int > &index, const ParticleIndexSystem &indexSys, LevelsetGrid &phi, const Real radius, const ParticleDataImpl< int > *ptype, const int exclude) |
void | Manta::knSmoothGrid (Grid< T > &me, Grid< T > &tmp, Real factor) |
void | Manta::knSmoothGridNeg (Grid< T > &me, Grid< T > &tmp, Real factor) |
void | Manta::knPushOutofObs (BasicParticleSystem &parts, const FlagGrid &flags, const Grid< Real > &phiObs, const Real shift, const Real thresh, const ParticleDataImpl< int > *ptype, const int exclude) |
void | Manta::knSafeDivReal (Grid< T > &me, const Grid< Real > &other, Real cutoff=VECTOR_EPSILON) |
void | Manta::knMapLinearVec3ToMACGrid (const BasicParticleSystem &p, const FlagGrid &flags, MACGrid &vel, Grid< Vec3 > &tmp, const ParticleDataImpl< Vec3 > &pvel, const ParticleDataImpl< int > *ptype, const int exclude) |
void | Manta::knMapLinear (BasicParticleSystem &p, FlagGrid &flags, Grid< T > &target, Grid< Real > >mp, ParticleDataImpl< T > &psource) |
void | Manta::knMapFromGrid (BasicParticleSystem &p, Grid< T > &gsrc, ParticleDataImpl< T > &target) |
void | Manta::knMapLinearMACGridToVec3_PIC (BasicParticleSystem &p, FlagGrid &flags, MACGrid &vel, ParticleDataImpl< Vec3 > &pvel, const ParticleDataImpl< int > *ptype, const int exclude) |
void | Manta::knMapLinearMACGridToVec3_FLIP (const BasicParticleSystem &p, const FlagGrid &flags, const MACGrid &vel, const MACGrid &oldVel, ParticleDataImpl< Vec3 > &pvel, const Real flipRatio, const ParticleDataImpl< int > *ptype, const int exclude) |
void | Manta::knCombineVels (MACGrid &vel, Grid< Vec3 > &w, MACGrid &combineVel, LevelsetGrid *phi, Real narrowBand, Real thresh) |
void | Manta::apply1DKernelDirX (MACGrid &in, MACGrid &out, const Matrix &kernel) |
void | Manta::apply1DKernelDirY (MACGrid &in, MACGrid &out, const Matrix &kernel) |
void | Manta::apply1DKernelDirZ (MACGrid &in, MACGrid &out, const Matrix &kernel) |
void | Manta::KnApplyNoiseInfl (const FlagGrid &flags, Grid< Real > &density, WaveletNoiseField &noise, const Grid< Real > &sdf, Real scale, Real sigma) |
void | Manta::KnAddNoise (const FlagGrid &flags, Grid< Real > &density, WaveletNoiseField &noise, const Grid< Real > *sdf, Real scale) |
void | Manta::knSetPdataNoise (BasicParticleSystem &parts, ParticleDataImpl< T > &pdata, WaveletNoiseField &noise, Real scale) |
void | Manta::knSetPdataNoiseVec (BasicParticleSystem &parts, ParticleDataImpl< T > &pdata, WaveletNoiseField &noise, Real scale) |
void | Manta::KnApplyEmission (FlagGrid &flags, Grid< Real > &density, Grid< Real > &emission, bool isAbsolute) |
void | Manta::KnApplyDensity (FlagGrid &flags, Grid< Real > &density, Grid< Real > &sdf, Real value, Real sigma) |
void | Manta::KnUpdateFractions (const FlagGrid &flags, const Grid< Real > &phiObs, MACGrid &fractions, const int &boundaryWidth) |
void | Manta::KnUpdateFlagsObs (FlagGrid &flags, const MACGrid *fractions, const Grid< Real > &phiObs, const Grid< Real > *phiOut) |
void | Manta::kninitVortexVelocity (const Grid< Real > &phiObs, MACGrid &vel, const Vec3 ¢er, const Real &radius) |
void | Manta::KnTurbulenceClamp (Grid< Real > &kgrid, Grid< Real > &egrid, Real minK, Real maxK, Real minNu, Real maxNu) |
void | Manta::KnComputeProduction (const MACGrid &vel, const Grid< Vec3 > &velCenter, const Grid< Real > &ke, const Grid< Real > &eps, Grid< Real > &prod, Grid< Real > &nuT, Grid< Real > *strain, Real pscale=1.0f) |
void | Manta::KnAddTurbulenceSource (Grid< Real > &kgrid, Grid< Real > &egrid, const Grid< Real > &pgrid, Real dt) |
void | Manta::MakeRhs (FlagGrid &flags, Grid< Real > &rhs, MACGrid &vel, Grid< Real > *perCellCorr, MACGrid *fractions, const Grid< Real > *phi, const Grid< Real > *curv, const Real surfTens, const Real gfClamp) |
void | Manta::CorrectVelocity (FlagGrid &flags, MACGrid &vel, Grid< Real > &pressure) |
void | Manta::ApplyGhostFluidDiagonal (Grid< Real > &A0, const FlagGrid &flags, const Grid< Real > &phi, Real gfClamp) |
void | Manta::CorrectVelocityGhostFluid (MACGrid &vel, const FlagGrid &flags, const Grid< Real > &pressure, const Grid< Real > &phi, Real gfClamp, const Grid< Real > *curv, const Real surfTens) |
void | Manta::ReplaceClampedGhostFluidVels (MACGrid &vel, FlagGrid &flags, const Grid< Real > &pressure, const Grid< Real > &phi, Real gfClamp) |
int | Manta::CountEmptyCells (FlagGrid &flags) |
void | Manta::SurfaceTurbulence::advectSurfacePoints (BasicParticleSystemWrapper &surfacePoints, BasicParticleSystemWrapper &coarseParticles, ParticleDataImplVec3Wrapper &coarseParticlesPrevPos) |
void | Manta::SurfaceTurbulence::computeSurfaceNormals (BasicParticleSystemWrapper &surfacePoints, BasicParticleSystemWrapper &coarseParticles, ParticleDataImpl< Vec3 > &surfaceNormals) |
void | Manta::SurfaceTurbulence::computeAveragedNormals (BasicParticleSystemWrapper &surfacePoints, ParticleDataImpl< Vec3 > &surfaceNormals) |
void | Manta::SurfaceTurbulence::assignNormals (BasicParticleSystemWrapper &surfacePoints, ParticleDataImpl< Vec3 > &surfaceNormals) |
void | Manta::SurfaceTurbulence::computeSurfaceDensities (BasicParticleSystemWrapper &surfacePoints, void *dummy) |
void | Manta::SurfaceTurbulence::computeSurfaceDisplacements (BasicParticleSystemWrapper &surfacePoints, ParticleDataImpl< Vec3 > &surfaceNormals) |
void | Manta::SurfaceTurbulence::applySurfaceDisplacements (BasicParticleSystemWrapper &surfacePoints, void *dummy) |
void | Manta::SurfaceTurbulence::constrainSurface (BasicParticleSystemWrapper &surfacePoints, BasicParticleSystemWrapper &coarseParticles) |
void | Manta::SurfaceTurbulence::interpolateNewWaveData (BasicParticleSystemWrapper &surfacePoints, ParticleDataImpl< Real > &surfaceWaveH, ParticleDataImpl< Real > &surfaceWaveDtH, ParticleDataImpl< Real > &surfaceWaveSeed, ParticleDataImpl< Real > &surfaceWaveSeedAmplitude) |
void | Manta::SurfaceTurbulence::addSeed (BasicParticleSystemWrapper &surfacePoints, ParticleDataImpl< Real > &surfaceWaveH, ParticleDataImpl< Real > &surfaceWaveSeed) |
void | Manta::SurfaceTurbulence::computeSurfaceWaveNormal (BasicParticleSystemWrapper &surfacePoints, ParticleDataImpl< Vec3 > &surfaceNormals, ParticleDataImpl< Real > &surfaceWaveH) |
void | Manta::SurfaceTurbulence::computeSurfaceWaveLaplacians (BasicParticleSystemWrapper &surfacePoints, ParticleDataImpl< Vec3 > &surfaceNormals, ParticleDataImpl< Real > &surfaceWaveH) |
void | Manta::SurfaceTurbulence::evolveWave (BasicParticleSystemWrapper &surfacePoints, ParticleDataImpl< Real > &surfaceWaveH, ParticleDataImpl< Real > &surfaceWaveDtH, ParticleDataImpl< Real > &surfaceWaveSeed) |
void | Manta::SurfaceTurbulence::computeSurfaceCurvature (BasicParticleSystemWrapper &surfacePoints, ParticleDataImpl< Vec3 > &surfaceNormals) |
void | Manta::SurfaceTurbulence::smoothCurvature (BasicParticleSystemWrapper &surfacePoints, ParticleDataImpl< Real > &surfaceWaveSource) |
void | Manta::SurfaceTurbulence::seedWaves (BasicParticleSystemWrapper &surfacePoints, ParticleDataImpl< Real > &surfaceWaveSeed, ParticleDataImpl< Real > &surfaceWaveSeedAmplitude, ParticleDataImpl< Real > &surfaceWaveSource) |
void | Manta::knSimpleNumpyTest (Grid< Real > &grid, PyArrayContainer npAr, Real scale) |
void | Manta::knExtractFeatureVel (const BasicParticleSystem &p, Real *fv, const IndexInt N_row, const IndexInt off_begin, const MACGrid &vel, const Real scale, const ParticleDataImpl< int > *ptype, const int exclude, const int window) |
extract feature vectors More... | |
void | Manta::knExtractFeaturePhi (const BasicParticleSystem &p, Real *fv, const IndexInt N_row, const IndexInt off_begin, const Grid< Real > &phi, const Real scale, const ParticleDataImpl< int > *ptype, const int exclude, const int window) |
void | Manta::knExtractFeatureGeo (const BasicParticleSystem &p, Real *fv, const IndexInt N_row, const IndexInt off_begin, const FlagGrid &geo, const Real scale, const ParticleDataImpl< int > *ptype, const int exclude, const int window) |
void | Manta::knMarkIsolatedFluidCell (FlagGrid &flags, const int mark) |
void | Manta::knMarkSmallRegions (FlagGrid &flags, const Grid< int > &rcnt, const int mark, const int exclude, const int th) |
void | Manta::KnAddForcePvel (ParticleDataImpl< Vec3 > &v, const Vec3 &da, const ParticleDataImpl< int > *ptype, const int exclude) |
void | Manta::KnUpdateVelocityFromDeltaPos (const BasicParticleSystem &p, ParticleDataImpl< Vec3 > &v, const ParticleDataImpl< Vec3 > &x_prev, const Real over_dt, const ParticleDataImpl< int > *ptype, const int exclude) |
void | Manta::KnStepEuler (BasicParticleSystem &p, const ParticleDataImpl< Vec3 > &v, const Real dt, const ParticleDataImpl< int > *ptype, const int exclude) |
void | Manta::KnSetType (ParticleDataImpl< int > &ptype, BasicParticleSystem &part, const int mark, const int stype, const FlagGrid &flags, const int cflag) |
void | Manta::KnAcceleration (MACGrid &a, const MACGrid &v1, const MACGrid &v0, const Real idt) |
void | Manta::KnInterpolateMACGrid (MACGrid &target, MACGrid &source, const Vec3 &sourceFactor, const Vec3 &off, int orderSpace) |
void | Manta::knApplySimpleNoiseVec3 (FlagGrid &flags, Grid< Vec3 > &target, WaveletNoiseField &noise, Real scale, Grid< Real > *weight) |
void | Manta::knApplySimpleNoiseReal (FlagGrid &flags, Grid< Real > &target, WaveletNoiseField &noise, Real scale, Grid< Real > *weight) |
void | Manta::knApplyNoiseVec3 (FlagGrid &flags, Grid< Vec3 > &target, WaveletNoiseField &noise, Real scale, Real scaleSpatial, Grid< Real > *weight, Grid< Vec3 > *uv, bool uvInterpol, const Vec3 &sourceFactor) |
void | Manta::KnApplyComputeEnergy (FlagGrid &flags, MACGrid &vel, Grid< Real > &energy) |
void | Manta::KnComputeStrainRateMag (const MACGrid &vel, const Grid< Vec3 > &velCenter, Grid< Real > &prod) |
void | Manta::knCalcSecDeriv2d (const Grid< Real > &v, Grid< Real > &ret) |
double | Manta::knTotalSum (Grid< Real > &h) |
void | Manta::MakeRhsWE (FlagGrid &flags, Grid< Real > &rhs, Grid< Real > &ut, Grid< Real > &utm1, Real s, bool crankNic=false) |
void | Manta::ApplyShapeToGrid (Grid< T > *grid, Shape *shape, T value, FlagGrid *respectFlags) |
void | Manta::ApplyShapeToGridSmooth (Grid< T > *grid, Grid< Real > &phi, Real sigma, Real shift, T value, FlagGrid *respectFlags) |
void | Manta::ApplyShapeToMACGrid (MACGrid *grid, Shape *shape, Vec3 value, FlagGrid *respectFlags) |
void | Manta::BoxSDF (Grid< Real > &phi, const Vec3 &p1, const Vec3 &p2) |
void | Manta::SphereSDF (Grid< Real > &phi, Vec3 center, Real radius, Vec3 scale) |
void | Manta::CylinderSDF (Grid< Real > &phi, Vec3 center, Real radius, Vec3 zaxis, Real maxz) |
void | Manta::SlopeSDF (const Vec3 &n, Grid< Real > &phiObs, const Real &fac, const Real &origin) |
double | Manta::reductionTest (const Grid< Real > &v) |
double | Manta::minReduction (const Grid< Real > &v) |
void | Manta::KnSynthesizeTurbulence (TurbulenceParticleSystem &p, FlagGrid &flags, WaveletNoiseField &noise, Grid< Real > &kGrid, Real alpha, Real dt, int octaves, Real scale, Real invL0, Real kmin) |
vector< Vec3 > | Manta::KnVpAdvectMesh (vector< Node > &nodes, const vector< VortexParticleData > &vp, Real scale) |
vector< Vec3 > | Manta::KnVpAdvectSelf (vector< VortexParticleData > &vp, Real scale) |
convolves in with 1D kernel (centred at the kernel's midpoint) in the x-direction (out must be a grid of zeros)
convolves in with 1D kernel (centred at the kernel's midpoint) in the y-direction (out must be a grid of zeros)
convolves in with 1D kernel (centred at the kernel's midpoint) in the z-direction (out must be a grid of zeros)
void Manta::ApplyGhostFluidDiagonal | ( | Grid< Real > & | A0, |
const FlagGrid & | flags, | ||
const Grid< Real > & | phi, | ||
Real | gfClamp | ||
) |
Kernel: Adapt A0 for ghost fluid
void Manta::ApplyMatrix | ( | FlagGrid & | flags, |
Grid< Real > & | dst, | ||
Grid< Real > & | src, | ||
Grid< Real > & | A0, | ||
Grid< Real > & | Ai, | ||
Grid< Real > & | Aj, | ||
Grid< Real > & | Ak | ||
) |
Kernel: Apply symmetric stored Matrix
void Manta::ApplyMatrix2D | ( | FlagGrid & | flags, |
Grid< Real > & | dst, | ||
Grid< Real > & | src, | ||
Grid< Real > & | A0, | ||
Grid< Real > & | Ai, | ||
Grid< Real > & | Aj, | ||
Grid< Real > & | Ak | ||
) |
Kernel: Apply symmetric stored Matrix. 2D version
void Manta::ApplyMeshToGrid | ( | Grid< T > * | grid, |
Grid< Real > & | sdf, | ||
T | value, | ||
FlagGrid * | respectFlags | ||
) |
Kernel: Apply a shape to a grid, setting value inside
Kernel: Apply a shape to a grid, setting value inside
void Manta::ApplyShapeToGridSmooth | ( | Grid< T > * | grid, |
Grid< Real > & | phi, | ||
Real | sigma, | ||
Real | shift, | ||
T | value, | ||
FlagGrid * | respectFlags | ||
) |
Kernel: Apply a shape to a grid, setting value inside (scaling by SDF value)
void Manta::ApplyShapeToMACGrid | ( | MACGrid * | grid, |
Shape * | shape, | ||
Vec3 | value, | ||
FlagGrid * | respectFlags | ||
) |
Kernel: Apply a shape to a MAC grid, setting value inside
Kernel: Analytic SDF for box shape
int Manta::CompMaxInt | ( | Grid< int > & | val | ) |
Kernel: Compute max value of int grid
Real Manta::CompMaxReal | ( | Grid< Real > & | val | ) |
Kernel: Compute max value of Real grid
int Manta::CompMinInt | ( | Grid< int > & | val | ) |
Kernel: Compute min value of int grid
Real Manta::CompMinReal | ( | Grid< Real > & | val | ) |
Kernel: Compute min value of Real grid
copy extrapolated velocity components
Kernel: make velocity divergence free by subtracting pressure gradient
void Manta::CorrectVelocityGhostFluid | ( | MACGrid & | vel, |
const FlagGrid & | flags, | ||
const Grid< Real > & | pressure, | ||
const Grid< Real > & | phi, | ||
Real | gfClamp, | ||
const Grid< Real > * | curv, | ||
const Real | surfTens | ||
) |
Kernel: Apply velocity update: ghost fluid contribution
int Manta::CountEmptyCells | ( | FlagGrid & | flags | ) |
Kernel: Compute min value of Real grid
Kernel: rotation operator x v for centered vector fields
Kernel: divergence operator (from MAC grid)
void Manta::extrapolateVelConvectiveBC | ( | FlagGrid & | flags, |
MACGrid & | vel, | ||
MACGrid & | velDst, | ||
MACGrid & | velPrev, | ||
Real | timeStep, | ||
int | bWidth | ||
) |
extrapolate normal velocity components into outflow cell
Fill in the domain boundary cells (i,j,k=0/size-1) from the neighboring cells
Kernel: compute centered velocity field from MAC
Kernel: get component (not shifted)
Kernel: compute MAC from centered velocity field
Kernel: get component at MAC positions
Kernel: centered gradient operator
Kernel: gradient operator for MAC grid
Kernel: Compute the dot product between two Real grids.
Uses double precision internally
Kernel: get norm of centered grid
double Manta::GridSumSqr | ( | Grid< Real > & | grid | ) |
Kernel: Squared sum over grid
double Manta::InitSigma | ( | FlagGrid & | flags, |
Grid< Real > & | dst, | ||
Grid< Real > & | rhs, | ||
Grid< Real > & | temp | ||
) |
Kernel: compute residual (init) and add to sigma
Kernel: Invert real values, if positive and fluid
Real Manta::kn4dMaxVec | ( | Grid4d< VEC > & | val | ) |
Kernel: Compute max norm of vec Grid4d
Real Manta::kn4dMinVec | ( | Grid4d< VEC > & | val | ) |
Kernel: Compute min norm of vec Grid4d
kernel to add Buoyancy force
add constant force between fl/fl and fl/em cells
add Forces between fl/fl and fl/em cells (interpolate cell centered forces to MAC grid)
void Manta::KnAddNoise | ( | const FlagGrid & | flags, |
Grid< Real > & | density, | ||
WaveletNoiseField & | noise, | ||
const Grid< Real > * | sdf, | ||
Real | scale | ||
) |
Apply noise to real grid based on an SDF
void Manta::KnAddTurbulenceSource | ( | Grid< Real > & | kgrid, |
Grid< Real > & | egrid, | ||
const Grid< Real > & | pgrid, | ||
Real | dt | ||
) |
Integrate source terms of k-epsilon equation
Compute energy of a staggered velocity field (at cell center)
void Manta::KnApplyNoiseInfl | ( | const FlagGrid & | flags, |
Grid< Real > & | density, | ||
WaveletNoiseField & | noise, | ||
const Grid< Real > & | sdf, | ||
Real | scale, | ||
Real | sigma | ||
) |
Apply noise to grid
void Manta::knApplyNoiseVec3 | ( | FlagGrid & | flags, |
Grid< Vec3 > & | target, | ||
WaveletNoiseField & | noise, | ||
Real | scale, | ||
Real | scaleSpatial, | ||
Grid< Real > * | weight, | ||
Grid< Vec3 > * | uv, | ||
bool | uvInterpol, | ||
const Vec3 & | sourceFactor | ||
) |
Apply vector-based wavelet noise to target grid This is the version with more functionality - supports uv grids, and on-the-fly interpolation of input grids.
void Manta::knApplySimpleNoiseReal | ( | FlagGrid & | flags, |
Grid< Real > & | target, | ||
WaveletNoiseField & | noise, | ||
Real | scale, | ||
Grid< Real > * | weight | ||
) |
Simple noise for a real grid , follows applySimpleNoiseVec3
void Manta::knApplySimpleNoiseVec3 | ( | FlagGrid & | flags, |
Grid< Vec3 > & | target, | ||
WaveletNoiseField & | noise, | ||
Real | scale, | ||
Grid< Real > * | weight | ||
) |
Apply vector noise to grid, this is a simplified version - no position scaling or UVs
void Manta::knClearFluidFlags | ( | FlagGrid & | flags, |
int | dummy = 0 |
||
) |
mark fluid cells and helpers
void Manta::KnComputeProduction | ( | const MACGrid & | vel, |
const Grid< Vec3 > & | velCenter, | ||
const Grid< Real > & | ke, | ||
const Grid< Real > & | eps, | ||
Grid< Real > & | prod, | ||
Grid< Real > & | nuT, | ||
Grid< Real > * | strain, | ||
Real | pscale = 1.0f |
||
) |
Compute k-epsilon production term P = 2*nu_T*sum_ij(Sij^2) and the turbulent viscosity nu_T=C_mu*k^2/eps
void Manta::KnConfForce | ( | Grid< Vec3 > & | force, |
const Grid< Real > & | grid, | ||
const Grid< Vec3 > & | curl, | ||
Real | str | ||
) |
Kernel: gradient norm operator
void Manta::knExtractFeatureVel | ( | const BasicParticleSystem & | p, |
Real * | fv, | ||
const IndexInt | N_row, | ||
const IndexInt | off_begin, | ||
const MACGrid & | vel, | ||
const Real | scale, | ||
const ParticleDataImpl< int > * | ptype, | ||
const int | exclude, | ||
const int | window | ||
) |
extract feature vectors
copy velocity into domain side, note - don't read & write same grid, hence velTmp copy
transfer data between real and vec3 grids
helper kernels for getGridAvg
void Manta::kninitVortexVelocity | ( | const Grid< Real > & | phiObs, |
MACGrid & | vel, | ||
const Vec3 & | center, | ||
const Real & | radius | ||
) |
small helper for test case test_1040_secOrderBnd.py
void Manta::knInterpol4d | ( | Grid4d< S > & | target, |
Grid4d< S > & | source, | ||
const Vec4 & | srcFac, | ||
const Vec4 & | offset | ||
) |
interpolate 4d grid from one size to another size
void Manta::KnInterpolateMACGrid | ( | MACGrid & | target, |
MACGrid & | source, | ||
const Vec3 & | sourceFactor, | ||
const Vec3 & | off, | ||
int | orderSpace | ||
) |
interpolate a mac velocity grid from one size to another size
prevent parts of the surface getting "stuck" in obstacle regions
kernel to set velocity components of mac grid to value for a boundary of w cells
only set normal velocity components of mac grid to value for a boundary of w cells
enforce a constant inflow/outflow at the grid boundaries
void Manta::KnSetObstacleVelocity | ( | FlagGrid & | flags, |
MACGrid & | vel, | ||
Grid< Vec3 > & | obsvel, | ||
int | borderWidth | ||
) |
add obstacle velocity between obs/obs, obs/fl and/or obs,em cells. expects centered obsvels, sets staggered vels
void Manta::knSetPdataNoise | ( | BasicParticleSystem & | parts, |
ParticleDataImpl< T > & | pdata, | ||
WaveletNoiseField & | noise, | ||
Real | scale | ||
) |
sample noise field and set pdata with its values (for convenience, scale the noise values)
set no-stick wall boundary condition between ob/fl and ob/ob cells
void Manta::KnSetWallBcsFrac | ( | FlagGrid & | flags, |
MACGrid & | vel, | ||
MACGrid & | velTarget, | ||
Grid< Real > * | phiObs, | ||
const int & | boundaryWidth = 0 |
||
) |
set wall BCs for fill fraction mode, note - only needs obstacle SDF
void Manta::knSimpleNumpyTest | ( | Grid< Real > & | grid, |
PyArrayContainer | npAr, | ||
Real | scale | ||
) |
simple test kernel and kernel with numpy array
void Manta::KnStepEuler | ( | BasicParticleSystem & | p, |
const ParticleDataImpl< Vec3 > & | v, | ||
const Real | dt, | ||
const ParticleDataImpl< int > * | ptype, | ||
const int | exclude | ||
) |
simple foward Euler integration for particle system
subtract b, note does not preserve SDF!
void Manta::KnTurbulenceClamp | ( | Grid< Real > & | kgrid, |
Grid< Real > & | egrid, | ||
Real | minK, | ||
Real | maxK, | ||
Real | minNu, | ||
Real | maxNu | ||
) |
clamp k and epsilon to limits
Kernel: Laplace operator
void Manta::MacCormackClamp | ( | FlagGrid & | flags, |
MACGrid & | vel, | ||
Grid< T > & | dst, | ||
Grid< T > & | orig, | ||
Grid< T > & | fwd, | ||
Real | dt, | ||
const int | clampMode | ||
) |
Kernel: Clamp obtained value to min/max in source area, and reset values that point out of grid or into boundaries.
void Manta::MacCormackClampMAC | ( | FlagGrid & | flags, |
MACGrid & | vel, | ||
MACGrid & | dst, | ||
MACGrid & | orig, | ||
MACGrid & | fwd, | ||
Real | dt, | ||
const int | clampMode | ||
) |
Kernel: same as MacCormackClamp above, but specialized version for MAC grids
void Manta::MacCormackCorrect | ( | FlagGrid & | flags, |
Grid< T > & | dst, | ||
Grid< T > & | old, | ||
Grid< T > & | fwd, | ||
Grid< T > & | bwd, | ||
Real | strength, | ||
bool | isLevelSet, | ||
bool | isMAC = false |
||
) |
Kernel: Correct based on forward and backward SL steps (for both centered & mac grids)
void Manta::MacCormackCorrectMAC | ( | FlagGrid & | flags, |
Grid< T > & | dst, | ||
Grid< T > & | old, | ||
Grid< T > & | fwd, | ||
Grid< T > & | bwd, | ||
Real | strength, | ||
bool | isLevelSet, | ||
bool | isMAC = false |
||
) |
Kernel: Correct based on forward and backward SL steps (for both centered & mac grids)
void Manta::MakeLaplaceMatrix | ( | FlagGrid & | flags, |
Grid< Real > & | A0, | ||
Grid< Real > & | Ai, | ||
Grid< Real > & | Aj, | ||
Grid< Real > & | Ak, | ||
MACGrid * | fractions = 0 |
||
) |
Kernel: Construct the matrix for the poisson equation
void Manta::MakeRhs | ( | FlagGrid & | flags, |
Grid< Real > & | rhs, | ||
MACGrid & | vel, | ||
Grid< Real > * | perCellCorr, | ||
MACGrid * | fractions, | ||
const Grid< Real > * | phi, | ||
const Grid< Real > * | curv, | ||
const Real | surfTens, | ||
const Real | gfClamp | ||
) |
Kernel: Construct the right-hand side of the poisson equation
void Manta::MakeRhsWE | ( | FlagGrid & | flags, |
Grid< Real > & | rhs, | ||
Grid< Real > & | ut, | ||
Grid< Real > & | utm1, | ||
Real | s, | ||
bool | crankNic = false |
||
) |
Kernel: Construct the right-hand side of the poisson equation
void Manta::SemiLagrange | ( | FlagGrid & | flags, |
MACGrid & | vel, | ||
Grid< T > & | dst, | ||
Grid< T > & | src, | ||
Real | dt, | ||
bool | isLevelset, | ||
int | orderSpace | ||
) |
Semi-Lagrange interpolation kernel
void Manta::SemiLagrangeMAC | ( | FlagGrid & | flags, |
MACGrid & | vel, | ||
MACGrid & | dst, | ||
MACGrid & | src, | ||
Real | dt, | ||
int | orderSpace | ||
) |
Semi-Lagrange interpolation kernel for MAC grids
Kernel: set component (not shifted)
void Manta::SetLevelsetBoundaries | ( | Grid< Real > & | phi | ) |
Enforce delta_phi = 0 on boundaries