00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GAS_SubStep__
00020 #define __GAS_SubStep__
00021
00022 #include "GAS_API.h"
00023
00024 #include "GAS_SubSolver.h"
00025 #include "GAS_Utils.h"
00026
00027 class GAS_API GAS_SubStep : public GAS_SubSolver
00028 {
00029 public:
00030 GETSET_DATA_FUNCS_I(SIM_NAME_PRIMARYSOLVER, PrimarySolver);
00031 GET_DATA_FUNC_S(GAS_NAME_VELOCITY, VelocityName);
00032 GET_DATA_FUNC_S(GAS_NAME_GEOMETRY, GeometryName);
00033 GETSET_DATA_FUNCS_I("substeps", Substeps);
00034 GETSET_DATA_FUNCS_I("minimumsubsteps", MinimumSubsteps);
00035 GETSET_DATA_FUNCS_F("cflcond", CFLCond);
00036
00037 GET_DATA_FUNC_S(GAS_NAME_TRACKERADDR, TrackerAddress);
00038 GET_DATA_FUNC_I(GAS_NAME_TRACKERPORT, TrackerPort);
00039 GET_DATA_FUNC_S(GAS_NAME_JOBNAME, JobName);
00040 GET_DATA_FUNC_I("slice", Slice);
00041 GET_DATA_FUNC_I("numslice", NumSlice);
00042
00043
00044
00045 virtual SIM_Result solveObjectsSubclass(SIM_Engine &engine,
00046 SIM_ObjectArray &objects,
00047 SIM_ObjectArray &newobjects,
00048 SIM_ObjectArray &feedbacktoobjects,
00049 const SIM_Time ×tep);
00050
00051 protected:
00052 explicit GAS_SubStep(const SIM_DataFactory *factory);
00053 virtual ~GAS_SubStep();
00054
00055 virtual bool solveGasSubclass(SIM_Engine &engine,
00056 SIM_Object *obj,
00057 SIM_Time time,
00058 SIM_Time timestep)
00059 {
00060 return true;
00061 }
00062
00063 virtual void getImpulseMassMatrixSubclass(
00064 const SIM_Object &object,
00065 const UT_Vector3 &impulseworldpos,
00066 UT_DMatrix3 &immatrix) const;
00067 virtual void getPointImpulseMassMatrixSubclass(
00068 const SIM_Object &object,
00069 int ptnum, UT_DMatrix3 &immatrix) const;
00070 private:
00071 static const SIM_DopDescription *getDopDescription();
00072
00073
00074 const SIM_Solver *getCurrentSolver() const;
00075
00076
00077
00078 SIM_Time getAdjustedSubStep(
00079 SIM_ObjectArray &objects);
00080
00081 SIM_Solver *myCurrentSolver;
00082
00083 DECLARE_STANDARD_GETCASTTOTYPE();
00084 DECLARE_DATAFACTORY(GAS_SubStep,
00085 GAS_SubSolver,
00086 "Gas SubStep",
00087 getDopDescription());
00088 };
00089
00090 #endif
00091