mantaflow  0.10
A framework for fluid simulation
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Manta::LevelsetGrid Class Reference

#include <levelset.h>

Inheritance diagram for Manta::LevelsetGrid:
Manta::Grid< Real > Manta::GridBase

Public Member Functions

 PYTHON () LevelsetGrid(FluidSolver *parent
 calculate L1 norm of grid content
 
 PYTHON () void reinitMarching(const FlagGrid &flags
 reconstruct the levelset using fast marching
 
 PYTHON () void createMesh(Mesh &mesh)
 create a triangle mesh from the levelset isosurface
 
 PYTHON () void join(const LevelsetGrid &o)
 union with another levelset
 
 PYTHON () void subtract(const LevelsetGrid &o)
 
 PYTHON () void initFromFlags(const FlagGrid &flags
 initialize levelset from flags (+/- 0.5 heaviside)
 
- Public Member Functions inherited from Manta::Grid< Real >
 PYTHON () Grid(FluidSolver *parent
 init new grid, values are set to zero More...
 
 PYTHON () Grid< Real > &copyFrom(const Grid< Real > &a
 warning - do not use "=" for grids in python, this copies the reference! not the grid content... More...
 
 PYTHON () void add(const Grid< Real > &a)
 add/subtract other grid
 
 PYTHON () void sub(const Grid< Real > &a)
 
 PYTHON () void setConst(Real s)
 set all cells to constant value
 
 PYTHON () void addConst(Real s)
 add constant to all grid cells
 
 PYTHON () void addScaled(const Grid< Real > &a
 add scaled other grid to current one (note, only "Real" factor, "T" type not supported here!)
 
 PYTHON () void mult(const Grid< Real > &a)
 multiply contents of grid
 
 PYTHON () void multConst(Real s)
 multiply each cell by a constant scalar value
 
 PYTHON () void clamp(Real min
 clamp content to range (for vec3, clamps each component separately)
 
 PYTHON () void stomp(const Real &threshold)
 reduce small values to zero
 
 PYTHON () Real getMaxAbs()
 get absolute max value in grid
 
 PYTHON () Real getMax()
 get max value in grid
 
 PYTHON () Real getMin()
 get min value in grid
 
 PYTHON () void setBound(Real value
 set all boundary cells to constant value (Dirichlet)
 
 PYTHON () void setBoundNeumann(int boundaryWidth
 set all boundary cells to last inner value (Neumann)
 
PYTHON() std PYTHON () void printGrid(int zSlice
 get data pointer of grid More...
 
 Grid (const Grid< Real > &a)
 create new & copy content from another grid
 
virtual ~Grid ()
 return memory to solver
 
Real get (int i, int j, int k) const
 
Real & get (int i, int j, int k)
 access data
 
Real get (IndexInt idx) const
 access data
 
Real get (const Vec3i &pos) const
 access data
 
Real & operator() (int i, int j, int k)
 access data
 
Real operator() (int i, int j, int k) const
 access data
 
Real & operator() (IndexInt idx)
 access data
 
Real operator() (IndexInt idx) const
 access data
 
Real & operator() (const Vec3i &pos)
 access data
 
Real operator() (const Vec3i &pos) const
 access data
 
Real & operator() (int i, int j, int k, int unused)
 grid4d compatibility functions
 
Real operator() (int i, int j, int k, int unused) const
 
Real & operator[] (IndexInt idx)
 access data
 
const Real operator[] (IndexInt idx) const
 access data
 
Real getInterpolated (const Vec3 &pos) const
 
void setInterpolated (const Vec3 &pos, const Real &val, Grid< Real > &sumBuffer) const
 
Real getInterpolatedHi (const Vec3 &pos, int order) const
 
Grid< Real > & operator+= (const Grid< S > &a)
 
Grid< Real > & operator+= (const S &a)
 
Grid< Real > & operator-= (const Grid< S > &a)
 
Grid< Real > & operator-= (const S &a)
 
Grid< Real > & operator*= (const Grid< S > &a)
 
Grid< Real > & operator*= (const S &a)
 
Grid< Real > & operator/= (const Grid< S > &a)
 
Grid< Real > & operator/= (const S &a)
 
Grid< Real > & safeDivide (const Grid< Real > &a)
 
void swap (Grid< Real > &other)
 Swap data with another grid (no actual data is moved)
 
Real getMax ()
 
Real getMax ()
 
Real getMax ()
 
- Public Member Functions inherited from Manta::GridBase
 PYTHON () GridBase(FluidSolver *parent)
 
int getSizeX () const
 Get the grids X dimension.
 
int getSizeY () const
 Get the grids Y dimension.
 
int getSizeZ () const
 Get the grids Z dimension.
 
Vec3i getSize () const
 Get the grids dimensions.
 
IndexInt getStrideX () const
 Get Stride in X dimension.
 
IndexInt getStrideY () const
 Get Stride in Y dimension.
 
IndexInt getStrideZ () const
 Get Stride in Z dimension.
 
Real getDx ()
 
void checkIndex (int i, int j, int k) const
 Check if indices are within bounds, otherwise error (should only be called when debugging)
 
void checkIndex (IndexInt idx) const
 Check if indices are within bounds, otherwise error (should only be called when debugging)
 
bool isInBounds (const Vec3i &p, int bnd) const
 Check if index is within given boundaries.
 
bool isInBounds (const Vec3i &p) const
 Check if index is within given boundaries.
 
bool isInBounds (const Vec3 &p, int bnd=0) const
 Check if index is within given boundaries.
 
bool isInBounds (IndexInt idx) const
 Check if linear index is in the range of the array.
 
GridType getType () const
 Get the type of grid.
 
bool is3D () const
 Check dimensionality.
 
IndexInt index (int i, int j, int k) const
 Get index into the data.
 
IndexInt index (const Vec3i &pos) const
 Get index into the data.
 
bool is4D () const
 grid4d compatibility functions
 
int getSizeT () const
 
int getStrideT () const
 
int index (int i, int j, int k, int unused) const
 
bool isInBounds (int i, int j, int k, int t, int bnd) const
 

Static Public Member Functions

static Real invalidTimeValue ()
 

Public Attributes

bool show = true)
 
Real maxTime =4.0
 
Real MACGridvelTransport =NULL
 
Real MACGrid bool ignoreWalls =false
 
Real MACGrid bool bool correctOuterLayer =true
 
Real MACGrid bool bool int obstacleType = FlagGrid::TypeObstacle )
 
bool ignoreWalls =false)
 
- Public Attributes inherited from Manta::Grid< Real >
bool show
 
bool copyType
 
const Real & factor
 
Real max
 
int boundaryWidth
 
PYTHON() std bool printIndex
 

Additional Inherited Members

- Public Types inherited from Manta::Grid< Real >
typedef Real BASETYPE
 
typedef GridBase BASETYPE_GRID
 
- Public Types inherited from Manta::GridBase
enum  GridType {
  TypeNone = 0, TypeReal = 1, TypeInt = 2, TypeVec3 = 4,
  TypeMAC = 8, TypeLevelset = 16, TypeFlags = 32
}
 
- Protected Attributes inherited from Manta::Grid< Real >
Real * mData
 
- Protected Attributes inherited from Manta::GridBase
GridType mType
 
Vec3i mSize
 
Real mDx
 
bool m3D
 
IndexInt mStrideZ
 

Detailed Description

Special function for levelsets


The documentation for this class was generated from the following files: