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.3 $ 00022 // $Date: 2001/03/29 03:41:36 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/Element.h,v $ 00024 00025 00026 // File: ~/element/Element.h 00027 // 00028 // Written: fmk 00029 // Created: 11/96 00030 // Revision: A 00031 // 00032 // Description: This file contains the class definition for Element. 00033 // Element is an abstract base class and thus no objects of it's type 00034 // can be instantiated. It has pure virtual functions which must be 00035 // implemented in it's derived classes. 00036 // 00037 // What: "@(#) Element.h, revA" 00038 00039 #ifndef Element_h 00040 #define Element_h 00041 00042 #ifndef _bool_h 00043 #include "bool.h" 00044 #endif 00045 00046 #include <ID.h> 00047 00048 #include <DomainComponent.h> 00049 00050 #include <Matrix.h> 00051 #include <Vector.h> 00052 #include <Renderer.h> 00053 #include <Info.h> 00054 #include <Information.h> 00055 #include <Response.h> 00056 00066 class Element : public DomainComponent 00067 { 00068 public: 00075 Element(int tag, int classTag); 00076 00081 virtual ~Element(); 00082 00083 00085 virtual int getNumExternalNodes(void) const =0; 00089 virtual const ID &getExternalNodes(void) =0; 00090 00097 virtual int getNumDOF(void) =0; 00098 00099 00101 virtual int commitState(void) = 0; 00106 virtual int revertToLastCommit(void) = 0; 00107 00113 virtual int revertToStart(void); 00114 00122 virtual int update(void); 00123 00129 virtual bool isSubdomain(void); 00130 00131 00132 // methods to return the current linearized stiffness, 00134 virtual const Matrix &getTangentStiff(void)=0; 00141 virtual const Matrix &getSecantStiff(void)=0; 00142 00148 virtual const Matrix &getDamp(void)=0; 00149 00155 virtual const Matrix &getMass(void)=0; 00156 00157 00159 virtual int setKi(void); 00161 virtual const Matrix &getKi(void); 00162 00163 00165 virtual void zeroLoad(void) =0; 00167 virtual int addLoad(const Vector &addP) =0; 00169 virtual int addInertiaLoadToUnbalance(const Vector &accel); 00171 virtual const Vector &getResistingForce(void) =0; 00173 virtual const Vector &getResistingForceIncInertia(void) =0; 00174 00176 virtual Response *setResponse(char **argv, int argc, Information &eleInformation); 00178 virtual int getResponse(int responseID, Information &eleInformation); 00179 00180 protected: 00182 Matrix *Ki; 00183 00184 private: 00185 }; 00186 00187 00188 #endif 00189