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

Public Member Functions

 PYTHON () BasicParticleSystem(FluidSolver *parent)
 
void writeParticlesRawPositionsGz (const std::string name) const
 other output formats
 
void writeParticlesRawVelocityGz (const std::string name) const
 
 PYTHON () void readParticles(BasicParticleSystem *from)
 read from other particle system (with resize)
 
 PYTHON () void addParticle(Vec3 pos)
 add particles in python
 
std::vector< BasicParticleData > & getData ()
 dangerous, get low level access - avoid usage, only used in vortex filament advection for now
 
 PYTHON () void printParts(IndexInt start
 
- Public Member Functions inherited from Manta::ParticleSystem< BasicParticleData >
 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
 
BasicParticleDataoperator[] (IndexInt idx)
 accessors
 
const BasicParticleDataoperator[] (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 BasicParticleData &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
 

Public Attributes

IndexInt stop =-1
 
IndexInt bool printIndex =false)
 
- Public Attributes inherited from Manta::ParticleSystem< BasicParticleData >
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 = "")
 

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) }
 
- Protected Member Functions inherited from Manta::ParticleSystem< BasicParticleData >
virtual void compress ()
 reduce storage , called by doCompress
 
- Protected Attributes inherited from Manta::ParticleSystem< BasicParticleData >
IndexInt mDeletes
 deletion count , and interval for re-compressing
 
IndexInt mDeleteChunk
 
std::vector< BasicParticleDatamData
 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 files: