HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GAS_ComputeParticleAttributes.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_ComputeParticleAttributes.h
7  * This DOP is used to recompute desired attributes
8  * on the provided particle fluid field.
9  *
10  * COMMENTS:
11  */
12 
13 #ifndef __GAS_ComputeParticleAttributes__
14 #define __GAS_ComputeParticleAttributes__
15 
16 #include "GAS_API.h"
17 
18 #include <GU/GU_Detail.h>
19 
21 
22 #include "GAS_SubSolver.h"
23 #include "GAS_Utils.h"
24 
25 class GAS_SPH;
26 
28 {
29 public:
30  GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
31  GET_DATA_FUNC_B("dodensitygrad", DoDensityGrad);
32  GET_DATA_FUNC_B("doneighbourvel", DoNeighbourVel);
33 
34 protected:
36  const SIM_DataFactory *factory);
38 
39  /// Recomputes the values of specified attributes
40  virtual bool solveGasSubclass(SIM_Engine &engine,
41  SIM_Object *obj,
42  SIM_Time time,
43  SIM_Time timestep);
44 
45  bool shouldMultiThread() { return true; }
46 
47 protected:
48  // A structure used to list which attributes we want
49  // to store.
50  struct Attribs {
53  };
54 
55  /// Multithreaded attribute calculation method
57  computeAttributes,
58  GU_Detail *, gdp,
59  const GAS_SPH &, sph,
60  const Attribs &, attribs)
61  void computeAttributesPartial(GU_Detail *gdp,
62  const GAS_SPH &sph,
63  const Attribs &attribs,
64  const UT_JobInfo &info);
65 
66 private:
67  static const SIM_DopDescription *getDopDescription();
68 
72  "Gas Compute Particle Attributes",
73  getDopDescription());
74 };
75 
76 #endif
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
#define GAS_NAME_GEOMETRY
Definition: GAS_Utils.h:28
#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 THREADED_METHOD3(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3)
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
#define GET_DATA_FUNC_B(DataName, FuncName)
#define const
Definition: zconf.h:214
#define GET_DATA_FUNC_S(DataName, FuncName)