ZeroLengthSection.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.7 $
00022 // $Date: 2006/08/04 21:50:27 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/zeroLength/ZeroLengthSection.h,v $
00024                                                                         
00025 // Written: MHS
00026 // Created: Sept 2000
00027 //
00028 // Description: This file contains the class definition for ZeroLengthSection.
00029 // A ZeroLengthSection element is defined by two nodes with the same coordinate.
00030 // A SectionForceDeformation object is associated with the nodes to
00031 // provide the basic force-deformation relationship for the element.
00032 
00033 #ifndef ZeroLengthSection_h
00034 #define ZeroLengthSection_h
00035 
00036 #include <Element.h>
00037 #include <Matrix.h>
00038 
00039 // Tolerance for zero length of element
00040 #define LENTOL 1.0e-6
00041 
00042 class Node;
00043 class Channel;
00044 class SectionForceDeformation;
00045 class Response;
00046 
00047 class ZeroLengthSection : public Element
00048 {
00049   public:
00050     
00051     ZeroLengthSection(int tag,                        
00052                int dimension,
00053                int Nd1, int Nd2, 
00054                const Vector& x,
00055                const Vector& yprime,
00056                    SectionForceDeformation& theSection);
00057 
00058     ZeroLengthSection();    
00059     ~ZeroLengthSection();
00060 
00061     const char *getClassType(void) const {return "ZeroLengthSection";};
00062 
00063     // public methods to obtain inforrmation about dof & connectivity    
00064     int getNumExternalNodes(void) const;
00065     const ID &getExternalNodes(void);
00066     Node **getNodePtrs(void);
00067 
00068     int getNumDOF(void);        
00069     void setDomain(Domain *theDomain);
00070 
00071     // public methods to set the state of the element    
00072     int commitState(void);
00073     int revertToLastCommit(void);        
00074     int revertToStart(void);        
00075 
00076     // public methods to obtain stiffness, mass, damping and residual information    
00077     const Matrix &getTangentStiff(void);
00078     const Matrix &getInitialStiff(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 &output);
00094     int getResponse(int responseID, Information &eleInformation);
00095     
00096   protected:
00097     
00098   private:
00099     // private methods
00100     void setUp (int Nd1, int Nd2, const Vector& x, const Vector& y);
00101     void setTransformation(void);
00102         void computeSectionDefs(void);
00103 
00104     // private attributes - a copy for each object of the class
00105     ID  connectedExternalNodes;         // contains the tags of the end nodes
00106     int dimension;                      // = 2 or 3 dimensions
00107     int numDOF;                         // number of dof for ZeroLengthSection
00108     Matrix transformation;              // transformation matrix for orientation
00109         
00110     Matrix *A;  // Transformation matrix ... e = A*(u2-u1)
00111     Vector *v;  // Section deformation vector, the element basic deformations
00112     
00113     Matrix *K;  // Pointer to element stiffness matrix
00114     Vector *P;  // Pointer to element force vector
00115     
00116     Node *theNodes[2];
00117     
00118     SectionForceDeformation *theSection;        // Pointer to section object
00119     int order;          // Order of the section model
00120     
00121     // Class wide matrices for return
00122     static Matrix K6;
00123     static Matrix K12;
00124     
00125     // Class wide vectors for return
00126     static Vector P6;
00127     static Vector P12;
00128 };
00129 
00130 #endif
00131 
00132 
00133 
00134 

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