Simbody  3.4 (development)
SimTK::Constraint::ConstantAcceleration Class Reference

Constrain a single mobility to have a particular acceleration. More...

#include <Constraint.h>

+ Inheritance diagram for SimTK::Constraint::ConstantAcceleration:

List of all members.

Public Member Functions

 ConstantAcceleration (MobilizedBody &mobilizer, MobilizerUIndex whichU, Real defaultAcceleration)
 Construct a constant acceleration constraint on a particular mobility of the given mobilizer.
 ConstantAcceleration (MobilizedBody &mobilizer, Real defaultAcceleration)
 Construct a constant acceleration constraint on the mobility of the given mobilizer, assuming there is only one mobility.
 ConstantAcceleration ()
 Default constructor creates an empty handle.
MobilizedBodyIndex getMobilizedBodyIndex () const
 Return the index of the mobilized body to which this constant acceleration constraint is being applied (to one of its mobilities).
MobilizerUIndex getWhichU () const
 Return the particular mobility whose generalized acceleration is controlled by this ConstantAcceleration constraint.
Real getDefaultAcceleration () const
 Return the default value for the acceleration to be enforced.
ConstantAccelerationsetDefaultAcceleration (Real accel)
 Change the default value for the acceleration to be enforced by this constraint.
void setAcceleration (State &state, Real accel) const
 Override the default acceleration with this one whose value is stored in the given State.
Real getAcceleration (const State &state) const
 Get the current value of the acceleration set point from the indicated State.
Real getAccelerationError (const State &) const
 Return the amount by which the accelerations in the given State fail to satify this constraint.
Real getMultiplier (const State &) const
 Get the value of the Lagrange multipler generated to satisfy this constraint.

Detailed Description

Constrain a single mobility to have a particular acceleration.

One acceleration-only constraint equation. Some generalized acceleration udot is required to be at a particular value a.

There is no assembly condition because this does not involve state variables q or u, just u's time derivative udot.


Constructor & Destructor Documentation

SimTK::Constraint::ConstantAcceleration::ConstantAcceleration ( MobilizedBody mobilizer,
MobilizerUIndex  whichU,
Real  defaultAcceleration 
)

Construct a constant acceleration constraint on a particular mobility of the given mobilizer.

SimTK::Constraint::ConstantAcceleration::ConstantAcceleration ( MobilizedBody mobilizer,
Real  defaultAcceleration 
)

Construct a constant acceleration constraint on the mobility of the given mobilizer, assuming there is only one mobility.

Default constructor creates an empty handle.


Member Function Documentation

Return the index of the mobilized body to which this constant acceleration constraint is being applied (to one of its mobilities).

This is set on construction of the ConstantAcceleration constraint.

Return the particular mobility whose generalized acceleration is controlled by this ConstantAcceleration constraint.

This is set on construction.

Return the default value for the acceleration to be enforced.

This is set on construction or via setDefaultAcceleration(). This is used to initialize the acceleration when a default State is created, but it can be overriden by changing the value in the State using setAcceleration().

Change the default value for the acceleration to be enforced by this constraint.

This is a topological change, meaning you'll have to call realizeTopology() on the containing System and obtain a new State before you can use it. If you just want to make a runtime change in the State, see setAcceleration().

void SimTK::Constraint::ConstantAcceleration::setAcceleration ( State state,
Real  accel 
) const

Override the default acceleration with this one whose value is stored in the given State.

This invalidates the Acceleration stage in the state. Don't confuse this with setDefaultAcceleration() -- the value set here overrides that one.

Get the current value of the acceleration set point from the indicated State.

This is the value currently in effect, either from the default or from a previous call to setAcceleration().

Return the amount by which the accelerations in the given State fail to satify this constraint.

The state must already be realized through Stage::Acceleration.

Get the value of the Lagrange multipler generated to satisfy this constraint.

For a ConstantAcceleration constraint, that is the same as the generalized force although by convention constraint multipliers have the opposite sign from applied forces. The state must already be realized through Stage::Acceleration.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines