SPHinXsys
alpha version
|
#include <state_engine.h>
Inherited by SPH::StateEngine::AddedStateVariable.
Public Member Functions | |
StateVariable () | |
StateVariable (std::string &name, StateEngine &owner, SimTK::SubsystemIndex subsys, int varindex) | |
std::string & | getName () |
StateEngine & | getOwner () |
int & | getVarIndex () |
SimTK::SubsystemIndex & | getSubsysIndex () |
SimTK::SystemYIndex & | getSystemYIndex () |
void | setVarIndex (int index) |
void | setSubsystemIndex (SimTK::SubsystemIndex &subsysindx) |
virtual Real | getValue ()=0 |
virtual void | setValue (Real value)=0 |
virtual Real | getDerivative ()=0 |
virtual void | setDerivative (Real deriv)=0 |
Derived simbodysate must create concrete StateVariables to expose their state variables. When exposing state variables allocated by the underlying Simbody (MobilizedBody, Constraint, Force, etc...) use its interface to implement the virtual methods below.
|
inline |
Concstructor and destructor.
|
inlineexplicit |
name | state var name. |
owner | owning component. |
subsys | subsystem for allocation. |
varindex | variable's index in subsystem. |
|
inline |
Return the index of the subsystem used to make resource allocations.
|
inline |
Return the index in the global list of continuous state variables, Y.
|
pure virtual |
Concrete StateEngines implement how the state variable value is evaluated.
Implemented in SPH::StateEngine::AddedStateVariable.
|
inline |
Get the index of simbody state variable.
|
pure virtual |
The derivative a state should be a cache entry and thus does not change the state.
Implemented in SPH::StateEngine::AddedStateVariable.
|
inline |
Set the index of the subsystem used to resource allocations.
|
inline |
Set the index of simbody variable.