Simbody  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimTK::Measure_< T >::Result::Implementation Class Reference

#include <MeasureImplementation.h>

+ Inheritance diagram for SimTK::Measure_< T >::Result::Implementation:

Public Member Functions

 Implementation ()
 
 Implementation (Stage dependsOn, Stage invalidated)
 
 Implementation (const Implementation &source)
 
void setDependsOnStage (Stage dependsOn)
 
void setInvalidatedStage (Stage invalidated)
 
Stage getDependsOnStage () const
 
Stage getInvalidatedStage () const
 
void markAsValid (const State &state) const
 
bool isValid (const State &state) const
 
void markAsNotValid (const State &state) const
 
T & updValue (const State &state) const
 
ImplementationcloneVirtual () const override
 
int getNumTimeDerivativesVirtual () const override
 
Stage getDependsOnStageVirtual (int derivOrder) const override
 Cache value is available after its "depends on" stage has been realized; but all its derivatives are zero so are always available. More...
 
void calcCachedValueVirtual (const State &, int derivOrder, T &value) const override
 Concrete measures must override this if the state cache is used for precalculated values or derivatives. More...
 
- Public Member Functions inherited from SimTK::Measure_< T >::Implementation
const T & getValue (const State &s, int derivOrder) const
 
void setDefaultValue (const T &defaultValue)
 Set a new default value for this Measure. More...
 
const T & getDefaultValue () const
 Return a reference to the value that this Measure will use to initialize its value-level state resource (state variable or cache entry) during the next call to realizeTopology(). More...
 
void setIsPresumedValidAtDependsOnStage (bool presume)
 
bool getIsPresumedValidAtDependsOnStage () const
 

Additional Inherited Members

- Protected Member Functions inherited from SimTK::Measure_< T >::Implementation
 Implementation (const T &defaultValue, int numCacheEntries=1)
 
 Implementation (int numCacheEntries=1)
 Argument numCacheEntries should be one greater than the number of derivatives; that is, there is room for the value ("0th" derivative) also. More...
 
 Implementation (const Implementation &source)
 Copy constructor copies the number of cache entries from the source, but not the cache indices themselves as those must be allocated uniquely for the copy. More...
 
int size () const
 Return the number of elements in the data type of this Measure; for Vector measures this is determined by the size of the default value. More...
 
int getNumCacheEntries () const
 Return the number of cache entries allocated for the value and derivatives of this Measure. More...
 
const T & getCacheEntry (const State &s, int derivOrder) const
 Get a const reference to the value stored in one of this Measure's cache entries, indexed by the derivative order (with the value treated as the 0th derivative). More...
 
T & updCacheEntry (const State &s, int derivOrder) const
 Get a writable reference to the value stored in one of this Measure's cache entries, indexed by the derivative order (with the value treated as the 0th derivative). More...
 
bool isCacheValueRealized (const State &s, int derivOrder) const
 Determine whether a particular one of this Measure's cache entries has already been realized since the given state was modified. More...
 
void markCacheValueRealized (const State &s, int derivOrder) const
 Mark one of this Measure's cache entries up to date; call this after you have calculated a value or derivative and stored it in the corresponding cache entry. More...
 
void markCacheValueNotRealized (const State &s, int derivOrder) const
 Invalidate one of this Measure's cache entries. More...
 
virtual void realizeMeasureTopologyVirtual (State &) const
 Concrete measures can override this to allocate Topology-stage resources. More...
 
virtual const T & getUncachedValueVirtual (const State &, int derivOrder) const
 This is only called when derivOrder >= the number of cache entries we have, but still <= the number of derivatives the Measure says it can deliver. More...
 
const T & getValueZero () const
 Return a reference to a zero of the same type and size as this Measure's value. More...
 
- Protected Member Functions inherited from SimTK::AbstractMeasure::Implementation
 Implementation ()
 This default constructor is for use by concrete measure implementation classes. More...
 
 Implementation (const Implementation &src)
 Base class copy constructor removes the Subsystem and sets the reference count to zero. More...
 
Implementationoperator= (const Implementation &src)
 Base class copy assignment operator removes the Subsystem, and sets the reference count to zero. More...
 
int incrRefCount () const
 
int decrRefCount () const
 
int getRefCount () const
 
int getCopyNumber () const
 
Implementationclone () const
 This is a deep copy of the concrete Implementation object, except the Subsystem will have been removed. More...
 
void realizeModel (State &s) const
 
void realizeInstance (const State &s) const
 
void realizeTime (const State &s) const
 
void realizePosition (const State &s) const
 
void realizeVelocity (const State &s) const
 
void realizeDynamics (const State &s) const
 
void realizeAcceleration (const State &s) const
 
void realizeReport (const State &s) const
 
void initialize (State &s) const
 This should be called at the start of a time stepping study to cause this Measure to set its state variables (if any) in the supplied state to their initial conditions. More...
 
int getNumTimeDerivatives () const
 
Stage getDependsOnStage (int derivOrder) const
 
void setSubsystem (Subsystem &sub, MeasureIndex mx)
 
bool isInSubsystem () const
 
const SubsystemgetSubsystem () const
 
SubsystemupdSubsystem ()
 
MeasureIndex getSubsystemMeasureIndex () const
 
SubsystemIndex getSubsystemIndex () const
 
void invalidateTopologyCache () const
 
Stage getStage (const State &s) const
 
virtual ~Implementation ()
 
virtual void realizeMeasureModelVirtual (State &) const
 
virtual void realizeMeasureInstanceVirtual (const State &) const
 
virtual void realizeMeasureTimeVirtual (const State &) const
 
virtual void realizeMeasurePositionVirtual (const State &) const
 
virtual void realizeMeasureVelocityVirtual (const State &) const
 
virtual void realizeMeasureDynamicsVirtual (const State &) const
 
virtual void realizeMeasureAccelerationVirtual (const State &) const
 
virtual void realizeMeasureReportVirtual (const State &) const
 
virtual void initializeVirtual (State &) const
 

Constructor & Destructor Documentation

template<class T>
SimTK::Measure_< T >::Result::Implementation::Implementation ( )
inline
template<class T>
SimTK::Measure_< T >::Result::Implementation::Implementation ( Stage  dependsOn,
Stage  invalidated 
)
inline
template<class T>
SimTK::Measure_< T >::Result::Implementation::Implementation ( const Implementation source)
inline

Member Function Documentation

template<class T>
void SimTK::Measure_< T >::Result::Implementation::setDependsOnStage ( Stage  dependsOn)
inline
template<class T>
void SimTK::Measure_< T >::Result::Implementation::setInvalidatedStage ( Stage  invalidated)
inline
template<class T>
Stage SimTK::Measure_< T >::Result::Implementation::getDependsOnStage ( ) const
inline
template<class T>
Stage SimTK::Measure_< T >::Result::Implementation::getInvalidatedStage ( ) const
inline
template<class T>
void SimTK::Measure_< T >::Result::Implementation::markAsValid ( const State state) const
inline
template<class T>
bool SimTK::Measure_< T >::Result::Implementation::isValid ( const State state) const
inline
template<class T>
void SimTK::Measure_< T >::Result::Implementation::markAsNotValid ( const State state) const
inline
template<class T>
T& SimTK::Measure_< T >::Result::Implementation::updValue ( const State state) const
inline
template<class T>
Implementation* SimTK::Measure_< T >::Result::Implementation::cloneVirtual ( ) const
inlineoverridevirtual
template<class T>
int SimTK::Measure_< T >::Result::Implementation::getNumTimeDerivativesVirtual ( ) const
inlineoverridevirtual
template<class T>
Stage SimTK::Measure_< T >::Result::Implementation::getDependsOnStageVirtual ( int  derivOrder) const
inlineoverridevirtual

Cache value is available after its "depends on" stage has been realized; but all its derivatives are zero so are always available.

Implements SimTK::AbstractMeasure::Implementation.

template<class T>
void SimTK::Measure_< T >::Result::Implementation::calcCachedValueVirtual ( const State ,
int  derivOrder,
T &  value 
) const
inlineoverridevirtual

Concrete measures must override this if the state cache is used for precalculated values or derivatives.

Reimplemented from SimTK::Measure_< T >::Implementation.


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