FE_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/02/08 20:20:00 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/fe_ele/FE_Element.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef FE_Element_h
00027 #define FE_Element_h
00028 
00029 // File: ~/analysis/fe_ele/FE_Element.h
00030 // 
00031 // Written: fmk 
00032 // Created: 11/96
00033 // Revision: A
00034 //
00035 // Description: This file contains the class definition for FE_Element.
00036 //
00037 // What: "@(#) FE_Element.h, revA"
00038 
00039 #include <ID.h>
00040 #include <Matrix.h>
00041 #include <Vector.h>
00042 #include <TaggedObject.h>
00043 
00044 class TransientIntegrator;
00045 class Element;
00046 class Integrator;
00047 class AnalysisModel;
00048 
00049 class FE_Element: public TaggedObject
00050 {
00051   public:
00052     FE_Element(int tag, Element *theElement);
00053     FE_Element(int tag, int numDOF_Group, int ndof);
00054     virtual ~FE_Element();    
00055 
00056     // public methods for setting/obtaining mapping information
00057     virtual const ID &getDOFtags(void) const;
00058     virtual const ID &getID(void) const;
00059     void setAnalysisModel(AnalysisModel &theModel);
00060     virtual int  setID(void);
00061     
00062     // methods to form and obtain the tangent and residual
00063     virtual const Matrix &getTangent(Integrator *theIntegrator);
00064     virtual const Vector &getResidual(Integrator *theIntegrator);
00065 
00066     // methods to allow integrator to build tangent
00067     virtual void  zeroTangent(void);
00068     virtual void  addKtToTang(double fact = 1.0);
00069     virtual void  addKiToTang(double fact = 1.0);
00070     virtual void  addCtoTang(double fact = 1.0);    
00071     virtual void  addMtoTang(double fact = 1.0);    
00072     
00073     // methods to allow integrator to build residual    
00074     virtual void  zeroResidual(void);    
00075     virtual void  addRtoResidual(double fact = 1.0);
00076     virtual void  addRIncInertiaToResidual(double fact = 1.0);    
00077 
00078     // methods for ele-by-ele strategies
00079     virtual const Vector &getTangForce(const Vector &x, double fact = 1.0);
00080     virtual const Vector &getK_Force(const Vector &x, double fact = 1.0);
00081     virtual const Vector &getKi_Force(const Vector &x, double fact = 1.0);
00082     virtual const Vector &getC_Force(const Vector &x, double fact = 1.0);
00083     virtual const Vector &getM_Force(const Vector &x, double fact = 1.0);
00084     virtual void  addM_Force(const Vector &accel, double fact = 1.0);    
00085     virtual void  addD_Force(const Vector &vel, double fact = 1.0);    
00086 
00087     virtual int updateElement(void);
00088 
00089     virtual Integrator *getLastIntegrator(void);
00090     virtual const Vector &getLastResponse(void);
00091     Element *getElement(void);
00092 
00093     virtual void  Print(OPS_Stream&, int = 0) {return;};
00094 
00095     // AddingSensitivity:BEGIN ////////////////////////////////////
00096     virtual void addResistingForceSensitivity(int gradNumber, double fact = 1.0);
00097     virtual void addM_ForceSensitivity       (int gradNumber, const Vector &vect, double fact = 1.0);
00098     virtual void addD_ForceSensitivity       (int gradNumber, const Vector &vect, double fact = 1.0);
00099     virtual int  commitSensitivity           (int gradNum, int numGrads);
00100     // AddingSensitivity:END //////////////////////////////////////
00101     
00102   protected:
00103     void  addLocalM_Force(const Vector &accel, double fact = 1.0);    
00104     void  addLocalD_Force(const Vector &vel, double fact = 1.0);    
00105     void  addLocalM_ForceSensitivity(int gradNumber, const Vector &accel, double fact = 1.0);    
00106     void  addLocalD_ForceSensitivity(int gradNumber, const Vector &vel, double fact = 1.0);    
00107 
00108 
00109     // protected variables - a copy for each object of the class        
00110     ID myDOF_Groups;
00111     ID myID;
00112 
00113   private:
00114     // private variables - a copy for each object of the class    
00115     int numDOF;
00116     AnalysisModel *theModel;
00117     Element *myEle;
00118     Vector *theResidual;
00119     Matrix *theTangent;
00120     Integrator *theIntegrator; // need for Subdomain
00121 
00122     
00123     // static variables - single copy for all objects of the class      
00124     static Matrix errMatrix;
00125     static Vector errVector;
00126     static Matrix **theMatrices; // array of pointers to class wide matrices
00127     static Vector **theVectors;  // array of pointers to class widde vectors
00128     static int numFEs;           // number of objects
00129     
00130 
00131 };
00132 
00133 #endif
00134 
00135 

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