mantaflow
0.10
A framework for fluid simulation
|
Functions | |
PYTHON void | Manta::cgSolveDiffusion (FlagGrid &flags, GridBase &grid, Real alpha=0.25, Real cgMaxIterFac=1.0, Real cgAccuracy=1e-4) |
do a CG solve for diffusion; note: diffusion coefficient alpha given in grid space, More... | |
PYTHON void | Manta::extrapolateMACSimple (FlagGrid &flags, MACGrid &vel, int distance=4, LevelsetGrid *phiObs=NULL, bool intoObs=false) |
PYTHON void | Manta::extrapolateMACFromWeight (MACGrid &vel, Grid< Vec3 > &weight, int distance=2) |
PYTHON void | Manta::extrapolateLsSimple (Grid< Real > &phi, int distance=4, bool inside=false) |
PYTHON void | Manta::extrapolateVec3Simple (Grid< Vec3 > &vel, Grid< Real > &phi, int distance=4, bool inside=false) |
PYTHON Vec3 | Manta::getUniFileSize (const string &name) |
PYTHON void | Manta::printUniFileInfoString (const string &name) |
PYTHON void | Manta::quantizeGrid (Grid< Real > &grid, Real step) |
PYTHON void | Manta::quantizeGridVec3 (Grid< Vec3 > &grid, Real step) |
PYTHON void | Manta::mantaMsg (const std::string &out, int level=1) |
PYTHON std::string | Manta::printBuildInfo () |
PYTHON void | Manta::setDebugLevel (int level=1) |
PYTHON void | Manta::assertNumpy () |
PYTHON Real | Manta::gridMaxDiff (Grid< Real > &g1, Grid< Real > &g2) |
PYTHON Real | Manta::gridMaxDiffInt (Grid< int > &g1, Grid< int > &g2) |
PYTHON Real | Manta::gridMaxDiffVec3 (Grid< Vec3 > &g1, Grid< Vec3 > &g2) |
PYTHON void | Manta::copyMacToVec3 (MACGrid &source, Grid< Vec3 > &target) |
PYTHON void | Manta::convertMacToVec3 (MACGrid &source, Grid< Vec3 > &target) |
PYTHON void | Manta::resampleVec3ToMac (Grid< Vec3 > &source, MACGrid &target) |
PYTHON void | Manta::resampleMacToVec3 (MACGrid &source, Grid< Vec3 > &target) |
PYTHON void | Manta::copyLevelsetToReal (LevelsetGrid &source, Grid< Real > &target) |
PYTHON void | Manta::copyVec3ToReal (Grid< Vec3 > &source, Grid< Real > &targetX, Grid< Real > &targetY, Grid< Real > &targetZ) |
PYTHON void | Manta::copyRealToVec3 (Grid< Real > &sourceX, Grid< Real > &sourceY, Grid< Real > &sourceZ, Grid< Vec3 > &target) |
PYTHON void | Manta::convertLevelsetToReal (LevelsetGrid &source, Grid< Real > &target) |
PYTHON void | Manta::swapComponents (Grid< Vec3 > &vel, int c1=0, int c2=1, int c3=2) |
PYTHON Real | Manta::getUvWeight (Grid< Vec3 > &uv) |
PYTHON void | Manta::resetUvGrid (Grid< Vec3 > &target) |
PYTHON void | Manta::updateUvWeight (Real resetTime, int index, int numUvs, Grid< Vec3 > &uv) |
PYTHON Real | Manta::getGridAvg (Grid< Real > &source, FlagGrid *flags=NULL) |
PYTHON void | Manta::getComponent (const Grid< Vec3 > &source, Grid< Real > &target, int component) |
PYTHON void | Manta::setComponent (const Grid< Real > &source, Grid< Vec3 > &target, int component) |
PYTHON void | Manta::getComp4d (const Grid4d< Vec4 > &src, Grid4d< Real > &dst, int c) |
PYTHON void | Manta::setComp4d (const Grid4d< Real > &src, Grid4d< Vec4 > &dst, int c) |
PYTHON Real | Manta::grid4dMaxDiff (Grid4d< Real > &g1, Grid4d< Real > &g2) |
PYTHON Real | Manta::grid4dMaxDiffInt (Grid4d< int > &g1, Grid4d< int > &g2) |
PYTHON Real | Manta::grid4dMaxDiffVec3 (Grid4d< Vec3 > &g1, Grid4d< Vec3 > &g2) |
PYTHON Real | Manta::grid4dMaxDiffVec4 (Grid4d< Vec4 > &g1, Grid4d< Vec4 > &g2) |
PYTHON void | Manta::setRegion4d (Grid4d< Real > &dst, Vec4 start, Vec4 end, Real value) |
PYTHON void | Manta::setRegion4dVec4 (Grid4d< Vec4 > &dst, Vec4 start, Vec4 end, Vec4 value) |
PYTHON void | Manta::getSliceFrom4d (Grid4d< Real > &src, int srct, Grid< Real > &dst) |
PYTHON void | Manta::getSliceFrom4dVec (Grid4d< Vec4 > &src, int srct, Grid< Vec3 > &dst, Grid< Real > *dstt=NULL) |
PYTHON void | Manta::interpolateGrid4d (Grid4d< Real > &target, Grid4d< Real > &source, Vec4 offset=Vec4(0.), Vec4 scale=Vec4(1.), Vec4 size=Vec4(-1.)) |
PYTHON void | Manta::interpolateGrid4dVec (Grid4d< Vec4 > &target, Grid4d< Vec4 > &source, Vec4 offset=Vec4(0.), Vec4 scale=Vec4(1.), Vec4 size=Vec4(-1.)) |
PYTHON void | Manta::resetPhiInObs (FlagGrid &flags, Grid< Real > &sdf) |
PYTHON void | Manta::advectSemiLagrange (FlagGrid *flags, MACGrid *vel, GridBase *grid, int order=1, Real strength=1.0, int orderSpace=1, bool openBounds=false, int boundaryWidth=1, int clampMode=1) |
PYTHON void | Manta::addGravity (FlagGrid &flags, MACGrid &vel, Vec3 gravity) |
PYTHON void | Manta::addGravityNoScale (FlagGrid &flags, MACGrid &vel, const Vec3 &gravity) |
PYTHON void | Manta::addBuoyancy (FlagGrid &flags, Grid< Real > &density, MACGrid &vel, Vec3 gravity, Real coefficient=1.) |
PYTHON void | Manta::setOpenBound (FlagGrid &flags, int bWidth, string openBound="", int type=FlagGrid::TypeOutflow|FlagGrid::TypeEmpty) |
PYTHON void | Manta::resetOutflow (FlagGrid &flags, Grid< Real > *phi=0, BasicParticleSystem *parts=0, Grid< Real > *real=0, Grid< int > *index=0, ParticleIndexSystem *indexSys=0) |
PYTHON void | Manta::setInflowBcs (MACGrid &vel, string dir, Vec3 value) |
PYTHON void | Manta::setWallBcs (FlagGrid &flags, MACGrid &vel, MACGrid *fractions=0, Grid< Real > *phiObs=0, int boundaryWidth=0) |
set zero normal velocity boundary condition on walls More... | |
PYTHON void | Manta::setObstacleVelocity (FlagGrid &flags, MACGrid &vel, Grid< Vec3 > &obsvel, int borderWidth=0) |
PYTHON void | Manta::vorticityConfinement (MACGrid &vel, FlagGrid &flags, Real strength) |
PYTHON void | Manta::addForceField (FlagGrid &flags, MACGrid &vel, Grid< Vec3 > &force) |
PYTHON void | Manta::processBurn (Grid< Real > &fuel, Grid< Real > &density, Grid< Real > &react, Grid< Real > *red=NULL, Grid< Real > *green=NULL, Grid< Real > *blue=NULL, Grid< Real > *heat=NULL, Real burningRate=0.75f, Real flameSmoke=1.0f, Real ignitionTemp=1.25f, Real maxTemp=1.75f, Real dt=0.1f, Vec3 flameSmokeColor=Vec3(0.7f, 0.7f, 0.7f)) |
PYTHON void | Manta::updateFlame (Grid< Real > &react, Grid< Real > &flame) |
PYTHON void | Manta::sampleFlagsWithParticles (const FlagGrid &flags, BasicParticleSystem &parts, const int discretization, const Real randomness) |
PYTHON void | Manta::sampleLevelsetWithParticles (const LevelsetGrid &phi, const FlagGrid &flags, BasicParticleSystem &parts, const int discretization, const Real randomness, const bool reset=false, const bool refillEmpty=false) |
PYTHON void | Manta::sampleShapeWithParticles (const Shape &shape, const FlagGrid &flags, BasicParticleSystem &parts, const int discretization, const Real randomness, const bool reset=false, const bool refillEmpty=false, const LevelsetGrid *exclude=NULL) |
PYTHON void | Manta::markFluidCells (const BasicParticleSystem &parts, FlagGrid &flags, const Grid< Real > *phiObs=NULL, const ParticleDataImpl< int > *ptype=NULL, const int exclude=0) |
PYTHON void | Manta::testInitGridWithPos (Grid< Real > &grid) |
PYTHON void | Manta::adjustNumber (BasicParticleSystem &parts, MACGrid &vel, FlagGrid &flags, int minParticles, int maxParticles, LevelsetGrid &phi, Real radiusFactor=1., Real narrowBand=-1., Grid< Real > *exclude=NULL) |
re-sample particles based on an input levelset More... | |
PYTHON void | Manta::debugIntToReal (Grid< int > &source, Grid< Real > &dest, Real factor=1.) |
PYTHON void | Manta::gridParticleIndex (BasicParticleSystem &parts, ParticleIndexSystem &indexSys, FlagGrid &flags, Grid< int > &index, Grid< int > *counter=NULL) |
PYTHON void | Manta::unionParticleLevelset (const BasicParticleSystem &parts, const ParticleIndexSystem &indexSys, const FlagGrid &flags, const Grid< int > &index, LevelsetGrid &phi, const Real radiusFactor=1., const ParticleDataImpl< int > *ptype=NULL, const int exclude=0) |
PYTHON void | Manta::averagedParticleLevelset (const BasicParticleSystem &parts, const ParticleIndexSystem &indexSys, const FlagGrid &flags, const Grid< int > &index, LevelsetGrid &phi, const Real radiusFactor=1., const int smoothen=1, const int smoothenNeg=1, const ParticleDataImpl< int > *ptype=NULL, const int exclude=0) |
PYTHON void | Manta::pushOutofObs (BasicParticleSystem &parts, const FlagGrid &flags, const Grid< Real > &phiObs, const Real shift=0, const Real thresh=0, const ParticleDataImpl< int > *ptype=NULL, const int exclude=0) |
PYTHON void | Manta::mapPartsToMAC (const FlagGrid &flags, MACGrid &vel, MACGrid &velOld, const BasicParticleSystem &parts, const ParticleDataImpl< Vec3 > &partVel, Grid< Vec3 > *weight=NULL, const ParticleDataImpl< int > *ptype=NULL, const int exclude=0) |
PYTHON void | Manta::mapPartsToGrid (FlagGrid &flags, Grid< Real > &target, BasicParticleSystem &parts, ParticleDataImpl< Real > &source) |
PYTHON void | Manta::mapPartsToGridVec3 (FlagGrid &flags, Grid< Vec3 > &target, BasicParticleSystem &parts, ParticleDataImpl< Vec3 > &source) |
PYTHON void | Manta::mapGridToParts (Grid< Real > &source, BasicParticleSystem &parts, ParticleDataImpl< Real > &target) |
PYTHON void | Manta::mapGridToPartsVec3 (Grid< Vec3 > &source, BasicParticleSystem &parts, ParticleDataImpl< Vec3 > &target) |
PYTHON void | Manta::mapMACToParts (FlagGrid &flags, MACGrid &vel, BasicParticleSystem &parts, ParticleDataImpl< Vec3 > &partVel, const ParticleDataImpl< int > *ptype=NULL, const int exclude=0) |
PYTHON void | Manta::flipVelocityUpdate (const FlagGrid &flags, const MACGrid &vel, const MACGrid &velOld, const BasicParticleSystem &parts, ParticleDataImpl< Vec3 > &partVel, const Real flipRatio, const ParticleDataImpl< int > *ptype=NULL, const int exclude=0) |
PYTHON void | Manta::combineGridVel (MACGrid &vel, Grid< Vec3 > &weight, MACGrid &combineVel, LevelsetGrid *phi=NULL, Real narrowBand=0.0, Real thresh=0.0) |
PYTHON void | Manta::getLaplacian (Grid< Real > &laplacian, const Grid< Real > &grid) |
PYTHON void | Manta::getSpiralVelocity2D (const FlagGrid &flags, MACGrid &vel, Real strength=1.0) |
PYTHON void | Manta::setGradientYWeight (Grid< Real > &W, const int minY, const int maxY, const Real valAtMin, const Real valAtMax) |
PYTHON void | Manta::PD_fluid_guiding (MACGrid &vel, MACGrid &velT, Grid< Real > &pressure, FlagGrid &flags, Grid< Real > &weight, int blurRadius=5, Real theta=1.0, Real tau=1.0, Real sigma=1.0, Real epsRel=1e-3, Real epsAbs=1e-3, int maxIters=200, Grid< Real > *phi=0, Grid< Real > *perCellCorr=0, MACGrid *fractions=0, Real gfClamp=1e-04, Real cgMaxIterFac=1.5, Real cgAccuracy=1e-3, int preconditioner=1, bool zeroPressureFixing=false) |
PYTHON void | Manta::densityInflow (const FlagGrid &flags, Grid< Real > &density, WaveletNoiseField &noise, Shape *shape, Real scale=1.0, Real sigma=0) |
PYTHON void | Manta::addNoise (const FlagGrid &flags, Grid< Real > &density, WaveletNoiseField &noise, const Grid< Real > *sdf=NULL, Real scale=1.0) |
PYTHON void | Manta::setNoisePdata (BasicParticleSystem &parts, ParticleDataImpl< Real > &pd, WaveletNoiseField &noise, Real scale=1.) |
PYTHON void | Manta::setNoisePdataVec3 (BasicParticleSystem &parts, ParticleDataImpl< Vec3 > &pd, WaveletNoiseField &noise, Real scale=1.) |
PYTHON void | Manta::setNoisePdataInt (BasicParticleSystem &parts, ParticleDataImpl< int > &pd, WaveletNoiseField &noise, Real scale=1.) |
PYTHON Grid< Vec3 > | Manta::obstacleGradient (const FlagGrid &flags) |
SDF gradient from obstacle flags, for turbulence.py. More... | |
PYTHON LevelsetGrid | Manta::obstacleLevelset (const FlagGrid &flags) |
PYTHON void | Manta::applyEmission (FlagGrid &flags, Grid< Real > &density, Grid< Real > &emission, bool isAbsolute) |
Add emission values. More... | |
PYTHON void | Manta::densityInflowMeshNoise (FlagGrid &flags, Grid< Real > &density, WaveletNoiseField &noise, Mesh *mesh, Real scale=1.0, Real sigma=0) |
PYTHON void | Manta::densityInflowMesh (FlagGrid &flags, Grid< Real > &density, Mesh *mesh, Real value=1., Real cutoff=7, Real sigma=0) |
PYTHON void | Manta::checkSymmetry (Grid< Real > &a, Grid< Real > *err=NULL, bool symmetrize=false, int axis=0, int bound=0) |
PYTHON void | Manta::checkSymmetryVec3 (Grid< Vec3 > &a, Grid< Real > *err=NULL, bool symmetrize=false, int axis=0, int bound=0, int disable=0) |
PYTHON void | Manta::projectPpmFull (Grid< Real > &val, string name, int shadeMode=0, Real scale=1.) |
PYTHON void | Manta::addTestParts (BasicParticleSystem &parts, int num) |
PYTHON Real | Manta::pdataMaxDiff (ParticleDataBase *a, ParticleDataBase *b) |
PYTHON Vec3 | Manta::calcCenterOfMass (Grid< Real > &density) |
PYTHON void | Manta::updateFractions (const FlagGrid &flags, const Grid< Real > &phiObs, MACGrid &fractions, const int &boundaryWidth=0) |
PYTHON void | Manta::setObstacleFlags (FlagGrid &flags, const Grid< Real > &phiObs, const MACGrid *fractions=NULL, const Grid< Real > *phiOut=NULL) |
PYTHON void | Manta::initVortexVelocity (Grid< Real > &phiObs, MACGrid &vel, const Vec3 ¢er, const Real &radius) |
PYTHON void | Manta::KEpsilonComputeProduction (MACGrid &vel, Grid< Real > &k, Grid< Real > &eps, Grid< Real > &prod, Grid< Real > &nuT, Grid< Real > *strain=0, Real pscale=1.0f) |
PYTHON void | Manta::KEpsilonSources (Grid< Real > &k, Grid< Real > &eps, Grid< Real > &prod) |
PYTHON void | Manta::KEpsilonBcs (FlagGrid &flags, Grid< Real > &k, Grid< Real > &eps, Real intensity, Real nu, bool fillArea) |
PYTHON void | Manta::KEpsilonGradientDiffusion (Grid< Real > &k, Grid< Real > &eps, Grid< Real > &nuT, Real sigmaU=4.0, MACGrid *vel=0) |
PYTHON void | Manta::smoothMesh (Mesh &mesh, Real strength, int steps=1, Real minLength=1e-5) |
Mesh smoothing. More... | |
PYTHON void | Manta::subdivideMesh (Mesh &mesh, Real minAngle, Real minLength, Real maxLength, bool cutTubes=false) |
PYTHON void | Manta::killSmallComponents (Mesh &mesh, int elements=10) |
PYTHON void | Manta::copyArrayToGridReal (const PyArrayContainer source, Grid< Real > &target) |
PYTHON void | Manta::copyGridToArrayReal (const Grid< Real > &source, PyArrayContainer target) |
PYTHON void | Manta::copyArrayToGridLevelset (const PyArrayContainer source, LevelsetGrid &target) |
PYTHON void | Manta::copyGridToArrayLevelset (const LevelsetGrid &source, PyArrayContainer target) |
PYTHON void | Manta::copyArrayToGridVec3 (const PyArrayContainer source, Grid< Vec3 > &target) |
PYTHON void | Manta::copyGridToArrayVec3 (const Grid< Vec3 > &source, PyArrayContainer target) |
PYTHON void | Manta::copyArrayToGridMAC (const PyArrayContainer source, MACGrid &target) |
PYTHON void | Manta::copyGridToArrayMAC (const MACGrid &source, PyArrayContainer target) |
PYTHON void | Manta::copyArrayToPdataInt (const PyArrayContainer source, ParticleDataImpl< int > &target) |
PYTHON void | Manta::copyPdataToArrayInt (const ParticleDataImpl< int > &source, PyArrayContainer target) |
PYTHON void | Manta::copyArrayToPdataReal (const PyArrayContainer source, ParticleDataImpl< Real > &target) |
PYTHON void | Manta::copyPdataToArrayReal (const ParticleDataImpl< Real > &source, PyArrayContainer target) |
PYTHON void | Manta::copyArrayToPdataVec3 (const PyArrayContainer source, ParticleDataImpl< Vec3 > &target) |
PYTHON void | Manta::copyPdataToArrayVec3 (const ParticleDataImpl< Vec3 > &source, PyArrayContainer target) |
PYTHON void | Manta::releaseMG (FluidSolver *solver=nullptr) |
void | Manta::solvePressure (MACGrid &vel, Grid< Real > &pressure, FlagGrid &flags, Real cgAccuracy=1e-3, Grid< Real > *phi=0, Grid< Real > *perCellCorr=0, MACGrid *fractions=0, Real gfClamp=1e-04, Real cgMaxIterFac=1.5, bool precondition=true, int preconditioner=1, bool enforceCompatibility=false, bool useL2Norm=false, bool zeroPressureFixing=false, const Grid< Real > *curv=NULL, const Real surfTens=0.0, Grid< Real > *retRhs=NULL) |
PYTHON void | Manta::SurfaceTurbulence::particleSurfaceTurbulence (FlagGrid &flags, BasicParticleSystem &coarseParts, ParticleDataImpl< Vec3 > &coarsePartsPrevPos, BasicParticleSystem &surfPoints, ParticleDataImpl< Vec3 > &surfaceNormals, ParticleDataImpl< Real > &surfaceWaveH, ParticleDataImpl< Real > &surfaceWaveDtH, BasicParticleSystem &surfacePointsDisplaced, ParticleDataImpl< Real > &surfaceWaveSource, ParticleDataImpl< Real > &surfaceWaveSeed, ParticleDataImpl< Real > &surfaceWaveSeedAmplitude, int res, Real outerRadius=1.0f, int surfaceDensity=20, int nbSurfaceMaintenanceIterations=4, Real dt=0.005f, Real waveSpeed=16.0f, Real waveDamping=0.0f, Real waveSeedFrequency=4, Real waveMaxAmplitude=0.25f, Real waveMaxFrequency=800, Real waveMaxSeedingAmplitude=0.5, Real waveSeedingCurvatureThresholdRegionCenter=0.025f, Real waveSeedingCurvatureThresholdRegionRadius=0.01f, Real waveSeedStepSizeRatioOfMax=0.05f) |
PYTHON void | Manta::SurfaceTurbulence::debugCheckParts (BasicParticleSystem &parts, FlagGrid &flags) |
PYTHON void | Manta::simpleNumpyTest (Grid< Real > &grid, PyArrayContainer npAr, Real scale) |
PYTHON void | Manta::extractFeatureVel (PyArrayContainer fv, const int N_row, const int off_begin, const BasicParticleSystem &p, const MACGrid &vel, const Real scale=1.0, const ParticleDataImpl< int > *ptype=NULL, const int exclude=0, const int window=1) |
PYTHON void | Manta::extractFeaturePhi (PyArrayContainer fv, const int N_row, const int off_begin, const BasicParticleSystem &p, const Grid< Real > &phi, const Real scale=1.0, const ParticleDataImpl< int > *ptype=NULL, const int exclude=0, const int window=1) |
PYTHON void | Manta::extractFeatureGeo (PyArrayContainer fv, const int N_row, const int off_begin, const BasicParticleSystem &p, const FlagGrid &flag, const Real scale=1.0, const ParticleDataImpl< int > *ptype=NULL, const int exclude=0, const int window=1) |
PYTHON int | Manta::getRegions (Grid< int > &r, const FlagGrid &flags, const int ctype) |
PYTHON void | Manta::getRegionalCounts (Grid< int > &r, const FlagGrid &flags, const int ctype) |
PYTHON void | Manta::extendRegion (FlagGrid &flags, const int region, const int exclude, const int depth) |
PYTHON void | Manta::markIsolatedFluidCell (FlagGrid &flags, const int mark) |
PYTHON void | Manta::markSmallRegions (FlagGrid &flags, const Grid< int > &rcnt, const int mark, const int exclude, const int th=1) |
PYTHON void | Manta::addForcePvel (ParticleDataImpl< Vec3 > &vel, const Vec3 &a, const Real dt, const ParticleDataImpl< int > *ptype, const int exclude) |
PYTHON void | Manta::updateVelocityFromDeltaPos (BasicParticleSystem &parts, ParticleDataImpl< Vec3 > &vel, const ParticleDataImpl< Vec3 > &x_prev, const Real dt, const ParticleDataImpl< int > *ptype, const int exclude) |
PYTHON void | Manta::eulerStep (BasicParticleSystem &parts, const ParticleDataImpl< Vec3 > &vel, const ParticleDataImpl< int > *ptype, const int exclude) |
PYTHON void | Manta::setPartType (BasicParticleSystem &parts, ParticleDataImpl< int > &ptype, const int mark, const int stype, const FlagGrid &flags, const int cflag) |
PYTHON void | Manta::markAsFixed (Mesh &mesh, Shape *shape, bool exclusive=true) |
PYTHON void | Manta::texcoordInflow (VortexSheetMesh &mesh, Shape *shape, MACGrid &vel) |
PYTHON void | Manta::meshSmokeInflow (VortexSheetMesh &mesh, Shape *shape, Real amount) |
PYTHON void | Manta::vorticitySource (VortexSheetMesh &mesh, Vec3 gravity, MACGrid *vel=NULL, MACGrid *velOld=NULL, Real scale=0.1, Real maxAmount=0, Real mult=1.0) |
PYTHON void | Manta::smoothVorticity (VortexSheetMesh &mesh, int iter=1, Real sigma=0.2, Real alpha=0.8) |
PYTHON void | Manta::VPseedK41 (VortexParticleSystem &system, Shape *shape, Real strength=0, Real sigma0=0.2, Real sigma1=1.0, Real probability=1.0, Real N=3.0) |
PYTHON void | Manta::VICintegration (VortexSheetMesh &mesh, Real sigma, Grid< Vec3 > &vel, FlagGrid &flags, Grid< Vec3 > *vorticity=NULL, Real cgMaxIterFac=1.5, Real cgAccuracy=1e-3, Real scale=0.01, int precondition=0) |
PYTHON void | Manta::densityFromLevelset (LevelsetGrid &phi, Grid< Real > &density, Real value=1.0, Real sigma=1.0) |
PYTHON void | Manta::interpolateGrid (Grid< Real > &target, Grid< Real > &source, Vec3 scale=Vec3(1.), Vec3 offset=Vec3(0.), Vec3i size=Vec3i(-1,-1,-1), int orderSpace=1) |
PYTHON void | Manta::interpolateGridVec3 (Grid< Vec3 > &target, Grid< Vec3 > &source, Vec3 scale=Vec3(1.), Vec3 offset=Vec3(0.), Vec3i size=Vec3i(-1,-1,-1), int orderSpace=1) |
PYTHON void | Manta::interpolateMACGrid (MACGrid &target, MACGrid &source, Vec3 scale=Vec3(1.), Vec3 offset=Vec3(0.), Vec3i size=Vec3i(-1,-1,-1), int orderSpace=1) |
PYTHON void | Manta::applySimpleNoiseVec3 (FlagGrid &flags, Grid< Vec3 > &target, WaveletNoiseField &noise, Real scale=1.0, Grid< Real > *weight=NULL) |
PYTHON void | Manta::applySimpleNoiseReal (FlagGrid &flags, Grid< Real > &target, WaveletNoiseField &noise, Real scale=1.0, Grid< Real > *weight=NULL) |
PYTHON void | Manta::applyNoiseVec3 (FlagGrid &flags, Grid< Vec3 > &target, WaveletNoiseField &noise, Real scale=1.0, Real scaleSpatial=1.0, Grid< Real > *weight=NULL, Grid< Vec3 > *uv=NULL) |
PYTHON void | Manta::computeEnergy (FlagGrid &flags, MACGrid &vel, Grid< Real > &energy) |
PYTHON void | Manta::computeWaveletCoeffs (Grid< Real > &input) |
PYTHON void | Manta::computeVorticity (MACGrid &vel, Grid< Vec3 > &vorticity, Grid< Real > *norm) |
PYTHON void | Manta::computeStrainRateMag (MACGrid &vel, Grid< Real > &mag) |
PYTHON void | Manta::extrapolateSimpleFlags (FlagGrid &flags, GridBase *val, int distance=4, int flagFrom=FlagGrid::TypeFluid, int flagTo=FlagGrid::TypeObstacle) |
PYTHON void | Manta::getCurl (MACGrid &vel, Grid< Real > &vort, int comp) |
PYTHON void | Manta::calcSecDeriv2d (const Grid< Real > &v, Grid< Real > &curv) |
PYTHON Real | Manta::totalSum (Grid< Real > &height) |
PYTHON void | Manta::normalizeSumTo (Grid< Real > &height, Real target) |
PYTHON void | Manta::cgSolveWE (FlagGrid &flags, Grid< Real > &ut, Grid< Real > &utm1, Grid< Real > &out, bool crankNic=false, Real cSqr=0.25, Real cgMaxIterFac=1.5, Real cgAccuracy=1e-5) |
PYTHON void Manta::addBuoyancy | ( | FlagGrid & | flags, |
Grid< Real > & | density, | ||
MACGrid & | vel, | ||
Vec3 | gravity, | ||
Real | coefficient = 1. |
||
) |
add Buoyancy force based on fctor (e.g. smoke density)
PYTHON void Manta::addForcePvel | ( | ParticleDataImpl< Vec3 > & | vel, |
const Vec3 & | a, | ||
const Real | dt, | ||
const ParticleDataImpl< int > * | ptype, | ||
const int | exclude | ||
) |
add force to vec3 particle data (ie, a velocity)
add gravity forces to all fluid cells, automatically adapts to different grid sizes
add gravity forces to all fluid cells , but dont account for changing cell size
PYTHON void Manta::addTestParts | ( | BasicParticleSystem & | parts, |
int | num | ||
) |
init some test particles at the origin
PYTHON void Manta::adjustNumber | ( | BasicParticleSystem & | parts, |
MACGrid & | vel, | ||
FlagGrid & | flags, | ||
int | minParticles, | ||
int | maxParticles, | ||
LevelsetGrid & | phi, | ||
Real | radiusFactor = 1. , |
||
Real | narrowBand = -1. , |
||
Grid< Real > * | exclude = NULL |
||
) |
re-sample particles based on an input levelset
PYTHON void Manta::advectSemiLagrange | ( | FlagGrid * | flags, |
MACGrid * | vel, | ||
GridBase * | grid, | ||
int | order = 1 , |
||
Real | strength = 1.0 , |
||
int | orderSpace = 1 , |
||
bool | openBounds = false , |
||
int | boundaryWidth = 1 , |
||
int | clampMode = 1 |
||
) |
Perform semi-lagrangian advection of target Real- or Vec3 grid Open boundary handling needs information about width of border Clamping modes: 1 regular clamp leading to more overshoot and sharper results, 2 revert to 1st order slightly smoother less overshoot (enable when 1 gives artifacts)
PYTHON void Manta::applyEmission | ( | FlagGrid & | flags, |
Grid< Real > & | density, | ||
Grid< Real > & | emission, | ||
bool | isAbsolute | ||
) |
Add emission values.
PYTHON void Manta::assertNumpy | ( | ) |
helper function to check for numpy compilation
calculate center of mass given density grid, for re-centering
calculate a second derivative for the wave equation
PYTHON void Manta::cgSolveDiffusion | ( | FlagGrid & | flags, |
GridBase & | grid, | ||
Real | alpha = 0.25 , |
||
Real | cgMaxIterFac = 1.0 , |
||
Real | cgAccuracy = 1e-4 |
||
) |
do a CG solve for diffusion; note: diffusion coefficient alpha given in grid space,
PYTHON void Manta::cgSolveWE | ( | FlagGrid & | flags, |
Grid< Real > & | ut, | ||
Grid< Real > & | utm1, | ||
Grid< Real > & | out, | ||
bool | crankNic = false , |
||
Real | cSqr = 0.25 , |
||
Real | cgMaxIterFac = 1.5 , |
||
Real | cgAccuracy = 1e-5 |
||
) |
do a CG solve for the wave equation (note, out grid only there for debugging... could be removed)
PYTHON void Manta::checkSymmetry | ( | Grid< Real > & | a, |
Grid< Real > * | err = NULL , |
||
bool | symmetrize = false , |
||
int | axis = 0 , |
||
int | bound = 0 |
||
) |
check for symmetry , optionally enfore by copying
PYTHON void Manta::checkSymmetryVec3 | ( | Grid< Vec3 > & | a, |
Grid< Real > * | err = NULL , |
||
bool | symmetrize = false , |
||
int | axis = 0 , |
||
int | bound = 0 , |
||
int | disable = 0 |
||
) |
check for symmetry , mac grid version
PYTHON void Manta::combineGridVel | ( | MACGrid & | vel, |
Grid< Vec3 > & | weight, | ||
MACGrid & | combineVel, | ||
LevelsetGrid * | phi = NULL , |
||
Real | narrowBand = 0.0 , |
||
Real | thresh = 0.0 |
||
) |
narrow band velocity combination
PYTHON void Manta::densityFromLevelset | ( | LevelsetGrid & | phi, |
Grid< Real > & | density, | ||
Real | value = 1.0 , |
||
Real | sigma = 1.0 |
||
) |
Obtain density field from levelset with linear gradient of size sigma over the interface
PYTHON void Manta::densityInflow | ( | const FlagGrid & | flags, |
Grid< Real > & | density, | ||
WaveletNoiseField & | noise, | ||
Shape * | shape, | ||
Real | scale = 1.0 , |
||
Real | sigma = 0 |
||
) |
Init noise-modulated density inside shape
PYTHON void Manta::densityInflowMesh | ( | FlagGrid & | flags, |
Grid< Real > & | density, | ||
Mesh * | mesh, | ||
Real | value = 1. , |
||
Real | cutoff = 7 , |
||
Real | sigma = 0 |
||
) |
Init constant density inside mesh
PYTHON void Manta::densityInflowMeshNoise | ( | FlagGrid & | flags, |
Grid< Real > & | density, | ||
WaveletNoiseField & | noise, | ||
Mesh * | mesh, | ||
Real | scale = 1.0 , |
||
Real | sigma = 0 |
||
) |
Init noise-modulated density inside mesh
convert vel to a centered grid, then compute its curl
averaged value for all cells (if flags are given, only for fluid cells)
surface tension helper
slow helper to visualize tests, get a 3d slice of a 4d grid
PYTHON void Manta::getSliceFrom4dVec | ( | Grid4d< Vec4 > & | src, |
int | srct, | ||
Grid< Vec3 > & | dst, | ||
Grid< Real > * | dstt = NULL |
||
) |
slow helper to visualize tests, get a 3d slice of a 4d vec4 grid
PYTHON void Manta::getSpiralVelocity2D | ( | const FlagGrid & | flags, |
MACGrid & | vel, | ||
Real | strength = 1.0 |
||
) |
Create a spiral velocity field in 2D as a test scene
compute maximal diference of two cells in the grid, needed for testing system
PYTHON void Manta::interpolateGrid4d | ( | Grid4d< Real > & | target, |
Grid4d< Real > & | source, | ||
Vec4 | offset = Vec4(0.) , |
||
Vec4 | scale = Vec4(1.) , |
||
Vec4 | size = Vec4(-1.) |
||
) |
linearly interpolate data of a 4d grid
PYTHON void Manta::interpolateGrid4dVec | ( | Grid4d< Vec4 > & | target, |
Grid4d< Vec4 > & | source, | ||
Vec4 | offset = Vec4(0.) , |
||
Vec4 | scale = Vec4(1.) , |
||
Vec4 | size = Vec4(-1.) |
||
) |
linearly interpolate vec4 data of a 4d grid
PYTHON void Manta::KEpsilonBcs | ( | FlagGrid & | flags, |
Grid< Real > & | k, | ||
Grid< Real > & | eps, | ||
Real | intensity, | ||
Real | nu, | ||
bool | fillArea | ||
) |
Initialize the domain or boundary conditions
PYTHON void Manta::KEpsilonComputeProduction | ( | MACGrid & | vel, |
Grid< Real > & | k, | ||
Grid< Real > & | eps, | ||
Grid< Real > & | prod, | ||
Grid< Real > & | nuT, | ||
Grid< Real > * | strain = 0 , |
||
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
PYTHON void Manta::KEpsilonGradientDiffusion | ( | Grid< Real > & | k, |
Grid< Real > & | eps, | ||
Grid< Real > & | nuT, | ||
Real | sigmaU = 4.0 , |
||
MACGrid * | vel = 0 |
||
) |
Compute k-epsilon turbulent viscosity
Integrate source terms of k-epsilon equation
PYTHON void Manta::mantaMsg | ( | const std::string & | out, |
int | level = 1 |
||
) |
helper to unify printing from python scripts and printing internal messages (optionally pass debug level to control amount of output)
Mark area of mesh inside shape as fixed nodes. Remove all other fixed nodes if 'exclusive' is set
PYTHON void Manta::meshSmokeInflow | ( | VortexSheetMesh & | mesh, |
Shape * | shape, | ||
Real | amount | ||
) |
Init smoke density values of the mesh surface inside source shape
PYTHON void Manta::normalizeSumTo | ( | Grid< Real > & | height, |
Real | target | ||
) |
normalize all values in a grid (for wave equation solves)
SDF gradient from obstacle flags, for turbulence.py.
PYTHON LevelsetGrid Manta::obstacleLevelset | ( | const FlagGrid & | flags | ) |
SDF from obstacle flags, for turbulence.py
PYTHON void Manta::PD_fluid_guiding | ( | MACGrid & | vel, |
MACGrid & | velT, | ||
Grid< Real > & | pressure, | ||
FlagGrid & | flags, | ||
Grid< Real > & | weight, | ||
int | blurRadius = 5 , |
||
Real | theta = 1.0 , |
||
Real | tau = 1.0 , |
||
Real | sigma = 1.0 , |
||
Real | epsRel = 1e-3 , |
||
Real | epsAbs = 1e-3 , |
||
int | maxIters = 200 , |
||
Grid< Real > * | phi = 0 , |
||
Grid< Real > * | perCellCorr = 0 , |
||
MACGrid * | fractions = 0 , |
||
Real | gfClamp = 1e-04 , |
||
Real | cgMaxIterFac = 1.5 , |
||
Real | cgAccuracy = 1e-3 , |
||
int | preconditioner = 1 , |
||
bool | zeroPressureFixing = false |
||
) |
Main function for fluid guiding , includes "regular" pressure solve
PYTHON Real Manta::pdataMaxDiff | ( | ParticleDataBase * | a, |
ParticleDataBase * | b | ||
) |
calculate the difference between two pdata fields (note - slow!, not parallelized)
PYTHON void Manta::printUniFileInfoString | ( | const string & | name | ) |
for test run debugging
PYTHON void Manta::projectPpmFull | ( | Grid< Real > & | val, |
string | name, | ||
int | shadeMode = 0 , |
||
Real | scale = 1. |
||
) |
output shaded (all 3 axes at once for 3D) shading modes: 0 smoke, 1 surfaces
PYTHON void Manta::pushOutofObs | ( | BasicParticleSystem & | parts, |
const FlagGrid & | flags, | ||
const Grid< Real > & | phiObs, | ||
const Real | shift = 0 , |
||
const Real | thresh = 0 , |
||
const ParticleDataImpl< int > * | ptype = NULL , |
||
const int | exclude = 0 |
||
) |
push particles out of obstacle levelset
mac->vec3 grid conversion , with full resampling
vec3->mac grid conversion , but with full resampling
PYTHON void Manta::resetOutflow | ( | FlagGrid & | flags, |
Grid< Real > * | phi = 0 , |
||
BasicParticleSystem * | parts = 0 , |
||
Grid< Real > * | real = 0 , |
||
Grid< int > * | index = 0 , |
||
ParticleIndexSystem * | indexSys = 0 |
||
) |
delete fluid and ensure empty flag in outflow cells, delete particles and density and set phi to 0.5
PYTHON void Manta::sampleFlagsWithParticles | ( | const FlagGrid & | flags, |
BasicParticleSystem & | parts, | ||
const int | discretization, | ||
const Real | randomness | ||
) |
note - this is a simplified version , sampleLevelsetWithParticles has more functionality
PYTHON void Manta::sampleLevelsetWithParticles | ( | const LevelsetGrid & | phi, |
const FlagGrid & | flags, | ||
BasicParticleSystem & | parts, | ||
const int | discretization, | ||
const Real | randomness, | ||
const bool | reset = false , |
||
const bool | refillEmpty = false |
||
) |
sample a level set with particles, use reset to clear the particle buffer, and skipEmpty for a continuous inflow (in the latter case, only empty cells will be re-filled once they empty when calling sampleLevelsetWithParticles during the main loop).
PYTHON void Manta::sampleShapeWithParticles | ( | const Shape & | shape, |
const FlagGrid & | flags, | ||
BasicParticleSystem & | parts, | ||
const int | discretization, | ||
const Real | randomness, | ||
const bool | reset = false , |
||
const bool | refillEmpty = false , |
||
const LevelsetGrid * | exclude = NULL |
||
) |
sample a shape with particles, use reset to clear the particle buffer, and skipEmpty for a continuous inflow (in the latter case, only empty cells will be re-filled once they empty when calling sampleShapeWithParticles during the main loop).
PYTHON void Manta::setDebugLevel | ( | int | level = 1 | ) |
set debug level for messages (0 off, 1 regular, higher = more, up to 10)
PYTHON void Manta::setGradientYWeight | ( | Grid< Real > & | W, |
const int | minY, | ||
const int | maxY, | ||
const Real | valAtMin, | ||
const Real | valAtMax | ||
) |
Set the guiding weight W as a gradient in the y-direction
enforce a constant inflow/outflow at the grid boundaries
PYTHON void Manta::setObstacleFlags | ( | FlagGrid & | flags, |
const Grid< Real > & | phiObs, | ||
const MACGrid * | fractions = NULL , |
||
const Grid< Real > * | phiOut = NULL |
||
) |
update obstacle and outflow flags from levelsets optionally uses fill fractions for obstacle
PYTHON void Manta::setOpenBound | ( | FlagGrid & | flags, |
int | bWidth, | ||
string | openBound = "" , |
||
int | type = FlagGrid::TypeOutflow | FlagGrid::TypeEmpty |
||
) |
add empty and outflow flag to cells of open boundaries
simple init functions in 4d
simple init functions in 4d, vec4
PYTHON void Manta::setWallBcs | ( | FlagGrid & | flags, |
MACGrid & | vel, | ||
MACGrid * | fractions = 0 , |
||
Grid< Real > * | phiObs = 0 , |
||
int | boundaryWidth = 0 |
||
) |
set zero normal velocity boundary condition on walls
PYTHON void Manta::simpleNumpyTest | ( | Grid< Real > & | grid, |
PyArrayContainer | npAr, | ||
Real | scale | ||
) |
simple test function and kernel with numpy array
PYTHON void Manta::smoothMesh | ( | Mesh & | mesh, |
Real | strength, | ||
int | steps = 1 , |
||
Real | minLength = 1e-5 |
||
) |
Mesh smoothing.
see Desbrun 99 "Implicit fairing of of irregular meshes using diffusion and curvature flow"
void Manta::solvePressure | ( | MACGrid & | vel, |
Grid< Real > & | pressure, | ||
FlagGrid & | flags, | ||
Real | cgAccuracy = 1e-3 , |
||
Grid< Real > * | phi = 0 , |
||
Grid< Real > * | perCellCorr = 0 , |
||
MACGrid * | fractions = 0 , |
||
Real | gfClamp = 1e-04 , |
||
Real | cgMaxIterFac = 1.5 , |
||
bool | precondition = true , |
||
int | preconditioner = PcMIC , |
||
bool | enforceCompatibility = false , |
||
bool | useL2Norm = false , |
||
bool | zeroPressureFixing = false , |
||
const Grid< Real > * | curv = NULL , |
||
const Real | surfTens = 0. , |
||
Grid< Real > * | retRhs = NULL |
||
) |
Perform pressure projection of the velocity grid perCellCorr: a divergence correction for each cell, optional fractions: for 2nd order obstacle boundaries, optional gfClamp: clamping threshold for ghost fluid method cgMaxIterFac: heuristic to determine maximal number of CG iteations, increase for more accurate solutions preconditioner: MIC, or MG (see Preconditioner enum) useL2Norm: use max norm by default, can be turned to L2 here zeroPressureFixing: remove null space by fixing a single pressure value, needed for MG curv: curvature for surface tension effects surfTens: surface tension coefficient retRhs: return RHS divergence, e.g., for debugging; optional
PYTHON void Manta::subdivideMesh | ( | Mesh & | mesh, |
Real | minAngle, | ||
Real | minLength, | ||
Real | maxLength, | ||
bool | cutTubes = false |
||
) |
Subdivide and edgecollapse to guarantee mesh with edgelengths between min/maxLength and an angle below minAngle
helper to swap components of a grid (eg for data import)
PYTHON void Manta::texcoordInflow | ( | VortexSheetMesh & | mesh, |
Shape * | shape, | ||
MACGrid & | vel | ||
) |
Adapt texture coordinates of mesh inside shape to obtain an effective inflow effect
PYTHON Real Manta::totalSum | ( | Grid< Real > & | height | ) |
calculate the sum of all values in a grid (for wave equation solves)
PYTHON void Manta::updateFractions | ( | const FlagGrid & | flags, |
const Grid< Real > & | phiObs, | ||
MACGrid & | fractions, | ||
const int & | boundaryWidth = 0 |
||
) |
update fill fraction values
PYTHON void Manta::updateVelocityFromDeltaPos | ( | BasicParticleSystem & | parts, |
ParticleDataImpl< Vec3 > & | vel, | ||
const ParticleDataImpl< Vec3 > & | x_prev, | ||
const Real | dt, | ||
const ParticleDataImpl< int > * | ptype, | ||
const int | exclude | ||
) |
retrieve velocity from position change
PYTHON void Manta::VICintegration | ( | VortexSheetMesh & | mesh, |
Real | sigma, | ||
Grid< Vec3 > & | vel, | ||
FlagGrid & | flags, | ||
Grid< Vec3 > * | vorticity = NULL , |
||
Real | cgMaxIterFac = 1.5 , |
||
Real | cgAccuracy = 1e-3 , |
||
Real | scale = 0.01 , |
||
int | precondition = 0 |
||
) |
Vortex-in-cell integration
PYTHON void Manta::vorticitySource | ( | VortexSheetMesh & | mesh, |
Vec3 | gravity, | ||
MACGrid * | vel = NULL , |
||
MACGrid * | velOld = NULL , |
||
Real | scale = 0.1 , |
||
Real | maxAmount = 0 , |
||
Real | mult = 1.0 |
||
) |
Add vorticity to vortex sheets based on buoyancy
PYTHON void Manta::VPseedK41 | ( | VortexParticleSystem & | system, |
Shape * | shape, | ||
Real | strength = 0 , |
||
Real | sigma0 = 0.2 , |
||
Real | sigma1 = 1.0 , |
||
Real | probability = 1.0 , |
||
Real | N = 3.0 |
||
) |
Seed Vortex Particles inside shape with K41 characteristics