HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  bool solveGasSubclass(SIM_Engine &engine,
41  SIM_Object *obj,
42  SIM_Time time,
43  SIM_Time timestep) override;
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:50
#define GAS_NAME_GEOMETRY
Definition: GAS_Utils.h:30
void
Definition: png.h:1083
GT_API const UT_StringHolder time
#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 THREADED_METHOD3(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3)
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:63
#define GET_DATA_FUNC_B(DataName, FuncName)
#define GET_DATA_FUNC_S(DataName, FuncName)