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

suIndAcc Class Reference

A class that performs a basic induced acceleration analysis. More...

#include <suIndAcc.h>

Inheritance diagram for suIndAcc:

rdAnalysis suBodyIndAcc suBodyPointIndAcc suIndContactPowers suBodyIndAccCOM suBodyIndPowers List of all members.

Public Member Functions

 suIndAcc (rdModel *aModel)
 Construct an induced acceleration instance for a model.

 suIndAcc (rdModel *aModel, rdStorage *aStates, rdStorage *aControls, char *aBaseName, char *aDir=NULL, char *aExtension=NULL)
 Construct an induced acceleration instance for a model.

virtual ~suIndAcc ()
 Destructor.

int getNumComponents ()
 Get the number of components.

int getNumIndependentComponents ()
 Get the number of independent components.

int getNumElements ()
 Get the number of contact elements.

int getLastActuatorIndex ()
 Get the index of the last actuator component.

int getGravityIndex ()
 Get the index of the gravity component.

int getVelocityIndex ()
 Get the index of the velocity component.

int getInertialIndex ()
 Get the index of the inertial component.

int getAllActuatorsIndex ()
 Get the index of the total of all actuator components.

int getAllIndex ()
 Get the index of the total of all components.

void setContactThreshold (double aThreshold)
 Set the force threashold above which contact is assumed to be established.

double getContactThreshold ()
 Get the force threashold above which contact is assumed to be established.

const char * getComponentName (int aC)
 GET THE NAME OF A COMPONENT.

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

rdStorage ** getForceStorage ()
 Get the force decomposition storage.

bool getUseNullDecomposition ()
 Get whether or not accelerations are being computed using a NULL decomposition.

void setComputeNormalizedAccelerations (bool aBool)
 Set whether or not accelerations are being normalized by actuator force.

bool getComputeNormalizedAccelerations ()
 Get whether or not accelerations are being normalized by actuator force.

int computeAccelerations ()
 Compute induced accelerations given the force decomposition and set of states.

void sumForceResults ()
 Sum the force decompositon results.

void sumAccelerationResults ()
 Sum the accelerations results.

void sumDecomposition ()
 Sum the independent component forces to get the contribution of all actuators and all components.

virtual void store ()
 Store various model quantities.

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


Protected Attributes

int _nc
int _nic
int _ne
int _cAct
int _cGrav
int _cVel
int _cIner
int _cAllAct
int _cAll
double _ti
double _tf
const char ** _cNames
double _contactThreshold
bool * _contactEstablished
double * _feContig
double *** _fe
rdStorage_yStore
rdStorage_xStore
rdStorage ** _feStore
rdStorage ** _aeStore
rdStorage ** _velStore
rdStorage ** _posStore
rdStorage_iPosStore
rdStorage_iVelStore
char * _aeDescrip
char * _aeLabels
bool _computeNormalizedAccelerations
 Flag that determines whether accelerations are normalized by force.


Private Member Functions

void setNull ()
 Set member variables to approprate NULL values.

void initializeNumbers ()
 Initialize numbers of things.

void constructComponentNames ()
 Construct component names.

void constructDescription ()
 Construct a description.

void constructColumnLabels ()
 Construct the column labels.

void allocateElementVectors ()
 Allocate element vectors.

void allocateStoragePointers ()
 Allocate storage pointers for the force decomposition and induced accelerations.

void allocateStorage ()
 Allocate storage for the decomposition.

void deleteStorage ()
 Delete storage objects.

void createNullDecomposition ()
 Create a NULL decomposition.

virtual int readDecomposition (char *aBaseName, char *aDir=NULL, char *aExtension=NULL)
 Read the results of a force decomposition from file.


Private Attributes

bool _useNullDecomposition
 Flag which indicates whether or not accelerations are being computed using a NULL decomposition.


Detailed Description

A class that performs a basic induced acceleration analysis.

An induced acceleration analysis can be peformed in two ways using this class: 1) during the course of a simulation and 2) after a simulation has completed. For the second way, the states recorded during the simulation as well an appropriate contact force decomposition must be used to construct the suIndAcc instance.

Author:
Frank C. Anderson
Version:
1.0


Constructor & Destructor Documentation

suIndAcc::suIndAcc rdModel aModel  ) 
 

Construct an induced acceleration instance for a model.

This constructor is used if the induced acceleration analysis is going to be performed during the course of a simulation.

Parameters:
aModel Model on which the analyses are to be performed.

suIndAcc::suIndAcc rdModel aModel,
rdStorage aStates,
rdStorage aControls,
char *  aBaseName,
char *  aDir = NULL,
char *  aExtension = NULL
 

Construct an induced acceleration instance for a model.

This constructor is used when the analysis is to be performed following a simulation. The states recorded during the simulation as well as an appropriate force decomposition must be used to construct the induced acceleration instance. The induced accelerations are not read in from file. They are recomputed based on the force decomposition.

If NULL is sent in as the base name for the force decomposition files, it is assumed that induced accelerations are to be computed based on a NULL decomposition. A NULL decomposition is one in which all induced contact forces are assmed to be zero: each actuator accelerates the model in a pure sense, without its associated reaction forces.

Parameters:
aModel Model on which the simulation was run.
aStates Set of model states.
aStates Set of model controls.
aBaseName Base name for the force decompositon files. If NULL, accelerations are computed based on a NULL decompostion.
aDir Directory in which the results reside.
aExtension File extension of the force decomposition files.


Member Function Documentation

int suIndAcc::computeAccelerations  ) 
 

Compute induced accelerations given the force decomposition and set of states.

Returns:
0 on success, -1 on error.

bool suIndAcc::getComputeNormalizedAccelerations  ) 
 

Get whether or not accelerations are being normalized by actuator force.

Returns:
True when the accelerations are being normalized by actuator force

double suIndAcc::getContactThreshold  ) 
 

Get the force threashold above which contact is assumed to be established.

Returns:
Force threashold above which contact is established.

rdStorage ** suIndAcc::getForceStorage  ) 
 

Get the force decomposition storage.

Returns:
Array of pointers to the force decomposition storage objects.

bool suIndAcc::getUseNullDecomposition  ) 
 

Get whether or not accelerations are being computed using a NULL decomposition.

A NULL decomposition is one in which all induced contact forces are assumed to be zero.

The value returned by this method can be used to decide whether or not it is necessary to apply contact forces.

Returns:
True when a NULL decomposition is used, false otherwise.

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

Reimplemented in suBodyIndAcc, suBodyIndAccCOM, suBodyIndPowers, suBodyPointIndAcc, and suIndContactPowers.

int suIndAcc::readDecomposition char *  aBaseName,
char *  aDir = NULL,
char *  aExtension = NULL
[private, virtual]
 

Read the results of a force decomposition from file.

Note that the induced accelerations are not read in from file. The induced accelerations are recomputed based on the force decomposition.

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

Parameters:
aDir Directory in which the results reside.
aBaseName Base file name of the files.
aExtension File extension.
Returns:
0 on success, -1 on error.

void suIndAcc::setComputeNormalizedAccelerations bool  aBool  ) 
 

Set whether or not accelerations are being normalized by actuator force.

Parameters:
aBool Determines whether accelerations are normalized by actuator force.

void suIndAcc::setContactThreshold double  aThreshold  ) 
 

Set the force threashold above which contact is assumed to be established.

Parameters:
aThreashold Force threashold above which contact is established.

void suIndAcc::setStorageCapacityIncrements int  aIncrement  )  [virtual]
 

Set the capacity increments of all storage instances.

Parameters:
aIncrement Increment by which storage capacities will be increased when storage capcities run out.

Reimplemented in suBodyIndAcc, suBodyIndAccCOM, suBodyIndPowers, and suBodyPointIndAcc.


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