Simbody  3.4 (development)
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...

#include <Measure.h>

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

List of all members.

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.
void setValue (State &s, const T &value) const
 Set the current value of this measure by modifying the state variables that hold the integral.
const Measure_< T > & getDerivativeMeasure () const
 Get the integrand (derivative) measure for this integral.
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.
IntegratesetDerivativeMeasure (const Measure_< T > &d)
IntegratesetInitialConditionMeasure (const Measure_< T > &ic)
 SimTK_MEASURE_HANDLE_POSTSCRIPT (Integrate, Measure_< T >)

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

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

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.

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

Get the integrand (derivative) measure for this integral.

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.

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

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