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

Truss.h

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.5 $
00022 // $Date: 2001/07/13 22:42:34 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/truss/Truss.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef Truss_h
00027 #define Truss_h
00028 
00029 // File: ~/element/truss/Truss.h
00030 // 
00031 // Written: fmk 
00032 // Created: 07/98
00033 // Revision: A
00034 //
00035 // Description: This file contains the class definition for Truss. A Truss object
00036 // provides the abstraction of the small deformation bar element. Each truss
00037 // object is assocaited with a material object. This Truss element will work
00038 // in 1d, 2d or 3d problems.
00039 //
00040 // What: "@(#) Truss.h, revA"
00041 
00042 #include <Element.h>
00043 #include <Matrix.h>
00044 
00045 #include <Node.h>
00046 #include <Channel.h>
00047 #include <UniaxialMaterial.h>
00048 
00058 class Truss : public Element
00059 {
00060   public:
00064     Truss(int tag, 
00065 
00066    int dimension,
00067    int Nd1, int Nd2, 
00068    UniaxialMaterial &theMaterial,
00069    double A, double rho=0.0);
00070     
00076     Truss();    
00077 
00082     ~Truss();
00083 
00084 
00086     int getNumExternalNodes(void) const;
00091     const ID &getExternalNodes(void);
00092 
00098     int getNumDOF(void); 
00099 
00101     void setDomain(Domain *theDomain);
00102 
00103 
00105     int commitState(void);
00107     int revertToLastCommit(void);        
00109     int revertToStart(void);        
00111     int update(void);
00112     
00114     const Matrix &getTangentStiff(void);
00116     const Matrix &getSecantStiff(void);    
00118     const Matrix &getDamp(void);    
00120     const Matrix &getMass(void);    
00121 
00123     void zeroLoad(void); 
00125     int addLoad(const Vector &addP);
00127     int addInertiaLoadToUnbalance(const Vector &accel);
00129     const Vector &getResistingForce(void);
00131     const Vector &getResistingForceIncInertia(void);            
00132 
00134     int sendSelf(int commitTag, Channel &theChannel);
00136     int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00138     int displaySelf(Renderer &theViewer, int displayMode, float fact);    
00140     void Print(ostream &s, int flag =0);    
00141 
00143     Response *setResponse(char **argv, int argc, Information &eleInfo);
00145     int getResponse(int responseID, Information &eleInformation);
00146 
00148     int setParameter (char **argv, int argc, Information &info);
00150     int updateParameter (int parameterID, Information &info);
00151 
00152   protected:
00153     
00154   private:
00156     double computeCurrentStrain(void) const;
00158     double computeCurrentStrainRate(void) const;
00159     
00161     UniaxialMaterial *theMaterial;  
00162     ID  connectedExternalNodes;     
00163     int dimension;                  
00164     int numDOF;                     
00165 
00166     Vector *theLoad;     
00167     Matrix *theMatrix; 
00168     Vector *theVector; 
00169 
00170     Matrix *t;    
00171 
00172     double L;     
00173     double A;      
00174     double M;      
00175 
00176     Node *end1Ptr;  
00177     Node *end2Ptr;  // pointer to the end1 node object 
00178 
00180     static Matrix trussM2;   
00181     static Matrix trussM4;   
00182     static Matrix trussM6;   
00183     static Matrix trussM12;  
00184     static Vector trussV2;   
00185     static Vector trussV4;   
00186     static Vector trussV6;   
00187     static Vector trussV12;  // class wide Vector for size 12
00188 };
00189 
00190 #endif
00191 
00192 
00193 
00194 
Copyright Contact Us