00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __GAS_ComputeParticleAttributes__
00022 #define __GAS_ComputeParticleAttributes__
00023
00024 #include "GAS_API.h"
00025
00026 #include <GU/GU_Detail.h>
00027
00028 #include <UT/UT_ThreadedAlgorithm.h>
00029
00030 #include "GAS_SubSolver.h"
00031 #include "GAS_Utils.h"
00032
00033 class GAS_SPH;
00034
00035 class GAS_API GAS_ComputeParticleAttributes : public GAS_SubSolver
00036 {
00037 public:
00038 GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
00039 GET_DATA_FUNC_B("dodensitygrad", DoDensityGrad);
00040 GET_DATA_FUNC_B("doneighbourvel", DoNeighbourVel);
00041
00042 protected:
00043 explicit GAS_ComputeParticleAttributes(
00044 const SIM_DataFactory *factory);
00045 virtual ~GAS_ComputeParticleAttributes();
00046
00047
00048 virtual bool solveGasSubclass(SIM_Engine &engine,
00049 SIM_Object *obj,
00050 SIM_Time time,
00051 SIM_Time timestep);
00052
00053 bool shouldMultiThread() { return true; }
00054
00055 protected:
00056
00057
00058 struct Attribs {
00059 bool myStoreDensityGradient;
00060 bool myStoreNeighbourVelocity;
00061 };
00062
00063
00064 THREADED_METHOD2(GAS_ComputeParticleAttributes, shouldMultiThread(),
00065 computeAttributes,
00066 GU_Detail *, gdp,
00067 const Attribs &, attribs)
00068 void computeAttributesPartial(GU_Detail *gdp,
00069 const Attribs &attribs,
00070 const UT_JobInfo &info);
00071
00072 private:
00073 static const SIM_DopDescription *getDopDescription();
00074
00075 DECLARE_STANDARD_GETCASTTOTYPE();
00076 DECLARE_DATAFACTORY(GAS_ComputeParticleAttributes,
00077 GAS_SubSolver,
00078 "Gas Compute Particle Attributes",
00079 getDopDescription());
00080 };
00081
00082 #endif