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

ZeroLengthND.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/ZeroLengthND.h,v $
00024                                                                         
00025 // Written: MHS
00026 // Created: Sept 2000
00027 //
00028 // Description: This file contains the class definition for ZeroLengthND.
00029 // A ZeroLengthND element is defined by two nodes with the same coordinate.
00030 // An NDMaterial object of order 2 or 3 is associated with the nodes to
00031 // provide the basic force-deformation relationship for the element.
00032 // If the NDMaterial is of order 2, an optional UniaxialMaterial may 
00033 // be used to represent the (uncoupled) force-deformation relationship 
00034 // orthogonal to the plane of the NDMaterial. The ZeroLengthND element
00035 // only accounts for translational force-deformation relations.
00036 
00037 #ifndef ZeroLengthND_h
00038 #define ZeroLengthND_h
00039 
00040 #include <Element.h>
00041 #include <Matrix.h>
00042 
00043 // Tolerance for zero length of element
00044 #define LENTOL 1.0e-6
00045 
00046 #include <Node.h>
00047 #include <Channel.h>
00048 #include <NDMaterial.h>
00049 #include <UniaxialMaterial.h>
00050 #include <Response.h>
00051 
00072 class ZeroLengthND : public Element
00073 {
00074   public:
00075     
00077     ZeroLengthND(int tag,          
00078         int dimension,
00079         int Nd1, int Nd2, 
00080         const Vector& x,
00081         const Vector& yprime,
00082      NDMaterial& theNDMaterial);
00083 
00084     // Constructor for an Nd material model of order 2 with an 
00086     ZeroLengthND(int tag,          
00087         int dimension,
00088         int Nd1, int Nd2, 
00089         const Vector& x,
00090         const Vector& yprime,
00091      NDMaterial& theNDMaterial,
00092      UniaxialMaterial &the1DMaterial);
00093 
00103     ZeroLengthND();    
00104 
00116     ~ZeroLengthND();
00117 
00118 
00120     int getNumExternalNodes(void) const;
00125     const ID &getExternalNodes(void);
00126 
00132     int getNumDOF(void); 
00133 
00140     void setDomain(Domain *theDomain);
00141 
00142 
00144     int commitState(void);
00150     int revertToLastCommit(void);        
00151 
00157     int revertToStart(void);        
00158 
00159 
00161     const Matrix &getTangentStiff(void);
00167     const Matrix &getSecantStiff(void);    
00168 
00173     const Matrix &getDamp(void);    
00174 
00179     const Matrix &getMass(void);    
00180 
00181 
00186     void zeroLoad(void); 
00187 
00192     int addLoad(const Vector &addP);
00193 
00198     int addInertiaLoadToUnbalance(const Vector &accel);    
00199 
00208     const Vector &getResistingForce(void);
00209 
00214     const Vector &getResistingForceIncInertia(void);            
00215 
00216 
00218     int sendSelf(int commitTag, Channel &theChannel);
00223     int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker);
00224 
00229     int displaySelf(Renderer &theViewer, int displayMode, float fact);    
00230 
00235     void Print(ostream &s, int flag =0);    
00236 
00237 
00239     Response *setResponse(char **argv, int argc, Information &eleInformation);
00240 
00242     int getResponse(int responseID, Information &eleInformation);
00243     
00244   protected:
00245     
00246   private:
00248     void setUp (int Nd1, int Nd2, const Vector& x, const Vector& y);
00250     void setTransformation(void);
00252  void computeStrain(void);
00253 
00255     ID  connectedExternalNodes;         
00256     int dimension;                      
00257     int numDOF;                         
00258     Matrix transformation;  
00259  
00260  Matrix *A; 
00261  Vector *v; 
00262  double e; 
00263 
00264  Matrix *K; 
00265  Vector *P; 
00266 
00267     Node *end1Ptr;        
00268     Node *end2Ptr;        
00269 
00270  NDMaterial *theNDMaterial; 
00271  UniaxialMaterial *the1DMaterial; 
00272  int order;  // Order of the NDMaterial (2 or 3)
00273 
00275  static Matrix K6;
00277  static Matrix K12;
00278 
00280  static Vector P6;
00282  static Vector P12;
00283 
00285  static Vector v2;
00287  static Vector v3;
00288 };
00289 
00290 #endif
00291 
00292 
00293 
00294 
Copyright Contact Us