Simbody  3.5
SimTK::ForceSubsystem::Guts Class Referenceabstract

Public declaration of internals for ForceSubsystem extension. More...

+ Inheritance diagram for SimTK::ForceSubsystem::Guts:

Public Member Functions

 Guts (const String &name, const String &version)
 
virtual ~Guts ()
 Destructor is virtual to permit cleanup of derived classes. More...
 
const MultibodySystemgetMultibodySystem () const
 
virtual Real calcPotentialEnergy (const State &state) const =0
 Get this subsystem's contribution to the potential energy. More...
 
 SimTK_DOWNCAST (ForceSubsystem::Guts, Subsystem::Guts)
 
- Public Member Functions inherited from SimTK::Subsystem::Guts
 Guts (const String &name="<NONAME>", const String &version="0.0.0")
 This constructor is for use in the constructors of derived Subsystems. More...
 
 Guts (const Guts &)
 Copy constructor results in a default-constructed object though with the name and version string copied. More...
 
const StringgetName () const
 Report back the name supplied on construction; this is not interpreted in any way by Simbody. More...
 
const StringgetVersion () const
 Report back the version string supplied on construction; this i not interpreted in any way by Simbody. More...
 
MeasureIndex adoptMeasure (AbstractMeasure &m)
 Add a new Measure to this Subsystem. More...
 
template<class T >
Measure_< T > getMeasure_ (MeasureIndex mx) const
 Return the Measure whose index within this Subsystem is given. More...
 
AbstractMeasure getMeasure (MeasureIndex mx) const
 Return the Measure whose index within this Subsystem is given, as an AbstractMeasure (that is, its value type is not specified). More...
 
bool isInSystem () const
 
bool isInSameSystem (const Subsystem &otherSubsystem) const
 
const SystemgetSystem () const
 
SystemupdSystem ()
 
void setSystem (System &sys, SubsystemIndex id)
 
SubsystemIndex getMySubsystemIndex () const
 
bool subsystemTopologyHasBeenRealized () const
 Returns true if this subsystem's realizeTopology() method has been called since the last topological change or call to invalidateSubsystemTopologyCache(). More...
 
void invalidateSubsystemTopologyCache () const
 Always call this method when a topological change is made to this Subsystem to indicate that any Stage::Topology cache values may need recomputation. More...
 
Subsystem::Gutsclone () const
 
void realizeSubsystemTopology (State &) const
 
void realizeSubsystemModel (State &) const
 
void realizeSubsystemInstance (const State &) const
 
void realizeSubsystemTime (const State &) const
 
void realizeSubsystemPosition (const State &) const
 
void realizeSubsystemVelocity (const State &) const
 
void realizeSubsystemDynamics (const State &) const
 
void realizeSubsystemAcceleration (const State &) const
 
void realizeSubsystemReport (const State &) const
 
void calcDecorativeGeometryAndAppend (const State &, Stage, Array_< DecorativeGeometry > &) const
 
void createScheduledEvent (const State &state, EventId &eventId) const
 
void createTriggeredEvent (const State &state, EventId &eventId, EventTriggerByStageIndex &triggerFunctionIndex, Stage stage) const
 
void calcEventTriggerInfo (const State &, Array_< EventTriggerInfo > &) const
 
void calcTimeOfNextScheduledEvent (const State &, Real &tNextEvent, Array_< EventId > &eventIds, bool includeCurrentTime) const
 
void calcTimeOfNextScheduledReport (const State &, Real &tNextEvent, Array_< EventId > &eventIds, bool includeCurrentTime) const
 
void handleEvents (State &, Event::Cause, const Array_< EventId > &eventIds, const HandleEventsOptions &options, HandleEventsResults &results) const
 
void reportEvents (const State &, Event::Cause, const Array_< EventId > &eventIds) const
 
const SubsystemgetOwnerSubsystemHandle () const
 Return a const reference to the Subsystem handle object that is the unique owner of this Subsystem::Guts object. More...
 
SubsystemupdOwnerSubsystemHandle ()
 Return a writable reference to the Subsystem handle object that is the unique owner of this Subsystem::Guts object. More...
 
void setOwnerSubsystemHandle (Subsystem &subsys)
 Provide a reference to the Subsystem handle object that is the unique owner of this Subsystem::Guts object. More...
 
bool hasOwnerSubsystemHandle () const
 Check whether this Subsystem::Guts object is currently owned by some Subsystem handle object. More...
 
QIndex allocateQ (State &s, const Vector &qInit) const
 
UIndex allocateU (State &s, const Vector &uInit) const
 
ZIndex allocateZ (State &s, const Vector &zInit) const
 
DiscreteVariableIndex allocateDiscreteVariable (State &s, Stage g, AbstractValue *v) const
 
DiscreteVariableIndex allocateAutoUpdateDiscreteVariable (State &s, Stage invalidates, AbstractValue *v, Stage updateDependsOn) const
 
CacheEntryIndex allocateCacheEntry (const State &s, Stage dependsOn, Stage computedBy, AbstractValue *v) const
 
CacheEntryIndex allocateCacheEntry (const State &state, Stage g, AbstractValue *v) const
 
CacheEntryIndex allocateLazyCacheEntry (const State &state, Stage earliest, AbstractValue *v) const
 
QErrIndex allocateQErr (const State &s, int nqerr) const
 
UErrIndex allocateUErr (const State &s, int nuerr) const
 
UDotErrIndex allocateUDotErr (const State &s, int nudoterr) const
 
EventTriggerByStageIndex allocateEventTriggersByStage (const State &s, Stage g, int ntriggers) const
 
const VectorgetQ (const State &s) const
 
const VectorgetU (const State &s) const
 
const VectorgetZ (const State &s) const
 
const VectorgetUWeights (const State &s) const
 
const VectorgetZWeights (const State &s) const
 
VectorupdQ (State &s) const
 
VectorupdU (State &s) const
 
VectorupdZ (State &s) const
 
const VectorgetQDot (const State &s) const
 
const VectorgetUDot (const State &s) const
 
const VectorgetZDot (const State &s) const
 
const VectorgetQDotDot (const State &s) const
 
VectorupdQDot (const State &s) const
 
VectorupdUDot (const State &s) const
 
VectorupdZDot (const State &s) const
 
VectorupdQDotDot (const State &s) const
 
const VectorgetQErr (const State &s) const
 
const VectorgetUErr (const State &s) const
 
const VectorgetQErrWeights (const State &s) const
 
const VectorgetUErrWeights (const State &s) const
 
const VectorgetUDotErr (const State &s) const
 
const VectorgetMultipliers (const State &s) const
 
const VectorgetEventTriggersByStage (const State &s, Stage g) const
 
VectorupdQErr (const State &s) const
 
VectorupdUErr (const State &s) const
 
VectorupdUDotErr (const State &s) const
 
VectorupdMultipliers (const State &s) const
 
VectorupdEventTriggersByStage (const State &s, Stage g) const
 
SystemQIndex getQStart (const State &s) const
 
int getNQ (const State &s) const
 
SystemUIndex getUStart (const State &s) const
 
int getNU (const State &s) const
 
SystemZIndex getZStart (const State &s) const
 
int getNZ (const State &s) const
 
SystemQErrIndex getQErrStart (const State &s) const
 
int getNQErr (const State &s) const
 
SystemUErrIndex getUErrStart (const State &s) const
 
int getNUErr (const State &s) const
 
SystemUDotErrIndex getUDotErrStart (const State &s) const
 
int getNUDotErr (const State &s) const
 
SystemMultiplierIndex getMultipliersStart (const State &s) const
 
int getNMultipliers (const State &s) const
 
SystemEventTriggerByStageIndex getEventTriggerStartByStage (const State &s, Stage g) const
 
int getNEventTriggersByStage (const State &s, Stage g) const
 
void setQ (State &s, const Vector &q) const
 
void setU (State &s, const Vector &u) const
 
void setZ (State &s, const Vector &z) const
 
Stage getStage (const State &s) const
 
void advanceToStage (const State &s, Stage g) const
 
const AbstractValuegetDiscreteVariable (const State &s, DiscreteVariableIndex index) const
 
AbstractValueupdDiscreteVariable (State &s, DiscreteVariableIndex index) const
 
const AbstractValuegetCacheEntry (const State &s, CacheEntryIndex index) const
 
AbstractValueupdCacheEntry (const State &s, CacheEntryIndex index) const
 
Real getDiscreteVarLastUpdateTime (const State &s, DiscreteVariableIndex dx) const
 
CacheEntryIndex getDiscreteVarUpdateIndex (const State &s, DiscreteVariableIndex dx) const
 
const AbstractValuegetDiscreteVarUpdateValue (const State &s, DiscreteVariableIndex dx) const
 
AbstractValueupdDiscreteVarUpdateValue (const State &s, DiscreteVariableIndex dx) const
 
bool isDiscreteVarUpdateValueRealized (const State &s, DiscreteVariableIndex dx) const
 
void markDiscreteVarUpdateValueRealized (const State &s, DiscreteVariableIndex dx) const
 
bool isCacheValueRealized (const State &s, CacheEntryIndex cx) const
 
void markCacheValueRealized (const State &s, CacheEntryIndex cx) const
 
void markCacheValueNotRealized (const State &s, CacheEntryIndex cx) const
 

Additional Inherited Members

- Protected Member Functions inherited from SimTK::Subsystem::Guts
virtual Subsystem::GutscloneImpl () const =0
 
virtual int realizeSubsystemTopologyImpl (State &s) const
 
virtual int realizeSubsystemModelImpl (State &s) const
 
virtual int realizeSubsystemInstanceImpl (const State &s) const
 
virtual int realizeSubsystemTimeImpl (const State &s) const
 
virtual int realizeSubsystemPositionImpl (const State &s) const
 
virtual int realizeSubsystemVelocityImpl (const State &s) const
 
virtual int realizeSubsystemDynamicsImpl (const State &s) const
 
virtual int realizeSubsystemAccelerationImpl (const State &s) const
 
virtual int realizeSubsystemReportImpl (const State &s) const
 
virtual int calcDecorativeGeometryAndAppendImpl (const State &, Stage, Array_< DecorativeGeometry > &) const
 
virtual void calcEventTriggerInfoImpl (const State &, Array_< EventTriggerInfo > &) const
 
virtual void calcTimeOfNextScheduledEventImpl (const State &, Real &tNextEvent, Array_< EventId > &eventIds, bool includeCurrentTime) const
 
virtual void calcTimeOfNextScheduledReportImpl (const State &, Real &tNextEvent, Array_< EventId > &eventIds, bool includeCurrentTime) const
 
virtual void handleEventsImpl (State &, Event::Cause, const Array_< EventId > &eventIds, const HandleEventsOptions &options, HandleEventsResults &results) const
 
virtual void reportEventsImpl (const State &, Event::Cause, const Array_< EventId > &eventIds) const
 

Detailed Description

Public declaration of internals for ForceSubsystem extension.

Constructor & Destructor Documentation

SimTK::ForceSubsystem::Guts::Guts ( const String name,
const String version 
)
inline
virtual SimTK::ForceSubsystem::Guts::~Guts ( )
inlinevirtual

Destructor is virtual to permit cleanup of derived classes.

Reimplemented from SimTK::Subsystem::Guts.

Member Function Documentation

const MultibodySystem& SimTK::ForceSubsystem::Guts::getMultibodySystem ( ) const
inline
virtual Real SimTK::ForceSubsystem::Guts::calcPotentialEnergy ( const State state) const
pure virtual

Get this subsystem's contribution to the potential energy.

The state must be at Dynamics stage or later.

SimTK::ForceSubsystem::Guts::SimTK_DOWNCAST ( ForceSubsystem::Guts  ,
Subsystem::Guts   
)

The documentation for this class was generated from the following file: