#include <SubsystemGuts.h>
A Subsystem is expected to be part of a larger System and to have interdependencies with other subsystems of that same system. It must NOT have dependencies on objects which are outside the System. Consequently construction of any concrete subsystem requires specification of a system at that time. Subsystems go through an extended construction phase in which their contents and interdependencies are created. Thus all of a System's Subsystems generally need to be available simultaneously during construction, so that they can reference each other.
There are three distinct users of this class:
Public Member Functions | |
Guts (const Guts &) | |
Guts & | operator= (const Guts &) |
Guts (const String &name="<NONAME>", const String &version="0.0.0") | |
virtual | ~Guts () |
const String & | getName () const |
const String & | getVersion () const |
const Vector & | getQ (const State &) const |
const Vector & | getU (const State &) const |
const Vector & | getZ (const State &) const |
const Vector & | getQDot (const State &) const |
const Vector & | getUDot (const State &) const |
const Vector & | getZDot (const State &) const |
const Vector & | getQDotDot (const State &) const |
const Vector & | getQErr (const State &) const |
const Vector & | getUErr (const State &) const |
const Vector & | getUDotErr (const State &) const |
const Vector & | getMultipliers (const State &) const |
Vector & | updQ (State &) const |
Vector & | updU (State &) const |
Vector & | updZ (State &) 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 |
Vector & | updQDot (const State &) const |
Vector & | updUDot (const State &) const |
Vector & | updZDot (const State &) const |
Vector & | updQDotDot (const State &) const |
Vector & | updQErr (const State &) const |
Vector & | updUErr (const State &) const |
Vector & | updUDotErr (const State &) const |
Vector & | updMultipliers (const State &) const |
Stage | getStage (const State &) const |
const AbstractValue & | getDiscreteVariable (const State &, int index) const |
AbstractValue & | updDiscreteVariable (State &, int index) const |
const AbstractValue & | getCacheEntry (const State &, int index) const |
AbstractValue & | updCacheEntry (const State &, int index) const |
int | getQStart (const State &) const |
int | getNQ (const State &) const |
int | getUStart (const State &) const |
int | getNU (const State &) const |
int | getZStart (const State &) const |
int | getNZ (const State &) const |
int | getQErrStart (const State &) const |
int | getNQErr (const State &) const |
int | getUErrStart (const State &) const |
int | getNUErr (const State &) const |
int | getUDotErrStart (const State &) const |
int | getNUDotErr (const State &) const |
int | getMultipliersStart (const State &) const |
int | getNMultipliers (const State &) const |
bool | isInSystem () const |
bool | isInSameSystem (const Subsystem &otherSubsystem) const |
const System & | getSystem () const |
System & | updSystem () |
SubsystemIndex | getMySubsystemIndex () const |
const Subsystem & | getOwnerSubsystemHandle () const |
Subsystem & | updOwnerSubsystemHandle () |
void | setOwnerSubsystemHandle (Subsystem &) |
bool | hasOwnerSubsystemHandle () const |
void | setSystem (System &, SubsystemIndex) |
Guts (class GutsRep *r) | |
bool | hasRep () const |
const GutsRep & | getRep () const |
GutsRep & | updRep () const |
void | setRep (GutsRep &r) |
bool | subsystemTopologyHasBeenRealized () const |
void | invalidateSubsystemTopologyCache () const |
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 | calcQUnitWeights (const State &, Vector &weights) const |
void | calcUUnitWeights (const State &, Vector &weights) const |
void | calcZUnitWeights (const State &, Vector &weights) const |
void | calcQErrUnitTolerances (const State &, Vector &tolerances) const |
void | calcUErrUnitTolerances (const State &, Vector &tolerances) const |
void | calcDecorativeGeometryAndAppend (const State &, Stage, std::vector< DecorativeGeometry > &) const |
void | createScheduledEvent (const State &state, EventId &eventId) const |
void | createTriggeredEvent (const State &state, EventId &eventId, int &triggerFunctionIndex, Stage stage) const |
virtual void | calcEventTriggerInfo (const State &, std::vector< System::EventTriggerInfo > &) const |
virtual void | calcTimeOfNextScheduledEvent (const State &, Real &tNextEvent, std::vector< EventId > &eventIds, bool includeCurrentTime) const |
virtual void | calcTimeOfNextScheduledReport (const State &, Real &tNextEvent, std::vector< EventId > &eventIds, bool includeCurrentTime) const |
virtual void | handleEvents (State &, System::EventCause, const std::vector< EventId > &eventIds, Real accuracy, const Vector &yWeights, const Vector &ooConstraintTols, Stage &lowestModified, bool &shouldTerminate) const |
virtual void | reportEvents (const State &, System::EventCause, const std::vector< EventId > &eventIds) const |
Static Public Member Functions | |
static void | destruct (Subsystem::Guts *) |
Protected Member Functions | |
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 | calcQUnitWeightsImpl (const State &s, Vector &weights) const |
virtual int | calcUUnitWeightsImpl (const State &s, Vector &weights) const |
virtual int | calcZUnitWeightsImpl (const State &s, Vector &weights) const |
virtual int | calcQErrUnitTolerancesImpl (const State &s, Vector &tolerances) const |
virtual int | calcUErrUnitTolerancesImpl (const State &s, Vector &tolerances) const |
virtual int | calcDecorativeGeometryAndAppendImpl (const State &, Stage, std::vector< DecorativeGeometry > &) const |
int | allocateQ (State &s, const Vector &qInit) const |
int | allocateU (State &s, const Vector &uInit) const |
int | allocateZ (State &s, const Vector &zInit) const |
int | allocateQErr (const State &s, int nqerr) const |
int | allocateUErr (const State &s, int nuerr) const |
int | allocateUDotErr (const State &s, int nudoterr) const |
int | allocateDiscreteVariable (State &s, Stage g, AbstractValue *v) const |
int | allocateCacheEntry (State &s, Stage g, AbstractValue *v) const |
void | advanceToStage (const State &s, Stage g) const |
Friends | |
class | GutsRep |
void | subsystemDestructImplLocator (Subsystem::Guts *) |
Subsystem::Guts * | subsystemCloneImplLocator (const Subsystem::Guts &) |
int | subsystemRealizeTopologyImplLocator (const Subsystem::Guts &, State &) |
int | subsystemRealizeModelImplLocator (const Subsystem::Guts &, State &) |
int | subsystemRealizeInstanceImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizeTimeImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizePositionImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizeVelocityImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizeDynamicsImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizeAccelerationImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemRealizeReportImplLocator (const Subsystem::Guts &, const State &) |
int | subsystemCalcQUnitWeightsImplLocator (const Subsystem::Guts &, const State &, Vector &) |
int | subsystemCalcUUnitWeightsImplLocator (const Subsystem::Guts &, const State &, Vector &) |
int | subsystemCalcZUnitWeightsImplLocator (const Subsystem::Guts &, const State &, Vector &) |
int | subsystemCalcQErrUnitTolerancesImplLocator (const Subsystem::Guts &, const State &, Vector &) |
int | subsystemCalcUErrUnitTolerancesImplLocator (const Subsystem::Guts &, const State &, Vector &) |
int | subsystemCalcDecorativeGeometryAndAppendImplLocator (const Subsystem::Guts &, const State &, Stage, std::vector< DecorativeGeometry > &) |
Reimplemented in ForceSubsystem::Guts.
References Subsystem::Guts::subsystemCalcDecorativeGeometryAndAppendImplLocator, Subsystem::Guts::subsystemCalcQErrUnitTolerancesImplLocator, Subsystem::Guts::subsystemCalcQUnitWeightsImplLocator, Subsystem::Guts::subsystemCalcUErrUnitTolerancesImplLocator, Subsystem::Guts::subsystemCalcUUnitWeightsImplLocator, Subsystem::Guts::subsystemCalcZUnitWeightsImplLocator, Subsystem::Guts::subsystemCloneImplLocator, Subsystem::Guts::subsystemDestructImplLocator, Subsystem::Guts::subsystemRealizeAccelerationImplLocator, Subsystem::Guts::subsystemRealizeDynamicsImplLocator, Subsystem::Guts::subsystemRealizeInstanceImplLocator, Subsystem::Guts::subsystemRealizeModelImplLocator, Subsystem::Guts::subsystemRealizePositionImplLocator, Subsystem::Guts::subsystemRealizeReportImplLocator, Subsystem::Guts::subsystemRealizeTimeImplLocator, Subsystem::Guts::subsystemRealizeTopologyImplLocator, and Subsystem::Guts::subsystemRealizeVelocityImplLocator.
virtual ~Guts | ( | ) | [inline, virtual] |
Reimplemented in ForceSubsystem::Guts.
Guts | ( | class GutsRep * | r | ) | [inline, explicit] |
const String& getName | ( | ) | const |
const String& getVersion | ( | ) | const |
References VectorBase::size().
References VectorBase::size().
References VectorBase::size().
const AbstractValue& getDiscreteVariable | ( | const State & | , | |
int | index | |||
) | const |
AbstractValue& updDiscreteVariable | ( | State & | , | |
int | index | |||
) | const |
const AbstractValue& getCacheEntry | ( | const State & | , | |
int | index | |||
) | const |
AbstractValue& updCacheEntry | ( | const State & | , | |
int | index | |||
) | const |
int getQStart | ( | const State & | ) | const |
int getNQ | ( | const State & | ) | const |
int getUStart | ( | const State & | ) | const |
int getNU | ( | const State & | ) | const |
int getZStart | ( | const State & | ) | const |
int getNZ | ( | const State & | ) | const |
int getQErrStart | ( | const State & | ) | const |
int getNQErr | ( | const State & | ) | const |
int getUErrStart | ( | const State & | ) | const |
int getNUErr | ( | const State & | ) | const |
int getUDotErrStart | ( | const State & | ) | const |
int getNUDotErr | ( | const State & | ) | const |
int getMultipliersStart | ( | const State & | ) | const |
int getNMultipliers | ( | const State & | ) | const |
bool isInSystem | ( | ) | const |
bool isInSameSystem | ( | const Subsystem & | otherSubsystem | ) | const |
const System& getSystem | ( | ) | const |
Referenced by ForceSubsystem::Guts::getMultibodySystem().
System& updSystem | ( | ) |
SubsystemIndex getMySubsystemIndex | ( | ) | const |
const Subsystem& getOwnerSubsystemHandle | ( | ) | const |
Subsystem& updOwnerSubsystemHandle | ( | ) |
void setOwnerSubsystemHandle | ( | Subsystem & | ) |
bool hasOwnerSubsystemHandle | ( | ) | const |
void setSystem | ( | System & | , | |
SubsystemIndex | ||||
) |
bool hasRep | ( | ) | const [inline] |
const GutsRep& getRep | ( | ) | const [inline] |
GutsRep& updRep | ( | ) | const [inline] |
void setRep | ( | GutsRep & | r | ) | [inline] |
bool subsystemTopologyHasBeenRealized | ( | ) | const |
void invalidateSubsystemTopologyCache | ( | ) | const |
static void destruct | ( | Subsystem::Guts * | ) | [static] |
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 | , | |||
std::vector< DecorativeGeometry > & | ||||
) | const |
void createScheduledEvent | ( | const State & | state, | |
EventId & | eventId | |||
) | const |
void createTriggeredEvent | ( | const State & | state, | |
EventId & | eventId, | |||
int & | triggerFunctionIndex, | |||
Stage | stage | |||
) | const |
virtual void calcEventTriggerInfo | ( | const State & | , | |
std::vector< System::EventTriggerInfo > & | ||||
) | const [virtual] |
virtual void calcTimeOfNextScheduledEvent | ( | const State & | , | |
Real & | tNextEvent, | |||
std::vector< EventId > & | eventIds, | |||
bool | includeCurrentTime | |||
) | const [virtual] |
virtual void calcTimeOfNextScheduledReport | ( | const State & | , | |
Real & | tNextEvent, | |||
std::vector< EventId > & | eventIds, | |||
bool | includeCurrentTime | |||
) | const [virtual] |
virtual void handleEvents | ( | State & | , | |
System::EventCause | , | |||
const std::vector< EventId > & | eventIds, | |||
Real | accuracy, | |||
const Vector & | yWeights, | |||
const Vector & | ooConstraintTols, | |||
Stage & | lowestModified, | |||
bool & | shouldTerminate | |||
) | const [virtual] |
virtual void reportEvents | ( | const State & | , | |
System::EventCause | , | |||
const std::vector< EventId > & | eventIds | |||
) | const [virtual] |
virtual Subsystem::Guts* cloneImpl | ( | ) | const [protected, pure virtual] |
virtual int realizeSubsystemTopologyImpl | ( | State & | s | ) | const [protected, virtual] |
virtual int realizeSubsystemModelImpl | ( | State & | s | ) | const [protected, virtual] |
virtual int realizeSubsystemInstanceImpl | ( | const State & | s | ) | const [protected, virtual] |
virtual int realizeSubsystemTimeImpl | ( | const State & | s | ) | const [protected, virtual] |
virtual int realizeSubsystemPositionImpl | ( | const State & | s | ) | const [protected, virtual] |
virtual int realizeSubsystemVelocityImpl | ( | const State & | s | ) | const [protected, virtual] |
virtual int realizeSubsystemDynamicsImpl | ( | const State & | s | ) | const [protected, virtual] |
virtual int realizeSubsystemAccelerationImpl | ( | const State & | s | ) | const [protected, virtual] |
virtual int realizeSubsystemReportImpl | ( | const State & | s | ) | const [protected, virtual] |
virtual int calcQErrUnitTolerancesImpl | ( | const State & | s, | |
Vector & | tolerances | |||
) | const [protected, virtual] |
virtual int calcUErrUnitTolerancesImpl | ( | const State & | s, | |
Vector & | tolerances | |||
) | const [protected, virtual] |
virtual int calcDecorativeGeometryAndAppendImpl | ( | const State & | , | |
Stage | , | |||
std::vector< DecorativeGeometry > & | ||||
) | const [protected, virtual] |
int allocateQErr | ( | const State & | s, | |
int | nqerr | |||
) | const [protected] |
int allocateUErr | ( | const State & | s, | |
int | nuerr | |||
) | const [protected] |
int allocateUDotErr | ( | const State & | s, | |
int | nudoterr | |||
) | const [protected] |
int allocateDiscreteVariable | ( | State & | s, | |
Stage | g, | |||
AbstractValue * | v | |||
) | const [protected] |
int allocateCacheEntry | ( | State & | s, | |
Stage | g, | |||
AbstractValue * | v | |||
) | const [protected] |
friend class GutsRep [friend] |
void subsystemDestructImplLocator | ( | Subsystem::Guts * | sysp | ) | [friend] |
Referenced by Subsystem::Guts::Guts().
Subsystem::Guts* subsystemCloneImplLocator | ( | const Subsystem::Guts & | sys | ) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemRealizeTopologyImplLocator | ( | const Subsystem::Guts & | sys, | |
State & | state | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemRealizeModelImplLocator | ( | const Subsystem::Guts & | sys, | |
State & | state | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemRealizeInstanceImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | state | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemRealizeTimeImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | state | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemRealizePositionImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | state | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemRealizeVelocityImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | state | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemRealizeDynamicsImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | state | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemRealizeAccelerationImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | state | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemRealizeReportImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | state | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemCalcQUnitWeightsImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | s, | |||
Vector & | weights | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemCalcUUnitWeightsImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | s, | |||
Vector & | weights | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemCalcZUnitWeightsImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | s, | |||
Vector & | weights | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemCalcQErrUnitTolerancesImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | s, | |||
Vector & | tolerances | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemCalcUErrUnitTolerancesImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | s, | |||
Vector & | tolerances | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().
int subsystemCalcDecorativeGeometryAndAppendImplLocator | ( | const Subsystem::Guts & | sys, | |
const State & | s, | |||
Stage | g, | |||
std::vector< DecorativeGeometry > & | geom | |||
) | [friend] |
Referenced by Subsystem::Guts::Guts().