00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GAS_SandForces__
00020 #define __GAS_SandForces__
00021
00022 #include "GAS_API.h"
00023
00024 #include "GAS_SubSolver.h"
00025 #include "GAS_Utils.h"
00026
00027 class SIM_VectorField;
00028 class SIM_ScalarField;
00029
00030 class GAS_API GAS_SandForces : public GAS_SubSolver
00031 {
00032 public:
00033 GET_DATA_FUNC_S(GAS_NAME_SURFACE, SurfaceName);
00034 GET_DATA_FUNC_S(GAS_NAME_PRESSURE, PressureName);
00035 GET_DATA_FUNC_S(GAS_NAME_STRAIN, StrainName);
00036 GET_DATA_FUNC_S(GAS_NAME_VELOCITY, VelocityName);
00037
00038 GETSET_DATA_FUNCS_F("frictionangle", FrictionAngle);
00039 GETSET_DATA_FUNCS_F("cohesion", Cohesion);
00040
00041 GET_DATA_FUNC_B(GAS_NAME_USETIMESTEP, UseTimeStep);
00042 GET_DATA_FUNC_F(GAS_NAME_TIMESCALE, TimeScale);
00043
00044 protected:
00045 explicit GAS_SandForces(const SIM_DataFactory *factory);
00046 virtual ~GAS_SandForces();
00047
00048
00049
00050 virtual bool solveGasSubclass(SIM_Engine &engine,
00051 SIM_Object *obj,
00052 SIM_Time time,
00053 SIM_Time timestep);
00054
00055
00056
00057 void addSandForces(SIM_VectorField *velocity,
00058 SIM_ScalarField *surface,
00059 SIM_MatrixField *strain,
00060 SIM_ScalarField *pressure,
00061 fpreal timestep);
00062
00063 private:
00064 static const SIM_DopDescription *getDopDescription();
00065
00066 DECLARE_STANDARD_GETCASTTOTYPE();
00067 DECLARE_DATAFACTORY(GAS_SandForces,
00068 GAS_SubSolver,
00069 "Gas Sand Forces",
00070 getDopDescription());
00071 };
00072
00073 #endif