Simbody 3.7
Loading...
Searching...
No Matches
SimTK::ForceSubsystem::Guts Class Referenceabstract

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

#include <ForceSubsystemGuts.h>

+ 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.
 
const MultibodySystem & getMultibodySystem () const
 
virtual Real calcPotentialEnergy (const State &state) const =0
 Get this subsystem's contribution to the potential energy.
 
 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.
 
 Guts (const Guts &)
 Copy constructor results in a default-constructed object though with the name and version string copied.
 
const String & getName () const
 Report back the name supplied on construction; this is not interpreted in any way by Simbody.
 
const String & getVersion () const
 Report back the version string supplied on construction; this i not interpreted in any way by Simbody.
 
MeasureIndex adoptMeasure (AbstractMeasure &m)
 Add a new Measure to this Subsystem.
 
template<class T >
Measure_< T > getMeasure_ (MeasureIndex mx) const
 Return the Measure whose index within this Subsystem is given.
 
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).
 
bool isInSystem () const
 
bool isInSameSystem (const Subsystem &otherSubsystem) const
 
const System & getSystem () const
 
System & updSystem ()
 
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().
 
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.
 
Subsystem::Guts * clone () 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 Subsystem & getOwnerSubsystemHandle () const
 Return a const reference to the Subsystem handle object that is the unique owner of this Subsystem::Guts object.
 
Subsystem & updOwnerSubsystemHandle ()
 Return a writable reference to the Subsystem handle object that is the unique owner of this Subsystem::Guts object.
 
void setOwnerSubsystemHandle (Subsystem &subsys)
 Provide a reference to the Subsystem handle object that is the unique owner of this Subsystem::Guts object.
 
bool hasOwnerSubsystemHandle () const
 Check whether this Subsystem::Guts object is currently owned by some Subsystem handle object.
 
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 Vector & getQ (const State &s) const
 
const Vector & getU (const State &s) const
 
const Vector & getZ (const State &s) const
 
const Vector & getUWeights (const State &s) const
 
const Vector & getZWeights (const State &s) const
 
Vector & updQ (State &s) const
 
Vector & updU (State &s) const
 
Vector & updZ (State &s) const
 
const Vector & getQDot (const State &s) const
 
const Vector & getUDot (const State &s) const
 
const Vector & getZDot (const State &s) const
 
const Vector & getQDotDot (const State &s) const
 
Vector & updQDot (const State &s) const
 
Vector & updUDot (const State &s) const
 
Vector & updZDot (const State &s) const
 
Vector & updQDotDot (const State &s) const
 
const Vector & getQErr (const State &s) const
 
const Vector & getUErr (const State &s) const
 
const Vector & getQErrWeights (const State &s) const
 
const Vector & getUErrWeights (const State &s) const
 
const Vector & getUDotErr (const State &s) const
 
const Vector & getMultipliers (const State &s) const
 
const Vector & getEventTriggersByStage (const State &s, Stage g) const
 
Vector & updQErr (const State &s) const
 
Vector & updUErr (const State &s) const
 
Vector & updUDotErr (const State &s) const
 
Vector & updMultipliers (const State &s) const
 
Vector & updEventTriggersByStage (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 AbstractValue & getDiscreteVariable (const State &s, DiscreteVariableIndex index) const
 
AbstractValue & updDiscreteVariable (State &s, DiscreteVariableIndex index) const
 
const AbstractValue & getCacheEntry (const State &s, CacheEntryIndex index) const
 
AbstractValue & updCacheEntry (const State &s, CacheEntryIndex index) const
 
Real getDiscreteVarLastUpdateTime (const State &s, DiscreteVariableIndex dx) const
 
CacheEntryIndex getDiscreteVarUpdateIndex (const State &s, DiscreteVariableIndex dx) const
 
const AbstractValue & getDiscreteVarUpdateValue (const State &s, DiscreteVariableIndex dx) const
 
AbstractValue & updDiscreteVarUpdateValue (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::Guts * cloneImpl () 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

◆ Guts()

SimTK::ForceSubsystem::Guts::Guts ( const String &  name,
const String &  version 
)
inline

◆ ~Guts()

virtual SimTK::ForceSubsystem::Guts::~Guts ( )
inlinevirtual

Destructor is virtual to permit cleanup of derived classes.

Reimplemented from SimTK::Subsystem::Guts.

Member Function Documentation

◆ getMultibodySystem()

const MultibodySystem & SimTK::ForceSubsystem::Guts::getMultibodySystem ( ) const
inline

◆ calcPotentialEnergy()

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_DOWNCAST()

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

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