1 #ifndef SimTK_SimTKCOMMON_SYSTEM_GUTS_H_
2 #define SimTK_SimTKCOMMON_SYSTEM_GUTS_H_
35 class DecorativeGeometry;
80 const String& version=
"0.0.0");
83 const String& getName()
const;
84 const String& getVersion()
const;
86 void setHasTimeAdvancedEvents(
bool hasEm);
87 bool hasTimeAdvancedEvents()
const;
95 const State& getDefaultState()
const;
96 State& updDefaultState();
102 int getNumSubsystems()
const;
107 const System& getSystem()
const;
110 void setOwnerHandle(
System&);
111 bool hasOwnerHandle()
const;
113 explicit Guts(
class GutsRep* r) : rep(r) { }
115 const GutsRep&
getRep()
const {assert(rep);
return *rep;}
116 GutsRep&
updRep()
const {assert(rep);
return *rep;}
118 bool systemTopologyHasBeenRealized()
const;
120 void setSystemTopologyCacheVersion(
StageVersion topoVersion)
const;
121 void invalidateSystemTopologyCache()
const;
131 const State& realizeTopology()
const;
132 void realizeModel(
State&)
const;
133 void realizeInstance (
const State& s)
const;
134 void realizeTime (
const State& s)
const;
135 void realizePosition (
const State& s)
const;
136 void realizeVelocity (
const State& s)
const;
137 void realizeDynamics (
const State& s)
const;
138 void realizeAcceleration(
const State& s)
const;
139 void realizeReport (
const State& s)
const;
142 void multiplyByN(
const State& state,
const Vector& u,
144 void multiplyByNTranspose(
const State& state,
const Vector& fq,
146 void multiplyByNPInv(
const State& state,
const Vector& dq,
148 void multiplyByNPInvTranspose(
const State& state,
const Vector& fu,
151 bool prescribeQ(
State&)
const;
152 bool prescribeU(
State&)
const;
165 void calcTimeOfNextScheduledEvent(
const State&, Real& tNextEvent,
Array_<EventId>& eventIds,
bool includeCurrentTime)
const;
166 void calcTimeOfNextScheduledReport(
const State&, Real& tNextEvent,
Array_<EventId>& eventIds,
bool includeCurrentTime)
const;
168 void calcDecorativeGeometryAndAppend(
const State&,
Stage,
198 virtual void multiplyByNImpl(
const State& state,
const Vector& u,
200 virtual void multiplyByNTransposeImpl(
const State& state,
const Vector& fq,
202 virtual void multiplyByNPInvImpl(
const State& state,
const Vector& dq,
204 virtual void multiplyByNPInvTransposeImpl(
const State& state,
const Vector& fu,
220 virtual void handleEventsImpl
227 virtual int calcEventTriggerInfoImpl(
const State& state,
230 virtual int calcTimeOfNextScheduledEventImpl
232 bool includeCurrentTime)
const;
233 virtual int calcTimeOfNextScheduledReportImpl
235 bool includeCurrentTime)
const;
240 class EventTriggerInfoRep;
247 #endif // SimTK_SimTKCOMMON_SYSTEM_GUTS_H_
The abstract parent of all Subsystems.
Definition: Subsystem.h:61
virtual int realizeTimeImpl(const State &state) const
Definition: SystemGuts.h:191
#define SimTK_SimTKCOMMON_EXPORT
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:202
virtual int realizeTopologyImpl(State &state) const
Definition: SystemGuts.h:188
virtual void projectUImpl(State &state, Vector &uErrEst, const ProjectOptions &options, ProjectResults &results) const
Definition: SystemGuts.h:216
This class is basically a glorified enumerated type, type-safe and range checked but permitting conve...
Definition: Stage.h:50
virtual int realizeDynamicsImpl(const State &state) const
Definition: SystemGuts.h:194
virtual int realizeReportImpl(const State &state) const
Definition: SystemGuts.h:196
ProjectResults & clear()
Restore this object to its default-constructed state, with the return status set to Invalid...
Definition: System.h:1074
This is the handle class for the hidden State implementation.
Definition: State.h:264
virtual int realizeAccelerationImpl(const State &state) const
Definition: SystemGuts.h:195
virtual bool prescribeQImpl(State &) const
Definition: SystemGuts.h:208
Results for advanced users of project() methods.
Definition: System.h:1052
These are all the possible causes for events.
Definition: Event.h:123
Options for the advanced project() methods.
Definition: System.h:935
virtual bool prescribeUImpl(State &) const
Definition: SystemGuts.h:209
virtual int realizeVelocityImpl(const State &state) const
Definition: SystemGuts.h:193
The project() was successful either because no projection was necessary or projection was able to ach...
Definition: System.h:1061
The SimTK::Array_<T> container class is a plug-compatible replacement for the C++ standard template l...
Definition: Array.h:50
virtual int realizePositionImpl(const State &state) const
Definition: SystemGuts.h:192
Guts(class GutsRep *r)
Definition: SystemGuts.h:113
GutsRep & updRep() const
Definition: SystemGuts.h:116
ProjectResults & setExitStatus(Status status)
Definition: System.h:1094
SimTK::String is a plug-compatible std::string replacement (plus some additional functionality) inten...
Definition: String.h:62
const GutsRep & getRep() const
Definition: SystemGuts.h:115
This is the declaration for the System::Guts class, the abstract object to which a System handle poin...
Definition: SystemGuts.h:71
bool hasRep() const
Definition: SystemGuts.h:114
This is the base class that serves as the parent of all SimTK System objects; most commonly Simbody's...
Definition: System.h:96
virtual int realizeInstanceImpl(const State &state) const
Definition: SystemGuts.h:190
Provide a unique integer type for identifying Subsystems.
Results returned by the handleEvent() method.
Definition: Event.h:341
This is the header which should be included in user programs that would like to make use of all the S...
Includes internal headers providing declarations for the basic SimTK Core classes.
virtual int realizeModelImpl(State &state) const
Definition: SystemGuts.h:189
virtual void projectQImpl(State &state, Vector &qErrEst, const ProjectOptions &options, ProjectResults &results) const
Definition: SystemGuts.h:213
int StageVersion
This is the type to use for Stage version numbers.
Definition: State.h:154
Options for the handleEvent() method.
Definition: Event.h:265