HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GAS_SPH Class Reference

#include <GAS_SPH.h>

Public Types

enum  sphWeight {
  POLY6, SPIKY, VISCOSITY, SPIKY2,
  SPIKY5, POLY6_UNSCALED, SPIKY_UNSCALED
}
 
typedef UT_Array< GA_Offsetgas_PointList
 

Public Member Functions

 GAS_SPH ()
 
 ~GAS_SPH ()
 
bool initialize (const GU_Detail *gdp, bool fullinit=true, const GA_PointGroup *excludegroup=NULL, fpreal radiusScale=1.0, bool needVolume=true)
 
bool buildNeighbours (const GU_Detail *gdp, fpreal radiusScale=1.0, bool needVolume=true)
 
bool setNeighbours (const GU_Detail *gdp, GU_NeighbourList *list, fpreal radScale=1.0, bool needVolume=true)
 
fpreal sampleF (const UT_Vector3 &p, const GA_ROHandleF &attrib, sphWeight wfunc, fpreal *color=0, bool normalize=false, bool volumeScale=true) const
 
fpreal sampleF (const UT_Vector3 &p, const gas_PointList &point_list, const GA_ROHandleF &attrib, sphWeight wfunc, fpreal *color=0, bool normalize=false, bool volumeScale=true) const
 
fpreal sampleF (const UT_Vector3 &p, UT_FloatArray &floats, sphWeight wfunc, bool volumescale=true, bool normalize=false) const
 
fpreal sampleF (const UT_Vector3 &p, const gas_PointList &point_list, UT_FloatArray &floats, sphWeight wfunc, bool volumescale=true, bool normalize=false) const
 
UT_Vector3 sampleV3 (const UT_Vector3 &p, const GA_ROHandleV3 &attrib, sphWeight wfunc, fpreal *color=0, bool normalize=false) const
 
UT_Vector3 sampleV3 (const UT_Vector3 &p, const gas_PointList &point_list, const GA_ROHandleV3 &attrib, sphWeight wfunc, fpreal *color=0, bool normalize=false) const
 
UT_Vector3 sampleVelocity (const UT_Vector3 &p, sphWeight wfunc, int excludePoint=-1) const
 
UT_Vector3 sampleVelocity (const UT_Vector3 &p, const gas_PointList &ptlist, sphWeight wfunc, int excludePoint=-1) const
 
UT_Vector3 xsphVelocity (int ptnum, sphWeight wfunc, const UT_Vector3Array &velocities, fpreal xsph_constant) const
 
fpreal sampleDensity (const UT_Vector3 &p, sphWeight wfunc, const bool massScale=true) const
 
fpreal sampleDensity (const UT_Vector3 &p, const gas_PointList &ptlist, sphWeight wfunc, const bool massScale=true) const
 
void sampleDoubleDensity (const UT_Vector3 &p, const gas_PointList &ptlist, UT_FloatArray &rad2list, sphWeight wfunc1, sphWeight wfunc2, fpreal &density1, fpreal &density2, const bool massScale=true) const
 
fpreal sampleSurfaceDensity (const UT_Vector3 &p, const GA_ROHandleF &distanceattrib) const
 
fpreal sampleSurfaceDensity (const UT_Vector3 &p, const gas_PointList &ptlist, const GA_ROHandleF &distanceattrib) const
 
fpreal sampleSurfaceDensity (const UT_Vector3 &p, fpreal surfaceDistance, const bool distanceModifier=false) const
 
fpreal sampleSurfaceDensity (const UT_Vector3 &p, const gas_PointList &ptlist, fpreal surfaceDistance, const bool distanceModifier=false) const
 
UT_Vector3 sampleSurfaceDensityGrad (const UT_Vector3 &p, const GA_ROHandleF &distanceattrib) const
 
UT_Vector3 sampleSurfaceDensityGrad (const UT_Vector3 &p, const gas_PointList &ptlist, const GA_ROHandleF &distanceattrib) const
 
UT_Vector3 sampleSurfaceDensityGrad (const UT_Vector3 &p) const
 
UT_Vector3 sampleSurfaceDensityGrad (const UT_Vector3 &p, const gas_PointList &ptlist) const
 
fpreal sampleColor (const UT_Vector3 &p, sphWeight wfunc) const
 
fpreal sampleColor (const UT_Vector3 &p, const gas_PointList &ptlist, sphWeight wfunc) const
 
UT_Vector3 colorGradient (const UT_Vector3 &p, sphWeight wfunc) const
 
UT_Vector3 colorGradient (const UT_Vector3 &p, const gas_PointList &ptlist, sphWeight wfunc) const
 
UT_Vector3 colorGradientUnscaled (const UT_Vector3 &p, bool scale=false) const
 
UT_Vector3 colorGradientUnscaled (const UT_Vector3 &p, const gas_PointList &ptlist, bool scale=false) const
 
fpreal colorLaplacian (const UT_Vector3 &p, sphWeight wfunc, const GA_ROHandleR &scaleattrib=GA_ROHandleR(), fpreal point_scale=1.0) const
 
fpreal colorLaplacian (const UT_Vector3 &p, const gas_PointList &ptlist, sphWeight wfunc, const GA_ROHandleR &scaleattrib=GA_ROHandleR(), fpreal point_scale=1.0) const
 
UT_Vector3 gradient (const UT_Vector3 &p, const GA_ROHandleR &attrib, sphWeight wfunc, UT_Vector3 *color=0, bool debugprint=false, const GA_ROHandleR &scaleattrib=GA_ROHandleR(), fpreal point_scale=1.0) const
 
UT_Vector3 gradient (const UT_Vector3 &p, const gas_PointList &ptlist, const GA_ROHandleR &attrib, sphWeight wfunc, UT_Vector3 *color=0, bool debugprint=false, const GA_ROHandleR &scaleattrib=GA_ROHandleR(), fpreal point_scale=1.0) const
 
UT_Vector3 gradient (const UT_Vector3 &p, const GA_ROHandleV3 &attrib, sphWeight wfunc, int axis, UT_Vector3 *color=0, bool normalize=false) const
 
UT_Vector3 gradient (const UT_Vector3 &p, const gas_PointList &ptlist, const GA_ROHandleV3 &attrib, sphWeight wfunc, int axis, UT_Vector3 *color=0, bool normalize=false) const
 
fpreal laplacian (const UT_Vector3 &p, const GA_ROHandleR &attrib, sphWeight wfunc, fpreal *color=0) const
 
fpreal laplacian (const UT_Vector3 &p, const gas_PointList &ptlist, const GA_ROHandleR &attrib, sphWeight wfunc, fpreal *color=0) const
 
UT_FloatArray laplacianF (const UT_Vector3 &p, const GA_ROHandleR &attrib, sphWeight wfunc, int size, fpreal *color=0) const
 
UT_FloatArray laplacianF (const UT_Vector3 &p, const gas_PointList &ptlist, const GA_ROHandleR &attrib, sphWeight wfunc, int size, fpreal *color=0) const
 
UT_Vector3 laplacianV3 (const UT_Vector3 &p, const GA_ROHandleV3 &attrib, sphWeight wfunc, fpreal *color=0, const GA_ROHandleR &scale_attrib=GA_ROHandleR(), fpreal point_scale=1.0) const
 
UT_Vector3 laplacianV3 (const UT_Vector3 &p, const gas_PointList &ptlist, const GA_ROHandleV3 &attrib, sphWeight wfunc, fpreal *color=0, const GA_ROHandleR &scale_attrib=GA_ROHandleR(), fpreal point_scale=1.0) const
 
UT_Vector3 dampingValue (const UT_Vector3 &p, const GA_ROHandleV3 &attrib, sphWeight wfunc, UT_Vector3 &point_velocity, fpreal point_density, const GA_ROHandleR &scale_attrib=GA_ROHandleR(), fpreal point_scale=1.0) const
 
UT_Vector3 dampingValue (const UT_Vector3 &p, const gas_PointList &ptlist, const GA_ROHandleV3 &attrib, sphWeight wfunc, UT_Vector3 &point_velocity, fpreal point_density, const GA_ROHandleR &scale_attrib=GA_ROHandleR(), fpreal point_scale=1.0) const
 
void findClosePoints (const UT_Vector3 &p, gas_PointList &ptlist) const
 
void findClosePoints (int ptidx, gas_PointList &ptlist) const
 
bool initVelocityData (bool initKD=false)
 
fpreal getCellWidth () const
 
UT_HashGrid< GA_Offset > * getGrid () const
 

Static Public Member Functions

static void missingAttribWarning (SIM_Engine &engine, GAS_SubSolver *solver, const UT_String &objName, const UT_String &geometryName, const UT_String &attribName)
 

Protected Member Functions

fpreal64 weight (fpreal64 r2, fpreal64 h, sphWeight wfunc) const
 
fpreal64 dweight (fpreal64 r, fpreal64 h, sphWeight wfunc) const
 
fpreal64 d2weight (fpreal64 r, fpreal64 h, sphWeight wfunc) const
 
fpreal64 scaleddweight (fpreal64 r, fpreal64 h, sphWeight wfunc) const
 

Protected Attributes

UT_HashGrid< GA_Offset > * myGrid
 
fpreal myCellWidth
 
fpreal myCellWidth2
 
const GU_DetailmyGdp
 
GA_ROHandleF myRadAttrib
 
GA_ROHandleF myMassAttrib
 
GA_ROHandleF myDensityAttrib
 
UT_FloatArray myMasses
 
UT_FloatArray myDensities
 
UT_FloatArray myRadii
 
UT_Vector3Array myVelocities
 
GEO_PointTreemyPointTree
 
fpreal myRadiusScale
 
GU_NeighbourListmyNeighbourList
 
bool myOwnNeighbours
 

Detailed Description

Definition at line 40 of file GAS_SPH.h.

Member Typedef Documentation

Definition at line 57 of file GAS_SPH.h.

Member Enumeration Documentation

Enumerator
POLY6 
SPIKY 
VISCOSITY 
SPIKY2 
SPIKY5 
POLY6_UNSCALED 
SPIKY_UNSCALED 

Definition at line 46 of file GAS_SPH.h.

Constructor & Destructor Documentation

GAS_SPH::GAS_SPH ( )
GAS_SPH::~GAS_SPH ( )

Member Function Documentation

bool GAS_SPH::buildNeighbours ( const GU_Detail gdp,
fpreal  radiusScale = 1.0,
bool  needVolume = true 
)
UT_Vector3 GAS_SPH::colorGradient ( const UT_Vector3 p,
sphWeight  wfunc 
) const
UT_Vector3 GAS_SPH::colorGradient ( const UT_Vector3 p,
const gas_PointList ptlist,
sphWeight  wfunc 
) const
UT_Vector3 GAS_SPH::colorGradientUnscaled ( const UT_Vector3 p,
bool  scale = false 
) const
UT_Vector3 GAS_SPH::colorGradientUnscaled ( const UT_Vector3 p,
const gas_PointList ptlist,
bool  scale = false 
) const
fpreal GAS_SPH::colorLaplacian ( const UT_Vector3 p,
sphWeight  wfunc,
const GA_ROHandleR scaleattrib = GA_ROHandleR(),
fpreal  point_scale = 1.0 
) const
fpreal GAS_SPH::colorLaplacian ( const UT_Vector3 p,
const gas_PointList ptlist,
sphWeight  wfunc,
const GA_ROHandleR scaleattrib = GA_ROHandleR(),
fpreal  point_scale = 1.0 
) const
fpreal64 GAS_SPH::d2weight ( fpreal64  r,
fpreal64  h,
sphWeight  wfunc 
) const
protected
UT_Vector3 GAS_SPH::dampingValue ( const UT_Vector3 p,
const GA_ROHandleV3 attrib,
sphWeight  wfunc,
UT_Vector3 point_velocity,
fpreal  point_density,
const GA_ROHandleR scale_attrib = GA_ROHandleR(),
fpreal  point_scale = 1.0 
) const
UT_Vector3 GAS_SPH::dampingValue ( const UT_Vector3 p,
const gas_PointList ptlist,
const GA_ROHandleV3 attrib,
sphWeight  wfunc,
UT_Vector3 point_velocity,
fpreal  point_density,
const GA_ROHandleR scale_attrib = GA_ROHandleR(),
fpreal  point_scale = 1.0 
) const
fpreal64 GAS_SPH::dweight ( fpreal64  r,
fpreal64  h,
sphWeight  wfunc 
) const
protected
void GAS_SPH::findClosePoints ( const UT_Vector3 p,
gas_PointList ptlist 
) const

Returns all points close to the given point. Does a search using the points current positions

void GAS_SPH::findClosePoints ( int  ptidx,
gas_PointList ptlist 
) const

Finds all points close to the given point number. If the neighbourlist is built, that will be retrieved directly If it hasn't been built, the point's position will be searched using findClosePoints(Vector)

fpreal GAS_SPH::getCellWidth ( ) const
inline

Definition at line 358 of file GAS_SPH.h.

UT_HashGrid<GA_Offset>* GAS_SPH::getGrid ( ) const
inline

Definition at line 360 of file GAS_SPH.h.

UT_Vector3 GAS_SPH::gradient ( const UT_Vector3 p,
const GA_ROHandleR attrib,
sphWeight  wfunc,
UT_Vector3 color = 0,
bool  debugprint = false,
const GA_ROHandleR scaleattrib = GA_ROHandleR(),
fpreal  point_scale = 1.0 
) const
UT_Vector3 GAS_SPH::gradient ( const UT_Vector3 p,
const gas_PointList ptlist,
const GA_ROHandleR attrib,
sphWeight  wfunc,
UT_Vector3 color = 0,
bool  debugprint = false,
const GA_ROHandleR scaleattrib = GA_ROHandleR(),
fpreal  point_scale = 1.0 
) const
UT_Vector3 GAS_SPH::gradient ( const UT_Vector3 p,
const GA_ROHandleV3 attrib,
sphWeight  wfunc,
int  axis,
UT_Vector3 color = 0,
bool  normalize = false 
) const
UT_Vector3 GAS_SPH::gradient ( const UT_Vector3 p,
const gas_PointList ptlist,
const GA_ROHandleV3 attrib,
sphWeight  wfunc,
int  axis,
UT_Vector3 color = 0,
bool  normalize = false 
) const
bool GAS_SPH::initialize ( const GU_Detail gdp,
bool  fullinit = true,
const GA_PointGroup excludegroup = NULL,
fpreal  radiusScale = 1.0,
bool  needVolume = true 
)
bool GAS_SPH::initVelocityData ( bool  initKD = false)
fpreal GAS_SPH::laplacian ( const UT_Vector3 p,
const GA_ROHandleR attrib,
sphWeight  wfunc,
fpreal color = 0 
) const
fpreal GAS_SPH::laplacian ( const UT_Vector3 p,
const gas_PointList ptlist,
const GA_ROHandleR attrib,
sphWeight  wfunc,
fpreal color = 0 
) const
UT_FloatArray GAS_SPH::laplacianF ( const UT_Vector3 p,
const GA_ROHandleR attrib,
sphWeight  wfunc,
int  size,
fpreal color = 0 
) const
UT_FloatArray GAS_SPH::laplacianF ( const UT_Vector3 p,
const gas_PointList ptlist,
const GA_ROHandleR attrib,
sphWeight  wfunc,
int  size,
fpreal color = 0 
) const
UT_Vector3 GAS_SPH::laplacianV3 ( const UT_Vector3 p,
const GA_ROHandleV3 attrib,
sphWeight  wfunc,
fpreal color = 0,
const GA_ROHandleR scale_attrib = GA_ROHandleR(),
fpreal  point_scale = 1.0 
) const
UT_Vector3 GAS_SPH::laplacianV3 ( const UT_Vector3 p,
const gas_PointList ptlist,
const GA_ROHandleV3 attrib,
sphWeight  wfunc,
fpreal color = 0,
const GA_ROHandleR scale_attrib = GA_ROHandleR(),
fpreal  point_scale = 1.0 
) const
static void GAS_SPH::missingAttribWarning ( SIM_Engine engine,
GAS_SubSolver solver,
const UT_String objName,
const UT_String geometryName,
const UT_String attribName 
)
static
fpreal GAS_SPH::sampleColor ( const UT_Vector3 p,
sphWeight  wfunc 
) const
fpreal GAS_SPH::sampleColor ( const UT_Vector3 p,
const gas_PointList ptlist,
sphWeight  wfunc 
) const
fpreal GAS_SPH::sampleDensity ( const UT_Vector3 p,
sphWeight  wfunc,
const bool  massScale = true 
) const
fpreal GAS_SPH::sampleDensity ( const UT_Vector3 p,
const gas_PointList ptlist,
sphWeight  wfunc,
const bool  massScale = true 
) const
void GAS_SPH::sampleDoubleDensity ( const UT_Vector3 p,
const gas_PointList ptlist,
UT_FloatArray rad2list,
sphWeight  wfunc1,
sphWeight  wfunc2,
fpreal density1,
fpreal density2,
const bool  massScale = true 
) const
fpreal GAS_SPH::sampleF ( const UT_Vector3 p,
const GA_ROHandleF attrib,
sphWeight  wfunc,
fpreal color = 0,
bool  normalize = false,
bool  volumeScale = true 
) const
fpreal GAS_SPH::sampleF ( const UT_Vector3 p,
const gas_PointList point_list,
const GA_ROHandleF attrib,
sphWeight  wfunc,
fpreal color = 0,
bool  normalize = false,
bool  volumeScale = true 
) const
fpreal GAS_SPH::sampleF ( const UT_Vector3 p,
UT_FloatArray floats,
sphWeight  wfunc,
bool  volumescale = true,
bool  normalize = false 
) const
fpreal GAS_SPH::sampleF ( const UT_Vector3 p,
const gas_PointList point_list,
UT_FloatArray floats,
sphWeight  wfunc,
bool  volumescale = true,
bool  normalize = false 
) const
fpreal GAS_SPH::sampleSurfaceDensity ( const UT_Vector3 p,
const GA_ROHandleF distanceattrib 
) const
fpreal GAS_SPH::sampleSurfaceDensity ( const UT_Vector3 p,
const gas_PointList ptlist,
const GA_ROHandleF distanceattrib 
) const
fpreal GAS_SPH::sampleSurfaceDensity ( const UT_Vector3 p,
fpreal  surfaceDistance,
const bool  distanceModifier = false 
) const
fpreal GAS_SPH::sampleSurfaceDensity ( const UT_Vector3 p,
const gas_PointList ptlist,
fpreal  surfaceDistance,
const bool  distanceModifier = false 
) const
UT_Vector3 GAS_SPH::sampleSurfaceDensityGrad ( const UT_Vector3 p,
const GA_ROHandleF distanceattrib 
) const
UT_Vector3 GAS_SPH::sampleSurfaceDensityGrad ( const UT_Vector3 p,
const gas_PointList ptlist,
const GA_ROHandleF distanceattrib 
) const
UT_Vector3 GAS_SPH::sampleSurfaceDensityGrad ( const UT_Vector3 p) const
UT_Vector3 GAS_SPH::sampleSurfaceDensityGrad ( const UT_Vector3 p,
const gas_PointList ptlist 
) const
UT_Vector3 GAS_SPH::sampleV3 ( const UT_Vector3 p,
const GA_ROHandleV3 attrib,
sphWeight  wfunc,
fpreal color = 0,
bool  normalize = false 
) const
UT_Vector3 GAS_SPH::sampleV3 ( const UT_Vector3 p,
const gas_PointList point_list,
const GA_ROHandleV3 attrib,
sphWeight  wfunc,
fpreal color = 0,
bool  normalize = false 
) const
UT_Vector3 GAS_SPH::sampleVelocity ( const UT_Vector3 p,
sphWeight  wfunc,
int  excludePoint = -1 
) const
UT_Vector3 GAS_SPH::sampleVelocity ( const UT_Vector3 p,
const gas_PointList ptlist,
sphWeight  wfunc,
int  excludePoint = -1 
) const
fpreal64 GAS_SPH::scaleddweight ( fpreal64  r,
fpreal64  h,
sphWeight  wfunc 
) const
protected
bool GAS_SPH::setNeighbours ( const GU_Detail gdp,
GU_NeighbourList list,
fpreal  radScale = 1.0,
bool  needVolume = true 
)
fpreal64 GAS_SPH::weight ( fpreal64  r2,
fpreal64  h,
sphWeight  wfunc 
) const
protected
UT_Vector3 GAS_SPH::xsphVelocity ( int  ptnum,
sphWeight  wfunc,
const UT_Vector3Array velocities,
fpreal  xsph_constant 
) const

Member Data Documentation

fpreal GAS_SPH::myCellWidth
protected

Definition at line 373 of file GAS_SPH.h.

fpreal GAS_SPH::myCellWidth2
protected

Definition at line 374 of file GAS_SPH.h.

UT_FloatArray GAS_SPH::myDensities
protected

Definition at line 386 of file GAS_SPH.h.

GA_ROHandleF GAS_SPH::myDensityAttrib
protected

Definition at line 380 of file GAS_SPH.h.

const GU_Detail* GAS_SPH::myGdp
protected

Definition at line 376 of file GAS_SPH.h.

UT_HashGrid<GA_Offset>* GAS_SPH::myGrid
protected

Definition at line 371 of file GAS_SPH.h.

GA_ROHandleF GAS_SPH::myMassAttrib
protected

Definition at line 379 of file GAS_SPH.h.

UT_FloatArray GAS_SPH::myMasses
protected

Definition at line 385 of file GAS_SPH.h.

GU_NeighbourList* GAS_SPH::myNeighbourList
protected

Definition at line 400 of file GAS_SPH.h.

bool GAS_SPH::myOwnNeighbours
protected

Definition at line 401 of file GAS_SPH.h.

GEO_PointTree* GAS_SPH::myPointTree
protected

Definition at line 393 of file GAS_SPH.h.

GA_ROHandleF GAS_SPH::myRadAttrib
protected

Definition at line 378 of file GAS_SPH.h.

UT_FloatArray GAS_SPH::myRadii
protected

Definition at line 387 of file GAS_SPH.h.

fpreal GAS_SPH::myRadiusScale
protected

Definition at line 396 of file GAS_SPH.h.

UT_Vector3Array GAS_SPH::myVelocities
protected

Definition at line 388 of file GAS_SPH.h.


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