HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GAS_DSD.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_DSD.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_DSD__
12 #define __GAS_DSD__
13 
14 #include "GAS_API.h"
15 
17 #include <SIM/SIM_RawField.h>
18 #include "GAS_SubSolver.h"
19 #include "GAS_Utils.h"
20 
21 class SIM_VectorField;
22 class SIM_ScalarField;
23 
25 {
26 public:
27  GET_DATA_FUNC_S("d", DName);
28  GET_DATA_FUNC_S("ddot", DDotName);
29  GET_DATA_FUNC_S("curvature", KappaName);
30  GET_DATA_FUNC_S("curvatureadvected", KappaStarName);
31 
32  GETSET_DATA_FUNCS_F("c1", C1);
33  GETSET_DATA_FUNCS_F("c2", C2);
34  GETSET_DATA_FUNCS_F("c3", C3);
35  GETSET_DATA_FUNCS_F("c4", C4);
36  GETSET_DATA_FUNCS_F("c5", C5);
37  GETSET_DATA_FUNCS_F("mutheta", MuTheta);
38  GETSET_DATA_FUNCS_F("dcj", DCJ);
39 
42 
43 protected:
44  explicit GAS_DSD(const SIM_DataFactory *factory);
45  virtual ~GAS_DSD();
46 
47  /// Applies a force to the velocity field proportional
48  /// to the vorticle values.
49  virtual bool solveGasSubclass(SIM_Engine &engine,
50  SIM_Object *obj,
51  SIM_Time time,
52  SIM_Time timestep);
53 
54  bool shouldMultiThread(SIM_RawField *field) const
55  { return field->field()->numTiles() > 1; }
56 
57  THREADED_METHOD5_CONST(GAS_DSD, shouldMultiThread(d),
58  applyDSD,
59  SIM_RawField *, d,
60  SIM_RawField *, ddot,
61  const SIM_ScalarField *, kappa,
62  const SIM_ScalarField *, kappastar,
63  fpreal, timestep);
64  void applyDSDPartial(SIM_RawField *d,
65  SIM_RawField *ddot,
66  const SIM_ScalarField *kappa,
67  const SIM_ScalarField *kappastar,
68  fpreal timestep,
69  const UT_JobInfo &info) const;
70 
71 private:
72  static const SIM_DopDescription *getDopDescription();
73 
77  "Gas DSD",
78  getDopDescription());
79 };
80 
81 #endif
82 
#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
bool shouldMultiThread(SIM_RawField *field) const
Definition: GAS_DSD.h:54
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 DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
int numTiles() const
double fpreal
Definition: SYS_Types.h:263
#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
This class holds a three dimensional vector field.
#define GET_DATA_FUNC_S(DataName, FuncName)
UT_VoxelArrayF UT_VoxelArrayF & field