HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GAS_SandForces.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GAS_SandForces.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_SandForces__
12 #define __GAS_SandForces__
13 
14 #include "GAS_API.h"
15 
16 #include "GAS_SubSolver.h"
17 #include "GAS_Utils.h"
18 
19 class SIM_VectorField;
20 class SIM_ScalarField;
21 
23 {
24 public:
25  GET_DATA_FUNC_S(GAS_NAME_SURFACE, SurfaceName);
26  GET_DATA_FUNC_S(GAS_NAME_PRESSURE, PressureName);
27  GET_DATA_FUNC_S(GAS_NAME_STRAIN, StrainName);
28  GET_DATA_FUNC_S(GAS_NAME_VELOCITY, VelocityName);
29 
30  GETSET_DATA_FUNCS_F("frictionangle", FrictionAngle);
31  GETSET_DATA_FUNCS_F("cohesion", Cohesion);
32 
35 
36 protected:
37  explicit GAS_SandForces(const SIM_DataFactory *factory);
38  virtual ~GAS_SandForces();
39 
40  /// Compute the amount of stress to add to each voxel according
41  /// to the given strain amounts.
42  virtual bool solveGasSubclass(SIM_Engine &engine,
43  SIM_Object *obj,
44  SIM_Time time,
45  SIM_Time timestep);
46 
47  /// Using the given strain field, update the velocity
48  /// field to take into account the relevant strains.
49  void addSandForces(SIM_VectorField *velocity,
50  SIM_ScalarField *surface,
51  SIM_MatrixField *strain,
52  SIM_ScalarField *pressure,
53  fpreal timestep);
54 
55 private:
56  static const SIM_DopDescription *getDopDescription();
57 
61  "Gas Sand Forces",
62  getDopDescription());
63 };
64 
65 #endif
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
#define GAS_NAME_USETIMESTEP
Definition: GAS_Utils.h:37
#define GAS_API
Definition: GAS_API.h:10
virtual bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
#define GETSET_DATA_FUNCS_F(DataName, FuncName)
#define GAS_NAME_VELOCITY
Definition: GAS_Utils.h:40
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
This class holds a three dimensional tensor field.
double fpreal
Definition: SYS_Types.h:263
#define GAS_NAME_STRAIN
Definition: GAS_Utils.h:35
#define GET_DATA_FUNC_B(DataName, FuncName)
#define GET_DATA_FUNC_F(DataName, FuncName)
This class holds a three dimensional scalar field.
#define GAS_NAME_TIMESCALE
Definition: GAS_Utils.h:38
#define GAS_NAME_PRESSURE
Definition: GAS_Utils.h:31
#define GAS_NAME_SURFACE
Definition: GAS_Utils.h:36
This class holds a three dimensional vector field.
#define GET_DATA_FUNC_S(DataName, FuncName)