OpenSim::AnalyzeTool Class Reference
An abstract class for specifying the interface for an investigation.
More...
#include <AnalyzeTool.h>
List of all members.
Public Member Functions |
virtual | ~AnalyzeTool () |
| Destructor.
|
| AnalyzeTool () |
| Default constructor.
|
| AnalyzeTool (const std::string &aFileName, bool aLoadModelAndInput=true) SWIG_DECLARE_EXCEPTION |
| AnalyzeTool (const AnalyzeTool &aObject) |
| Copy constructor.
|
| AnalyzeTool (Model &aModel) |
| Construct with a passed in model.
|
virtual Object * | copy () const |
| Virtual copy constructor.
|
AnalyzeTool & | operator= (const AnalyzeTool &aAnalyzeTool) |
| Assignment operator.
|
void | setStatesStorage (Storage &aStore) |
| Set the states storage.
|
Storage & | getStatesStorage () |
| Get the states storage.
|
const std::string & | getStatesFileName () const |
void | setStatesFileName (const std::string &aFileName) |
const std::string & | getCoordinatesFileName () const |
void | setCoordinatesFileName (const std::string &aFileName) |
const std::string & | getSpeedsFileName () const |
void | setSpeedsFileName (const std::string &aFileName) |
double | getLowpassCutoffFrequency () const |
void | setLowpassCutoffFrequency (double aLowpassCutoffFrequency) |
const std::string & | getExternalLoadsFileName () const |
void | setExternalLoadsFileName (const std::string &aFileName) |
const std::string & | getExternalLoadsModelKinematicsFileName () const |
void | setExternalLoadsModelKinematicsFileName (const std::string &aFileName) |
const std::string & | getExternalLoadsBody1 () const |
void | setExternalLoadsBody1 (const std::string &aName) |
const std::string & | getExternalLoadsBody2 () const |
void | setExternalLoadsBody2 (const std::string &aName) |
double | getLowpassCutoffFrequencyForLoadKinematics () const |
void | setLowpassCutoffFrequencyForLoadKinematics (double aLowpassCutoffFrequency) |
void | setStatesFromMotion (const SimTK::State &s, const Storage &aMotion, bool aInDegrees) SWIG_DECLARE_EXCEPTION |
void | loadStatesFromFile (SimTK::State &s) SWIG_DECLARE_EXCEPTION |
| Initialize the controls, states, and external loads from files.
|
void | verifyControlsStates () |
| Verify that the controls and states are consistent with the model.
|
void | setPrintResultFiles (bool aToWrite) |
| Turn On/Off writing result storages to files.
|
virtual bool | run () SWIG_DECLARE_EXCEPTION |
| Run the investigation.
|
Static Public Member Functions |
static Storage * | createStatesStorageFromCoordinatesAndSpeeds (const Model &aModel, const Storage &aQStore, const Storage &aUStore) |
| aUStore is optional.
|
static void | run (SimTK::State &s, Model &aModel, int iInitial, int iFinal, const Storage &aStatesStore, bool aSolveForEquilibrium) |
Detailed Description
An abstract class for specifying the interface for an investigation.
- Author:
- Frank C. Anderson
- Version:
- 1.0
Constructor & Destructor Documentation
AnalyzeTool::~AnalyzeTool |
( |
|
) |
[virtual] |
AnalyzeTool::AnalyzeTool |
( |
|
) |
|
OpenSim::AnalyzeTool::AnalyzeTool |
( |
const std::string & |
aFileName, |
|
|
bool |
aLoadModelAndInput = true | |
|
) |
| | |
Copy constructor.
Copy constructors for all Tools only copy the non-XML variable members of the object; that is, the object's DOMnode and XMLDocument are not copied but set to NULL. The reason for this is that for the object and all its derived classes to establish the correct connection to the XML document nodes, the the object would need to reconstruct based on the XML document not the values of the object's member variables.
There are three proper ways to generate an XML document for an Tool:
1) Construction based on XML file (
- See also:
- Tool(const char *aFileName)). In this case, the XML document is created by parsing the XML file.
2) Construction by Tool(const XMLDocument *aDocument). This constructor explictly requests construction based on an XML document. In this way the proper connection between an object's node and the corresponding node within the XML document is established. This constructor is a copy constructor of sorts because all essential Tool member variables should be held within the XML document. The advantage of this style of construction is that nodes within the XML document, such as comments that may not have any associated Tool member variable, are preserved.
3) A call to generateXMLDocument(). This method generates an XML document for the Tool from scratch. Only the essential document nodes are created (that is, nodes that correspond directly to member variables.).
- Parameters:
-
- See also:
- Tool(const XMLDocument *aDocument)
-
Tool(const char *aFileName)
-
generateXMLDocument()
AnalyzeTool::AnalyzeTool |
( |
Model & |
aModel |
) |
|
Construct with a passed in model.
Typically used from the GUI where the model is readily available. This special constructor avoid many steps/generalities in th AnalyzeTool Analyses are added to the model beforehand.
- Parameters:
-
Member Function Documentation
Object * AnalyzeTool::copy |
( |
|
) |
const [virtual] |
Storage * AnalyzeTool::createStatesStorageFromCoordinatesAndSpeeds |
( |
const Model & |
aModel, |
|
|
const Storage & |
aQStore, |
|
|
const Storage & |
aUStore | |
|
) |
| | [static] |
aUStore is optional.
Assumes coordinates and speeds are already in radians. Fills in zeros for actuator and contact set states.
const std::string& OpenSim::AnalyzeTool::getCoordinatesFileName |
( |
|
) |
const [inline] |
const std::string& OpenSim::AnalyzeTool::getExternalLoadsBody1 |
( |
|
) |
const [inline] |
const std::string& OpenSim::AnalyzeTool::getExternalLoadsBody2 |
( |
|
) |
const [inline] |
const std::string& OpenSim::AnalyzeTool::getExternalLoadsFileName |
( |
|
) |
const [inline] |
const std::string& OpenSim::AnalyzeTool::getExternalLoadsModelKinematicsFileName |
( |
|
) |
const [inline] |
double OpenSim::AnalyzeTool::getLowpassCutoffFrequency |
( |
|
) |
const [inline] |
double OpenSim::AnalyzeTool::getLowpassCutoffFrequencyForLoadKinematics |
( |
|
) |
const [inline] |
const std::string& OpenSim::AnalyzeTool::getSpeedsFileName |
( |
|
) |
const [inline] |
const std::string& OpenSim::AnalyzeTool::getStatesFileName |
( |
|
) |
const [inline] |
Storage & AnalyzeTool::getStatesStorage |
( |
|
) |
|
Get the states storage.
- Returns:
- Pointer to the states storage.
void AnalyzeTool::loadStatesFromFile |
( |
SimTK::State & |
s |
) |
|
Initialize the controls, states, and external loads from files.
The file names are stored in the property set. The file names can either come from the XML setup file, or they can be set explicitly. Either way, this method should be called to read all the needed information in from file.
void AnalyzeTool::run |
( |
SimTK::State & |
s, |
|
|
Model & |
aModel, |
|
|
int |
iInitial, |
|
|
int |
iFinal, |
|
|
const Storage & |
aStatesStore, |
|
|
bool |
aSolveForEquilibrium | |
|
) |
| | [static] |
bool AnalyzeTool::run |
( |
|
) |
[virtual] |
void OpenSim::AnalyzeTool::setCoordinatesFileName |
( |
const std::string & |
aFileName |
) |
[inline] |
void OpenSim::AnalyzeTool::setExternalLoadsBody1 |
( |
const std::string & |
aName |
) |
[inline] |
void OpenSim::AnalyzeTool::setExternalLoadsBody2 |
( |
const std::string & |
aName |
) |
[inline] |
void OpenSim::AnalyzeTool::setExternalLoadsFileName |
( |
const std::string & |
aFileName |
) |
[inline] |
void OpenSim::AnalyzeTool::setExternalLoadsModelKinematicsFileName |
( |
const std::string & |
aFileName |
) |
[inline] |
void OpenSim::AnalyzeTool::setLowpassCutoffFrequency |
( |
double |
aLowpassCutoffFrequency |
) |
[inline] |
void OpenSim::AnalyzeTool::setLowpassCutoffFrequencyForLoadKinematics |
( |
double |
aLowpassCutoffFrequency |
) |
[inline] |
void AnalyzeTool::setPrintResultFiles |
( |
bool |
aToWrite |
) |
|
Turn On/Off writing result storages to files.
void OpenSim::AnalyzeTool::setSpeedsFileName |
( |
const std::string & |
aFileName |
) |
[inline] |
void OpenSim::AnalyzeTool::setStatesFileName |
( |
const std::string & |
aFileName |
) |
[inline] |
void AnalyzeTool::setStatesFromMotion |
( |
const SimTK::State & |
s, |
|
|
const Storage & |
aMotion, |
|
|
bool |
aInDegrees | |
|
) |
| | |
void AnalyzeTool::setStatesStorage |
( |
Storage & |
aStore |
) |
|
Set the states storage.
A states storage is required to run the analyze tool. The rows of a states storage consist of time-stamped vectors of all the model states. Time is in the first column and is assumed to increasing monotonically.
- Parameters:
-
| Pointer | to storage file containing the time history of model states. |
void AnalyzeTool::verifyControlsStates |
( |
|
) |
|
Verify that the controls and states are consistent with the model.
The documentation for this class was generated from the following files:
- OpenSim/Tools/AnalyzeTool.h
- OpenSim/Tools/AnalyzeTool.cpp