Blender V2.61 - r43446
Public Member Functions | Static Public Member Functions | Public Attributes

FLUID_3D Class Reference

#include <FLUID_3D.h>

List of all members.

Public Member Functions

 FLUID_3D (int *res, float *p0)
 FLUID_3D ()
virtual ~FLUID_3D ()
void initBlenderRNA (float *alpha, float *beta, float *dt_factor, float *vorticity, int *border_colli)
void initVectorNoise (int amplify)
void addSmokeColumn ()
void step (float dt)
void addObstacle (OBSTACLE *obstacle)
const float * xVelocity ()
const float * yVelocity ()
const float * zVelocity ()
int xRes () const
int yRes () const
int zRes () const
void artificialDampingSL (int zBegin, int zEnd)
void artificialDampingExactSL (int pos)
void setBorderCollisions ()
void copyBorderAll (float *field, int zBegin, int zEnd)
void wipeBoundaries (int zBegin, int zEnd)
void wipeBoundariesSL (int zBegin, int zEnd)
void addForce (int zBegin, int zEnd)
void addVorticity (int zBegin, int zEnd)
void addBuoyancy (float *heat, float *density, int zBegin, int zEnd)
void project ()
void diffuseHeat ()
void solvePressure (float *field, float *b, unsigned char *skip)
void solvePressurePre (float *field, float *b, unsigned char *skip)
void solveHeat (float *field, float *b, unsigned char *skip)
void setObstacleBoundaries (float *_pressure, int zBegin, int zEnd)
void setObstaclePressure (float *_pressure, int zBegin, int zEnd)
void advectMacCormackBegin (int zBegin, int zEnd)
void advectMacCormackEnd1 (int zBegin, int zEnd)
void advectMacCormackEnd2 (int zBegin, int zEnd)

Static Public Member Functions

static void addSmokeTestCase (float *field, Vec3Int res)
static void copyBorderX (float *field, Vec3Int res, int zBegin, int zEnd)
static void copyBorderY (float *field, Vec3Int res, int zBegin, int zEnd)
static void copyBorderZ (float *field, Vec3Int res, int zBegin, int zEnd)
static void setNeumannX (float *field, Vec3Int res, int zBegin, int zEnd)
static void setNeumannY (float *field, Vec3Int res, int zBegin, int zEnd)
static void setNeumannZ (float *field, Vec3Int res, int zBegin, int zEnd)
static void setZeroX (float *field, Vec3Int res, int zBegin, int zEnd)
static void setZeroY (float *field, Vec3Int res, int zBegin, int zEnd)
static void setZeroZ (float *field, Vec3Int res, int zBegin, int zEnd)
static void setZeroBorder (float *field, Vec3Int res, int zBegin, int zEnd)
static void advectFieldSemiLagrange (const float dt, const float *velx, const float *vely, const float *velz, float *oldField, float *newField, Vec3Int res, int zBegin, int zEnd)
static void advectFieldMacCormack1 (const float dt, const float *xVelocity, const float *yVelocity, const float *zVelocity, float *oldField, float *tempResult, Vec3Int res, int zBegin, int zEnd)
static void advectFieldMacCormack2 (const float dt, const float *xVelocity, const float *yVelocity, const float *zVelocity, float *oldField, float *newField, float *tempResult, float *temp1, Vec3Int res, const unsigned char *obstacles, int zBegin, int zEnd)
static void clampExtrema (const float dt, const float *xVelocity, const float *yVelocity, const float *zVelocity, float *oldField, float *newField, Vec3Int res, int zBegin, int zEnd)
static void clampOutsideRays (const float dt, const float *xVelocity, const float *yVelocity, const float *zVelocity, float *oldField, float *newField, Vec3Int res, const unsigned char *obstacles, const float *oldAdvection, int zBegin, int zEnd)

Public Attributes

int _xRes
int _yRes
int _zRes
int _maxRes
Vec3Int _res
size_t _totalCells
int _slabSize
float _dx
float _p0 [3]
float _p1 [3]
float _totalTime
int _totalSteps
int _totalImgDumps
int _totalVelDumps
float * _density
float * _densityOld
float * _heat
float * _heatOld
float * _xVelocity
float * _yVelocity
float * _zVelocity
float * _xVelocityOld
float * _yVelocityOld
float * _zVelocityOld
float * _xForce
float * _yForce
float * _zForce
unsigned char * _obstacles
float * _xVelocityTemp
float * _yVelocityTemp
float * _zVelocityTemp
float * _heatTemp
float * _densityTemp
int _iterations
float _dt
float * _dtFactor
float _vorticityEps
float _heatDiffusion
float * _vorticityRNA
float * _alpha
float * _beta
float _tempAmb
float _constantScaling
bool _domainBcFront
bool _domainBcTop
bool _domainBcLeft
bool _domainBcBack
bool _domainBcBottom
bool _domainBcRight
int * _borderColli
int _colloPrev

Detailed Description

Definition at line 49 of file FLUID_3D.h.


Constructor & Destructor Documentation

FLUID_3D::FLUID_3D ( int *  res,
float *  p0 
)
FLUID_3D::FLUID_3D ( ) [inline]

Definition at line 53 of file FLUID_3D.h.

Referenced by smoke_init().

FLUID_3D::~FLUID_3D ( ) [virtual]

Member Function Documentation

void FLUID_3D::addBuoyancy ( float *  heat,
float *  density,
int  zBegin,
int  zEnd 
)

Definition at line 1038 of file FLUID_3D.cpp.

References _alpha, _beta, _slabSize, _tempAmb, _xRes, _yRes, and _zForce.

Referenced by step().

void FLUID_3D::addForce ( int  zBegin,
int  zEnd 
)

Definition at line 763 of file FLUID_3D.cpp.

References _dt, _slabSize, _xForce, _xVelocity, _xVelocityTemp, _yForce, _yVelocity, _yVelocityTemp, _zForce, _zVelocity, _zVelocityTemp, and i.

Referenced by step().

void FLUID_3D::addObstacle ( OBSTACLE obstacle)

Definition at line 878 of file FLUID_3D.cpp.

References _dx, _obstacles, _xRes, _yRes, _zRes, and OBSTACLE::inside().

void FLUID_3D::addSmokeColumn ( )
void FLUID_3D::addSmokeTestCase ( float *  field,
Vec3Int  res 
) [static]

Definition at line 56 of file FLUID_3D_STATIC.cpp.

References MAX3V(), and sqrtf.

void FLUID_3D::addVorticity ( int  zBegin,
int  zEnd 
)

Definition at line 1053 of file FLUID_3D.cpp.

References _dx, _obstacles, _slabSize, _vorticityEps, _xForce, _xRes, _xVelocity, _yForce, _yRes, _yVelocity, _zForce, _zRes, _zVelocity, eps, left(), N, and sqrtf.

Referenced by step().

void FLUID_3D::advectFieldMacCormack1 ( const float  dt,
const float *  xVelocity,
const float *  yVelocity,
const float *  zVelocity,
float *  oldField,
float *  tempResult,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]
void FLUID_3D::advectFieldMacCormack2 ( const float  dt,
const float *  xVelocity,
const float *  yVelocity,
const float *  zVelocity,
float *  oldField,
float *  newField,
float *  tempResult,
float *  temp1,
Vec3Int  res,
const unsigned char *  obstacles,
int  zBegin,
int  zEnd 
) [static]
void FLUID_3D::advectFieldSemiLagrange ( const float  dt,
const float *  velx,
const float *  vely,
const float *  velz,
float *  oldField,
float *  newField,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]

Definition at line 338 of file FLUID_3D_STATIC.cpp.

Referenced by advectFieldMacCormack1(), and advectFieldMacCormack2().

void FLUID_3D::advectMacCormackBegin ( int  zBegin,
int  zEnd 
)
void FLUID_3D::advectMacCormackEnd1 ( int  zBegin,
int  zEnd 
)
void FLUID_3D::advectMacCormackEnd2 ( int  zBegin,
int  zEnd 
)
void FLUID_3D::artificialDampingExactSL ( int  pos)
void FLUID_3D::artificialDampingSL ( int  zBegin,
int  zEnd 
)
void FLUID_3D::clampExtrema ( const float  dt,
const float *  xVelocity,
const float *  yVelocity,
const float *  zVelocity,
float *  oldField,
float *  newField,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]

Definition at line 472 of file FLUID_3D_STATIC.cpp.

Referenced by advectFieldMacCormack2().

void FLUID_3D::clampOutsideRays ( const float  dt,
const float *  xVelocity,
const float *  yVelocity,
const float *  zVelocity,
float *  oldField,
float *  newField,
Vec3Int  res,
const unsigned char *  obstacles,
const float *  oldAdvection,
int  zBegin,
int  zEnd 
) [static]

Definition at line 556 of file FLUID_3D_STATIC.cpp.

Referenced by advectFieldMacCormack2().

void FLUID_3D::copyBorderAll ( float *  field,
int  zBegin,
int  zEnd 
)

Definition at line 605 of file FLUID_3D.cpp.

References _slabSize, _xRes, _yRes, and _zRes.

Referenced by diffuseHeat(), and project().

void FLUID_3D::copyBorderX ( float *  field,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]
void FLUID_3D::copyBorderY ( float *  field,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]
void FLUID_3D::copyBorderZ ( float *  field,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]
void FLUID_3D::diffuseHeat ( )

Definition at line 861 of file FLUID_3D.cpp.

References _heat, _heatOld, _obstacles, _totalCells, _zRes, copyBorderAll(), solveHeat(), and SWAP_POINTERS().

Referenced by step().

void FLUID_3D::initBlenderRNA ( float *  alpha,
float *  beta,
float *  dt_factor,
float *  vorticity,
int *  border_colli 
)

Definition at line 203 of file FLUID_3D.cpp.

References _alpha, _beta, _borderColli, _dtFactor, and _vorticityRNA.

Referenced by smoke_initBlenderRNA().

void FLUID_3D::initVectorNoise ( int  amplify)
void FLUID_3D::project ( )
void FLUID_3D::setBorderCollisions ( )
void FLUID_3D::setNeumannX ( float *  field,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]

Definition at line 85 of file FLUID_3D_STATIC.cpp.

Referenced by project(), and WTURBULENCE::stepTurbulenceFull().

void FLUID_3D::setNeumannY ( float *  field,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]

Definition at line 117 of file FLUID_3D_STATIC.cpp.

Referenced by project(), and WTURBULENCE::stepTurbulenceFull().

void FLUID_3D::setNeumannZ ( float *  field,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]

Definition at line 150 of file FLUID_3D_STATIC.cpp.

Referenced by project(), and WTURBULENCE::stepTurbulenceFull().

void FLUID_3D::setObstacleBoundaries ( float *  _pressure,
int  zBegin,
int  zEnd 
)

Definition at line 979 of file FLUID_3D.cpp.

References _obstacles, _slabSize, _xRes, _xVelocity, _yRes, _yVelocity, _zRes, _zVelocity, EMPTY, and left().

Referenced by project().

void FLUID_3D::setObstaclePressure ( float *  _pressure,
int  zBegin,
int  zEnd 
)

Definition at line 892 of file FLUID_3D.cpp.

References _obstacles, _slabSize, _xRes, _xVelocity, _yRes, _yVelocity, _zRes, _zVelocity, and left().

Referenced by project().

static void FLUID_3D::setZeroBorder ( float *  field,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [inline, static]
void FLUID_3D::setZeroX ( float *  field,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]
void FLUID_3D::setZeroY ( float *  field,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]
void FLUID_3D::setZeroZ ( float *  field,
Vec3Int  res,
int  zBegin,
int  zEnd 
) [static]
void FLUID_3D::solveHeat ( float *  field,
float *  b,
unsigned char *  skip 
)

Definition at line 37 of file FLUID_3D_SOLVERS.cpp.

References _dt, _dx, _heatDiffusion, _iterations, _slabSize, _totalCells, _xRes, _yRes, _zRes, eps, fabs(), i, and SOLVER_ACCURACY.

Referenced by diffuseHeat().

void FLUID_3D::solvePressure ( float *  field,
float *  b,
unsigned char *  skip 
)
void FLUID_3D::solvePressurePre ( float *  field,
float *  b,
unsigned char *  skip 
)

Definition at line 169 of file FLUID_3D_SOLVERS.cpp.

References _iterations, _slabSize, _totalCells, _xRes, _yRes, _zRes, eps, fabs(), i, and SOLVER_ACCURACY.

Referenced by project().

void FLUID_3D::step ( float  dt)
void FLUID_3D::wipeBoundaries ( int  zBegin,
int  zEnd 
)

Definition at line 658 of file FLUID_3D.cpp.

References _density, _res, _xVelocity, _yVelocity, _zVelocity, and setZeroBorder().

void FLUID_3D::wipeBoundariesSL ( int  zBegin,
int  zEnd 
)

Definition at line 666 of file FLUID_3D.cpp.

References _density, _xRes, _xVelocity, _yRes, _yVelocity, _zRes, and _zVelocity.

Referenced by step().

int FLUID_3D::xRes ( ) const [inline]

Definition at line 71 of file FLUID_3D.h.

const float* FLUID_3D::xVelocity ( ) [inline]

Definition at line 67 of file FLUID_3D.h.

int FLUID_3D::yRes ( ) const [inline]

Definition at line 72 of file FLUID_3D.h.

const float* FLUID_3D::yVelocity ( ) [inline]

Definition at line 68 of file FLUID_3D.h.

int FLUID_3D::zRes ( ) const [inline]

Definition at line 73 of file FLUID_3D.h.

const float* FLUID_3D::zVelocity ( ) [inline]

Definition at line 69 of file FLUID_3D.h.


Member Data Documentation

Definition at line 124 of file FLUID_3D.h.

Referenced by addBuoyancy(), and initBlenderRNA().

Definition at line 125 of file FLUID_3D.h.

Referenced by addBuoyancy(), and initBlenderRNA().

Definition at line 135 of file FLUID_3D.h.

Referenced by initBlenderRNA(), setBorderCollisions(), and step().

Definition at line 136 of file FLUID_3D.h.

Referenced by FLUID_3D(), setBorderCollisions(), and step().

Definition at line 127 of file FLUID_3D.h.

Referenced by FLUID_3D(), and step().

Definition at line 113 of file FLUID_3D.h.

Referenced by advectMacCormackEnd1(), advectMacCormackEnd2(), FLUID_3D(), and ~FLUID_3D().

Definition at line 132 of file FLUID_3D.h.

Referenced by FLUID_3D(), and setBorderCollisions().

Definition at line 133 of file FLUID_3D.h.

Referenced by FLUID_3D(), and setBorderCollisions().

Definition at line 134 of file FLUID_3D.h.

Referenced by FLUID_3D(), and setBorderCollisions().

Definition at line 120 of file FLUID_3D.h.

Referenced by initBlenderRNA(), and smoke_step().

Definition at line 122 of file FLUID_3D.h.

Referenced by FLUID_3D(), and solveHeat().

Definition at line 112 of file FLUID_3D.h.

Referenced by advectMacCormackEnd1(), advectMacCormackEnd2(), FLUID_3D(), and ~FLUID_3D().

Definition at line 116 of file FLUID_3D.h.

Referenced by FLUID_3D(), solveHeat(), and solvePressurePre().

Definition at line 73 of file FLUID_3D.h.

Referenced by FLUID_3D().

unsigned char* FLUID_3D::_obstacles
float FLUID_3D::_p0[3]

Definition at line 82 of file FLUID_3D.h.

Referenced by FLUID_3D().

float FLUID_3D::_p1[3]

Definition at line 83 of file FLUID_3D.h.

Definition at line 126 of file FLUID_3D.h.

Referenced by addBuoyancy(), and FLUID_3D().

Definition at line 86 of file FLUID_3D.h.

Definition at line 85 of file FLUID_3D.h.

Referenced by artificialDampingExactSL(), artificialDampingSL(), FLUID_3D(), and step().

Definition at line 84 of file FLUID_3D.h.

Referenced by FLUID_3D(), and step().

Definition at line 87 of file FLUID_3D.h.

Definition at line 121 of file FLUID_3D.h.

Referenced by addVorticity(), FLUID_3D(), and step().

Definition at line 123 of file FLUID_3D.h.

Referenced by initBlenderRNA().


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