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

suKinematics Class Reference

A class for recording the kinematics of the generalized coordinates of a model during a simulation. More...

#include <suKinematics.h>

Inheritance diagram for suKinematics:

rdAnalysis List of all members.

Public Member Functions

 suKinematics (rdModel *aModel)
 Construct an suKinematics object for recording the kinematics of a model's generalized coodinates during a simulation.

virtual ~suKinematics ()
 Destructor.

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

rdStoragegetAccelerationStorage ()
 Get the acceleration storage.

rdStoragegetVelocityStorage ()
 Get the velocity storage.

rdStoragegetPositionStorage ()
 Get the position storage.

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 kinematics.


Protected Attributes

double * _y
double * _dy
rdStorage_pStore
rdStorage_vStore
rdStorage_aStore

Private Member Functions

void constructDescription ()
 Construct the description for the kinematics files.

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

void allocateStorage ()
 Allocate storage for the kinematics.

void deleteStorage ()
 Delete storage objects.


Detailed Description

A class for recording the kinematics of the generalized coordinates of a model during a simulation.

Author:
Frank C. Anderson
Version:
1.0


Constructor & Destructor Documentation

suKinematics::suKinematics rdModel aModel  ) 
 

Construct an suKinematics object for recording the kinematics of a model's generalized coodinates during a simulation.

Parameters:
aModel Model for which the kinematics are to be recorded.


Member Function Documentation

int suKinematics::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 suKinematics::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 suKinematics::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 * suKinematics::getAccelerationStorage  ) 
 

Get the acceleration storage.

Returns:
Acceleration storage.

rdStorage * suKinematics::getPositionStorage  ) 
 

Get the position storage.

Returns:
Position storage.

rdStorage * suKinematics::getVelocityStorage  ) 
 

Get the velocity storage.

Returns:
Velocity storage.

int suKinematics::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.

int suKinematics::record double  aT,
double *  aX,
double *  aY
[protected, virtual]
 

Record the kinematics.

Returns:
0 of success, -1 on error.

void suKinematics::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:14 2003 for Simulation Software by doxygen1.3