00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GAS_DSD__
00020 #define __GAS_DSD__
00021
00022 #include "GAS_API.h"
00023
00024 #include <UT/UT_ThreadedAlgorithm.h>
00025 #include <SIM/SIM_RawField.h>
00026 #include "GAS_SubSolver.h"
00027 #include "GAS_Utils.h"
00028
00029 class SIM_VectorField;
00030 class SIM_ScalarField;
00031
00032 class GAS_API GAS_DSD : public GAS_SubSolver
00033 {
00034 public:
00035 GET_DATA_FUNC_S("d", DName);
00036 GET_DATA_FUNC_S("ddot", DDotName);
00037 GET_DATA_FUNC_S("curvature", KappaName);
00038 GET_DATA_FUNC_S("curvatureadvected", KappaStarName);
00039
00040 GETSET_DATA_FUNCS_F("c1", C1);
00041 GETSET_DATA_FUNCS_F("c2", C2);
00042 GETSET_DATA_FUNCS_F("c3", C3);
00043 GETSET_DATA_FUNCS_F("c4", C4);
00044 GETSET_DATA_FUNCS_F("c5", C5);
00045 GETSET_DATA_FUNCS_F("mutheta", MuTheta);
00046 GETSET_DATA_FUNCS_F("dcj", DCJ);
00047
00048 GET_DATA_FUNC_B(GAS_NAME_USETIMESTEP, UseTimeStep);
00049 GET_DATA_FUNC_F(GAS_NAME_TIMESCALE, TimeScale);
00050
00051 protected:
00052 explicit GAS_DSD(const SIM_DataFactory *factory);
00053 virtual ~GAS_DSD();
00054
00055
00056
00057 virtual bool solveGasSubclass(SIM_Engine &engine,
00058 SIM_Object *obj,
00059 SIM_Time time,
00060 SIM_Time timestep);
00061
00062 bool shouldMultiThread(SIM_RawField *field) const
00063 { return field->field()->numTiles() > 1; }
00064
00065 THREADED_METHOD5_CONST(GAS_DSD, shouldMultiThread(d),
00066 applyDSD,
00067 SIM_RawField *, d,
00068 SIM_RawField *, ddot,
00069 const SIM_ScalarField *, kappa,
00070 const SIM_ScalarField *, kappastar,
00071 fpreal, timestep);
00072 void applyDSDPartial(SIM_RawField *d,
00073 SIM_RawField *ddot,
00074 const SIM_ScalarField *kappa,
00075 const SIM_ScalarField *kappastar,
00076 fpreal timestep,
00077 const UT_JobInfo &info) const;
00078
00079 private:
00080 static const SIM_DopDescription *getDopDescription();
00081
00082 DECLARE_STANDARD_GETCASTTOTYPE();
00083 DECLARE_DATAFACTORY(GAS_DSD,
00084 GAS_SubSolver,
00085 "Gas DSD",
00086 getDopDescription());
00087 };
00088
00089 #endif
00090