Element.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.14 $
00022 // $Date: 2006/09/05 21:00:46 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/Element.h,v $
00024                                                                         
00025                                                                         
00026 // Written: fmk 
00027 // Created: 11/96
00028 // Revision: A
00029 //
00030 // Description: This file contains the class definition for Element.
00031 // Element is an abstract base class and thus no objects of it's type
00032 // can be instantiated. It has pure virtual functions which must be
00033 // implemented in it's derived classes. 
00034 //
00035 // What: "@(#) Element.h, revA"
00036 
00037 #ifndef Element_h
00038 #define Element_h
00039 
00040 #ifndef _bool_h
00041 #include "bool.h"
00042 #endif
00043 
00044 #include <ID.h>
00045 
00046 #include <DomainComponent.h>
00047 
00048 class Matrix;
00049 class Vector;
00050 class Renderer;
00051 class Info;
00052 class Information;
00053 class Response;
00054 class ElementalLoad;
00055 class Node;
00056 
00057 class Element : public DomainComponent
00058 {
00059   public:
00060     Element(int tag, int classTag);    
00061     virtual ~Element();
00062 
00063     // methods dealing with nodes and number of external dof
00064     virtual int getNumExternalNodes(void) const =0;
00065     virtual const ID &getExternalNodes(void)  =0;       
00066     virtual Node **getNodePtrs(void)  =0;       
00067     virtual int getNumDOF(void) =0;
00068 
00069     // methods dealing with committed state and update
00070     virtual int commitState(void);    
00071     virtual int revertToLastCommit(void) = 0;        
00072     virtual int revertToStart(void);                
00073     virtual int update(void);
00074     virtual bool isSubdomain(void);
00075     
00076     // methods to return the current linearized stiffness,
00077     // damping and mass matrices
00078     virtual const Matrix &getTangentStiff(void) =0;
00079     virtual const Matrix &getInitialStiff(void) =0;
00080     virtual const Matrix &getDamp(void);    
00081     virtual const Matrix &getMass(void);    
00082 
00083     // methods for applying loads
00084     virtual void zeroLoad(void) =0;     
00085     virtual int addLoad(ElementalLoad *theLoad, double loadFactor) =0;
00086     virtual int addInertiaLoadToUnbalance(const Vector &accel) =0;
00087     virtual int setRayleighDampingFactors(double alphaM, double betaK, double betaK0, double betaKc);
00088 
00089     // methods for obtaining resisting force (force includes elemental loads)
00090     virtual const Vector &getResistingForce(void) =0;
00091     virtual const Vector &getResistingForceIncInertia(void);        
00092 
00093     // method for obtaining information specific to an element
00094     virtual Response *setResponse(const char **argv, int argc, 
00095                                   Information &eleInformation, 
00096                                   OPS_Stream &theHandler);
00097     virtual int getResponse(int responseID, Information &eleInformation);
00098     virtual int getResponseSensitivity(int responseID, int gradNumber,
00099                                        Information &eleInformation);
00100 
00101 // AddingSensitivity:BEGIN //////////////////////////////////////////
00102     virtual int addInertiaLoadSensitivityToUnbalance(const Vector &accel, bool tag);
00103     virtual const Vector & getResistingForceSensitivity(int gradNumber);
00104     virtual const Matrix & getInitialStiffSensitivity(int gradNumber);
00105     virtual const Matrix & getDampSensitivity(int gradNumber);
00106     virtual const Matrix & getMassSensitivity(int gradNumber);
00107     virtual int   commitSensitivity(int gradNumber, int numGrads);
00108 // AddingSensitivity:END ///////////////////////////////////////////
00109 
00110     virtual int addResistingForceToNodalReaction(bool inclInertia);
00111 
00112   protected:
00113     const Vector &getRayleighDampingForces(void);
00114 
00115     double alphaM, betaK, betaK0, betaKc;
00116     Matrix *Kc; // pointer to hold last committed matrix if needed for rayleigh damping
00117 
00118   private:
00119     int index, nodeIndex;
00120 
00121     static Matrix ** theMatrices; 
00122     static Vector ** theVectors1; 
00123     static Vector ** theVectors2; 
00124     static int numMatrices;
00125 };
00126 
00127 
00128 #endif
00129 

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