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

suPointKinematics Class Reference

A class for recording the kinematics of a point on a body of a model during a simulation. More...

#include <suPointKinematics.h>

Inheritance diagram for suPointKinematics:

rdAnalysis List of all members.

Public Member Functions

 suPointKinematics (rdModel *aModel)
 Construct an suPointKinematics instance for recording the kinematics of the bodies of a model during a simulation.

virtual ~suPointKinematics ()
 Destructor.

void setBody (int aBody)
 Set the body for which the induced accelerations are to be computed.

int getBody ()
 Get the body for which the induced accelerations are to be computed.

void setPoint (double aPoint[3])
 Set the point for which the induced accelerations are to be computed.

void getPoint (double rPoint[3])
 Get the point for which the induced accelerations are to be computed.

void setPointName (const char *aName)
 Set a name for the point.

const char * getPointName ()
 Get the point name.

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.


Static Public Attributes

const int NAME_LENGTH = suPointKinematics_NAME_LENGTH
const int BUFFER_LENGTH = suPointKinematics_BUFFER_LENGTH

Protected Member Functions

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


Protected Attributes

int _body
double _point [3]
char _pointName [suPointKinematics_NAME_LENGTH]
double * _dy
double * _kin
rdStorage_pStore
rdStorage_vStore
rdStorage_aStore

Private Member Functions

void setNull ()
 SetNull().

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

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

void allocateStorage ()
 Allocate storage for the kinematics.

void deleteStorage ()
 Delete storage objects.


Private Attributes

char _buffer [suPointKinematics_BUFFER_LENGTH]
char _tmp [suPointKinematics_BUFFER_LENGTH]

Detailed Description

A class for recording the kinematics of a point on a body of a model during a simulation.

Author:
Frank C. Anderson
Version:
1.0


Constructor & Destructor Documentation

suPointKinematics::suPointKinematics rdModel aModel  ) 
 

Construct an suPointKinematics instance for recording the kinematics of the bodies of a model during a simulation.

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


Member Function Documentation

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

Get the acceleration storage.

Returns:
Acceleration storage.

int suPointKinematics::getBody  ) 
 

Get the body for which the induced accelerations are to be computed.

Returns:
Body ID

void suPointKinematics::getPoint double  rPoint[3]  ) 
 

Get the point for which the induced accelerations are to be computed.

Parameters:
rPoint X-Y-Z Point

const char * suPointKinematics::getPointName  ) 
 

Get the point name.

Parameters:
aName Name for the point.

rdStorage * suPointKinematics::getPositionStorage  ) 
 

Get the position storage.

Returns:
Position storage.

rdStorage * suPointKinematics::getVelocityStorage  ) 
 

Get the velocity storage.

Returns:
Velocity storage.

int suPointKinematics::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 suPointKinematics::setBody int  aBody  ) 
 

Set the body for which the induced accelerations are to be computed.

Parameters:
aBody Body ID

void suPointKinematics::setPoint double  aPoint[3]  ) 
 

Set the point for which the induced accelerations are to be computed.

Parameters:
aPoint X-Y-Z Point

void suPointKinematics::setPointName const char *  aName  ) 
 

Set a name for the point.

Parameters:
aName Name for the point.

void suPointKinematics::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