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

ZeroLength.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.2 $
00022 // $Date: 2000/12/18 10:40:50 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/zeroLength/ZeroLength.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef ZeroLength_h
00027 #define ZeroLength_h
00028 
00029 // File: ~/element/zeroLength/ZeroLength.h
00030 // 
00031 // Written: GLF
00032 // Created: 12/99
00033 // Revision: A
00034 //
00035 // Description: This file contains the class definition for ZeroLength.
00036 // A ZeroLength element is defined by two nodes with the same coordinate.
00037 // One or more material objects may be associated with the nodes to
00038 // provide a force displacement relationship.
00039 // ZeroLength element will work with 1d, 2d, or 3d material models.
00040 //
00041 // What: "@(#) ZeroLength.h, revA"
00042 
00043 #include <Element.h>
00044 #include <Matrix.h>
00045 
00046 // Tolerance for zero length of element
00047 #define LENTOL 1.0e-6
00048 
00049 // Type of dimension of element NxDy has dimension x=1,2,3 and
00050 // y=2,4,6,12 degrees-of-freedom for the element
00051 // comment out for doc++ enum Etype { D1N2, D2N4, D2N6, D3N6, D3N12 };
00052 
00053 
00054 #include <Node.h>
00055 #include <Channel.h>
00056 #include <UniaxialMaterial.h>
00057 #include <Response.h>
00058 
00077 class ZeroLength : public Element
00078 {
00079   public:
00080     
00082     ZeroLength(int tag,          
00083         int dimension,
00084         int Nd1, int Nd2, 
00085         const Vector& x,
00086         const Vector& yprime,
00087         UniaxialMaterial& theMaterial,
00088         int direction );
00089 
00091     ZeroLength(int tag,          
00092         int dimension,
00093         int Nd1, int Nd2, 
00094         const Vector& x,
00095         const Vector& yprime,
00096         int n1dMat,
00097         UniaxialMaterial** theMaterial,  
00098         const ID& direction );
00099 
00108     ZeroLength();    
00109 
00120     ~ZeroLength();
00121 
00122 
00124     int getNumExternalNodes(void) const;
00129     const ID &getExternalNodes(void);
00130 
00136     int getNumDOF(void); 
00137 
00142     void setDomain(Domain *theDomain);
00143 
00144 
00146     int commitState(void);
00152     int revertToLastCommit(void);        
00153 
00159     int revertToStart(void);        
00160 
00161 
00163     const Matrix &getTangentStiff(void);
00169     const Matrix &getSecantStiff(void);    
00170 
00175     const Matrix &getDamp(void);    
00176 
00181     const Matrix &getMass(void);    
00182 
00183 
00188     void zeroLoad(void); 
00189 
00194     int addLoad(const Vector &addP);
00195 
00200     int addInertiaLoadToUnbalance(const Vector &accel);    
00201 
00206     const Vector &getResistingForce(void);
00207 
00212     const Vector &getResistingForceIncInertia(void);            
00213 
00214 
00216     int sendSelf(int commitTag, Channel &theChannel);
00221     int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00222 
00227     int displaySelf(Renderer &theViewer, int displayMode, float fact);    
00228 
00233     void Print(ostream &s, int flag =0);    
00234 
00235 
00237  Response *setResponse(char **argv, int argc, Information &eleInformation);
00238 
00240     int getResponse(int responseID, Information &eleInformation);
00241     
00242   protected:
00243     
00244   private:
00246     void   setUp ( int Nd1, int Nd2, const Vector& x, const Vector& y);
00248     void   checkDirection (  ID& dir ) const;
00249     
00251     void   setTran1d ( Etype e, int n );
00253     double computeCurrentStrain1d ( int mat, const Vector& diff ) const;    
00254 
00256     ID  connectedExternalNodes;         
00257     int dimension;                      
00258     int numDOF;                         
00259     Matrix transformation;  
00260  
00261     Node *end1Ptr;        
00262     Node *end2Ptr;        
00263 
00264     Matrix *theMatrix;       
00265     Vector *theVector;       // pointer to objects vector (a class Vector)
00266 
00268     int numMaterials1d;      
00269     UniaxialMaterial **theMaterial1d;      
00270     ID                     *dir1d;         
00271     Matrix                 *t1d;     // hold the transformation matrix
00272 
00274     static Matrix ZeroLengthM2;   
00275     static Matrix ZeroLengthM4;   
00276     static Matrix ZeroLengthM6;   
00277     static Matrix ZeroLengthM12;  
00278     static Vector ZeroLengthV2;   
00279     static Vector ZeroLengthV4;   
00280     static Vector ZeroLengthV6;   
00281     static Vector ZeroLengthV12;  // class wide Vector for size 12
00282 };
00283 
00284 #endif
00285 
00286 
00287 
00288 
Copyright Contact Us