Simbody  3.7
SimTK::Measure_< T >::Integrate Class Reference

This measure yields the time integral of a given derivative measure, initializing with an initial condition measure of the same type T. More...

+ Inheritance diagram for SimTK::Measure_< T >::Integrate:

Classes

class  Implementation
 The implementation for Integrate measures allocates a continuous state variable or variables from the State's z pool and generates zdot values to be integrated into those z variables. More...
 

Public Member Functions

 SimTK_MEASURE_HANDLE_PREAMBLE (Integrate, Measure_< T >)
 
 Integrate (Subsystem &subsystem, const Measure_< T > &deriv, const Measure_< T > &ic, const T &initAlloc=T(0))
 Create a new measure that will use Measure ic's value for initial conditions, and then integrate the deriv Measure. More...
 
void setValue (State &s, const T &value) const
 Set the current value of this measure by modifying the state variables that hold the integral. More...
 
const Measure_< T > & getDerivativeMeasure () const
 Get the integrand (derivative) measure for this integral. More...
 
const Measure_< T > & getInitialConditionMeasure () const
 Get the measure whose value is used as an initial condition for the integral at the start of an integration. More...
 
IntegratesetDerivativeMeasure (const Measure_< T > &d)
 
IntegratesetInitialConditionMeasure (const Measure_< T > &ic)
 
 SimTK_MEASURE_HANDLE_POSTSCRIPT (Integrate, Measure_< T >)
 
- Public Member Functions inherited from SimTK::Measure_< T >
 SimTK_MEASURE_HANDLE_PREAMBLE_ABSTRACT (Measure_, AbstractMeasure)
 This class is still abstract so we don't want it to allocate an Implementation object in its default constructor. More...
 
const T & getValue (const State &s, int derivOrder=0) const
 Retrieve the Value of this Measure or one of its time derivatives, assuming the supplied State has been realized to at least the required stage for the selected value or derivative, as reported by getDependsOnStage(). More...
 
Measure_setDefaultValue (const T &defaultValue)
 Change the default value associated with this Measure. More...
 
const T & getDefaultValue () const
 Obtain a reference to the default value associated with this Measure. More...
 
 SimTK_MEASURE_HANDLE_POSTSCRIPT (Measure_, AbstractMeasure)
 
- Public Member Functions inherited from SimTK::AbstractMeasure
 AbstractMeasure (Implementation *g=0)
 Provide an Implementation for this AbstractMeasure and bump its reference count. More...
 
 AbstractMeasure (Subsystem &, Implementation *g, const SetHandle &)
 Construct this handle with a given Implementation object (whose reference count will be bumped) and then let the given Subsystem adopt this Measure (which will again bump the Implementation's reference count, leaving us with two new handles). More...
 
 AbstractMeasure (const AbstractMeasure &)
 Shallow copy constructor copies the pointer from the source Implementation object and bumps its reference count. More...
 
AbstractMeasureoperator= (const AbstractMeasure &source)
 Shallow assignment operator results in this handle referencing the same Implementation object as does the source. More...
 
 ~AbstractMeasure ()
 Destructor decrements the Implementation's reference count and deletes the object if the count goes to zero. More...
 
AbstractMeasureshallowAssign (const AbstractMeasure &)
 Shallow assignment operator destructs the current Implementation object (meaning its reference count is decremented and the object actually deleted only if the count goes to zero), then copies the Implementation pointer from the source and bumps its reference count. More...
 
AbstractMeasuredeepAssign (const AbstractMeasure &source)
 Deep assignment clones the Implementation object pointed to by the source handle, so that this handle ends up pointing to a new Measure object similar to the original but not yet contained in any Subsystem. More...
 
int getNumTimeDerivatives () const
 Every Measure can produce a value, and some can provide one or more total derivatives with respect to time of that value. More...
 
Stage getDependsOnStage (int derivOrder=0) const
 At what Stage can we expect the value of this AbstractMeasure or one of its time derivatives to be available? Users of Measures will typically impose restrictions on the levels they will accept. More...
 
bool isSameMeasure (const AbstractMeasure &other) const
 There can be multiple handles on the same Measure. More...
 
bool isEmptyHandle () const
 
bool isInSubsystem () const
 Test whether this Measure object has been adopted by a Subsystem. More...
 
const SubsystemgetSubsystem () const
 Return a reference to the Subsystem that owns this Measure. More...
 
bool isSameSubsystem (const Subsystem &) const
 Is getSubsystem() the same as the passed-in Subsystem? More...
 
MeasureIndex getSubsystemMeasureIndex () const
 Return the MeasureIndex by which this Measure is known to the Subsystem that owns it. More...
 
const ImplementationgetImpl () const
 
ImplementationupdImpl ()
 
bool hasImpl () const
 
int getRefCount () const
 

Detailed Description

template<class T>
class SimTK::Measure_< T >::Integrate

This measure yields the time integral of a given derivative measure, initializing with an initial condition measure of the same type T.

The type T can be Real or a fixed size Vec type like Vec<3>, or a variable-size Vector. But in the case of a Vector you must say at construction what size the Vector will be during the simulation, so that an appropriate number of state variables can be allocated.

Constructor & Destructor Documentation

◆ Integrate()

template<class T>
SimTK::Measure_< T >::Integrate::Integrate ( Subsystem subsystem,
const Measure_< T > &  deriv,
const Measure_< T > &  ic,
const T &  initAlloc = T(0) 
)
inline

Create a new measure that will use Measure ic's value for initial conditions, and then integrate the deriv Measure.

If type T is a variable-length Vector you must also provide a const Vector to be used to size and initialized the number of state variables at allocation. In that case both the ic and deriv measures must return Vector values of the same size as the allocation constant.

Member Function Documentation

◆ SimTK_MEASURE_HANDLE_PREAMBLE()

template<class T>
SimTK::Measure_< T >::Integrate::SimTK_MEASURE_HANDLE_PREAMBLE ( Integrate  ,
Measure_< T >   
)

◆ setValue()

template<class T>
void SimTK::Measure_< T >::Integrate::setValue ( State s,
const T &  value 
) const
inline

Set the current value of this measure by modifying the state variables that hold the integral.

◆ getDerivativeMeasure()

template<class T>
const Measure_<T>& SimTK::Measure_< T >::Integrate::getDerivativeMeasure ( ) const
inline

Get the integrand (derivative) measure for this integral.

◆ getInitialConditionMeasure()

template<class T>
const Measure_<T>& SimTK::Measure_< T >::Integrate::getInitialConditionMeasure ( ) const
inline

Get the measure whose value is used as an initial condition for the integral at the start of an integration.

◆ setDerivativeMeasure()

template<class T>
Integrate& SimTK::Measure_< T >::Integrate::setDerivativeMeasure ( const Measure_< T > &  d)
inline

◆ setInitialConditionMeasure()

template<class T>
Integrate& SimTK::Measure_< T >::Integrate::setInitialConditionMeasure ( const Measure_< T > &  ic)
inline

◆ SimTK_MEASURE_HANDLE_POSTSCRIPT()

template<class T>
SimTK::Measure_< T >::Integrate::SimTK_MEASURE_HANDLE_POSTSCRIPT ( Integrate  ,
Measure_< T >   
)

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