Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

suActuatorGeneralizedForces Class Reference

A class for recording the generalized force due to an actuator or set of actuators.. More...

#include <suActuatorGeneralizedForces.h>

Inheritance diagram for suActuatorGeneralizedForces:

rdAnalysis List of all members.

Public Member Functions

 suActuatorGeneralizedForces (rdModel *aModel, int aNA, int *aActuatorList)
 Construct an suGeneralizedForces object for recording the joint torques due an actuator or set of actuators during a simulation.

virtual ~suActuatorGeneralizedForces ()
 Destructor.

void setStorageCapacityIncrements (int aIncrement)
 Set the capacity increments of all storage instances.

rdStoragegetActuatorGenForcesStorage ()
 Get the storage for the actuator generalized forces.

virtual int begin (int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called at the beginning of an analysis so that any necessary initializations may be performed.

virtual int analyze (double *aXPrev, double *aYPrev, int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called to perform the analysis.

virtual int end (int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called at the end of an analysis so that any necessary finalizations may be performed.

virtual int printResults (char *aBaseName, char *aDir=NULL, double aDT=-1.0, char *aExtension=".sto")
 Print results.


Protected Member Functions

virtual int record (double aT, double *aX, double *aY)
 Record the joint torques.


Protected Attributes

double * _dqdt
double * _dudt
int _NA
int * _actuatorList
double * _actuatorGenForces
rdStorage_actuatorGenForcesStore

Private Member Functions

void constructDescription ()
 Construct the description for the joint torque files.

void constructColumnLabels ()
 Construct the column labels for the kinematics files.

void allocateStorage ()
 Allocate storage for the kinematics.


Detailed Description

A class for recording the generalized force due to an actuator or set of actuators..

Author:
Frank C. Anderson & Saryn Goldberg
Version:
1.0


Constructor & Destructor Documentation

suActuatorGeneralizedForces::suActuatorGeneralizedForces rdModel aModel,
int  aNA,
int *  aActuatorList
 

Construct an suGeneralizedForces object for recording the joint torques due an actuator or set of actuators during a simulation.

Parameters:
aModel Model for which the joint torques are to be recorded.
aNA Number of actuators in set
aActuatorList An array containing the actuator numbers


Member Function Documentation

int suActuatorGeneralizedForces::analyze double *  aXPrev,
double *  aYPrev,
int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[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 in rdModel::integStepCallback(), which has the same argument list.

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:
aXPrev Controls at the beginining of the current time step.
aYPrev States at the beginning of the current time step.
aStep Step number of the integration.
aDT Size of the time step that was just taken.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.
Returns:
-1 on error, 0 otherwise.

Reimplemented from rdAnalysis.

int suActuatorGeneralizedForces::begin int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[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 in rdModel::integBeginCallback() and has the same argument list.

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:
aStep Step number of the integration.
aDT Size of the time step that will be attempted.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.
Returns:
-1 on error, 0 otherwise.

Reimplemented from rdAnalysis.

int suActuatorGeneralizedForces::end int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[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 in rdModel::integEndCallback() and has the same argument list.

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:
aStep Step number of the integration.
aDT Size of the time step that was just completed.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.
Returns:
-1 on error, 0 otherwise.

Reimplemented from rdAnalysis.

rdStorage * suActuatorGeneralizedForces::getActuatorGenForcesStorage  ) 
 

Get the storage for the actuator generalized forces.

Returns:
Actuator Generalized Force storage.

int suActuatorGeneralizedForces::printResults char *  aBaseName,
char *  aDir = NULL,
double  aDT = -1.0,
char *  aExtension = ".sto"
[virtual]
 

Print results.

The file names are constructed as aDir + "/" + aBaseName + "_" + ComponentName + aExtension

Parameters:
aDir Directory in which the results reside.
aBaseName Base file name.
aDT Desired time interval between adjacent storage vectors. Linear interpolation is used to print the data out at the desired interval.
aExtension File extension.
Returns:
0 on success, -1 on error.

Reimplemented from rdAnalysis.

void suActuatorGeneralizedForces::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.


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:13 2003 for Simulation Software by doxygen1.3