SIM_RawField Class Reference

#include <SIM_RawField.h>

List of all members.

Classes

struct  sim_particleToFieldParms

Public Types

enum  REDUCE_NAMES {
  REDUCE_MAX, REDUCE_MIN, REDUCE_AVERAGE, REDUCE_SUM,
  REDUCE_SUMABS, REDUCE_SUMSQUARE, REDUCE_RMS, REDUCE_MEDIAN
}
 Types of reductions supported by reduceOp. More...
enum  MIX_NAMES {
  MIX_COPY, MIX_ADD, MIX_SUB, MIX_MUL,
  MIX_DIV, MIX_MAX, MIX_MIN, MIX_AVERAGE,
  NUM_MIX
}
enum  PCG_METHOD { PCG_NONE, PCG_JACOBI, PCG_CHOLESKY, PCG_MIC }

Public Member Functions

 SIM_RawField ()
virtual ~SIM_RawField ()
 SIM_RawField (const SIM_RawField &src)
 Copy constructor:.
const SIM_RawFieldoperator= (const SIM_RawField &src)
 Assigment operator:.
void init (SIM_FieldSample sample, const UT_Vector3 &orig, const UT_Vector3 &size, int xres, int yres, int zres)
void init (SIM_FieldSample sample, const UT_Vector3 &orig, const UT_Vector3 &size, UT_VoxelArrayF *voxels)
void getPartialRange (UT_VoxelArrayIteratorF &vit, const UT_JobInfo &info) const
bool shouldMultiThread () const
 Returns true if this should be multithreaded.
void match (const SIM_RawField &src)
void match (const SIM_RawIndexField &src)
void resample (SIM_FieldSample sample, const SIM_RawField *src)
void getSamplePattern (SIM_FieldSample sample, int x, int y, int z, int &numsample, int *ix, int *iy, int *iz, bool clamp) const
void extrapolate (const SIM_RawField *depths, fpreal isocontour, fpreal dir, fpreal maxdist, bool clamp, fpreal clampval)
 THREADED_METHOD3 (SIM_RawField, shouldMultiThread(), moveAlongCurvature, fpreal, b_val, const SIM_RawField &, source, fpreal, timestep) void moveAlongCurvaturePartial(fpreal b_val
void moveAlongCurvature (fpreal amount, fpreal cflcond, int miniter, int maxiter)
 THREADED_METHOD3 (SIM_RawField, shouldMultiThread(), moveAlongNormal, const SIM_RawField &, speed, const SIM_RawField &, source, fpreal, timestep) void moveAlongNormalPartial(const SIM_RawField &speed
void moveAlongNormalMidpoint (const SIM_RawField &speed, const SIM_RawField &source, fpreal timestep)
void reinitializeSignedDistance (int maxiter)
 THREADED_METHOD (SIM_RawField, shouldMultiThread(), negate) void negatePartial(const UT_JobInfo &info)
 Negates all values in this field.
 THREADED_METHOD1 (SIM_RawField, shouldMultiThread(), scale, fpreal, scale) void scalePartial(fpreal scale
 Scales all values in this field.
 THREADED_METHOD1 (SIM_RawField, shouldMultiThread(), maximum, const SIM_RawField *, other) void maximumPartial(const SIM_RawField *other
 THREADED_METHOD1 (SIM_RawField, shouldMultiThread(), minimum, const SIM_RawField *, other) void minimumPartial(const SIM_RawField *other
 THREADED_METHOD1 (SIM_RawField, shouldMultiThread(), average, const SIM_RawField &, other) void averagePartial(const SIM_RawField &other
 THREADED_METHOD3_CONST (SIM_RawField, shouldMultiThread(), sumPerComponent, UT_DoubleArray &, result, UT_Int64Array &, activevoxels, const SIM_RawIndexField *, comp) void sumPerComponentPartial(UT_DoubleArray &result
 THREADED_METHOD2 (SIM_RawField, shouldMultiThread(), addValuePerComponent, const UT_DoubleArray &, valuelist, const SIM_RawIndexField *, comp) void addValuePerComponentPartial(const UT_DoubleArray &valuelist
 THREADED_METHOD3 (SIM_RawField, shouldMultiThread(), setScaleAdd, const SIM_RawField &, A, fpreal, scale, const SIM_RawField &, B) void setScaleAddPartial(const SIM_RawField &A
 THREADED_METHOD2 (SIM_RawField, shouldMultiThread(), smearedSign, const SIM_RawField &, sdf, fpreal, bandwidth) void smearedSignPartial(const SIM_RawField &sdf
 THREADED_METHOD (SIM_RawField, shouldMultiThread(), convertToHeaviside) void convertToHeavisidePartial(const UT_JobInfo &info)
fpreal toHeaviside (fpreal val) const
 Defines width as maxcomponent of our voxels.
fpreal fromHeaviside (fpreal val) const
fpreal reduceOp (REDUCE_NAMES op) const
fpreal average () const
 Prebuilt versions.
void localReduceOp (REDUCE_NAMES op, const UT_Vector3 &radius)
void boxBlur (float radius)
fpreal reduceMaskedOp (REDUCE_NAMES op, const SIM_RawField *mask, bool maskissdf) const
fpreal findProportionalValue (fpreal position, const SIM_RawField *mask, bool maskissdf) const
bool isMatching (const SIM_RawField *field) const
bool isMatching (const SIM_RawIndexField *field) const
bool isAligned (const SIM_RawField *field) const
bool isAligned (const SIM_RawIndexField *field) const
bool hasNan () const
 Returns true if our field has any NANs.
void testForNan () const
UT_VoxelArrayFfield () const
 Fetches the raw field.
UT_VoxelArrayFsteal ()
const UT_Vector3getOrig () const
const UT_Vector3getSize () const
const UT_Vector3getBBoxOrig () const
const UT_Vector3getBBoxSize () const
const UT_Vector3getVoxelSize () const
fpreal getVoxelDiameter () const
fpreal getVoxelVolume () const
SIM_FieldSample getSample () const
int64 getMemoryUsage () const
void getVoxelRes (int &xres, int &yres, int &zres) const
fpreal getValue (UT_Vector3 pos) const
 Functions to resolve quantities about the field.
fpreal getCellValue (int x, int y, int z) const
 Returns an averaged value for the center of the given voxel.
void addToCell (int x, int y, int z, fpreal v)
void setCellValue (int x, int y, int z, fpreal v)
UT_Vector3 getGradient (UT_Vector3 pos) const
UT_Vector3 getGradientAtIndex (int x, int y, int z) const
fpreal64 getLaplacian (UT_Vector3 pos) const
fpreal64 getLaplacianAtIndex (int x, int y, int z) const
fpreal64 getCurvature (UT_Vector3 pos) const
fpreal64 getCurvatureAtIndex (int x, int y, int z) const
fpreal64 getCurvatureTimesGradAtIndex (int x, int y, int z) const
fpreal64 calculateHJWENO (fpreal64 v1, fpreal64 v2, fpreal64 v3, fpreal64 v4, fpreal64 v5) const
fpreal64 calculateDerivative (int x, int y, int z, int axis, bool positivegradient) const
bool indexToPos (int x, int y, int z, UT_Vector3 &pos) const
bool posToIndex (UT_Vector3 pos, int &x, int &y, int &z) const
 Converts a worldspace position into an integer index.
bool posToIndex (UT_Vector3 pos, int &x, int &y, int &z, fpreal &dx, fpreal &dy, fpreal &dz) const
bool cellIndexToPos (int x, int y, int z, UT_Vector3 &pos) const
bool posToCellIndex (UT_Vector3 pos, int &x, int &y, int &z) const
bool movePtToIso (UT_Vector3 &pos, fpreal goaliso, fpreal maxtime, fpreal tol=1e-4) const
 THREADED_METHOD7 (SIM_RawField, shouldMultiThread(), advect, const SIM_RawField *, source, const SIM_RawField *, velx, const SIM_RawField *, vely, const SIM_RawField *, velz, fpreal, time, const SIM_RawField *, collision, SIM_FieldAdvection, advectmethod) void advectPartial(const SIM_RawField *source
 THREADED_METHOD4 (SIM_RawField, shouldMultiThread(), buoyancy, const SIM_RawField *, temperature, fpreal, up, fpreal, Tamb, fpreal, buoyancy) void buoyancyPartial(const SIM_RawField *temperature
 THREADED_METHOD3 (SIM_RawField, shouldMultiThread(), applyParticles, const GU_Detail *, particles, GEO_PointTree *, pttree, sim_particleToFieldParms &, parms) void applyParticlesPartial(const GU_Detail *particles
void accumulateParticles (const GU_Detail *particles, sim_particleToFieldParms &parms)
 THREADED_METHOD5 (SIM_RawField, shouldMultiThread(), advect2, const SIM_RawField *, source, sim_PointVelocity, getVelocity, fpreal, time, fpreal, voxelsize, const SIM_RawField *, collision) void advect2Partial(const SIM_RawField *source
void advectSelf (const SIM_RawField *velx, const SIM_RawField *vely, const SIM_RawField *velz, fpreal time, const SIM_RawField *collision, SIM_FieldAdvection advectmethod)
void advectSelf (sim_PointVelocity getVelocity, fpreal time, fpreal voxelsize, const SIM_RawField *collision)
void diffuse (fpreal diffrate, int numiter, const SIM_RawField *collision=0)
void computeConnectedComponents (UT_VoxelArray< int64 > &comp, int &numcomponent) const
 Determine all components connected according to < 0 semantic.
 THREADED_METHOD2 (SIM_RawField, shouldMultiThread(), buildDivergenceFace, const SIM_VectorField *, vel, const SIM_RawField *, surface) void buildDivergenceFacePartial(const SIM_VectorField *vel
void solvePressure (const SIM_RawField *divergence, const SIM_RawField *collision, int numiter=20)
void solvePressurePCG (const SIM_RawField &divergence, SIM_RawIndexField &index, SIM_VectorField *vel, const SIM_RawIndexField *comp=0, const UT_IntArray *expandable=0, const SIM_RawField *surface=0, bool variational=true, bool ghostfluid=true, PCG_METHOD pcgmethod=PCG_MIC)
 THREADED_METHOD4 (SIM_RawField, shouldMultiThread(), gaussSeidelIteration, const SIM_RawField *, B, fpreal32, weight, fpreal32, sumweight, int, parity) void gaussSeidelIterationPartial(const SIM_RawField *B
 THREADED_METHOD4_CONST (SIM_RawField, shouldMultiThread(), gaussSeidelIterationFlat, fpreal32 *, A, fpreal32, weight, fpreal32, sumweight, int, parity) void gaussSeidelIterationFlatPartial(fpreal32 *A
 THREADED_METHOD4_CONST (SIM_RawField, shouldMultiThread(), gaussSeidelIterationFlat2D, fpreal32 *, A, fpreal32, weight, fpreal32, sumweight, int, parity) void gaussSeidelIterationFlat2DPartial(fpreal32 *A
 THREADED_METHOD3_CONST (SIM_RawField, shouldMultiThread(), solveLowerTriangularSystems, const UT_PtrArray< SIM_RawSparseMatrix * > &, ld, UT_RefArray< UT_VectorF > &, ys, const UT_RefArray< UT_VectorF > &, bs) void solveLowerTriangularSystemsPartial(const UT_PtrArray< SIM_RawSparseMatrix * > &ld
 THREADED_METHOD5_CONST (SIM_RawField, shouldMultiThread(), solveUpperTriangularSystems, const UT_PtrArray< SIM_RawSparseMatrix * > &, ud, UT_RefArray< UT_VectorF > &, xs, const UT_PtrArray< SIM_RawSparseMatrix * > &, us, const UT_VectorF &, xc, UT_RefArray< UT_VectorF > &, ys) void solveUpperTriangularSystemsPartial(const UT_PtrArray< SIM_RawSparseMatrix * > &ud
 THREADED_METHOD2_CONST (SIM_RawField, shouldMultiThread(), incompleteCholeskyPreconditioner, const UT_VectorF &, b, UT_VectorF &, x) void incompleteCholeskyPreconditionerPartial(const UT_VectorF &b
 Applies the incomplete cholesky preconditioner.
 THREADED_METHOD2_CONST (SIM_RawField, shouldMultiThread(), incompleteCholeskyFactorization, const SIM_RawSparseMatrix &, A, PCG_METHOD, pcgmethod) void incompleteCholeskyFactorizationPartial(const SIM_RawSparseMatrix &A
 Calculates the incomplete cholesky factorization.
void enforceBoundary (SIM_FieldBoundary collisionboundary=SIM_BOUNDARY_NONE, const SIM_RawField *collision=0, const SIM_RawField *cvalue=0)
void enforceCollisionBoundary (SIM_FieldBoundary boundary, const SIM_RawField *collision, const SIM_RawField *cvalue=0)
void enforceSideBoundary (int axis, int side, SIM_FieldBoundary bound, fpreal boundaryvalue)
 THREADED_METHOD3 (SIM_RawField, shouldMultiThread(), enforceCollisionBoundaryInternal, SIM_FieldBoundary, boundary, const SIM_RawField *, collision, const SIM_RawField *, cvalue) void enforceCollisionBoundaryInternalPartial(SIM_FieldBoundary boundary
void enforceBoundaryFlat (fpreal32 *values, const SIM_RawIndexField *collision_lookup)
 THREADED_METHOD2 (SIM_RawField, shouldMultiThread(), enforceCollisionBoundaryFlat, fpreal32 *, values, const SIM_RawIndexField *, collision_lookup) void enforceCollisionBoundaryFlatPartial(fpreal32 *values
void enforceSideBoundaryFlat (fpreal32 *values, int axis, int side, SIM_FieldBoundary bound, fpreal boundval)
void setBoundary (int axis, int side, SIM_FieldBoundary bound)
SIM_FieldBoundary getBoundary (int axis, int side) const
void setBoundaryValue (int axis, int side, fpreal v)
fpreal getBoundaryValue (int axis, int side) const
void setAsExtrapolatedField (UT_Vector3 scale)
void waveletTransform (UT_Wavelet::WAVELET_NAMES wavelettype, const SIM_RawField *field, int maxpasses=-1)
void waveletInverseTransform (UT_Wavelet::WAVELET_NAMES wavelettype, const SIM_RawField *wavelet, int maxpasses=-1)
void waveletComputePSD (const SIM_RawField *wavelet, int level)
 Computes the sum of squares of the given level's detail vector.
void waveletExtractComponent (const SIM_RawField *wavelet, int level, int component)
 Extracts the given component from a packed wavelet array.
 THREADED_METHOD3 (SIM_RawField, shouldMultiThread(), buildFromGeo, const GEO_PrimVolume *, vol, const UT_DMatrix4 &, xform, fpreal, scale) void buildFromGeoPartial(const GEO_PrimVolume *vol

Static Public Member Functions

static fpreal toHeaviside (fpreal val, fpreal diam)
 Perform heaviside & inverse heaviside in a consistent fashion.
static fpreal fromHeaviside (fpreal val, fpreal diam)
static fpreal64 getCurvatureAtProbe (UT_VoxelProbeCubeF &probe, const UT_Vector3 &invvoxelsize)
 Computes the curvature according to a 3^3 voxel probe.
static void advect (UT_Vector3 &pos, const SIM_RawField *velx, const SIM_RawField *vely, const SIM_RawField *velz, fpreal time, const SIM_RawField *collision=0)
 Verbs that can be performed on these fields.
static void advect (UT_Vector3 &pos, sim_PointVelocity getVelocity, fpreal time, fpreal voxelsize, int jobnum=0, const SIM_RawField *collision=0)
static void advectMidpoint (UT_Vector3 &pos, const SIM_RawField *velx, const SIM_RawField *vely, const SIM_RawField *velz, fpreal time, const SIM_RawField *collision=0)
 Advect a point with the midpoint method.
static void advectMidpoint (UT_Vector3 &pos, sim_PointVelocity getVelocity, fpreal time, fpreal voxelsize, int jobnum=0, const SIM_RawField *collision=0)
static fpreal mixValues (MIX_NAMES mixtype, fpreal dest, fpreal src)
 Performs the requires mixing.
static void diffuse (float *dstdata, const float *srcdata[3][3][3], float b, float ivsx, float ivsy, float ivsz, int tx, int ty, int max_xtile, int max_ytile, int max_xvox, int max_yvox)
 Raw diffuse algorithm, exposed only for external performance tests.

Public Attributes

const SIM_RawFieldsource
const SIM_RawField fpreal timestep
const SIM_RawField fpreal
const UT_JobInfo
jobinfo
const SIM_RawField fpreal
const UT_JobInfo
info
const UT_JobInfoinfo
const UT_JobInfojobinfo
UT_Int64Arrayactivevoxels
UT_Int64Array const
SIM_RawIndexField
comp
UT_Int64Array const
SIM_RawIndexField const
UT_JobInfo &info 
const
const SIM_RawIndexFieldcomp
const SIM_RawIndexField const
UT_JobInfo
info
fpreal scale
fpreal const SIM_RawFieldB
fpreal const SIM_RawField
const UT_JobInfo
jobinfo
fpreal bandwidth
fpreal const UT_JobInfoinfo
const SIM_RawFieldvelx
const SIM_RawField const
SIM_RawField
vely
const SIM_RawField const
SIM_RawField const
SIM_RawField
velz
const SIM_RawField const
SIM_RawField const
SIM_RawField fpreal 
time
const SIM_RawField const
SIM_RawField const
SIM_RawField fpreal const
SIM_RawField
collision
const SIM_RawField const
SIM_RawField const
SIM_RawField fpreal const
SIM_RawField
SIM_FieldAdvection 
advectmethod
const SIM_RawField const
SIM_RawField const
SIM_RawField fpreal const
SIM_RawField
SIM_FieldAdvection const
UT_JobInfo
info
fpreal up
fpreal fpreal Tamb
fpreal fpreal fpreal buoyancy
fpreal fpreal fpreal const
UT_JobInfo
info
GEO_PointTreepttree
GEO_PointTree
sim_particleToFieldParms
parms
GEO_PointTree
sim_particleToFieldParms const
UT_JobInfo
info
sim_PointVelocity getVelocity
sim_PointVelocity fpreal time
sim_PointVelocity fpreal fpreal voxelsize
sim_PointVelocity fpreal
fpreal const SIM_RawField
collision
sim_PointVelocity fpreal
fpreal const SIM_RawField
const UT_JobInfo
info
const SIM_RawFieldsurface
const SIM_RawField const
UT_JobInfo
info
fpreal32 weight
fpreal32 fpreal32 sumweight
fpreal32 fpreal32 int parity
fpreal32 fpreal32 int const
UT_JobInfo
info
fpreal32 fpreal32 int const
UT_JobInfo &info 
const
UT_RefArray< UT_VectorF > & ys
UT_RefArray< UT_VectorF >
const UT_RefArray< UT_VectorF > & 
bs
UT_RefArray< UT_VectorF >
const UT_RefArray< UT_VectorF >
const UT_JobInfo &info 
const
UT_RefArray< UT_VectorF > & xs
UT_RefArray< UT_VectorF >
const UT_PtrArray
< SIM_RawSparseMatrix * > & 
us
UT_RefArray< UT_VectorF >
const UT_PtrArray
< SIM_RawSparseMatrix * >
const UT_VectorF
xc
UT_RefArray< UT_VectorF >
const UT_PtrArray
< SIM_RawSparseMatrix * >
const UT_VectorF UT_RefArray
< UT_VectorF > & 
ys
UT_RefArray< UT_VectorF >
const UT_PtrArray
< SIM_RawSparseMatrix * >
const UT_VectorF UT_RefArray
< UT_VectorF > const
UT_JobInfo &info 
const
UT_VectorFx
UT_VectorF const UT_JobInfo &info const
PCG_METHOD pcgmethod
PCG_METHOD const UT_JobInfo &info const
const SIM_RawFieldcollision
const SIM_RawField const
SIM_RawField
cvalue
const SIM_RawField const
SIM_RawField const UT_JobInfo
info
const SIM_RawIndexFieldcollision_lookup
const UT_DMatrix4xform
const UT_DMatrix4 fpreal scale
const UT_DMatrix4 fpreal const
UT_JobInfo
info

Protected Member Functions

void waveletRebuildFromVoxelArray (UT_VoxelArrayF *array, float scale)
 THREADED_METHOD2_CONST (SIM_RawField, shouldMultiThread(), reduceOpInternal, fpreal64 *, sum, REDUCE_NAMES, op) void reduceOpInternalPartial(fpreal64 *sum
 THREADED_METHOD5_CONST (SIM_RawField, shouldMultiThread(), reduceMaskedOpInternal, fpreal64 *, sum, fpreal64 *, masktotal, REDUCE_NAMES, op, const SIM_RawField *, mask, bool, maskissdf) void reduceMaskedOpInternalPartial(fpreal64 *sum
void sortAllVoxels (UT_FloatArray &voxelvalues) const
void sortAllVoxelsMasked (UT_FloatArray &voxelvalues, const SIM_RawField *maskfield, bool maskissdf) const
 THREADED_METHOD7 (SIM_RawField, shouldMultiThread(), buildExtrapList, UT_RefArray< UT_PtrArray< gu_sdf_qelem * > > &, lists, const SIM_RawField *, depths, fpreal, isocontour, fpreal, dir, fpreal, maxdist, bool, clamp, fpreal, clampval) void buildExtrapListPartial(UT_RefArray< UT_PtrArray< gu_sdf_qelem * > > &lists
 Methods for extrapolation.
void localReduceByAxis (REDUCE_NAMES op, UT_VoxelArrayF &dst, UT_VoxelArrayF &field, UT_Vector3 radius) const
template<int AXIS, REDUCE_NAMES OP>
void localReduceAxis (UT_VoxelArrayF &dstfield, UT_VoxelArrayF &field, float radius, const UT_JobInfo &info) const
 Reduce along a given axis by the specified radius in voxels.
template<int AXIS, REDUCE_NAMES OP>
void localMinMaxAxis (UT_VoxelArrayF &dstfield, UT_VoxelArrayF &field, float radius, const UT_JobInfo &info) const
template<int AXIS>
void localReduceAxisOp (REDUCE_NAMES op, UT_VoxelArrayF &dstfield, UT_VoxelArrayF &field, float radius, const UT_JobInfo &info) const
 THREADED_METHOD4_CONST (SIM_RawField, field.getTileRes(1)*field.getTileRes(2) > 1, localReduceAxisX, REDUCE_NAMES, op, UT_VoxelArrayF &, dst, UT_VoxelArrayF &, field, float, radius) void localReduceAxisXPartial(REDUCE_NAMES op
 Again a triple specialization to engage threading.
UT_VoxelArrayF UT_VoxelArrayF
float const UT_JobInfo &info
const 
localReduceAxisOp (op, dst, field, radius, info)
 THREADED_METHOD4_CONST (SIM_RawField, field.getTileRes(0)*field.getTileRes(2) > 1, localReduceAxisY, REDUCE_NAMES, op, UT_VoxelArrayF &, dst, UT_VoxelArrayF &, field, float, radius) void localReduceAxisYPartial(REDUCE_NAMES op

Static Protected Member Functions

static fpreal applyBoundary (SIM_FieldBoundary bound, fpreal v, fpreal boundval)

Protected Attributes

REDUCE_NAMES op
REDUCE_NAMES const UT_JobInfo &info const
fpreal64masktotal
fpreal64 REDUCE_NAMES op
fpreal64 REDUCE_NAMES const
SIM_RawField
maskfield
fpreal64 REDUCE_NAMES const
SIM_RawField bool 
maskissdf
fpreal64 REDUCE_NAMES const
SIM_RawField bool const
UT_JobInfo &info 
const
const SIM_RawFielddepths
const SIM_RawField fpreal isocontour
const SIM_RawField fpreal fpreal dir
const SIM_RawField fpreal
fpreal fpreal 
maxdist
const SIM_RawField fpreal
fpreal fpreal bool 
clamp
const SIM_RawField fpreal
fpreal fpreal bool fpreal 
clampval
const SIM_RawField fpreal
fpreal fpreal bool fpreal
const UT_JobInfo
info
UT_VoxelArrayFdst
UT_VoxelArrayF UT_VoxelArrayFfield
UT_VoxelArrayF UT_VoxelArrayF float radius
UT_VoxelArrayFmyField
UT_Vector3 myOrig
UT_Vector3 mySize
UT_Vector3 myBBoxOrig
UT_Vector3 myBBoxSize
UT_Vector3 myVoxelSize
fpreal myVoxelDiameter
SIM_FieldBoundary myBoundary [3][2]
fpreal myBoundaryValue [3][2]


Detailed Description

Examples:

ROP/ROP_DopField.C, SIM/SIM_GasAdd.C, and SIM/SIM_GasAdd.h.

Definition at line 88 of file SIM_RawField.h.


Member Enumeration Documentation

Enumerator:
MIX_COPY 
MIX_ADD 
MIX_SUB 
MIX_MUL 
MIX_DIV 
MIX_MAX 
MIX_MIN 
MIX_AVERAGE 
NUM_MIX 

Definition at line 532 of file SIM_RawField.h.

Enumerator:
PCG_NONE 
PCG_JACOBI 
PCG_CHOLESKY 
PCG_MIC 

Definition at line 628 of file SIM_RawField.h.

Types of reductions supported by reduceOp.

Enumerator:
REDUCE_MAX 
REDUCE_MIN 
REDUCE_AVERAGE 
REDUCE_SUM 
REDUCE_SUMABS 
REDUCE_SUMSQUARE 
REDUCE_RMS 
REDUCE_MEDIAN 

Definition at line 293 of file SIM_RawField.h.


Constructor & Destructor Documentation

SIM_RawField::SIM_RawField (  ) 

virtual SIM_RawField::~SIM_RawField (  )  [virtual]

SIM_RawField::SIM_RawField ( const SIM_RawField src  ) 

Copy constructor:.


Member Function Documentation

void SIM_RawField::accumulateParticles ( const GU_Detail particles,
sim_particleToFieldParms parms 
)

void SIM_RawField::addToCell ( int  x,
int  y,
int  z,
fpreal  v 
)

Adds the value to the given voxel cell, averaging out among adjacent samples if we aren't sampled evenly.

static void SIM_RawField::advect ( UT_Vector3 pos,
sim_PointVelocity  getVelocity,
fpreal  time,
fpreal  voxelsize,
int  jobnum = 0,
const SIM_RawField collision = 0 
) [static]

static void SIM_RawField::advect ( UT_Vector3 pos,
const SIM_RawField velx,
const SIM_RawField vely,
const SIM_RawField velz,
fpreal  time,
const SIM_RawField collision = 0 
) [static]

Verbs that can be performed on these fields.

Advect a point in space according to an array of velocity fields.

static void SIM_RawField::advectMidpoint ( UT_Vector3 pos,
sim_PointVelocity  getVelocity,
fpreal  time,
fpreal  voxelsize,
int  jobnum = 0,
const SIM_RawField collision = 0 
) [static]

static void SIM_RawField::advectMidpoint ( UT_Vector3 pos,
const SIM_RawField velx,
const SIM_RawField vely,
const SIM_RawField velz,
fpreal  time,
const SIM_RawField collision = 0 
) [static]

Advect a point with the midpoint method.

void SIM_RawField::advectSelf ( sim_PointVelocity  getVelocity,
fpreal  time,
fpreal  voxelsize,
const SIM_RawField collision 
)

void SIM_RawField::advectSelf ( const SIM_RawField velx,
const SIM_RawField vely,
const SIM_RawField velz,
fpreal  time,
const SIM_RawField collision,
SIM_FieldAdvection  advectmethod 
)

Advect this field by the given velocity fields. Invokes advect but handles the creation of the intermediate field.

static fpreal SIM_RawField::applyBoundary ( SIM_FieldBoundary  bound,
fpreal  v,
fpreal  boundval 
) [static, protected]

fpreal SIM_RawField::average (  )  const [inline]

Prebuilt versions.

Definition at line 311 of file SIM_RawField.h.

void SIM_RawField::boxBlur ( float  radius  )  [inline]

Inplace box blur. Radius is in world coordinates.

Definition at line 320 of file SIM_RawField.h.

fpreal64 SIM_RawField::calculateDerivative ( int  x,
int  y,
int  z,
int  axis,
bool  positivegradient 
) const

Calculate the derivitive along the specified axis using an HJ WENO method at the given index. The boolean determines whether the derivitive in the positive or negative direction is computed.

fpreal64 SIM_RawField::calculateHJWENO ( fpreal64  v1,
fpreal64  v2,
fpreal64  v3,
fpreal64  v4,
fpreal64  v5 
) const

Giving the relevent divided differences, compute the HJWENO approxmiation of the derivative.

bool SIM_RawField::cellIndexToPos ( int  x,
int  y,
int  z,
UT_Vector3 pos 
) const

Convert voxel cell indices to world coordinates and vice-versa. Returns values at cell centers. Is equivalent to the indexToPos style functions only when sampling is CENTER.

void SIM_RawField::computeConnectedComponents ( UT_VoxelArray< int64 > &  comp,
int &  numcomponent 
) const

Determine all components connected according to < 0 semantic.

static void SIM_RawField::diffuse ( float *  dstdata,
const float *  srcdata[3][3][3],
float  b,
float  ivsx,
float  ivsy,
float  ivsz,
int  tx,
int  ty,
int  max_xtile,
int  max_ytile,
int  max_xvox,
int  max_yvox 
) [static]

Raw diffuse algorithm, exposed only for external performance tests.

void SIM_RawField::diffuse ( fpreal  diffrate,
int  numiter,
const SIM_RawField collision = 0 
)

Solve the diffusion equation over this field according to the given diffusion rate. One likely wants to roll the desired timestep into the diffusion rate.

void SIM_RawField::enforceBoundary ( SIM_FieldBoundary  collisionboundary = SIM_BOUNDARY_NONE,
const SIM_RawField collision = 0,
const SIM_RawField cvalue = 0 
)

Enforces the boundary conditions on this field. Each axis can have its own conditions

void SIM_RawField::enforceBoundaryFlat ( fpreal32 values,
const SIM_RawIndexField collision_lookup 
)

Enforces the boundary conditions onto a flat array using the dimensions of this. Does SAME boundaries for collision objects. Index field is where to copy from for each collision voxel.

void SIM_RawField::enforceCollisionBoundary ( SIM_FieldBoundary  boundary,
const SIM_RawField collision,
const SIM_RawField cvalue = 0 
)

void SIM_RawField::enforceSideBoundary ( int  axis,
int  side,
SIM_FieldBoundary  bound,
fpreal  boundaryvalue 
)

void SIM_RawField::enforceSideBoundaryFlat ( fpreal32 values,
int  axis,
int  side,
SIM_FieldBoundary  bound,
fpreal  boundval 
)

void SIM_RawField::extrapolate ( const SIM_RawField depths,
fpreal  isocontour,
fpreal  dir,
fpreal  maxdist,
bool  clamp,
fpreal  clampval 
)

Extrapolates the values of this field to all locations which are on the wrong side of the isocontour. dir == 1 means greater than isocontour is wrong, dir == -1 is less than. maxdist, if not negative, represents the greatest *absolute* distance to extrapolate to. Values outside of this are left unaffected, unless clamp is set, in which case they are set to clampval.

UT_VoxelArrayF* SIM_RawField::field (  )  const [inline]

Fetches the raw field.

Definition at line 359 of file SIM_RawField.h.

fpreal SIM_RawField::findProportionalValue ( fpreal  position,
const SIM_RawField mask,
bool  maskissdf 
) const

Sorts the valid voxels (as defined by optional mask) and returns the given percentile voxel. 0.5 means median. 0.25 first quartile, etc.

fpreal SIM_RawField::fromHeaviside ( fpreal  val  )  const

static fpreal SIM_RawField::fromHeaviside ( fpreal  val,
fpreal  diam 
) [static]

const UT_Vector3& SIM_RawField::getBBoxOrig (  )  const [inline]

Definition at line 367 of file SIM_RawField.h.

const UT_Vector3& SIM_RawField::getBBoxSize (  )  const [inline]

Definition at line 368 of file SIM_RawField.h.

SIM_FieldBoundary SIM_RawField::getBoundary ( int  axis,
int  side 
) const [inline]

Definition at line 818 of file SIM_RawField.h.

fpreal SIM_RawField::getBoundaryValue ( int  axis,
int  side 
) const [inline]

Definition at line 822 of file SIM_RawField.h.

fpreal SIM_RawField::getCellValue ( int  x,
int  y,
int  z 
) const

Returns an averaged value for the center of the given voxel.

fpreal64 SIM_RawField::getCurvature ( UT_Vector3  pos  )  const

Returns the curvature of the field at a given world space location. Uses interpolation of index based getCurvatureAtIndex.

fpreal64 SIM_RawField::getCurvatureAtIndex ( int  x,
int  y,
int  z 
) const

Computes the curvature at the given voxel index. Uses central differencing. The resulting curvature is clamped according to the resolution of the field to avoid abnormally large values in noisy data.

static fpreal64 SIM_RawField::getCurvatureAtProbe ( UT_VoxelProbeCubeF probe,
const UT_Vector3 invvoxelsize 
) [static]

Computes the curvature according to a 3^3 voxel probe.

fpreal64 SIM_RawField::getCurvatureTimesGradAtIndex ( int  x,
int  y,
int  z 
) const

Computes K |grad(phi|), the curvature times the length of the gradient. By folding the two operations, we can return a non-zero value where grad goes to zero (but curvature doesn't) using L'Hospital's rule. This also does not clamp the curvature.

UT_Vector3 SIM_RawField::getGradient ( UT_Vector3  pos  )  const

Return the gradient of the field at the given world space location. Uses central differencing with a sample spacing of the voxelsize.

UT_Vector3 SIM_RawField::getGradientAtIndex ( int  x,
int  y,
int  z 
) const

Returns the gradient at the given voxel index. Uses central differencing.

fpreal64 SIM_RawField::getLaplacian ( UT_Vector3  pos  )  const

Computes the laplacian of the field at the world space coordinate using interpolation of getLaplacianAtIndex

fpreal64 SIM_RawField::getLaplacianAtIndex ( int  x,
int  y,
int  z 
) const

Computes the laplacian of the field at the specific voxel index specified

int64 SIM_RawField::getMemoryUsage (  )  const

const UT_Vector3& SIM_RawField::getOrig (  )  const [inline]

Examples:
ROP/ROP_DopField.C.

Definition at line 365 of file SIM_RawField.h.

void SIM_RawField::getPartialRange ( UT_VoxelArrayIteratorF vit,
const UT_JobInfo info 
) const

Initializes the voxel iterator to only run over a subset of tiles that correspond to the appropriate range for the jobinfo.

SIM_FieldSample SIM_RawField::getSample (  )  const [inline]

Definition at line 376 of file SIM_RawField.h.

void SIM_RawField::getSamplePattern ( SIM_FieldSample  sample,
int  x,
int  y,
int  z,
int &  numsample,
int *  ix,
int *  iy,
int *  iz,
bool  clamp 
) const

Returns the set of samples in *this* field which correspond to the given location & sampling pattern. ix, iy, and iz should be size 8. If you want the deltas for the sampling pattern, call with x, y, z zero and clamp to false.

const UT_Vector3& SIM_RawField::getSize ( void   )  const [inline]

Examples:
ROP/ROP_DopField.C.

Definition at line 366 of file SIM_RawField.h.

fpreal SIM_RawField::getValue ( UT_Vector3  pos  )  const

Functions to resolve quantities about the field.

Sample the field at the given world space location.

Examples:
SIM/SIM_GasAdd.C.

fpreal SIM_RawField::getVoxelDiameter (  )  const [inline]

Definition at line 370 of file SIM_RawField.h.

void SIM_RawField::getVoxelRes ( int &  xres,
int &  yres,
int &  zres 
) const

Returns the resolution of the voxel grid that we are sampling. This is a count of voxels, so may differ for our different sampling methods.

const UT_Vector3& SIM_RawField::getVoxelSize (  )  const [inline]

Definition at line 369 of file SIM_RawField.h.

fpreal SIM_RawField::getVoxelVolume (  )  const [inline]

Definition at line 371 of file SIM_RawField.h.

bool SIM_RawField::hasNan (  )  const [inline]

Returns true if our field has any NANs.

Definition at line 352 of file SIM_RawField.h.

bool SIM_RawField::indexToPos ( int  x,
int  y,
int  z,
UT_Vector3 pos 
) const

Convert indices to world coordinates and vice-versa. Note this uses this field's indices which change depending on sampling.

Examples:
SIM/SIM_GasAdd.C.

void SIM_RawField::init ( SIM_FieldSample  sample,
const UT_Vector3 orig,
const UT_Vector3 size,
UT_VoxelArrayF voxels 
)

Initializes the field. Will gain ownership of the given voxel array.

void SIM_RawField::init ( SIM_FieldSample  sample,
const UT_Vector3 orig,
const UT_Vector3 size,
int  xres,
int  yres,
int  zres 
)

Initializes the field. The resolution given is in terms of voxels, the actual dimensions of this field may be slightly different due to the sampling choice.

bool SIM_RawField::isAligned ( const SIM_RawIndexField field  )  const

bool SIM_RawField::isAligned ( const SIM_RawField field  )  const

Returns true if the two fields are precisely aligned. This means that samples are matched so a given integer index into either field would give the same result.

Examples:
SIM/SIM_GasAdd.C.

bool SIM_RawField::isMatching ( const SIM_RawIndexField field  )  const

bool SIM_RawField::isMatching ( const SIM_RawField field  )  const

Returns true if the given field and this one match in terms of number of voxels and bounding box size. This means the voxel cells match - not necessarily the sample points!

template<int AXIS, REDUCE_NAMES OP>
void SIM_RawField::localMinMaxAxis ( UT_VoxelArrayF dstfield,
UT_VoxelArrayF field,
float  radius,
const UT_JobInfo info 
) const [inline, protected]

template<int AXIS, REDUCE_NAMES OP>
void SIM_RawField::localReduceAxis ( UT_VoxelArrayF dstfield,
UT_VoxelArrayF field,
float  radius,
const UT_JobInfo info 
) const [inline, protected]

Reduce along a given axis by the specified radius in voxels.

UT_VoxelArrayF UT_VoxelArrayF float const UT_JobInfo& info const SIM_RawField::localReduceAxisOp ( op  ,
dst  ,
field  ,
radius  ,
info   
) [protected]

Type Constraints

template<int AXIS>
void SIM_RawField::localReduceAxisOp ( REDUCE_NAMES  op,
UT_VoxelArrayF dstfield,
UT_VoxelArrayF field,
float  radius,
const UT_JobInfo info 
) const [inline, protected]

void SIM_RawField::localReduceByAxis ( REDUCE_NAMES  op,
UT_VoxelArrayF dst,
UT_VoxelArrayF field,
UT_Vector3  radius 
) const [protected]

Reduction by reducing each axis in turn. This *will* change field and dst != field is required.

void SIM_RawField::localReduceOp ( REDUCE_NAMES  op,
const UT_Vector3 radius 
)

Performs a localized reduction on the field. Stores in this the result of the reduction. Radius is in world coordinates.

void SIM_RawField::match ( const SIM_RawIndexField src  ) 

void SIM_RawField::match ( const SIM_RawField src  ) 

Initializes this to be the same dimensions, sampling pattern, etc, of the given field. The values of this may be reset to zero.

static fpreal SIM_RawField::mixValues ( MIX_NAMES  mixtype,
fpreal  dest,
fpreal  src 
) [static]

Performs the requires mixing.

void SIM_RawField::moveAlongCurvature ( fpreal  amount,
fpreal  cflcond,
int  miniter,
int  maxiter 
)

Advances this field along the field's curvature. Is given a total amount to move and will calculate the appropriate timestep according to the given cfl condition & min/max iterations.

void SIM_RawField::moveAlongNormalMidpoint ( const SIM_RawField speed,
const SIM_RawField source,
fpreal  timestep 
)

Uses the midpoint method to do a second order temporal update of the moveAlongNormal algorithm.

bool SIM_RawField::movePtToIso ( UT_Vector3 pos,
fpreal  goaliso,
fpreal  maxtime,
fpreal  tol = 1e-4 
) const

Move a point to the given isooffset. Returns false if fails to complete the move in the given time.

const SIM_RawField& SIM_RawField::operator= ( const SIM_RawField src  ) 

Assigment operator:.

bool SIM_RawField::posToCellIndex ( UT_Vector3  pos,
int &  x,
int &  y,
int &  z 
) const

bool SIM_RawField::posToIndex ( UT_Vector3  pos,
int &  x,
int &  y,
int &  z,
fpreal dx,
fpreal dy,
fpreal dz 
) const

Converts worldspace position into an integer index + the lerp values required to interpolate. Lerp with (1-dx) * (x,y,z) + dx * (x+1,y,z)

bool SIM_RawField::posToIndex ( UT_Vector3  pos,
int &  x,
int &  y,
int &  z 
) const

Converts a worldspace position into an integer index.

fpreal SIM_RawField::reduceMaskedOp ( REDUCE_NAMES  op,
const SIM_RawField mask,
bool  maskissdf 
) const

Performs the reduction only including parts of the field that match the given mask. If mask is null, falls through to normal reduction.

fpreal SIM_RawField::reduceOp ( REDUCE_NAMES  op  )  const

Perform reduction on the field using the given method The internal methods are helpers to deal with the threading collating.

void SIM_RawField::reinitializeSignedDistance ( int  maxiter  ) 

Performs the reinitialization equation. This solves for: dphi/dt + S(phi0) * (|grad(phi)| - 1) = 0 at steady state. S(phi0) = phi0 / sqrt(phi0^2 + dx^2), a smeared sign function. It is held constant for the reinitialization.

void SIM_RawField::resample ( SIM_FieldSample  sample,
const SIM_RawField src 
)

Initializes this to be the same as the given field. The values of this will be found by resampling the other field with the new sampling pattern.

void SIM_RawField::setAsExtrapolatedField ( UT_Vector3  scale  ) 

Mark this field as being an extrapolated field. Out of bound voxels will read the clamped value. The difference between the clamped position and the real position is then dot producted with the given scale factor and added to the resulting value. This allows you to have rest fields that extrapolate meaningfully.

void SIM_RawField::setBoundary ( int  axis,
int  side,
SIM_FieldBoundary  bound 
) [inline]

These boundary conditions do *not* apply to reading outside of the valid field range. The native UT_VoxelArray boundary condition is used for that. Instead, they are used for the behaviour of enforceBoundary and by various places where we want to distinguish open velocity fields from closed.

Definition at line 816 of file SIM_RawField.h.

void SIM_RawField::setBoundaryValue ( int  axis,
int  side,
fpreal  v 
) [inline]

Definition at line 820 of file SIM_RawField.h.

void SIM_RawField::setCellValue ( int  x,
int  y,
int  z,
fpreal  v 
)

Ensures the given voxel cell has the given value. This will set all of the adjacent samples if we aren't sampled evenly.

bool SIM_RawField::shouldMultiThread (  )  const [inline]

Returns true if this should be multithreaded.

Definition at line 121 of file SIM_RawField.h.

void SIM_RawField::solvePressure ( const SIM_RawField divergence,
const SIM_RawField collision,
int  numiter = 20 
)

Solves the pressure field that would eliminate the given divergence field.

void SIM_RawField::solvePressurePCG ( const SIM_RawField divergence,
SIM_RawIndexField index,
SIM_VectorField vel,
const SIM_RawIndexField comp = 0,
const UT_IntArray expandable = 0,
const SIM_RawField surface = 0,
bool  variational = true,
bool  ghostfluid = true,
PCG_METHOD  pcgmethod = PCG_MIC 
)

void SIM_RawField::sortAllVoxels ( UT_FloatArray voxelvalues  )  const [protected]

void SIM_RawField::sortAllVoxelsMasked ( UT_FloatArray voxelvalues,
const SIM_RawField maskfield,
bool  maskissdf 
) const [protected]

UT_VoxelArrayF* SIM_RawField::steal (  ) 

Steals the voxel array, leaving this pointing to a 0 constant array

void SIM_RawField::testForNan (  )  const

Tests for nans, outputs text and asserts if has any Only runs if the test environment variable is set.

SIM_RawField::THREADED_METHOD ( SIM_RawField  ,
shouldMultiThread()  ,
convertToHeaviside   
) const

Sets this to the heaviside function of itself. this = clamp(-this/diam+0.5, 0, 1)

SIM_RawField::THREADED_METHOD ( SIM_RawField  ,
shouldMultiThread()  ,
negate   
) const

Negates all values in this field.

SIM_RawField::THREADED_METHOD1 ( SIM_RawField  ,
shouldMultiThread()  ,
average  ,
const SIM_RawField ,
other   
) const

Averages this with the other field. Result in this. Assumes fields match.

SIM_RawField::THREADED_METHOD1 ( SIM_RawField  ,
shouldMultiThread()  ,
minimum  ,
const SIM_RawField ,
other   
) const

SIM_RawField::THREADED_METHOD1 ( SIM_RawField  ,
shouldMultiThread()  ,
maximum  ,
const SIM_RawField ,
other   
) const

Makes this field the minimum or maximum of this field and the other field. The other field is not assumed to be matching.

SIM_RawField::THREADED_METHOD1 ( SIM_RawField  ,
shouldMultiThread()  ,
scale  ,
fpreal  ,
scale   
)

Scales all values in this field.

SIM_RawField::THREADED_METHOD2 ( SIM_RawField  ,
shouldMultiThread()  ,
enforceCollisionBoundaryFlat  ,
fpreal32 ,
values  ,
const SIM_RawIndexField ,
collision_lookup   
)

SIM_RawField::THREADED_METHOD2 ( SIM_RawField  ,
shouldMultiThread()  ,
buildDivergenceFace  ,
const SIM_VectorField ,
vel  ,
const SIM_RawField ,
surface   
) const

Computes the divergence of the face-centered velocity field and stores the result in this. this must match the velocity field.

SIM_RawField::THREADED_METHOD2 ( SIM_RawField  ,
shouldMultiThread()  ,
smearedSign  ,
const SIM_RawField ,
sdf  ,
fpreal  ,
bandwidth   
) const

Sets this to the smeared sign function of the given sdf. this = sdf / sqrt(sdf*sdf + bandwidth*bandwidth) this must already match sdf.

SIM_RawField::THREADED_METHOD2 ( SIM_RawField  ,
shouldMultiThread()  ,
addValuePerComponent  ,
const UT_DoubleArray ,
valuelist  ,
const SIM_RawIndexField ,
comp   
) const

Adds to this field the value given per component. Negative components neglected.

SIM_RawField::THREADED_METHOD2_CONST ( SIM_RawField  ,
shouldMultiThread()  ,
reduceOpInternal  ,
fpreal64 ,
sum  ,
REDUCE_NAMES  ,
op   
) [protected]

SIM_RawField::THREADED_METHOD2_CONST ( SIM_RawField  ,
shouldMultiThread()  ,
incompleteCholeskyFactorization  ,
const SIM_RawSparseMatrix ,
,
PCG_METHOD  ,
pcgmethod   
) const

Calculates the incomplete cholesky factorization.

SIM_RawField::THREADED_METHOD2_CONST ( SIM_RawField  ,
shouldMultiThread()  ,
incompleteCholeskyPreconditioner  ,
const UT_VectorF ,
b  ,
UT_VectorF ,
x   
) const

Applies the incomplete cholesky preconditioner.

SIM_RawField::THREADED_METHOD3 ( SIM_RawField  ,
shouldMultiThread()  ,
buildFromGeo  ,
const GEO_PrimVolume ,
vol  ,
const UT_DMatrix4 ,
xform  ,
fpreal  ,
scale   
) const

SIM_RawField::THREADED_METHOD3 ( SIM_RawField  ,
shouldMultiThread()  ,
enforceCollisionBoundaryInternal  ,
SIM_FieldBoundary  ,
boundary  ,
const SIM_RawField ,
collision  ,
const SIM_RawField ,
cvalue   
)

SIM_RawField::THREADED_METHOD3 ( SIM_RawField  ,
shouldMultiThread()  ,
applyParticles  ,
const GU_Detail ,
particles  ,
GEO_PointTree ,
pttree  ,
sim_particleToFieldParms ,
parms   
) const

SIM_RawField::THREADED_METHOD3 ( SIM_RawField  ,
shouldMultiThread()  ,
setScaleAdd  ,
const SIM_RawField ,
,
fpreal  ,
scale  ,
const SIM_RawField ,
B   
) const

Sets this to A + s*B. A & B match this. This can be either A or B, or neither.

SIM_RawField::THREADED_METHOD3 ( SIM_RawField  ,
shouldMultiThread()  ,
moveAlongNormal  ,
const SIM_RawField ,
speed  ,
const SIM_RawField ,
source  ,
fpreal  ,
timestep   
) const

Advances source field along the field's normal direction. Takes a matching field which defines the speed to move in the normal direction on a per cell basis. Does a single euler step. this is filled in with the resulting field. this cannot be source. This solves: dphi/dt + speed * |grad(phi)| = 0

SIM_RawField::THREADED_METHOD3 ( SIM_RawField  ,
shouldMultiThread()  ,
moveAlongCurvature  ,
fpreal  ,
b_val  ,
const SIM_RawField ,
source  ,
fpreal  ,
timestep   
)

Advances source field along the field's curvature. Takes a given b to act as the movement coefficient. Does a single euler step. this is filled in with the resulting field. this cannot be source. This solves: dphi/dt = b * K * |grad(phi)|

SIM_RawField::THREADED_METHOD3_CONST ( SIM_RawField  ,
shouldMultiThread()  ,
solveLowerTriangularSystems  ,
const UT_PtrArray< SIM_RawSparseMatrix * > &  ,
ld  ,
UT_RefArray< UT_VectorF > &  ,
ys  ,
const UT_RefArray< UT_VectorF > &  ,
bs   
) const

SIM_RawField::THREADED_METHOD3_CONST ( SIM_RawField  ,
shouldMultiThread()  ,
sumPerComponent  ,
UT_DoubleArray ,
result  ,
UT_Int64Array ,
activevoxels  ,
const SIM_RawIndexField ,
comp   
)

Sums the field into separate summation lists, one per component of the comp index field. Negative components ignored, the given arrays should already be sized to fit the maxindex.

SIM_RawField::THREADED_METHOD4 ( SIM_RawField  ,
shouldMultiThread()  ,
gaussSeidelIteration  ,
const SIM_RawField ,
B  ,
fpreal32  ,
weight  ,
fpreal32  ,
sumweight  ,
int  ,
parity   
) const

SIM_RawField::THREADED_METHOD4 ( SIM_RawField  ,
shouldMultiThread()  ,
buoyancy  ,
const SIM_RawField ,
temperature  ,
fpreal  ,
up  ,
fpreal  ,
Tamb  ,
fpreal  ,
buoyancy   
) const

SIM_RawField::THREADED_METHOD4_CONST ( SIM_RawField  ,
field.  getTileRes0)*field.getTileRes(2,
,
localReduceAxisY  ,
REDUCE_NAMES  ,
op  ,
UT_VoxelArrayF ,
dst  ,
UT_VoxelArrayF ,
field  ,
float  ,
radius   
) [protected]

SIM_RawField::THREADED_METHOD4_CONST ( SIM_RawField  ,
field.  getTileRes1)*field.getTileRes(2,
,
localReduceAxisX  ,
REDUCE_NAMES  ,
op  ,
UT_VoxelArrayF ,
dst  ,
UT_VoxelArrayF ,
field  ,
float  ,
radius   
) [protected]

Again a triple specialization to engage threading.

SIM_RawField::THREADED_METHOD4_CONST ( SIM_RawField  ,
shouldMultiThread()  ,
gaussSeidelIterationFlat2D  ,
fpreal32 ,
,
fpreal32  ,
weight  ,
fpreal32  ,
sumweight  ,
int  ,
parity   
)

SIM_RawField::THREADED_METHOD4_CONST ( SIM_RawField  ,
shouldMultiThread()  ,
gaussSeidelIterationFlat  ,
fpreal32 ,
,
fpreal32  ,
weight  ,
fpreal32  ,
sumweight  ,
int  ,
parity   
)

SIM_RawField::THREADED_METHOD5 ( SIM_RawField  ,
shouldMultiThread()  ,
advect2  ,
const SIM_RawField ,
source  ,
sim_PointVelocity  ,
getVelocity  ,
fpreal  ,
time  ,
fpreal  ,
voxelsize  ,
const SIM_RawField ,
collision   
) const

SIM_RawField::THREADED_METHOD5_CONST ( SIM_RawField  ,
shouldMultiThread()  ,
reduceMaskedOpInternal  ,
fpreal64 ,
sum  ,
fpreal64 ,
masktotal  ,
REDUCE_NAMES  ,
op  ,
const SIM_RawField ,
mask  ,
bool  ,
maskissdf   
) [protected]

SIM_RawField::THREADED_METHOD5_CONST ( SIM_RawField  ,
shouldMultiThread()  ,
solveUpperTriangularSystems  ,
const UT_PtrArray< SIM_RawSparseMatrix * > &  ,
ud  ,
UT_RefArray< UT_VectorF > &  ,
xs  ,
const UT_PtrArray< SIM_RawSparseMatrix * > &  ,
us  ,
const UT_VectorF ,
xc  ,
UT_RefArray< UT_VectorF > &  ,
ys   
) const

SIM_RawField::THREADED_METHOD7 ( SIM_RawField  ,
shouldMultiThread()  ,
buildExtrapList  ,
UT_RefArray< UT_PtrArray< gu_sdf_qelem * > > &  ,
lists  ,
const SIM_RawField ,
depths  ,
fpreal  ,
isocontour  ,
fpreal  ,
dir  ,
fpreal  ,
maxdist  ,
bool  ,
clamp  ,
fpreal  ,
clampval   
) [protected]

Methods for extrapolation.

SIM_RawField::THREADED_METHOD7 ( SIM_RawField  ,
shouldMultiThread()  ,
advect  ,
const SIM_RawField ,
source  ,
const SIM_RawField ,
velx  ,
const SIM_RawField ,
vely  ,
const SIM_RawField ,
velz  ,
fpreal  ,
time  ,
const SIM_RawField ,
collision  ,
SIM_FieldAdvection  ,
advectmethod   
) const

Advect the source field by the given set of velocity fields, setting this to the result. Source cannot be this. this and source are assumed to match.

fpreal SIM_RawField::toHeaviside ( fpreal  val  )  const

Defines width as maxcomponent of our voxels.

static fpreal SIM_RawField::toHeaviside ( fpreal  val,
fpreal  diam 
) [static]

Perform heaviside & inverse heaviside in a consistent fashion.

void SIM_RawField::waveletComputePSD ( const SIM_RawField wavelet,
int  level 
)

Computes the sum of squares of the given level's detail vector.

void SIM_RawField::waveletExtractComponent ( const SIM_RawField wavelet,
int  level,
int  component 
)

Extracts the given component from a packed wavelet array.

void SIM_RawField::waveletInverseTransform ( UT_Wavelet::WAVELET_NAMES  wavelettype,
const SIM_RawField wavelet,
int  maxpasses = -1 
)

void SIM_RawField::waveletRebuildFromVoxelArray ( UT_VoxelArrayF array,
float  scale 
) [protected]

void SIM_RawField::waveletTransform ( UT_Wavelet::WAVELET_NAMES  wavelettype,
const SIM_RawField field,
int  maxpasses = -1 
)

Transform turns this into a packed set of wavelet coeffecients from the scalar data in field. Inverse unpacks and generates a scalar field into this.

Using a smooth edge conditon we assume that in case of an odd sized field, the ultimate row has zero diff coefficients. We thus store the extra column in the averages side of the matrix, for ceil(n/2) in the averages and floor(n/2) in the diffs. Note this causes 3d fields that are actually 2d to properly decompose.


Member Data Documentation

Definition at line 247 of file SIM_RawField.h.

Definition at line 513 of file SIM_RawField.h.

Definition at line 267 of file SIM_RawField.h.

Definition at line 277 of file SIM_RawField.h.

Definition at line 717 of file SIM_RawField.h.

Definition at line 528 of file SIM_RawField.h.

Definition at line 907 of file SIM_RawField.h.

Definition at line 907 of file SIM_RawField.h.

Definition at line 786 of file SIM_RawField.h.

Definition at line 585 of file SIM_RawField.h.

Definition at line 513 of file SIM_RawField.h.

Definition at line 802 of file SIM_RawField.h.

Definition at line 257 of file SIM_RawField.h.

Definition at line 247 of file SIM_RawField.h.

Definition at line 889 of file SIM_RawField.h.

Definition at line 881 of file SIM_RawField.h.

Definition at line 764 of file SIM_RawField.h.

Definition at line 754 of file SIM_RawField.h.

Definition at line 740 of file SIM_RawField.h.

Definition at line 717 of file SIM_RawField.h.

Definition at line 680 of file SIM_RawField.h.

Definition at line 247 of file SIM_RawField.h.

Definition at line 786 of file SIM_RawField.h.

Definition at line 907 of file SIM_RawField.h.

Definition at line 907 of file SIM_RawField.h.

Definition at line 948 of file SIM_RawField.h.

Examples:
ROP/ROP_DopField.C, SIM/SIM_GasAdd.C, and SIM/SIM_GasAdd.h.

Definition at line 948 of file SIM_RawField.h.

Definition at line 585 of file SIM_RawField.h.

Definition at line 907 of file SIM_RawField.h.

Definition at line 865 of file SIM_RawField.h.

Definition at line 786 of file SIM_RawField.h.

Definition at line 664 of file SIM_RawField.h.

Definition at line 625 of file SIM_RawField.h.

Definition at line 585 of file SIM_RawField.h.

Definition at line 572 of file SIM_RawField.h.

Definition at line 528 of file SIM_RawField.h.

Definition at line 513 of file SIM_RawField.h.

Definition at line 277 of file SIM_RawField.h.

Definition at line 257 of file SIM_RawField.h.

Definition at line 220 of file SIM_RawField.h.

Definition at line 196 of file SIM_RawField.h.

Definition at line 907 of file SIM_RawField.h.

Definition at line 267 of file SIM_RawField.h.

Definition at line 231 of file SIM_RawField.h.

Definition at line 172 of file SIM_RawField.h.

Definition at line 889 of file SIM_RawField.h.

Definition at line 889 of file SIM_RawField.h.

Definition at line 889 of file SIM_RawField.h.

Definition at line 907 of file SIM_RawField.h.

Definition at line 992 of file SIM_RawField.h.

Definition at line 992 of file SIM_RawField.h.

Definition at line 997 of file SIM_RawField.h.

Definition at line 998 of file SIM_RawField.h.

Definition at line 963 of file SIM_RawField.h.

Definition at line 989 of file SIM_RawField.h.

Definition at line 989 of file SIM_RawField.h.

Definition at line 995 of file SIM_RawField.h.

Definition at line 994 of file SIM_RawField.h.

Definition at line 889 of file SIM_RawField.h.

Definition at line 881 of file SIM_RawField.h.

Definition at line 664 of file SIM_RawField.h.

Definition at line 572 of file SIM_RawField.h.

Definition at line 764 of file SIM_RawField.h.

Definition at line 572 of file SIM_RawField.h.

Definition at line 948 of file SIM_RawField.h.

Definition at line 865 of file SIM_RawField.h.

Definition at line 267 of file SIM_RawField.h.

Definition at line 172 of file SIM_RawField.h.

Definition at line 664 of file SIM_RawField.h.

Definition at line 625 of file SIM_RawField.h.

Definition at line 528 of file SIM_RawField.h.

Definition at line 585 of file SIM_RawField.h.

Definition at line 513 of file SIM_RawField.h.

Definition at line 172 of file SIM_RawField.h.

Definition at line 528 of file SIM_RawField.h.

Definition at line 740 of file SIM_RawField.h.

Definition at line 513 of file SIM_RawField.h.

Definition at line 513 of file SIM_RawField.h.

Definition at line 513 of file SIM_RawField.h.

Definition at line 585 of file SIM_RawField.h.

Definition at line 664 of file SIM_RawField.h.

Definition at line 754 of file SIM_RawField.h.

Definition at line 740 of file SIM_RawField.h.

Definition at line 865 of file SIM_RawField.h.

Definition at line 740 of file SIM_RawField.h.

Definition at line 740 of file SIM_RawField.h.

Definition at line 717 of file SIM_RawField.h.


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

Generated on Mon Jan 28 00:48:53 2013 for HDK by  doxygen 1.5.9