fElement.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.4 $
00022 // $Date: 2003/02/14 23:01:08 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/feap/fElement.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef fElement_h
00027 #define fElement_h
00028 
00029 // File: ~/element/fortran/fElement.h
00030 // 
00031 // Written: fmk 
00032 // Created: 03/99
00033 // Revision: A
00034 //
00035 // Description: This file contains the class definition for fElement. fElement
00036 // is a wrapper used to call fortran element subroutine. It is an abstract class.
00037 //
00038 // What: "@(#) fElement.h, revA"
00039 
00040 #include <Element.h>
00041 #include <Matrix.h>
00042 
00043 class Node;
00044 class Channel;
00045 class UniaxialMaterial;
00046 
00047 class fElement : public Element
00048 {
00049   public:
00050     // constructors
00051     fElement(int tag, 
00052              int classTag,
00053              int eleType,
00054              int sizeD, int nen,
00055              int ndm, int ndf,
00056              int nh1, int nh3);
00057 
00058     fElement(int tag, 
00059              int classTag,
00060              int eleType,
00061              int sizeD, int nen,
00062              int ndm, int ndf, int iow);
00063     
00064     fElement(int classTag);    
00065     
00066     // destructor
00067     virtual ~fElement();
00068 
00069     // public methods for element operations
00070     virtual int getNumExternalNodes(void) const;
00071     virtual const ID &getExternalNodes(void);
00072     Node **getNodePtrs(void);
00073 
00074     virtual int getNumDOF(void);        
00075     virtual void setDomain(Domain *theDomain);
00076     
00077     virtual int commitState(void);
00078     virtual int revertToLastCommit(void);        
00079     virtual int revertToStart(void);        
00080     virtual int update(void);
00081     
00082     virtual const Matrix &getTangentStiff(void);
00083     const Matrix &getInitialStiff(void);
00084     virtual const Matrix &getDamp(void);    
00085     virtual const Matrix &getMass(void);    
00086 
00087     virtual void zeroLoad(void);        
00088     virtual int addLoad(ElementalLoad *theLoad, double loadFactor);
00089     virtual int addInertiaLoadToUnbalance(const Vector &accel);
00090 
00091     virtual const Vector &getResistingForce(void);
00092     virtual const Vector &getResistingForceIncInertia(void);            
00093 
00094     // public methods for output
00095     virtual int sendSelf(int commitTag, Channel &theChannel);
00096     virtual int recvSelf(int commitTag, Channel &theChannel, 
00097                          FEM_ObjectBroker &theBroker);
00098     virtual int displaySelf(Renderer &theViewer, int displayMode, float fact);    
00099     virtual void Print(OPS_Stream &s, int flag =0);    
00100 
00101   protected:
00102     // protected methods 
00103     virtual int invokefRoutine(int ior, int iow, double *ctan, int isw);
00104     virtual int readyfRoutine(bool incInertia);
00105     virtual int invokefInit(int isw, int iow); 
00106 
00107     // protected data
00108     Vector *data;
00109     ID *connectedNodes;
00110         
00111   private:
00112     // private attributes - a copy for each object of the class      
00113     double *h;            // the elements local h array
00114     Node **theNodes;       // pointer to the elements nodes
00115     double *u;            // to hold u^(k-1)_(n+1) as nodes don't save this
00116     double *d;            // data stored for each element
00117     int eleType;          // defines which elmtnn subroutine to invoke
00118     int ndf;              // number of dof at nodes  nst = nen x ndf
00119     int nen;              // number of element nodes
00120     int ndm;              // dimension of mesh
00121     int nh1, nh3;         // the size of nh1(nh2) and nh3 data in h
00122     int nrCount;          // needed for Prof. Fillipou's Elmt05
00123 
00124     Vector *theLoad;    // vector to hold the applied load P
00125     Matrix *Ki;
00126         
00127     // static data - single copy for all objects of the class   
00128     static Matrix **fElementM;   // class wide matrices - use s array
00129     static Vector **fElementV;   // class wide vectors - use r array
00130     static double *s;  // element tangent (nst x nst)
00131     static double *r;  // element residual (ndf x nen) == (nst)
00132     static double *ul; // nodal responses (ndf x nen x 5) == (nst X 5)
00133     static double *xl; // nodal coordinates (ndf x nen) == (nst)
00134     static double *tl; // nodal temp (nen)
00135     static int    *ix; // nodal tags (nen)
00136     static int numfElements;
00137 };
00138 
00139 #endif
00140 
00141 
00142 
00143 

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