OpenSim::MuscleAnalysis Class Reference

A class for recording and computting basic quantities (length, shortening velocity, tendon length, . More...

#include <MuscleAnalysis.h>

Inheritance diagram for OpenSim::MuscleAnalysis:
OpenSim::Analysis OpenSim::Object

List of all members.

Classes

struct  private

Public Member Functions

 MuscleAnalysis (Model *aModel=0)
 Construct a MuscleAnalysis object for recording the MuscleAnalysis of a model's generalized coodinates during a simulation.
 MuscleAnalysis (const std::string &aFileName)
 Construct an object from file.
 MuscleAnalysis (const MuscleAnalysis &aObject)
 Copy constructor.
virtual Objectcopy () const
 Clone.
virtual ~MuscleAnalysis ()
 Destructor.
MuscleAnalysisoperator= (const MuscleAnalysis &aMuscleAnalysis)
 Assignment operator.
virtual void setModel (Model &aModel)
 Set the model pointer for analysis.
void setStorageCapacityIncrements (int aIncrement)
 Set the capacity increments of all storage instances.
StoragegetPennationAngleStorage () const
StoragegetMuscleTendonLengthStorage () const
StoragegetFiberLengthStorage () const
StoragegetNormalizedFiberLengthStorage () const
StoragegetTendonLegthStorage () const
StoragegetForceStorage () const
StoragegetFiberForceStorage () const
StoragegetActiveFiberForceStorage () const
StoragegetPassiveFiberForceStorage () const
StoragegetActiveFiberForceAlongTendonStorage () const
StoragegetPassiveFiberForceAlongTendonStorage () const
void setMuscles (Array< std::string > &aMuscles)
 Set the list of muscles to analyze.
void setCoordinates (Array< std::string > &aCoordinates)
 Set the list of coordinates.
void setComputeMoments (bool aTrueFalse)
bool getComputeMoments () const
virtual int begin (const SimTK::State &s)
 This method is called at the beginning of an analysis so that any necessary initializations may be performed.
virtual int step (const SimTK::State &s)
 This method is called to perform the analysis.
virtual int end (const SimTK::State &s)
 This method is called at the end of an analysis so that any necessary finalizations may be performed.
virtual int printResults (const std::string &aBaseName, const std::string &aDir="", double aDT=-1.0, const std::string &aExtension=".sto")
 Print the results of the analysis.

Public Attributes

PropertyStrArray _coordinateListProp
 List of generalized coordinates for which to compute moment arms.
PropertyBool _computeMomentsProp
 Compute moments and moment arms.
Storage_pennationAngleStore
 Pennation angle storage.
Storage_lengthStore
 Muscle-tendon length storage.
Storage_fiberLengthStore
 Fiber length storage.
Storage_normalizedFiberLengthStore
 Normalized fiber length storage.
Storage_tendonLengthStore
 Tendon length storage.
Storage_forceStore
 Force applied by the muscle.
Storage_fiberForceStore
 Force in the muscle fibers.
Storage_activeFiberForceStore
 Active force in the muscle fibers.
Storage_passiveFiberForceStore
 Passive force in the muscle fibers.
Storage_activeFiberForceAlongTendonStore
 Active force in the muscle fibers along tendon.
Storage_passiveFiberForceAlongTendonStore
 Passive force in the muscle fibers along tendon.
Array< std::string > _muscleList
 Work array for holding the list of muscles.
Array< std::string > _coordinateList
 Work array for holding the list of coordinates.
bool _computeMoments
ArrayPtrs< StorageCoordinatePair > _momentArmStorageArray
 Array of active storage and coordinate pairs.
ArrayPtrs< Muscle_muscleArray
 Array of active muscles.

Protected Member Functions

virtual int record (const SimTK::State &s)
 Record the MuscleAnalysis quantities.

Detailed Description

A class for recording and computting basic quantities (length, shortening velocity, tendon length, .

..) for muscles during a simulation.

Author:
Katherine Holzbaur, Frank C. Anderson
Version:
1.0

Constructor & Destructor Documentation

MuscleAnalysis::MuscleAnalysis ( Model aModel = 0  ) 

Construct a MuscleAnalysis object for recording the MuscleAnalysis of a model's generalized coodinates during a simulation.

Parameters:
aModel Model for which the MuscleAnalysis are to be recorded.
MuscleAnalysis::MuscleAnalysis ( const std::string &  aFileName  ) 

Construct an object from file.

The object is constructed from the root element of the XML document. The type of object is the tag name of the XML root element.

Parameters:
aFileName File name of the document.
MuscleAnalysis::MuscleAnalysis ( const MuscleAnalysis aObject  ) 

Copy constructor.

MuscleAnalysis::~MuscleAnalysis (  )  [virtual]

Destructor.


Member Function Documentation

int MuscleAnalysis::begin ( const SimTK::State &  s  )  [virtual]

This method is called at the beginning of an analysis so that any necessary initializations may be performed.

This method is meant to be called at the begining of an integration

This method should be overriden in the child class. It is included here so that the child class will not have to implement it if it is not necessary.

Parameters:
s current system state
Returns:
-1 on error, 0 otherwise.

Reimplemented from OpenSim::Analysis.

Object * MuscleAnalysis::copy (  )  const [virtual]

Clone.

Reimplemented from OpenSim::Analysis.

int MuscleAnalysis::end ( const SimTK::State &  s  )  [virtual]

This method is called at the end of an analysis so that any necessary finalizations may be performed.

This method is meant to be called at the end of an integration

This method should be overriden in the child class. It is included here so that the child class will not have to implement it if it is not necessary.

Parameters:
s current state of system
Returns:
-1 on error, 0 otherwise.

Reimplemented from OpenSim::Analysis.

Storage* OpenSim::MuscleAnalysis::getActiveFiberForceAlongTendonStorage (  )  const [inline]
Storage* OpenSim::MuscleAnalysis::getActiveFiberForceStorage (  )  const [inline]
bool OpenSim::MuscleAnalysis::getComputeMoments (  )  const [inline]
Storage* OpenSim::MuscleAnalysis::getFiberForceStorage (  )  const [inline]
Storage* OpenSim::MuscleAnalysis::getFiberLengthStorage (  )  const [inline]
Storage* OpenSim::MuscleAnalysis::getForceStorage (  )  const [inline]
Storage* OpenSim::MuscleAnalysis::getMuscleTendonLengthStorage (  )  const [inline]
Storage* OpenSim::MuscleAnalysis::getNormalizedFiberLengthStorage (  )  const [inline]
Storage* OpenSim::MuscleAnalysis::getPassiveFiberForceAlongTendonStorage (  )  const [inline]
Storage* OpenSim::MuscleAnalysis::getPassiveFiberForceStorage (  )  const [inline]
Storage* OpenSim::MuscleAnalysis::getPennationAngleStorage (  )  const [inline]
Storage* OpenSim::MuscleAnalysis::getTendonLegthStorage (  )  const [inline]
MuscleAnalysis & MuscleAnalysis::operator= ( const MuscleAnalysis aAnalysis  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Analysis.

virtual int OpenSim::MuscleAnalysis::printResults ( const std::string &  aBaseName,
const std::string &  aDir = "",
double  aDT = -1.0,
const std::string &  aExtension = ".sto" 
) [virtual]

Print the results of the analysis.

Parameters:
aFileName File to which to print the data.
aDT Time interval between results (linear interpolation is used). If not included as an argument or negative, all time steps are printed without interpolation.
Returns:
-1 on error, 0 otherwise.

Reimplemented from OpenSim::Analysis.

int MuscleAnalysis::record ( const SimTK::State &  s  )  [protected, virtual]

Record the MuscleAnalysis quantities.

void OpenSim::MuscleAnalysis::setComputeMoments ( bool  aTrueFalse  )  [inline]
void MuscleAnalysis::setCoordinates ( Array< std::string > &  aCoordinates  ) 

Set the list of coordinates.

Parameters:
aCoordinates Array of coordinates about which to compute moment arms.
void MuscleAnalysis::setModel ( Model aModel  )  [virtual]

Set the model pointer for analysis.

Reimplemented from OpenSim::Analysis.

void MuscleAnalysis::setMuscles ( Array< std::string > &  aMuscles  ) 

Set the list of muscles to analyze.

Parameters:
aMuscles is the array of names of muscles to analyze.
void MuscleAnalysis::setStorageCapacityIncrements ( int  aIncrement  ) 

Set the capacity increments of all storage instances.

Parameters:
aIncrement Increment by which storage capacities will be increased when storage capcities run out.
int MuscleAnalysis::step ( const SimTK::State &  s  )  [virtual]

This method is called to perform the analysis.

It can be called during the execution of a forward integrations or after the integration by feeding it the necessary data.

When called during an integration, this method is meant to be called

This method should be overriden in derived classes. It is included here so that the derived class will not have to implement it if it is not necessary.

Parameters:
s current state of system
Returns:
-1 on error, 0 otherwise.

Reimplemented from OpenSim::Analysis.


Member Data Documentation

Active force in the muscle fibers along tendon.

Active force in the muscle fibers.

Compute moments and moment arms.

Work array for holding the list of coordinates.

List of generalized coordinates for which to compute moment arms.

Force in the muscle fibers.

Fiber length storage.

Force applied by the muscle.

Muscle-tendon length storage.

ArrayPtrs<StorageCoordinatePair> OpenSim::MuscleAnalysis::_momentArmStorageArray

Array of active storage and coordinate pairs.

Array of active muscles.

Work array for holding the list of muscles.

This array

Normalized fiber length storage.

Passive force in the muscle fibers along tendon.

Passive force in the muscle fibers.

Pennation angle storage.

Tendon length storage.


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

Generated on Wed Dec 16 15:03:39 2009 for OpenSim by  doxygen 1.6.1