HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_Buoyancy.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_Buoyancy.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_Buoyancy__
12 #define __GAS_Buoyancy__
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_TEMPERATURE, TemperatureName);
26  GET_DATA_FUNC_S(GAS_NAME_VELOCITY, VelocityName);
27  GET_DATA_FUNC_S(GAS_NAME_STENCIL, StencilName);
28 
29  GETSET_DATA_FUNCS_V3("dir", BuoyancyDir);
30  GETSET_DATA_FUNCS_F("lift", BuoyancyLift);
31  GETSET_DATA_FUNCS_F("ambient", Ambient);
32 
35  GET_DATA_FUNC_B(SIM_NAME_OPENCL, UseOpenCL);
36 
37 protected:
38  explicit GAS_Buoyancy(const SIM_DataFactory *factory);
39  ~GAS_Buoyancy() override;
40 
41  /// Moves the fields given by FieldName by the given velocity
42  /// field. Moves the points given by GeometryName likewise.
43  bool solveGasSubclass(SIM_Engine &engine,
44  SIM_Object *obj,
45  SIM_Time time,
46  SIM_Time timestep) override;
47 
48  void addBuoyancyForces(SIM_Object *obj,
49  SIM_VectorField *velocity,
50  const SIM_ScalarField *stencil,
51  const SIM_ScalarField *temperature,
52  fpreal timestep);
53 
54  void addBuoyancyForcesCL(SIM_Object *obj,
55  SIM_VectorField *velocity,
56  const SIM_ScalarField *temperature,
57  const UT_Vector3 &up,
58  fpreal scale,
59  fpreal Tamb);
60 
61 private:
62  static const SIM_DopDescription *getDopDescription();
63 
67  "Gas Buoyancy",
68  getDopDescription());
69 };
70 
71 #endif
72 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
#define GAS_NAME_TEMPERATURE
Definition: GAS_Utils.h:41
GT_API const UT_StringHolder time
#define GAS_NAME_USETIMESTEP
Definition: GAS_Utils.h:39
#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 GETSET_DATA_FUNCS_V3(DataName, FuncName)
#define GAS_NAME_VELOCITY
Definition: GAS_Utils.h:42
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
GA_API const UT_StringHolder scale
GA_API const UT_StringHolder up
fpreal64 fpreal
Definition: SYS_Types.h:277
#define GET_DATA_FUNC_B(DataName, FuncName)
#define GET_DATA_FUNC_F(DataName, FuncName)
This class holds a three dimensional scalar field.
#define SIM_NAME_OPENCL
Definition: SIM_Names.h:222
#define GAS_NAME_TIMESCALE
Definition: GAS_Utils.h:40
GLint GLfloat GLint stencil
Definition: glcorearb.h:1278
This class holds a three dimensional vector field.
#define GET_DATA_FUNC_S(DataName, FuncName)
#define GAS_NAME_STENCIL
Definition: GAS_Utils.h:19