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

suContact Class Reference

A class for recording the contact forces (and torques) generated during a simulation. More...

#include <suContact.h>

Inheritance diagram for suContact:

rdAnalysis List of all members.

Public Member Functions

 suContact (rdModel *aModel, int *aCOPGroups=NULL)
 Construct an suContact object for recording the various qunatities associates with contact.

virtual ~suContact ()
 Destructor.

const char * getScalarColumnLabels () const
 Get the column labels for scalar variables such as contact powers.

const char * getCOPColumnLabels () const
 Get the column labels for COP groups.

rdStoragegetPointsStorage () const
 Get the contact points storage.

rdStoragegetVelocityStorage () const
 Get the contact point velocity storage.

rdStoragegetForceStorage () const
 Get the force storage.

rdStoragegetPowerStorage () const
 Get the power storage.

rdStoragegetCOPStorage () const
 Get the cop storage.

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

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 contact quantities.

void resetStorage ()
 Reset all storage objects.


Protected Attributes

double * _points
 Array of contact points.

double * _velocities
 Array of contact velocities.

double * _forces
 Array of contact forces.

double * _powers
 Array of contact powers.

double * _cops
 Array of cop locations (x and z direction for each contact point).

rdStorage_pStore
 Storage for the contact points.

rdStorage_vStore
 Storage for the contact point velocities.

rdStorage_fStore
 Storage for the contact forces.

rdStorage_pwrStore
 Storage for contact powers.

rdStorage_copsStore
 Storage for cop.


Private Member Functions

void setNull ()
 Set NULL values for member variables.

void constructDescription ()
 Construct a description.

void constructColumnLabels (int nCOPgroups)
 Get a string of column labels.

void allocateStorage ()
 Allocate storage for the kinematics.

void deleteStorage ()
 Delete storage objects.


Private Attributes

char _scalarLabels [rdAnalysis_DESCRIP_LENGTH]
char _copLabels [rdAnalysis_DESCRIP_LENGTH]
int * _copGroupAssignments
 Array containing group assignemnts for each contact point in COP calc *.

int _nCOPGroups
 Number of COP groups *.


Detailed Description

A class for recording the contact forces (and torques) generated during a simulation.

This class will record only the forces (and torques) returned by the getContactForces() method of rdModel.

Author:
Frank C. Anderson
Version:
1.0


Constructor & Destructor Documentation

suContact::suContact rdModel aModel,
int *  aCOPGroups = NULL
 

Construct an suContact object for recording the various qunatities associates with contact.

Parameters:
aModel Model for which the kinematics are to be recorded.
aCOPGroups Array containing group assignment for each contact point. The array must be as long as the number of contact points in the model. For a contact point to not be included in a COP calculation, assign it a negative group number. IF all points are assigned negative numbers, no COP analysis will be performed. If no array is given, the COP is calcualted for all contact points in the model.


Member Function Documentation

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

const char * suContact::getCOPColumnLabels  )  const
 

Get the column labels for COP groups.

Returns:
Column labels for COP groups.

rdStorage * suContact::getCOPStorage  )  const
 

Get the cop storage.

Returns:
COP storage.

rdStorage * suContact::getForceStorage  )  const
 

Get the force storage.

Returns:
Force storage.

rdStorage * suContact::getPointsStorage  )  const
 

Get the contact points storage.

Returns:
Points storage.

rdStorage * suContact::getPowerStorage  )  const
 

Get the power storage.

Returns:
Power storage.

const char * suContact::getScalarColumnLabels  )  const
 

Get the column labels for scalar variables such as contact powers.

Returns:
Column labels for scalar variables.

rdStorage * suContact::getVelocityStorage  )  const
 

Get the contact point velocity storage.

Returns:
Body-local force storage.

int suContact::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.
aExtension File extension.
Returns:
0 on success, -1 on error.

Reimplemented from rdAnalysis.

void suContact::resetStorage  )  [protected]
 

Reset all storage objects.

That is, delete all internally stored data so that new data may be stored.

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