A class for recording the states of a model during a simulation. More...
#include <StatesReporter.h>
Public Member Functions | |
StatesReporter (Model *aModel=0) | |
Construct an StatesReporter object for recording the states of the model during a simulation. | |
StatesReporter (const std::string &aFileName) | |
Construct an object from file. | |
StatesReporter (const StatesReporter &aObject) | |
Copy constructor. | |
virtual Object * | copy () const |
Clone. | |
virtual | ~StatesReporter () |
Destructor. | |
StatesReporter & | operator= (const StatesReporter &aRporter) |
Assignment operator. | |
const Storage & | getStatesStorage () const |
Storage & | updStatesStorage () |
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 StatesReporter quantities. | |
Protected Attributes | |
Storage | _statesStore |
States storage. |
A class for recording the states of a model during a simulation.
StatesReporter::StatesReporter | ( | Model * | aModel = 0 |
) |
Construct an StatesReporter object for recording the states of the model during a simulation.
aModel | Model for which the states are to be recorded. |
StatesReporter::StatesReporter | ( | 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.
aFileName | File name of the document. |
StatesReporter::StatesReporter | ( | const StatesReporter & | aObject | ) |
Copy constructor.
StatesReporter::~StatesReporter | ( | ) | [virtual] |
Destructor.
int StatesReporter::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.
state | system State | |
aStep | Step number of the integration. |
Reimplemented from OpenSim::Analysis.
Object * StatesReporter::copy | ( | ) | const [virtual] |
Clone.
Reimplemented from OpenSim::Analysis.
int StatesReporter::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.
state | System state |
Reimplemented from OpenSim::Analysis.
const Storage& OpenSim::StatesReporter::getStatesStorage | ( | ) | const [inline] |
StatesReporter & StatesReporter::operator= | ( | const StatesReporter & | aAnalysis | ) |
virtual int OpenSim::StatesReporter::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.
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. |
Reimplemented from OpenSim::Analysis.
int StatesReporter::record | ( | const SimTK::State & | s | ) | [protected, virtual] |
Record the StatesReporter quantities.
int StatesReporter::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.
state | System state |
Reimplemented from OpenSim::Analysis.
Storage& OpenSim::StatesReporter::updStatesStorage | ( | ) | [inline] |
Storage OpenSim::StatesReporter::_statesStore [protected] |
States storage.
Reimplemented from OpenSim::Analysis.