1 #ifndef SimTK_SimTKCOMMON_STATE_H_
2 #define SimTK_SimTKCOMMON_STATE_H_
276 void setNumSubsystems(
int i);
303 int getNumSubsystems()
const;
309 const Stage& getSystemStage()
const;
317 void invalidateAll(
Stage);
326 void invalidateAllCacheAtOrAbove(
Stage)
const;
339 void advanceSystemToStage(
Stage)
const;
641 {
return allocateCacheEntry(sx, g, g, v); }
749 int getNYErr()
const;
752 int getNQErr()
const;
758 int getNUErr()
const;
765 int getNUDotErr()
const;
770 int getNMultipliers()
const;
773 int getNEventTriggers()
const;
776 int getNEventTriggersByStage(
Stage)
const;
868 const Vector& getEventTriggers()
const;
869 const Vector& getEventTriggersByStage(
Stage)
const;
872 Vector& updEventTriggers()
const;
919 const Real& getTime()
const;
920 const Vector& getY()
const;
923 const Vector& getQ()
const;
924 const Vector& getU()
const;
925 const Vector& getZ()
const;
962 const Vector& getUWeights()
const;
970 const Vector& getZWeights()
const;
988 void setTime(Real t);
989 void setY(
const Vector& y);
997 void setQ(
const Vector& q);
998 void setU(
const Vector& u);
999 void setZ(
const Vector& z);
1001 const Vector& getYDot()
const;
1004 const Vector& getQDot()
const;
1005 const Vector& getZDot()
const;
1006 const Vector& getUDot()
const;
1009 const Vector& getQDotDot()
const;
1020 Vector& updQDotDot()
const;
1024 const Vector& getYErr()
const;
1027 const Vector& getQErr()
const;
1028 const Vector& getUErr()
const;
1031 const Vector& getUDotErr()
const;
1032 const Vector& getMultipliers()
const;
1036 const Vector& getQErrWeights()
const;
1048 const Vector& getUErrWeights()
const;
1054 Vector& updQErrWeights();
1060 Vector& updUErrWeights();
1067 Vector& updUDotErr()
const;
1068 Vector& updMultipliers()
const;
1088 Stage getLowestSystemStageDifference
1097 void setSystemTopologyStageVersion(
StageVersion topoVersion);
1102 void autoUpdateDiscreteVariables();
1105 String cacheToString()
const;
1109 class StateImpl* impl;
1110 const StateImpl& getImpl()
const {assert(impl);
return *impl;}
1111 StateImpl& updImpl() {assert(impl);
return *impl;}
1119 #endif // SimTK_SimTKCOMMON_STATE_H_
#define SimTK_SimTKCOMMON_EXPORT
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:202
SimTK_DEFINE_UNIQUE_INDEX_TYPE(AssemblyConditionIndex)
Unique integer type for Subsystem-local uDotErr indexing.
This unique integer type is for identifying a triggered event in the full System-level view of the St...
This unique integer type is for indexing the global, System-level "y-like" arrays, that is, the arrays in which all of the various Subsystems' continuous state variables q, u, and z have been collected into contiguous memory.
Unique integer type for Subsystem-local u indexing.
Unique integer type for Subsystem-local uErr indexing.
CacheEntryIndex allocateCacheEntry(SubsystemIndex sx, Stage g, AbstractValue *v) const
This is an abbreviation for allocation of a cache entry whose earliest and latest Stages are the same...
Definition: State.h:640
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
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
The SimTK::Array_<T> container class is a plug-compatible replacement for the C++ standard template l...
Definition: Array.h:50
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...
CacheEntryIndex allocateLazyCacheEntry(SubsystemIndex sx, Stage earliest, AbstractValue *v) const
This is an abbreviation for allocation of a lazy cache entry.
Definition: State.h:651
Unique integer type for Subsystem-local z indexing.
This unique integer type is for indexing the global, System-level "yErr-like" arrays, that is, the arrays in which all of the various Subsystems' qErr and uErr constraint equation slots have been collected together.
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.
Higher than any legitimate Stage.
Definition: Stage.h:63
std::ostream & operator<<(std::ostream &o, const ContactForce &f)
Definition: CompliantContactSubsystem.h:387
This unique integer type is for identifying a triggered event within a particular Stage of the full S...
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 file declares the types needed for Simbody's support for Events.
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...
Provide a unique integer type for identifying Subsystems.
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.
This unique integer type is for indexing global "u-like" arrays, that is, arrays that inherently have...
Unique integer type for Subsystem-local multiplier indexing.
Includes internal headers providing declarations for the basic SimTK Core classes.
int StageVersion
This is the type to use for Stage version numbers.
Definition: State.h:154