TrussSection.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.11 $
00022 // $Date: 2006/09/05 21:15:19 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/truss/TrussSection.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef TrussSection_h
00027 #define TrussSection_h
00028 
00029 // Written: fmk 
00030 // Created: 07/98
00031 // Revision: A
00032 //
00033 // Description: This file contains the class definition for Truss. A Truss 
00034 // object provides the abstraction of the small deformation bar element. 
00035 // Each truss object is assocaited with a section object. This Truss element 
00036 // will work in 1d, 2d or 3d problems.
00037 //
00038 // What: "@(#) Truss.h, revA"
00039 
00040 #include <Element.h>
00041 #include <Matrix.h>
00042 
00043 class Node;
00044 class Channel;
00045 class SectionForceDeformation;
00046 
00047 class TrussSection : public Element
00048 {
00049   public:
00050     TrussSection(int tag, 
00051           int dimension,
00052           int Nd1, int Nd2, 
00053           SectionForceDeformation &theSection,
00054           double rho=0.0);     
00055     
00056     TrussSection();    
00057     ~TrussSection();
00058 
00059     const char *getClassType(void) const {return "TrussSection";};
00060 
00061     // public methods to obtain inforrmation about dof & connectivity    
00062     int getNumExternalNodes(void) const;
00063     const ID &getExternalNodes(void);
00064     Node **getNodePtrs(void);
00065 
00066     int getNumDOF(void);        
00067     void setDomain(Domain *theDomain);
00068 
00069     // public methods to set the state of the element    
00070     int commitState(void);
00071     int revertToLastCommit(void);        
00072     int revertToStart(void);        
00073     int update(void);
00074 
00075     // public methods to obtain stiffness, mass, damping and residual information    
00076     const Matrix &getTangentStiff(void);
00077     const Matrix &getInitialStiff(void);
00078     const Matrix &getMass(void);    
00079 
00080     void zeroLoad(void);        
00081     int addLoad(ElementalLoad *theLoad, double loadFactor);
00082     int addInertiaLoadToUnbalance(const Vector &accel);
00083 
00084     const Vector &getResistingForce(void);
00085     const Vector &getResistingForceIncInertia(void);            
00086 
00087     // public methods for element output
00088     int sendSelf(int commitTag, Channel &theChannel);
00089     int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00090     int displaySelf(Renderer &theViewer, int displayMode, float fact);    
00091     void Print(OPS_Stream &s, int flag =0);    
00092     
00093     Response *setResponse(const char **argv, int argc, Information &eleInformation, OPS_Stream &s);
00094     int getResponse(int responseID, Information &eleInformation);
00095     
00096     int setParameter (const char **argv, int argc, Parameter &param);
00097 
00098   protected:
00099     
00100   private:
00101     double computeCurrentStrain(void) const;
00102     
00103     // private attributes - a copy for each object of the class
00104     ID  connectedExternalNodes;          // contains the tags of the end nodes
00105     int dimension;                       // truss in 2 or 3d domain
00106     int numDOF;                          // number of dof for truss
00107 
00108     Vector *theLoad;          // pointer to the load vector P    
00109     Matrix *theMatrix;  // pointer to objects matrix (one of class Matrices)
00110     Vector *theVector;      // pointer to objects vector (one of class Vectors)
00111 
00112     double cosX[3];     // direction cosines
00113 
00114     double L;           // length of truss based on undeformed configuration
00115     double rho;                 // mass density per unit length
00116 
00117     Node *theNodes[2];
00118 
00119     SectionForceDeformation  *theSection;
00120     
00121     // static data - single copy for all objects of the class   
00122     static Matrix trussM2;   // class wide matrix for 2*2
00123     static Matrix trussM3;   // class wide matrix for 3*3       
00124     static Matrix trussM4;   // class wide matrix for 4*4
00125     static Matrix trussM6;   // class wide matrix for 6*6
00126     static Matrix trussM12;  // class wide matrix for 12*12
00127     static Vector trussV2;   // class wide Vector for size 2
00128     static Vector trussV3;   // class wide Vector for size 3    
00129     static Vector trussV4;   // class wide Vector for size 4
00130     static Vector trussV6;   // class wide Vector for size 6
00131     static Vector trussV12;  // class wide Vector for size 12
00132 };
00133 
00134 #endif

Generated on Mon Oct 23 15:05:10 2006 for OpenSees by doxygen 1.5.0