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

suGeneralizedForces.h

00001 // suGeneralizedForces.h
00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00003 // AUTHOR: Frank C. Anderson & Saryn Goldberg
00004 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00005 #ifndef __suGeneralizedForces_h__
00006 #define __suGeneralizedForces_h__
00007 
00008 
00009 //=============================================================================
00010 // INCLUDES
00011 //=============================================================================
00012 #include <rdMath.h>
00013 #include <rdTools.h>
00014 #include <rdModel.h>
00015 #include <rdAnalysis.h>
00016 #include "suAnalysesDLL.h"
00017 
00018 
00019 //=============================================================================
00020 //=============================================================================
00028 class SUANALYSES_API suGeneralizedForces : public rdAnalysis 
00029 {
00030 //=============================================================================
00031 // DATA
00032 //=============================================================================
00033 private:
00034 
00035 protected:
00036    double *_dqdt;
00037    double *_dudt;
00038    double *_zero_aY;
00039    double *_gravGenForces;
00040    double *_velGenForces;
00041    double *_actuatorGenForces;
00042    double *_contactGenForces;
00043    rdStorage *_gravGenForcesStore;
00044    rdStorage *_velGenForcesStore;
00045    rdStorage *_actuatorGenForcesStore;
00046    rdStorage *_contactGenForcesStore;
00047 
00048 //=============================================================================
00049 // METHODS
00050 //=============================================================================
00051 public:
00052    suGeneralizedForces(rdModel *aModel);
00053    virtual ~suGeneralizedForces();
00054 private:
00055    void constructDescription();
00056    void constructColumnLabels();
00057    void allocateStorage();
00058    void deleteStorage();
00059 
00060 public:
00061    //--------------------------------------------------------------------------
00062    // GET AND SET
00063    //--------------------------------------------------------------------------
00064    // STORAGE
00065    void setStorageCapacityIncrements(int aIncrement);
00066    rdStorage* getGravGenForcesStorage();
00067    rdStorage* getVelGenForcesStorage();
00068    rdStorage* getActuatorGenForcesStorage();
00069    rdStorage* getContactGenForcesStorage();
00070 
00071    //--------------------------------------------------------------------------
00072    // ANALYSIS
00073    //--------------------------------------------------------------------------
00074    virtual int
00075       begin(int aStep,double aDT,double aT,double *aX,double *aY,
00076       void *aClientData=NULL);
00077    virtual int
00078       analyze(double *aXPrev,double *aYPrev,
00079       int aStep,double aDT,double aT,double *aX,double *aY,
00080       void *aClientData=NULL);
00081    virtual int
00082       end(int aStep,double aDT,double aT,double *aX,double *aY,
00083       void *aClientData=NULL);
00084 protected:
00085    virtual int
00086       record(double aT,double *aX,double *aY);
00087 
00088    //--------------------------------------------------------------------------
00089    // IO
00090    //--------------------------------------------------------------------------
00091 public:
00092    virtual int
00093       printResults(char *aBaseName,char *aDir=NULL,double aDT=-1.0,
00094       char *aExtension=".sto");
00095 
00096 //=============================================================================
00097 }; // END of class suGeneralizedForces
00098 //=============================================================================
00099 //=============================================================================
00100 
00101 
00102 #endif // #ifndef __suGeneralizedForces_h__

Generated on Wed Aug 20 02:17:07 2003 for Simulation Software by doxygen1.3