HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_VorticleForces.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_VorticleForces.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_VorticleForces__
12 #define __GAS_VorticleForces__
13 
14 #include "GAS_API.h"
15 
16 #include <SIM/SIM_VectorField.h>
17 
18 #include "GAS_SubSolver.h"
19 #include "GAS_Utils.h"
20 
22 
23 class SIM_ScalarField;
24 
26 {
27 public:
28  GET_DATA_FUNC_S(GAS_NAME_VELOCITY, VelocityName);
29  GET_DATA_FUNC_S(GAS_NAME_STENCIL, StencilName);
30  GET_DATA_FUNC_S("particlefield", ParticleField);
31  GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
32  GETSET_DATA_FUNCS_F("confinement", ConfinementStrength);
33  GET_DATA_FUNC_B("computev", ComputeVelocity);
34 
37 
38  bool shouldMultiThread() { return true; }
39 
40 protected:
41  explicit GAS_VorticleForces(const SIM_DataFactory *factory);
42  ~GAS_VorticleForces() override;
43 
44  /// Applies a force to the velocity field proportional
45  /// to the vorticle values.
46  bool solveGasSubclass(SIM_Engine &engine,
47  SIM_Object *obj,
48  SIM_Time time,
49  SIM_Time timestep) override;
50 
51  THREADED_METHOD6(GAS_VorticleForces, velocity->getField(axis)->shouldMultiThread(),
52  addVorticleForces,
53  SIM_VectorField *, velocity,
54  const SIM_RawField *, stencil,
55  const GU_Detail *, vorticles,
56  const GA_PointGroup *, vptgrp,
58  int, axis)
59  void addVorticleForcesPartial(SIM_VectorField *velocity,
61  const GU_Detail *vorticles,
62  const GA_PointGroup *vptgrp,
63  fpreal timestep,
64  int axis,
65  const UT_JobInfo &info);
66 
67  THREADED_METHOD5(GAS_VorticleForces, shouldMultiThread(),
68  calculateVorticleForces,
69  const GU_Detail *, vorticles,
70  const GA_PointGroup *, vptgrp,
71  GU_Detail *, gdp, fpreal, timestep,
72  fpreal, confinement)
73  void calculateVorticleForcesPartial(
74  const GU_Detail *vorticles,
76  GU_Detail *gdp,
77  fpreal timestep, fpreal confinement,
78  const UT_JobInfo &info);
79 
80 private:
81  static const SIM_DopDescription *getDopDescription();
82 
86  "Gas Vorticle Forces",
87  getDopDescription());
88 };
89 
90 #endif
91 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:50
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
#define GAS_NAME_GEOMETRY
Definition: GAS_Utils.h:30
void
Definition: png.h:1083
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 GAS_NAME_VELOCITY
Definition: GAS_Utils.h:42
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
#define THREADED_METHOD5(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5)
fpreal64 fpreal
Definition: SYS_Types.h:277
#define GET_DATA_FUNC_B(DataName, FuncName)
#define GET_DATA_FUNC_F(DataName, FuncName)
#define THREADED_METHOD6(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5, PARMTYPE6, PARMNAME6)
This class holds a three dimensional scalar field.
#define GAS_NAME_TIMESCALE
Definition: GAS_Utils.h:40
#define const
Definition: zconf.h:214
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
const GA_PointGroup SIM_Time timestep