00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GAS_FieldToParticle__
00020 #define __GAS_FieldToParticle__
00021
00022 #include "GAS_API.h"
00023
00024 #include "GAS_SubSolver.h"
00025 #include "GAS_Utils.h"
00026
00027 class SIM_RawField;
00028
00029 class GAS_API GAS_FieldToParticle : public GAS_SubSolver
00030 {
00031 public:
00032 GET_DATA_FUNC_S(GAS_NAME_FIELD, FieldName);
00033 GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
00034
00035 GET_DATA_FUNC_S("attrib", Attribute);
00036
00037 GET_DATA_FUNC_I("calculationtype", CalculationType);
00038 GET_DATA_FUNC_F("dstpreadd", DstPreAdd);
00039 GET_DATA_FUNC_F("dstpremul", DstPreMul);
00040 GET_DATA_FUNC_F("srcpreadd", SrcPreAdd);
00041 GET_DATA_FUNC_F("srcpremul", SrcPreMul);
00042 GET_DATA_FUNC_F("postadd", PostAdd);
00043 GET_DATA_FUNC_F("postmul", PostMul);
00044
00045 GET_DATA_FUNC_I("srctimescale", SrcTimeScale);
00046 GET_DATA_FUNC_I("dsttimescale", DstTimeScale);
00047 GET_DATA_FUNC_I("posttimescale", PostTimeScale);
00048
00049 protected:
00050 explicit GAS_FieldToParticle(const SIM_DataFactory *factory);
00051 virtual ~GAS_FieldToParticle();
00052
00053
00054
00055 virtual bool solveGasSubclass(SIM_Engine &engine,
00056 SIM_Object *obj,
00057 SIM_Time time,
00058 SIM_Time timestep);
00059
00060 void fieldToParticle(SIM_Object *obj,
00061 SIM_RawField *srcfield,
00062 GU_Detail *particles,
00063 fpreal timestep,
00064 const char *attributename,
00065 int offset);
00066
00067 private:
00068 static const SIM_DopDescription *getDopDescription();
00069
00070 DECLARE_STANDARD_GETCASTTOTYPE();
00071 DECLARE_DATAFACTORY(GAS_FieldToParticle,
00072 GAS_SubSolver,
00073 "Gas Field To Particle",
00074 getDopDescription());
00075 };
00076
00077 #endif
00078