HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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("particlefield", ParticleField);
30  GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
31  GETSET_DATA_FUNCS_F("confinement", ConfinementStrength);
32  GET_DATA_FUNC_B("computev", ComputeVelocity);
33 
36 
37  bool shouldMultiThread() { return true; }
38 
39 protected:
40  explicit GAS_VorticleForces(const SIM_DataFactory *factory);
41  virtual ~GAS_VorticleForces();
42 
43  /// Applies a force to the velocity field proportional
44  /// to the vorticle values.
45  virtual bool solveGasSubclass(SIM_Engine &engine,
46  SIM_Object *obj,
47  SIM_Time time,
48  SIM_Time timestep);
49 
50  THREADED_METHOD5(GAS_VorticleForces, velocity->getField(axis)->shouldMultiThread(),
51  addVorticleForces,
52  SIM_VectorField *, velocity,
53  const GU_Detail *, vorticles,
54  const GA_PointGroup *, vptgrp,
56  int, axis)
57  void addVorticleForcesPartial(SIM_VectorField *velocity,
58  const GU_Detail *vorticles,
59  const GA_PointGroup *vptgrp,
60  fpreal timestep,
61  int axis,
62  const UT_JobInfo &info);
63 
64  THREADED_METHOD5(GAS_VorticleForces, shouldMultiThread(),
65  calculateVorticleForces,
66  const GU_Detail *, vorticles,
67  const GA_PointGroup *, vptgrp,
68  GU_Detail *, gdp, fpreal, timestep,
69  fpreal, confinement)
70  void calculateVorticleForcesPartial(
71  const GU_Detail *vorticles,
73  GU_Detail *gdp,
74  fpreal timestep, fpreal confinement,
75  const UT_JobInfo &info);
76 
77 private:
78  static const SIM_DopDescription *getDopDescription();
79 
83  "Gas Vorticle Forces",
84  getDopDescription());
85 };
86 
87 #endif
88 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
#define GAS_NAME_GEOMETRY
Definition: GAS_Utils.h:28
#define GAS_NAME_USETIMESTEP
Definition: GAS_Utils.h:37
#define GAS_API
Definition: GAS_API.h:10
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
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
#define THREADED_METHOD5(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5)
double fpreal
Definition: SYS_Types.h:263
typedef int
Definition: png.h:1175
#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 const
Definition: zconf.h:214
This class holds a three dimensional vector field.
#define GET_DATA_FUNC_S(DataName, FuncName)
const GA_PointGroup SIM_Time timestep