diff --git a/Base/SceneElements/Objects/imstkDynamicalModel.h b/Base/SceneElements/Objects/imstkDynamicalModel.h index abbf987375bc414fafee05056444c7235e587628..bce5868008b25ddca919d844f0445c75ccc0095e 100644 --- a/Base/SceneElements/Objects/imstkDynamicalModel.h +++ b/Base/SceneElements/Objects/imstkDynamicalModel.h @@ -33,12 +33,22 @@ namespace imstk { /// class DynamicalModel { +public: + enum class Type + { + elastoDynamics, + NavierStokes, + HeatEquation, + none + }; + using kinematicState = ProblemState <Vectord> ; // for now! + public: /// /// \brief Constructor /// - DynamicalModel(std::string name){} + DynamicalModel(DynamicalModel::Type type = Type::none) : m_type(type){} /// /// \brief Destructor @@ -48,22 +58,35 @@ public: /// /// \brief Return the current state of the body /// - std::shared_ptr<kinematicState> getInitialState(); + std::shared_ptr<kinematicState> getInitialState() + { + return m_initialState; + } /// /// \brief Return the current state of the body /// - std::shared_ptr<kinematicState> getCurrentState(); + std::shared_ptr<kinematicState> getCurrentState() + { + return m_currentState; + } /// /// \brief Return the current state of the body /// - std::shared_ptr<kinematicState> getPreviousState(); + std::shared_ptr<kinematicState> getPreviousState() + { + return m_previousState; + } /// /// \brief Reset the current state to the initial state /// - virtual void resetToInitialState(); + virtual void resetToInitialState() + { + m_currentState->setState(m_initialState); + m_previousState->setState(m_initialState); + } /// /// \brief Returns the number of degrees of freedom @@ -75,6 +98,8 @@ public: protected: + Type m_type; ///> Mathematical model type + // Body states std::shared_ptr<kinematicState> m_initialState; ///> Initial state std::shared_ptr<kinematicState> m_currentState; ///> Current state