XC Open source finite element analysis program
FE_Element.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.13 $
48 // $Date: 2005/11/29 22:46:50 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/model/fe_ele/FE_Element.h,v $
50 
51 
52 #ifndef FE_Element_h
53 #define FE_Element_h
54 
55 // File: ~/analysis/model/fe_ele/FE_Element.h
56 //
57 // Written: fmk
58 // Created: 11/96
59 // Revision: A
60 //
61 // Description: This file contains the class definition for FE_Element.
62 //
63 // What: "@(#) FE_Element.h, revA"
64 
65 #include <utility/tagged/TaggedObject.h>
66 #include "utility/matrix/ID.h"
67 #include "solution/analysis/UnbalAndTangent.h"
68 
69 namespace XC {
70 class TransientIntegrator;
71 class Element;
72 class Vector;
73 class Matrix;
74 class Integrator;
75 class AnalysisModel;
76 
78 //
80 //
82 //
84 class FE_Element: public TaggedObject
85  {
86  private:
87  int numDOF;
88  UnbalAndTangent unbalAndTangent;
89  AnalysisModel *theModel;
90  Element *myEle;
91  Integrator *theIntegrator; // need for Subdomain
92 
93  // static variables - single copy for all objects of the class
94  static Matrix errMatrix;
95  static Vector errVector;
96  static UnbalAndTangentStorage unbalAndTangentArray;
97  static int numFEs;
98  void set_pointers(void);
99 
100  protected:
101  void addLocalM_Force(const Vector &accel, double fact = 1.0);
102  void addLocalD_Force(const Vector &vel, double fact = 1.0);
103  void addLocalM_ForceSensitivity(int gradNumber, const Vector &accel, double fact = 1.0);
104  void addLocalD_ForceSensitivity(int gradNumber, const Vector &vel, double fact = 1.0);
105 
106 
107  // protected variables - a copy for each object of the class
108  ID myDOF_Groups;
109  ID myID;
110 
111  friend class AnalysisModel;
112  FE_Element(int tag, Element *theElement);
113  FE_Element(int tag, int numDOF_Group, int ndof);
114  public:
115  virtual ~FE_Element(void);
116 
117  // public methods for setting/obtaining mapping information
118  virtual const ID &getDOFtags(void) const;
119  virtual const ID &getID(void) const;
120  void setAnalysisModel(AnalysisModel &theModel);
121  virtual int setID(void);
122 
123  // methods to form and obtain the tangent and residual
124  virtual const Matrix &getTangent(Integrator *theIntegrator);
125  virtual const Vector &getResidual(Integrator *theIntegrator);
126 
127  // methods to allow integrator to build tangent
128  virtual void zeroTangent(void);
129  virtual void addKtToTang(double fact = 1.0);
130  virtual void addKiToTang(double fact = 1.0);
131  virtual void addCtoTang(double fact = 1.0);
132  virtual void addMtoTang(double fact = 1.0);
133 
134  // methods to allow integrator to build residual
135  virtual void zeroResidual(void);
136  virtual void addRtoResidual(double fact = 1.0);
137  virtual void addRIncInertiaToResidual(double fact = 1.0);
138 
139  // methods for ele-by-ele strategies
140  virtual const Vector &getTangForce(const Vector &x, double fact = 1.0);
141  virtual const Vector &getK_Force(const Vector &x, double fact = 1.0);
142  virtual const Vector &getC_Force(const Vector &x, double fact = 1.0);
143  virtual const Vector &getM_Force(const Vector &x, double fact = 1.0);
144  virtual void addM_Force(const Vector &accel, double fact = 1.0);
145  virtual void addD_Force(const Vector &vel, double fact = 1.0);
146 
147  virtual int updateElement(void);
148 
149  virtual Integrator *getLastIntegrator(void);
150  virtual const Vector &getLastResponse(void);
151  Element *getElement(void);
152 
153  virtual void Print(std::ostream &, int = 0) {return;};
154 
155  // AddingSensitivity:BEGIN ////////////////////////////////////
156  virtual void addResistingForceSensitivity(int gradNumber, double fact = 1.0);
157  virtual void addM_ForceSensitivity(int gradNumber, const Vector &vect, double fact = 1.0);
158  virtual void addD_ForceSensitivity(int gradNumber, const Vector &vect, double fact = 1.0);
159  virtual int commitSensitivity(int gradNum, int numGrads);
160  // AddingSensitivity:END //////////////////////////////////////
161 
162  };
163 } // end of XC namespace
164 
165 #endif
166 
167 
Vector de fuerza desequilibrada y tangent stiffness matrix.
Definition: UnbalAndTangentStorage.h:42
Definition: Vector.h:82
Finite element as seen by analysis.
Definition: FE_Element.h:84
Vector de fuerza desequilibrada y tangent stiffness matrix.
Definition: UnbalAndTangent.h:40
virtual const Matrix & getTangent(Integrator *theIntegrator)
Return the matriz tangente que le indica el objeto Integrator.
Definition: FE_Element.cpp:231
Base calass for the finite elements.
Definition: Element.h:104
Definition: ID.h:77
Definition: Matrix.h:82
Object idenfied by an integer (tag).
Definition: TaggedObject.h:82
virtual void Print(std::ostream &, int=0)
Imprime el objeto.
Definition: FE_Element.h:153
Los objetos de esta clase, dan acceso a los objetos FE_Element y DOF_Group creados por el Constraint ...
Definition: AnalysisModel.h:113
virtual ~FE_Element(void)
destructor.
Definition: FE_Element.cpp:169
virtual const Vector & getResidual(Integrator *theIntegrator)
Returns the vector residuo que le indica el objeto Integrator.
Definition: FE_Element.cpp:258
================================================================================
Definition: ContinuaReprComponent.h:34
Base class for the object that performs the integration of physical properties over the domain to for...
Definition: Integrator.h:91