XC Open source finite element analysis program
fElement.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.4 $
48 // $Date: 2003/02/14 23:01:08 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/element/special/feap/fElement.h,v $
50 
51 
52 #ifndef fElement_h
53 #define fElement_h
54 
55 // File: ~/element/fortran/fElement.h
56 //
57 // Written: fmk
58 // Created: 03/99
59 // Revision: A
60 //
61 // Description: This file contains the class definition for fElement. fElement
62 // is a wrapper used to call fortran element subroutine. It is an abstract class.
63 //
64 // What: "@(#) fElement.h, revA"
65 
66 #include "domain/mesh/element/Element.h"
67 #include "domain/mesh/element/utils/NodePtrs.h"
68 
69 namespace XC {
70 class Node;
71 class Channel;
72 class UniaxialMaterial;
73 
78 //
81 class fElement : public Element
82  {
83  private:
84  // private attributes - a copy for each object of the class
85  double *h;
86  NodePtrs theNodes;
87  double *u;
88  double *d;
89  int eleType;
90  int ndf;
91  int nen;
92  int ndm;
93  int nh1, nh3;
94  int nrCount;
95 
96  Matrix *Ki;
97 
98  // static data - single copy for all objects of the class
99  static std::vector<Matrix *> fElementM; // class wide matrices - use s array
100  static std::vector<Vector *> fElementV; // class wide vectors - use r array
101  static std::vector<double> s; // element tangent (nst x nst)
102  static std::vector<double> r; // element residual (ndf x nen) == (nst)
103  static std::vector<double> ul; // nodal responses (ndf x nen x 5) == (nst X 5)
104  static std::vector<double> xl; // nodal coordinates (ndf x nen) == (nst)
105  static std::vector<double> tl; // nodal temp (nen)
106  static std::vector<int> ix; // nodal tags (nen)
107  static int numfElements;
108  protected:
109  // protected methods
110  virtual int invokefRoutine(int ior, int iow, double *ctan, int isw);
111  virtual int readyfRoutine(bool incInertia);
112  virtual int invokefInit(int isw, int iow);
113 
114  // protected data
115  Vector feapData;
116  ID connectedNodes;
117  public:
118  // constructors
119  fElement(int tag,
120  int classTag,
121  int eleType,
122  int sizeD, int nen,
123  int ndm, int ndf,
124  int nh1, int nh3);
125 
126  fElement(int tag,
127  int classTag,
128  int eleType,
129  int sizeD, int nen,
130  int ndm, int ndf, int iow);
131 
132  fElement(int classTag);
133 
134  // destructor
135  virtual ~fElement();
136 
137  // public methods for element operations
138  virtual int getNumExternalNodes(void) const;
139  virtual const ID &getExternalNodes(void) const;
140 
141  virtual int getNumDOF(void) const;
142  virtual void setDomain(Domain *theDomain);
143 
144  virtual int commitState(void);
145  virtual int revertToLastCommit(void);
146  virtual int revertToStart(void);
147  virtual int update(void);
148 
149  virtual const Matrix &getTangentStiff(void) const;
150  const Matrix &getInitialStiff(void) const;
151  virtual const Matrix &getDamp(void) const;
152  virtual const Matrix &getMass(void) const;
153 
154  virtual void zeroLoad(void);
155  virtual int addLoad(ElementalLoad *theLoad, double loadFactor);
156  virtual int addInertiaLoadToUnbalance(const Vector &accel);
157 
158  virtual const Vector &getResistingForce(void) const;
159  virtual const Vector &getResistingForceIncInertia(void) const;
160 
161  // public methods for output
162  virtual int sendSelf(CommParameters &);
163  virtual int recvSelf(const CommParameters &);
164  virtual void Print(std::ostream &s, int flag =0);
165  };
166 } // end of XC namespace
167 
168 #endif
169 
170 
171 
172 
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
virtual void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: fElement.cpp:645
Definition: Vector.h:82
virtual const Matrix & getDamp(void) const
Returns the matriz de amortiguamiento.
Definition: fElement.cpp:428
Wrapper used to call fortran element subroutines from FEAP.
Definition: fElement.h:81
virtual int commitState(void)
Consuma el estado of the element.
Definition: fElement.cpp:350
Base calass for the finite elements.
Definition: Element.h:104
Base class for loads over elements.
Definition: ElementalLoad.h:73
Definition: ID.h:77
Pointers to nodes.
Definition: NodePtrs.h:54
virtual int update(void)
Actualiza el estado of the element.
Definition: fElement.cpp:929
Definition: Matrix.h:82
virtual const Vector & getResistingForceIncInertia(void) const
Returns the action of the element over its attached nodes. Computes damping matrix.
Definition: fElement.cpp:588
virtual void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: fElement.cpp:255
virtual const Matrix & getMass(void) const
Returns the mass matrix.
Definition: fElement.cpp:468
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
virtual void zeroLoad(void)
Anula el load vector aplicadas of the element.