Simbody
3.4 (development)
|
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>
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. | |
Integrate & | setDerivativeMeasure (const Measure_< T > &d) |
Integrate & | setInitialConditionMeasure (const Measure_< T > &ic) |
SimTK_MEASURE_HANDLE_POSTSCRIPT (Integrate, Measure_< T >) |
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.
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.
SimTK::Measure_< T >::Integrate::SimTK_MEASURE_HANDLE_PREAMBLE | ( | Integrate | , |
Measure_< 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.
const Measure_<T>& SimTK::Measure_< T >::Integrate::getDerivativeMeasure | ( | ) | const [inline] |
Get the integrand (derivative) measure for this integral.
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.
Integrate& SimTK::Measure_< T >::Integrate::setDerivativeMeasure | ( | const Measure_< T > & | d | ) | [inline] |
Integrate& SimTK::Measure_< T >::Integrate::setInitialConditionMeasure | ( | const Measure_< T > & | ic | ) | [inline] |
SimTK::Measure_< T >::Integrate::SimTK_MEASURE_HANDLE_POSTSCRIPT | ( | Integrate | , |
Measure_< T > | |||
) |