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

suIndAcc.h

00001 // suIndAcc.h
00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00003 // AUTHOR: Frank C. Anderson
00004 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00005 #ifndef __suIndAcc_h__
00006 #define __suIndAcc_h__
00007 
00008 
00009 //=============================================================================
00010 // INCLUDES
00011 //=============================================================================
00012 #include <rdTools.h>
00013 #include <rdMath.h>
00014 #include <rdStorage.h>
00015 #include <rdModel.h>
00016 #include <rdAnalysis.h>
00017 #include "suAnalysesDLL.h"
00018 
00019 
00020 //=============================================================================
00021 //=============================================================================
00034 class SUANALYSES_API suIndAcc : public rdAnalysis 
00035 {
00036 //=============================================================================
00037 // DATA
00038 //=============================================================================
00039 protected:
00040    int _nc;
00041    int _nic;
00042    int _ne;
00043    int _cAct;
00044    int _cGrav;
00045    int _cVel;
00046    int _cIner;
00047    int _cAllAct;
00048    int _cAll;
00049    double _ti;
00050    double _tf;
00051 
00052    const char **_cNames;
00053    double _contactThreshold;
00054    bool *_contactEstablished;
00055    double *_feContig,***_fe;
00056    rdStorage *_yStore;
00057    rdStorage *_xStore;
00058    rdStorage **_feStore;
00059    rdStorage **_aeStore;
00060    rdStorage **_velStore;
00061    rdStorage **_posStore;
00062    rdStorage *_iPosStore;
00063    rdStorage *_iVelStore;
00064    char *_aeDescrip;
00065    char *_aeLabels;
00067    bool _computeNormalizedAccelerations;
00068 
00069 private:
00072    bool _useNullDecomposition;
00073 
00074 //=============================================================================
00075 // METHODS
00076 //=============================================================================
00077 public:
00078    suIndAcc(rdModel *aModel);
00079    suIndAcc(rdModel *aModel,rdStorage *aStates,rdStorage *aControls,
00080       char *aBaseName,char *aDir=NULL,char *aExtension=NULL);
00081    virtual ~suIndAcc();
00082 private:
00083    void setNull();
00084    void initializeNumbers();
00085    void constructComponentNames();
00086    void constructDescription();
00087    void constructColumnLabels();
00088    void allocateElementVectors();
00089    void allocateStoragePointers();
00090    void allocateStorage();
00091    void deleteStorage();
00092    void createNullDecomposition();
00093 
00094 public:
00095    //--------------------------------------------------------------------------
00096    // GET AND SET
00097    //--------------------------------------------------------------------------
00098    // NUMBERS
00099    int getNumComponents();
00100    int getNumIndependentComponents();
00101    int getNumElements();
00102    // INDICES
00103    int getLastActuatorIndex();
00104    int getGravityIndex();
00105    int getVelocityIndex();
00106    int getInertialIndex();
00107    int getAllActuatorsIndex();
00108    int getAllIndex();
00109    // CONTACT TOLERANCE
00110    void setContactThreshold(double aThreshold);
00111    double getContactThreshold();
00112    // NAMES
00113    const char* getComponentName(int aC);
00114    // STORAGE
00115    virtual void setStorageCapacityIncrements(int aIncrement);
00116    rdStorage** getForceStorage();
00117    // NULL DECOMPOSITION
00118    bool getUseNullDecomposition();
00119    // NORMALIZED ACCELERATIONS
00120    void setComputeNormalizedAccelerations(bool aBool);
00121    bool getComputeNormalizedAccelerations();
00122 
00123    //--------------------------------------------------------------------------
00124    // OPERATIONS
00125    //--------------------------------------------------------------------------
00126    int computeAccelerations();
00127 
00128    //--------------------------------------------------------------------------
00129    // UTILITY
00130    //--------------------------------------------------------------------------
00131    void sumForceResults();
00132    void sumAccelerationResults();
00133    void sumDecomposition();
00134 
00135    //--------------------------------------------------------------------------
00136    // IO
00137    //--------------------------------------------------------------------------
00138    virtual void store();
00139    virtual int
00140       printResults(char *aBaseName,char *aDir=NULL,double aDT=-1.0,
00141       char *aExtension=".sto");
00142 private:
00143    virtual int
00144       readDecomposition(char *aBaseName,char *aDir=NULL,
00145       char *aExtension=NULL);
00146 
00147 
00148 //=============================================================================
00149 }; // END of class suIndAcc
00150 //=============================================================================
00151 //=============================================================================
00152 
00153 
00154 #endif // #ifndef __suIndAcc_h__

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