HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_SurfaceTension.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_SurfaceTension.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_SurfaceTension__
12 #define __GAS_SurfaceTension__
13 
14 #include "GAS_API.h"
15 
16 #include "GAS_SubSolver.h"
17 #include "GAS_Utils.h"
19 
20 class SIM_VectorField;
21 class SIM_ScalarField;
22 
24 {
25 public:
26  GET_DATA_FUNC_S(GAS_NAME_VELOCITY, VelocityName);
27  GET_DATA_FUNC_S(GAS_NAME_SURFACE, SurfaceName);
28  GET_DATA_FUNC_S("mask", MaskName);
29 
30  GETSET_DATA_FUNCS_F("surfacetension", SurfaceTension);
31 
34 
35 protected:
36  explicit GAS_SurfaceTension(const SIM_DataFactory *factory);
37  ~GAS_SurfaceTension() override;
38 
39  /// Applies a force to the velocity field proportional
40  /// to the vorticle values.
41  bool solveGasSubclass(SIM_Engine &engine,
42  SIM_Object *obj,
43  SIM_Time time,
44  SIM_Time timestep) override;
45 
46  void addSurfaceTension(SIM_VectorField *velocity,
47  const SIM_ScalarField *surface,
48  const SIM_ScalarField *mask,
49  fpreal timestep);
50 
51  bool shouldMultiThread(const UT_VoxelArrayF *field) const
52  { return field->numTiles() > 1; }
53 
55  shouldMultiThread(dstfield->field()),
56  doSurfaceTension,
57  SIM_RawField *, dstfield,
58  int, axis,
59  const SIM_RawField *, surface,
60  const SIM_RawField *, mask,
61  float, scale);
62  void doSurfaceTensionPartial(SIM_RawField *dstfield,
63  int axis,
64  const SIM_RawField *surface,
65  const SIM_RawField *mask,
66  float scale,
67  const UT_JobInfo &info) const;
68 
69 private:
70  static const SIM_DopDescription *getDopDescription();
71 
75  "Gas Surface Tension",
76  getDopDescription());
77 };
78 
79 #endif
80 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
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 THREADED_METHOD5_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5)
#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
int numTiles() const
GLint GLuint mask
Definition: glcorearb.h:124
bool shouldMultiThread(const UT_VoxelArrayF *field) const
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 GAS_NAME_TIMESCALE
Definition: GAS_Utils.h:40
#define GAS_NAME_SURFACE
Definition: GAS_Utils.h:38
This class holds a three dimensional vector field.
#define GET_DATA_FUNC_S(DataName, FuncName)