1 #ifndef SimTK_SimTKCOMMON_SUBSYSTEM_H_
2 #define SimTK_SimTKCOMMON_SUBSYSTEM_H_
75 const String& getName()
const;
76 const String& getVersion()
const;
93 {
return allocateCacheEntry(state, g, g, v); }
134 assert(q.
size() == getNQ(s));
138 assert(u.
size() == getNU(s));
142 assert(z.
size() == getNZ(s));
196 int getNQ (
const State&)
const;
198 int getNU (
const State&)
const;
200 int getNZ (
const State&)
const;
202 int getNQErr (
const State&)
const;
204 int getNUErr (
const State&)
const;
206 int getNUDotErr (
const State&)
const;
208 int getNMultipliers (
const State&)
const;
210 int getNEventTriggersByStage (
const State&,
Stage)
const;
212 bool isInSystem()
const;
213 bool isInSameSystem(
const Subsystem& otherSubsystem)
const;
215 const System& getSystem()
const;
222 bool isOwnerHandle()
const;
223 bool isEmptyHandle()
const;
226 bool isSameSubsystem(
const Subsystem& otherSubsystem)
const;
228 bool subsystemTopologyHasBeenRealized()
const;
229 void invalidateSubsystemTopologyCache()
const;
256 #endif // SimTK_SimTKCOMMON_SUBSYSTEM_H_
AbstractValue & updDiscreteVarUpdateValue(SubsystemIndex, DiscreteVariableIndex) const
For an auto-updating discrete variable, return a writable reference to the value of its associated up...
The abstract parent of all Subsystems.
Definition: Subsystem.h:61
#define SimTK_SimTKCOMMON_EXPORT
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:202
Unique integer type for Subsystem-local uDotErr indexing.
bool isDiscreteVarUpdateValueRealized(SubsystemIndex, DiscreteVariableIndex) const
Check whether the update value for this auto-update discrete variable has already been computed since...
Unique integer type for Subsystem-local u indexing.
bool isDiscreteVarUpdateValueRealized(const State &s, DiscreteVariableIndex dx) const
Definition: Subsystem.h:174
Real getDiscreteVarLastUpdateTime(const State &s, DiscreteVariableIndex dx) const
Definition: Subsystem.h:166
Unique integer type for Subsystem-local uErr indexing.
Real getDiscreteVarLastUpdateTime(SubsystemIndex, DiscreteVariableIndex) const
Return the time of last update for this discrete variable.
CacheEntryIndex getDiscreteVarUpdateIndex(const State &s, DiscreteVariableIndex dx) const
Definition: Subsystem.h:168
Unique integer type for Subsystem-local qErr indexing.
This class is basically a glorified enumerated type, type-safe and range checked but permitting conve...
Definition: Stage.h:50
int size() const
Definition: BigMatrix.h:1411
void markDiscreteVarUpdateValueRealized(const State &s, DiscreteVariableIndex dx) const
Definition: Subsystem.h:176
CacheEntryIndex getDiscreteVarUpdateIndex(SubsystemIndex, DiscreteVariableIndex) const
For an auto-updating discrete variable, return the CacheEntryIndex for its associated update cache en...
void setU(State &s, const Vector &u) const
Definition: Subsystem.h:137
This is the base class for all Measure handle classes.
Definition: Measure.h:151
This unique integer type is for indexing global "multiplier-like" arrays, that is, arrays that inherently have the same dimension as the total number of Lagrange multipliers in the full System-level view of the State.
This is the handle class for the hidden State implementation.
Definition: State.h:264
const Subsystem::Guts & getSubsystemGuts() const
Definition: Subsystem.h:241
This file declares the base class AbstractMeasure for all derived Measure handle classes, and the handle classes for built-in Measures.
Subsystem::Guts & updSubsystemGuts()
Definition: Subsystem.h:242
const AbstractValue & getDiscreteVarUpdateValue(const State &s, DiscreteVariableIndex dx) const
Definition: Subsystem.h:170
This unique integer type is for indexing global "q-like" arrays, that is, arrays that inherently have...
This unique integer type is for indexing global "qErr-like" arrays, that is, arrays that inherently h...
Unique integer type for Subsystem-local z indexing.
void setQ(State &s, const Vector &q) const
Definition: Subsystem.h:133
This unique integer type is for indexing global "uErr-like" arrays, that is, arrays that inherently h...
Unique integer type for Subsystem-local q indexing.
Subsystem(Subsystem::Guts *g)
Definition: Subsystem.h:250
AbstractValue & updDiscreteVarUpdateValue(const State &s, DiscreteVariableIndex dx) const
Definition: Subsystem.h:172
The abstract parent of all Subsystem "Guts" implementation classes.
Definition: SubsystemGuts.h:42
Higher than any legitimate Stage.
Definition: Stage.h:63
This unique integer type is for identifying a triggered event within a particular Stage of the full S...
bool hasGuts() const
Definition: Subsystem.h:251
SimTK::String is a plug-compatible std::string replacement (plus some additional functionality) inten...
Definition: String.h:62
Abstract base class representing an arbitrary value of self-describing type.
Definition: Value.h:41
This unique integer type is for indexing global "uDotErr-like" arrays, that is, arrays that inherentl...
This unique integer type is for selecting discrete variables.
This unique integer type is for indexing global "z-like" arrays, that is, arrays that inherently have...
Measure_< T > getMeasure_(MeasureIndex mx) const
Definition: Subsystem.h:236
const AbstractValue & getDiscreteVarUpdateValue(SubsystemIndex, DiscreteVariableIndex) const
For an auto-updating discrete variable, return the current value of its associated update cache entry...
This is the base class that serves as the parent of all SimTK System objects; most commonly Simbody's...
Definition: System.h:96
Provide a unique integer type for identifying Subsystems.
Subsystem()
Definition: Subsystem.h:70
This unique integer type is for selecting non-shared cache entries.
This is the header which should be included in user programs that would like to make use of all the S...
Unique integer type for Subsystem-local, per-stage event indexing.
void setZ(State &s, const Vector &z) const
Definition: Subsystem.h:141
This unique integer type is for indexing global "u-like" arrays, that is, arrays that inherently have...
void markDiscreteVarUpdateValueRealized(SubsystemIndex, DiscreteVariableIndex) const
Mark the update value for this auto-update discrete variable as up-to-date with respect to the state ...
Includes internal headers providing declarations for the basic SimTK Core classes.
This is the base handle class for all Measures whose value type is known, including all the Simbody b...
Definition: Measure.h:261