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

#include <fluidsolver.h>

Inheritance diagram for Manta::FluidSolver:

Classes

struct  GridStorage
 

Public Member Functions

 PYTHON () FluidSolver(Vec3i gridSize
 
 PYTHON () Vec3i getGridSize()
 
Real getDt ()
 
Real getDx ()
 
Real getTime ()
 
bool is2D () const
 Check dimensionality.
 
bool is3D () const
 Check dimensionality (3d or above)
 
 PYTHON () void printMemInfo()
 
 PYTHON () void step()
 Advance the solver one timestep, update GUI if present.
 
 PYTHON () void adaptTimestep(Real maxVel)
 Update the timestep size based on given maximal velocity magnitude.
 
 PYTHON () PbClass *create(PbType type
 create a object with the solver as its parent
 
template<class T >
T * getGridPointer ()
 
template<class T >
void freeGridPointer (T *ptr)
 
 PYTHON (name=timestep) Real mDt
 expose animation time to python
 
 PYTHON (name=timeTotal) Real mTimeTotal
 
 PYTHON (name=frame) int mFrame
 
 PYTHON (name=cfl) Real mCflCond
 parameters for adaptive time stepping
 
 PYTHON (name=timestepMin) Real mDtMin
 
 PYTHON (name=timestepMax) Real mDtMax
 
 PYTHON (name=frameLength) Real mFrameLength
 
bool supports4D () const
 4d data section, only required for simulations working with space-time data More...
 
int getFourthDim () const
 fourth dimension size
 
template<class T >
T * getGrid4dPointer ()
 4d data allocation
 
template<class T >
void freeGrid4dPointer (T *ptr)
 
template<>
int * getGridPointer ()
 
template<>
Real * getGridPointer ()
 
template<>
Vec3getGridPointer ()
 
template<>
Vec4getGridPointer ()
 
template<>
void freeGridPointer (int *ptr)
 
template<>
void freeGridPointer (Real *ptr)
 
template<>
void freeGridPointer (Vec3 *ptr)
 
template<>
void freeGridPointer (Vec4 *ptr)
 
template<>
int * getGrid4dPointer ()
 
template<>
Real * getGrid4dPointer ()
 
template<>
Vec3getGrid4dPointer ()
 
template<>
Vec4getGrid4dPointer ()
 
template<>
void freeGrid4dPointer (int *ptr)
 
template<>
void freeGrid4dPointer (Real *ptr)
 
template<>
void freeGrid4dPointer (Vec3 *ptr)
 
template<>
void freeGrid4dPointer (Vec4 *ptr)
 

Public Attributes

int dim =3
 
int int fourthDim =-1)
 
PbTypeVec T =PbTypeVec()
 
PbTypeVec const std::string & name = "")
 

Protected Attributes

Vec3i mGridSize
 
const int mDim
 
Real mTimePerFrame
 
bool mLockDt
 
GridStorage< int > mGridsInt
 memory for regular (3d) grids
 
GridStorage< Real > mGridsReal
 
GridStorage< Vec3mGridsVec
 
int mFourthDim
 
GridStorage< Vec4mGridsVec4
 4d grid storage
 
GridStorage< int > mGrids4dInt
 
GridStorage< Real > mGrids4dReal
 
GridStorage< Vec3mGrids4dVec
 
GridStorage< Vec4mGrids4dVec4
 

Detailed Description

Encodes grid size, timstep etc.

Member Function Documentation

◆ supports4D()

bool Manta::FluidSolver::supports4D ( ) const
inline

4d data section, only required for simulations working with space-time data

4D enabled? note, there's intentionally no "is4D" function, there are only 3D solvers that also support 4D of a certain size

Member Data Documentation

◆ mFourthDim

int Manta::FluidSolver::mFourthDim
protected

4d size. Note - 4d is not treated like going from 2d to 3d! 4D grids are a separate data type. Normally all grids are forced to have the same size. In contrast, a solver can create and work with 3D as well as 4D grids, when fourth-dim is >0.


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