OpenSim::ForceReporter Class Reference

A class for recording the Forces applied to a model during a simulation. More...

#include <ForceReporter.h>

Inheritance diagram for OpenSim::ForceReporter:
OpenSim::Analysis OpenSim::Object

List of all members.

Public Member Functions

 ForceReporter (Model *aModel=0)
 Construct an ForceReporter object for recording the Forces exerted on a model during a simulation.
 ForceReporter (const std::string &aFileName)
 Construct an object from file.
 ForceReporter (const ForceReporter &aObject)
 Copy constructor.
virtual Objectcopy () const
 Clone.
virtual ~ForceReporter ()
 Destructor.
ForceReporteroperator= (const ForceReporter &aActuation)
 Assignment operator.
const StoragegetForceStorage () const
StorageupdForceStorage ()
virtual void setModel (Model &aModel)
 Set the model pointer for analysis.
void includeConstraintForces (bool flag)
virtual int begin (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, int setNumber)
 This method is called to perform the analysis.
virtual int end (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.

Protected Member Functions

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

Protected Attributes

PropertyBool _includeConstraintForcesProp
 Include constraint forces?
bool & _includeConstraintForces
Storage _forceStore
 Force storage.

Detailed Description

A class for recording the Forces applied to a model during a simulation.

Author:
Ayman Habib
Version:
1.0

Constructor & Destructor Documentation

ForceReporter::ForceReporter ( Model aModel = 0  ) 

Construct an ForceReporter object for recording the Forces exerted on a model during a simulation.

Parameters:
aModel Model for which the Forces are to be recorded.
ForceReporter::ForceReporter ( 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.
ForceReporter::ForceReporter ( const ForceReporter aObject  ) 

Copy constructor.

ForceReporter::~ForceReporter (  )  [virtual]

Destructor.


Member Function Documentation

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

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

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:
state system State
aStep Step number of the integration.
Returns:
-1 on error, 0 otherwise.

Reimplemented from OpenSim::Analysis.

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

Clone.

Reimplemented from OpenSim::Analysis.

int ForceReporter::end ( 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:
state System state
Returns:
-1 on error, 0 otherwise.

Reimplemented from OpenSim::Analysis.

const Storage& OpenSim::ForceReporter::getForceStorage (  )  const [inline]
void OpenSim::ForceReporter::includeConstraintForces ( bool  flag  )  [inline]
ForceReporter & ForceReporter::operator= ( const ForceReporter aAnalysis  ) 

Assignment operator.

Returns:
Reference to this object.

Reimplemented from OpenSim::Analysis.

virtual int OpenSim::ForceReporter::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 ForceReporter::record ( const SimTK::State &  s  )  [protected, virtual]

Record the ForceReporter quantities.

void ForceReporter::setModel ( Model aModel  )  [virtual]

Set the model pointer for analysis.

Reimplemented from OpenSim::Analysis.

int ForceReporter::step ( const SimTK::State &  s,
int  stepNumber 
) [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:
state System state
Returns:
-1 on error, 0 otherwise.

Reimplemented from OpenSim::Analysis.

Storage& OpenSim::ForceReporter::updForceStorage (  )  [inline]

Member Data Documentation

Force storage.

Include constraint forces?


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

Generated on Sun Sep 25 00:19:46 2011 for OpenSim by  doxygen 1.6.1