HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GAS_VelocityStretch.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_VelocityStretch.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_VelocityStretch__
12 #define __GAS_VelocityStretch__
13 
14 #include "GAS_API.h"
15 
16 #include <SIM/SIM_RawField.h>
17 
18 #include "GAS_SubSolver.h"
19 #include "GAS_Utils.h"
20 
21 class GAS_SPH;
22 class SIM_VectorField;
23 class SIM_ScalarField;
24 class SIM_MatrixField;
25 
27 {
28 public:
31  const GU_Detail *gdp;
33 };
34 
36 {
37 public:
38  GET_DATA_FUNC_S(GAS_NAME_VELOCITY, VelocityName);
39  GET_DATA_FUNC_S("vattrib", VelAttrib);
40 
41  GET_DATA_FUNC_S(GAS_NAME_FIELD, FieldName);
42  GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
43  GET_DATA_FUNC_S("attribs", Attributes);
44 
45  GET_DATA_FUNC_B("scalexforms", ScaleXforms);
46  GET_DATA_FUNC_B("rotatexforms", RotateXforms);
47 
50 
51 protected:
52  explicit GAS_VelocityStretch(const SIM_DataFactory *factory);
53  virtual ~GAS_VelocityStretch();
54 
55  /// Stretches the vorticle vorticities according to the velocity
56  /// field
57  virtual bool solveGasSubclass(SIM_Engine &engine,
58  SIM_Object *obj,
59  SIM_Time time,
60  SIM_Time timestep);
61 
62  void stretchByVelocity(GU_Detail *vorticles,
63  const gas_VelInfo &info);
64  void stretchByVelocity(SIM_VectorField *field,
65  const gas_VelInfo &info);
66  void stretchByVelocity(SIM_MatrixField *field,
67  const gas_VelInfo &info);
68 
69  THREADED_METHOD2(GAS_VelocityStretch, dst->shouldMultiThread(),
70  stretchScalarField,
71  SIM_RawField *, dst,
72  const gas_VelInfo &, velinfo)
73  void stretchScalarFieldPartial(
75  const gas_VelInfo &velinfo,
76  const UT_JobInfo &info);
77 
78  THREADED_METHOD4(GAS_VelocityStretch, dst->shouldMultiThread(),
79  stretchVectorField,
80  SIM_RawField *, dst,
81  int, axis,
83  const gas_VelInfo &, velinfo)
84  void stretchVectorFieldPartial(
86  int axis,
87  const SIM_VectorField *src,
88  const gas_VelInfo &velinfo,
89  const UT_JobInfo &info);
90 
91  THREADED_METHOD5(GAS_VelocityStretch, dst->shouldMultiThread(),
92  stretchMatrixField,
93  SIM_RawField *, dst,
94  int, a1,
95  int, a2,
97  const gas_VelInfo &, velinfo)
98  void stretchMatrixFieldPartial(
100  int a1, int a2,
101  const SIM_MatrixField *src,
102  const gas_VelInfo &velinfo,
103  const UT_JobInfo &info);
104 
105 private:
106  static const SIM_DopDescription *getDopDescription();
107 
111  "Gas Velocity Stretch",
112  getDopDescription());
113 };
114 
115 #endif
116 
#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
const SIM_VectorField * velocity
virtual bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
#define GAS_NAME_VELOCITY
Definition: GAS_Utils.h:40
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
#define GAS_NAME_FIELD
Definition: GAS_Utils.h:25
#define THREADED_METHOD2(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2)
#define THREADED_METHOD5(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5)
#define THREADED_METHOD4(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4)
This class holds a three dimensional tensor field.
GLenum GLenum dst
Definition: glcorearb.h:1792
double fpreal
Definition: SYS_Types.h:269
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
const GU_Detail * gdp
This class holds a three dimensional vector field.
#define GET_DATA_FUNC_S(DataName, FuncName)
GLenum src
Definition: glcorearb.h:1792