mantaflow  0.10
A framework for fluid simulation
Public Member Functions | List of all members
Manta::ParticleIndexSystem Class Reference
Inheritance diagram for Manta::ParticleIndexSystem:
Manta::ParticleSystem< ParticleIndexData > Manta::ParticleBase

Public Member Functions

 PYTHON () ParticleIndexSystem(FluidSolver *parent)
 
void resize (IndexInt size)
 we only need a resize function...
 
- Public Member Functions inherited from Manta::ParticleSystem< ParticleIndexData >
 PYTHON () ParticleSystem(FluidSolver *parent)
 
 PYTHON () int pySize() const
 note , special call for python, note - doesnt support more than 2b parts!
 
 PYTHON () void setPos(const IndexInt idx
 safe accessor for python
 
 PYTHON () Vec3 getPos(IndexInt idx) const
 
 PYTHON () void getPosPdata(ParticleDataImpl< Vec3 > &target) const
 copy all positions into pdata vec3 field
 
 PYTHON () void setPosPdata(const ParticleDataImpl< Vec3 > &source)
 
 PYTHON () void clear()
 remove all particles, init 0 length arrays (also pdata)
 
 PYTHON () void advectInGrid(const FlagGrid &flags
 Advect particle in grid velocity field.
 
 PYTHON () void projectOutside(Grid< Vec3 > &gradient)
 Project particles outside obstacles.
 
 PYTHON () void projectOutOfBnd(const FlagGrid &flags
 
virtual SystemType getType () const
 
ParticleIndexDataoperator[] (IndexInt idx)
 accessors
 
const ParticleIndexDataoperator[] (IndexInt idx) const
 
IndexInt size () const
 
virtual IndexInt getSizeSlow () const
 slow virtual function of base class, also returns size
 
int getStatus (IndexInt idx) const
 query status
 
bool isActive (IndexInt idx) const
 
void transformPositions (Vec3i dimOld, Vec3i dimNew)
 transform coordinate system from one grid size to another (usually upon load)
 
void doCompress ()
 explicitly trigger compression from outside
 
void insertBufferedParticles ()
 insert buffered positions as new particles, update additional particle data
 
void resizeAll (IndexInt newsize)
 resize data vector, and all pdata fields
 
void kill (IndexInt idx)
 adding and deleting
 
IndexInt add (const ParticleIndexData &data)
 
virtual ParticleBaseclone ()
 
virtual std::string infoString () const
 
void checkPartIndex (IndexInt idx) const
 debugging
 
- Public Member Functions inherited from Manta::ParticleBase
 PYTHON () ParticleBase(FluidSolver *parent)
 
virtual void cloneParticleData (ParticleBase *nm)
 copy all the particle data thats registered with the other particle system to this one
 
void addBuffered (const Vec3 &pos)
 add a position as potential candidate for new particle (todo, make usable from parallel threads)
 
 PYTHON () PbClass *create(PbType type
 particle data functions More...
 
void registerPdata (ParticleDataBase *pdata)
 add a particle data field, set its parent particle-system pointer
 
void registerPdataReal (ParticleDataImpl< Real > *pdata)
 
void registerPdataVec3 (ParticleDataImpl< Vec3 > *pdata)
 
void registerPdataInt (ParticleDataImpl< int > *pdata)
 
void deregister (ParticleDataBase *pdata)
 remove a particle data entry
 
void addAllPdata ()
 add one zero entry to all data fields
 
IndexInt getNumPdata () const
 how many are there?
 
ParticleDataBasegetPdata (int i)
 access one of the fields
 

Additional Inherited Members

- Public Types inherited from Manta::ParticleBase
enum  SystemType {
  BASE =0, PARTICLE, VORTEX, FILAMENT,
  FLIP, TURBULENCE, INDEX
}
 
enum  ParticleStatus { PNONE = 0, PNEW = (1<<1), PDELETE = (1<<10), PINVALID = (1<<30) }
 
- Public Attributes inherited from Manta::ParticleSystem< ParticleIndexData >
const Vec3pos
 
mData [idx] pos
 
const MACGridvel
 
const MACGrid const int integrationMode
 
const MACGrid const int const bool deleteInObstacle
 
const MACGrid const int const bool const bool stopInObstacle
 
const MACGrid const int const bool const bool const ParticleDataImpl< int > * ptype
 
const Real const std::string const ParticleDataImpl< int > * ptype
 
const MACGrid const int const bool const bool const ParticleDataImpl< int > const int exclude
 
const Real const std::string const ParticleDataImpl< int > const int exclude
 
const Real bnd
 
const Real const std::string & plane
 
- Public Attributes inherited from Manta::ParticleBase
PbTypeVec T =PbTypeVec()
 
PbTypeVec const std::string & name = "")
 
- Protected Member Functions inherited from Manta::ParticleSystem< ParticleIndexData >
virtual void compress ()
 reduce storage , called by doCompress
 
- Protected Attributes inherited from Manta::ParticleSystem< ParticleIndexData >
IndexInt mDeletes
 deletion count , and interval for re-compressing
 
IndexInt mDeleteChunk
 
std::vector< ParticleIndexDatamData
 the particle data
 
- Protected Attributes inherited from Manta::ParticleBase
std::vector< Vec3mNewBuffer
 new particle candidates
 
bool mAllowCompress
 allow automatic compression / resize? disallowed for, eg, flip particle systems
 
std::vector< ParticleDataBase * > mPartData
 store particle data , each pointer has its own storage vector of a certain type (int, real, vec3)
 
std::vector< ParticleDataImpl< Real > * > mPdataReal
 lists of different types, for fast operations w/o virtual function calls (all calls necessary per particle)
 
std::vector< ParticleDataImpl< Vec3 > * > mPdataVec3
 
std::vector< ParticleDataImpl< int > * > mPdataInt
 
bool mFreePdata
 indicate that pdata of this particle system is copied, and needs to be freed
 

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