GAS_SubSolver Class Reference

#include <GAS_SubSolver.h>

Inheritance diagram for GAS_SubSolver:

SIM_Solver SIM_OptionsUser SIM_Data GAS_AdjustElasticity GAS_AdjustParticleCoordinates GAS_Advect GAS_Analysis GAS_BuildCollisionMask GAS_BuildRelationshipMask GAS_Buoyancy GAS_Calculate GAS_ComputeParticleAttributes GAS_CorrectByMarkers GAS_Cross GAS_Diffuse GAS_DSD GAS_Elasticity GAS_EnforceBoundary GAS_ExternalForces GAS_Extrapolate GAS_Feedback GAS_FieldToParticle GAS_FieldVex GAS_GeometryToSDF GAS_Integrator GAS_Lookup GAS_MatchField GAS_NetFetchData GAS_NetFieldBorderExchange GAS_NetSliceBalance GAS_NetSliceExchange GAS_ParticleForces GAS_ParticleMoveToIso GAS_ParticlePressure GAS_ParticleToField GAS_ParticleToSDF GAS_ProjectNonDivergent GAS_Reduce GAS_ReinitializeSDF GAS_ResizeField GAS_Rest GAS_SandForces GAS_SeedMarkers GAS_SeedParticles GAS_SPHDensity GAS_SPHForces GAS_StrainForces GAS_StrainIntegrate GAS_SubStep GAS_SurfaceSnap GAS_SurfaceTension GAS_VelocityStretch GAS_VorticleForces GAS_Wavelets HDK_Sample::SIM_GasAdd

List of all members.

Classes

struct  RelationshipParms

Public Types

enum  MIX_NAMES {
  MIX_COPY, MIX_ADD, MIX_SUB, MIX_MUL,
  MIX_DIV, MIX_MAX, MIX_MIN, MIX_AVERAGE,
  NUM_MIX
}
enum  TIMESCALE_NAMES {
  TIMESCALE_NONE, TIMESCALE_ADD, TIMESCALE_MULT, TIMESCALE_BOTH,
  TIMESCALE_DIVIDE, NUM_TIMESCALE
}
enum  LENGTHSCALE_NAMES {
  LENGTHSCALE_NONE, LENGTHSCALE_LENGTH, LENGTHSCALE_AREA, LENGTHSCALE_VOLUME,
  NUM_LENGTHSCALE
}

Public Member Functions

virtual SIM_Result solveObjectsSubclass (SIM_Engine &engine, SIM_ObjectArray &objects, SIM_ObjectArray &newobjects, SIM_ObjectArray &feedbacktoobjects, const SIM_Time &timestep)
 Merely calls solve on each object.
virtual SIM_Result postSolveObjectsSubclass (SIM_Engine &engine, SIM_ObjectArray &objects, SIM_ObjectArray &newobjects, SIM_ObjectArray &feedbacktoobjects, const SIM_Time &timestep)
virtual bool solveGas (SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)
SIM_GeometrygetGeometry (SIM_Object *obj, const char *name, bool silent=false)
SIM_GeometryCopygetGeometryCopy (SIM_Object *obj, const char *name, bool silent=false)
SIM_ScalarFieldgetScalarField (SIM_Object *obj, const char *name, bool silent=false)
SIM_VectorFieldgetVectorField (SIM_Object *obj, const char *name, bool silent=false)
SIM_MatrixFieldgetMatrixField (SIM_Object *obj, const char *name, bool silent=false)
SIM_IndexFieldgetIndexField (SIM_Object *obj, const char *name, bool silent=false)
void getWorldToGeometry (UT_DMatrix4 &xform, SIM_Object *obj, const char *geopath)
 Builds the transform mapping world -> geo.
void getGeometryToWorld (UT_DMatrix4 &xform, SIM_Object *obj, const char *geopath)
 Builds the transform mapping geo -> world.
SIM_GeometryCopygetOrCreateGeometry (SIM_Object *obj, const char *name)
SIM_ScalarFieldgetOrCreateScalarField (SIM_Object *obj, const char *name)
SIM_VectorFieldgetOrCreateVectorField (SIM_Object *obj, const char *name)
SIM_MatrixFieldgetOrCreateMatrixField (SIM_Object *obj, const char *name)
SIM_IndexFieldgetOrCreateIndexField (SIM_Object *obj, const char *name)
void getMatchingData (SIM_DataArray &data, SIM_Object *obj, const char *name)
void getMatchingData (SIM_DataArray &data, UT_StringArray &datanames, SIM_Object *obj, const char *name)
void matchField (SIM_ScalarField *field, const SIM_ScalarField *reffield)
void matchField (SIM_VectorField *field, const SIM_ScalarField *reffield)
void matchField (SIM_MatrixField *field, const SIM_ScalarField *reffield)
void matchField (SIM_IndexField *field, const SIM_ScalarField *reffield)
void buildRelationshipField (SIM_ScalarField *mask, SIM_VectorField *vel, SIM_IndexField *index, SIM_Object *srcobj, bool usepoint, bool usesdf, bool allownonsdf, bool negate, fpreal particlebandwidth, fpreal bandwidth)

Static Public Member Functions

static fpreal mixValues (MIX_NAMES mixtype, fpreal dest, fpreal src)
 Performs the requires mixing.
static fpreal applyTimeScalePow (fpreal value, fpreal t)
static void applyTimeScale (fpreal &add, fpreal &mul, fpreal timestep, int timescale)
static fpreal applyLengthScale (fpreal val, fpreal width, int scaletype)

Protected Member Functions

 GAS_SubSolver (const SIM_DataFactory *factory)
virtual ~GAS_SubSolver ()
virtual bool solveGasSubclass (SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
virtual bool postSolveGasSubclass (SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)
fpreal getPropertyFromState (const SIM_Object &object, const SIM_Property &property) const
 Get a property value by looking at the Physical Parms of an object.
virtual fpreal getPropertyAtPositionSubclass (const SIM_Object &object, const UT_Vector3 &worldspacepos, const SIM_Property &property) const
 Evaluates property at a given position.
virtual fpreal getPropertyAtPointSubclass (const SIM_Object &object, int ptnum, const SIM_Property &property) const
virtual SIM_PropertyResolvergetPropertyResolverSubclass (const SIM_Object &object, const SIM_Property &property) const
 Builds a resolver for evaulating properties swiftly.
fpreal calculateTimestep (SIM_Engine &engine, SIM_VectorField *velocity, fpreal cflcond) const
fpreal calculateTimestep (GU_ConstDetailHandle gdh, fpreal cflcond) const
 THREADED_METHOD1 (GAS_SubSolver, parms.mask->shouldMultiThread(), buildRelationshipFieldInternal, const RelationshipParms &, parms) void buildRelationshipFieldInternalPartial(const RelationshipParms &parms
 Builds a relationship field after most stuff has been setup.

Protected Attributes

const UT_JobInfoinfo

Static Protected Attributes

static PRM_Name ourMixMethods [NUM_MIX+1]
 Holds the parm names for our mix methods.
static PRM_ChoiceList ourMixMethodMenu
static PRM_Name ourTimeScaleMethods [NUM_TIMESCALE+1]
static PRM_ChoiceList ourTimeScaleMenu
static PRM_Name ourLengthScaleMethods [NUM_LENGTHSCALE+1]
static PRM_ChoiceList ourLengthScaleMenu


Detailed Description

Examples:

SIM/SIM_GasAdd.h.

Definition at line 47 of file GAS_SubSolver.h.


Member Enumeration Documentation

Enumerator:
LENGTHSCALE_NONE 
LENGTHSCALE_LENGTH 
LENGTHSCALE_AREA 
LENGTHSCALE_VOLUME 
NUM_LENGTHSCALE 

Definition at line 234 of file GAS_SubSolver.h.

Enumerator:
MIX_COPY 
MIX_ADD 
MIX_SUB 
MIX_MUL 
MIX_DIV 
MIX_MAX 
MIX_MIN 
MIX_AVERAGE 
NUM_MIX 

Definition at line 212 of file GAS_SubSolver.h.

Enumerator:
TIMESCALE_NONE 
TIMESCALE_ADD 
TIMESCALE_MULT 
TIMESCALE_BOTH 
TIMESCALE_DIVIDE 
NUM_TIMESCALE 

Definition at line 224 of file GAS_SubSolver.h.


Constructor & Destructor Documentation

GAS_SubSolver::GAS_SubSolver ( const SIM_DataFactory factory  )  [explicit, protected]

virtual GAS_SubSolver::~GAS_SubSolver (  )  [protected, virtual]


Member Function Documentation

static fpreal GAS_SubSolver::applyLengthScale ( fpreal  val,
fpreal  width,
int  scaletype 
) [static]

Applies the effect of the given LENGTHSCALE_NAMES to the quantitity given

static void GAS_SubSolver::applyTimeScale ( fpreal add,
fpreal mul,
fpreal  timestep,
int  timescale 
) [static]

Applies the effect of TIMESCALE_NAMES to the additive and multiplicative values.

static fpreal GAS_SubSolver::applyTimeScalePow ( fpreal  value,
fpreal  t 
) [static]

Scales value exponentially for timestep t. v' = e ^ (ln(v) * t)

void GAS_SubSolver::buildRelationshipField ( SIM_ScalarField mask,
SIM_VectorField vel,
SIM_IndexField index,
SIM_Object srcobj,
bool  usepoint,
bool  usesdf,
bool  allownonsdf,
bool  negate,
fpreal  particlebandwidth,
fpreal  bandwidth 
)

Builds a relationship field, storing distance to each object in the destination field, along with the OBJID and object velocity in the optional index and vector fields. The negate flag controls the sign of the generated fields, collision have "inside object" as negative so have a negate of true. Mask should already be initialized as we only write to new values that are more-in the relevant object. To trigger a bandwidth, initialize mask to the max dist you want to write. The given fields must all be aligned. Bandwidth is how many voxels to border particles by for our lookup.

fpreal GAS_SubSolver::calculateTimestep ( GU_ConstDetailHandle  gdh,
fpreal  cflcond 
) const [protected]

Determines the appropriate timestep dependent on the geometry data. The size of the particles is used as the limitting factor for CFL condition. If no particle scale or velocity exists, returns infinite.

fpreal GAS_SubSolver::calculateTimestep ( SIM_Engine engine,
SIM_VectorField velocity,
fpreal  cflcond 
) const [protected]

Determines the appropriate timestep dependent on the velocity field.

SIM_Geometry* GAS_SubSolver::getGeometry ( SIM_Object obj,
const char *  name,
bool  silent = false 
)

Retrieves the SIM_DATA specified by the option* given by the name. Ie, look up in our options, find the data name, look up a data matching the name, return resulting data Reports message if a field is missing unless silent is set.

SIM_GeometryCopy* GAS_SubSolver::getGeometryCopy ( SIM_Object obj,
const char *  name,
bool  silent = false 
)

void GAS_SubSolver::getGeometryToWorld ( UT_DMatrix4 xform,
SIM_Object obj,
const char *  geopath 
)

Builds the transform mapping geo -> world.

SIM_IndexField* GAS_SubSolver::getIndexField ( SIM_Object obj,
const char *  name,
bool  silent = false 
)

void GAS_SubSolver::getMatchingData ( SIM_DataArray data,
UT_StringArray datanames,
SIM_Object obj,
const char *  name 
)

void GAS_SubSolver::getMatchingData ( SIM_DataArray data,
SIM_Object obj,
const char *  name 
)

Retrieves all of the SIM_DATAs that match the pattern stored in the option given by name.

Examples:
SIM/SIM_GasAdd.C.

SIM_MatrixField* GAS_SubSolver::getMatrixField ( SIM_Object obj,
const char *  name,
bool  silent = false 
)

SIM_GeometryCopy* GAS_SubSolver::getOrCreateGeometry ( SIM_Object obj,
const char *  name 
)

Returns the matching SIM_Data. If it doesn't exist, creates a new one. The resulting data is not guaranteed to exist - a bad name could end up prohibitting creation.

SIM_IndexField* GAS_SubSolver::getOrCreateIndexField ( SIM_Object obj,
const char *  name 
)

SIM_MatrixField* GAS_SubSolver::getOrCreateMatrixField ( SIM_Object obj,
const char *  name 
)

SIM_ScalarField* GAS_SubSolver::getOrCreateScalarField ( SIM_Object obj,
const char *  name 
)

SIM_VectorField* GAS_SubSolver::getOrCreateVectorField ( SIM_Object obj,
const char *  name 
)

virtual fpreal GAS_SubSolver::getPropertyAtPointSubclass ( const SIM_Object object,
int  ptnum,
const SIM_Property property 
) const [protected, virtual]

Gets the value of some physical property for the supplied object at a given point on the object's geometry.

Reimplemented from SIM_Solver.

virtual fpreal GAS_SubSolver::getPropertyAtPositionSubclass ( const SIM_Object object,
const UT_Vector3 worldspacepos,
const SIM_Property property 
) const [protected, virtual]

Evaluates property at a given position.

Reimplemented from SIM_Solver.

fpreal GAS_SubSolver::getPropertyFromState ( const SIM_Object object,
const SIM_Property property 
) const [protected]

Get a property value by looking at the Physical Parms of an object.

virtual SIM_PropertyResolver* GAS_SubSolver::getPropertyResolverSubclass ( const SIM_Object object,
const SIM_Property property 
) const [protected, virtual]

Builds a resolver for evaulating properties swiftly.

Reimplemented from SIM_Solver.

SIM_ScalarField* GAS_SubSolver::getScalarField ( SIM_Object obj,
const char *  name,
bool  silent = false 
)

SIM_VectorField* GAS_SubSolver::getVectorField ( SIM_Object obj,
const char *  name,
bool  silent = false 
)

void GAS_SubSolver::getWorldToGeometry ( UT_DMatrix4 xform,
SIM_Object obj,
const char *  geopath 
)

Builds the transform mapping world -> geo.

void GAS_SubSolver::matchField ( SIM_IndexField field,
const SIM_ScalarField reffield 
)

void GAS_SubSolver::matchField ( SIM_MatrixField field,
const SIM_ScalarField reffield 
)

void GAS_SubSolver::matchField ( SIM_VectorField field,
const SIM_ScalarField reffield 
)

void GAS_SubSolver::matchField ( SIM_ScalarField field,
const SIM_ScalarField reffield 
)

Makes the given field match the reference field in terms of bounding box & voxel count. A no-op if reffield or field is null.

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

Performs the requires mixing.

virtual bool GAS_SubSolver::postSolveGasSubclass ( SIM_Engine engine,
SIM_Object obj,
SIM_Time  time,
SIM_Time  timestep 
) [inline, protected, virtual]

Reimplemented in GAS_ParticleForces.

Definition at line 150 of file GAS_SubSolver.h.

virtual SIM_Result GAS_SubSolver::postSolveObjectsSubclass ( SIM_Engine engine,
SIM_ObjectArray objects,
SIM_ObjectArray newobjects,
SIM_ObjectArray feedbacktoobjects,
const SIM_Time timestep 
) [virtual]

Reimplemented from SIM_Solver.

virtual bool GAS_SubSolver::solveGas ( SIM_Engine engine,
SIM_Object obj,
SIM_Time  time,
SIM_Time  timestep 
) [virtual]

Applies this subsolver for a single timestep. Returns true on success

virtual bool GAS_SubSolver::solveGasSubclass ( SIM_Engine engine,
SIM_Object obj,
SIM_Time  time,
SIM_Time  timestep 
) [protected, pure virtual]

virtual SIM_Result GAS_SubSolver::solveObjectsSubclass ( SIM_Engine engine,
SIM_ObjectArray objects,
SIM_ObjectArray newobjects,
SIM_ObjectArray feedbacktoobjects,
const SIM_Time timestep 
) [virtual]

Merely calls solve on each object.

Implements SIM_Solver.

Reimplemented in GAS_Integrator, and GAS_SubStep.

GAS_SubSolver::THREADED_METHOD1 ( GAS_SubSolver  ,
parms.mask->  shouldMultiThread(),
buildRelationshipFieldInternal  ,
const RelationshipParms ,
parms   
) const [protected]

Builds a relationship field after most stuff has been setup.


Member Data Documentation

const UT_JobInfo& GAS_SubSolver::info [protected]

Definition at line 271 of file GAS_SubSolver.h.

PRM_Name GAS_SubSolver::ourLengthScaleMethods[NUM_LENGTHSCALE+1] [static, protected]

Definition at line 270 of file GAS_SubSolver.h.

Definition at line 265 of file GAS_SubSolver.h.

PRM_Name GAS_SubSolver::ourMixMethods[NUM_MIX+1] [static, protected]

Holds the parm names for our mix methods.

Definition at line 264 of file GAS_SubSolver.h.

Definition at line 268 of file GAS_SubSolver.h.

PRM_Name GAS_SubSolver::ourTimeScaleMethods[NUM_TIMESCALE+1] [static, protected]

Definition at line 267 of file GAS_SubSolver.h.


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

Generated on Thu May 24 00:09:35 2012 for HDK by  doxygen 1.5.9