xc
TransformationFE.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.8 $
48 // $Date: 2005/11/28 21:38:40 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/model/fe_ele/transformation/TransformationFE.h,v $
50 
51 
52 #ifndef TransformationFE_h
53 #define TransformationFE_h
54 
55 // Written: fmk
56 // Created: 05/99
57 // Revision: A
58 //
59 // Description: This file contains the class definition for TransformationFE.
60 // TransformationFE objects handle MFreedom_Constraints using the transformation
61 // method T^t K T. SFreedom_Constraints are handled by the TransformationConstraintHandler.
62 //
63 // What: "@(#) TransformationFE.h, revA"
64 
65 #include <solution/analysis/model/fe_ele/FE_Element.h>
66 #include "solution/analysis/UnbalAndTangent.h"
67 
68 namespace XC {
69 class SFreedom_Constraint;
70 class DOF_Group;
71 class TransformationConstraintHandler;
72 
74 //
90  {
91  private:
92  std::vector<DOF_Group *> theDOFs;
93  ID modID;
94  int numGroups;
95  int numTransformedDOF;
96  int numOriginalDOF;
97  UnbalAndTangent unbalAndTangentMod;
98 
99  // static variables - single copy for all objects of the class
100  static UnbalAndTangentStorage unbalAndTangentArrayMod;
101  static std::vector<Matrix *> theTransformations;
102  static int numTransFE;
103  static int transCounter;
104  static int sizeTransformations;
105  static Vector dataBuffer;
106  static Vector localKbuffer;
107  static ID dofData;
108  static int sizeBuffer;
109  protected:
110  int transformResponse(const Vector &modResponse, Vector &unmodResponse);
111 
112  friend class AnalysisModel;
113  TransformationFE(int tag, Element *theElement);
114  public:
115  ~TransformationFE(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 for ele-by-ele strategies
128  virtual const Vector &getTangForce(const Vector &x, double fact = 1.0);
129  virtual const Vector &getK_Force(const Vector &accel, double fcat = 1.0);
130  virtual const Vector &getM_Force(const Vector &accel, double fcat = 1.0);
131  virtual const Vector &getC_Force(const Vector &vel, double fcat = 1.0);
132  virtual void addD_Force(const Vector &vel, double fact = 1.0);
133  virtual void addM_Force(const Vector &accel, double fact = 1.0);
134 
135  const Vector &getLastResponse(void);
136  int addSP(SFreedom_Constraint &theSP);
137 
138  // AddingSensitivity:BEGIN ////////////////////////////////////
139  virtual void addM_ForceSensitivity(int gradNumber, const Vector &vect, double fact = 1.0);
140  virtual void addD_ForceSensitivity(int gradNumber, const Vector &vect, double fact = 1.0);
141  // AddingSensitivity:END //////////////////////////////////////
142 
143  };
144 } // end of XC namespace
145 
146 #endif
147 
148 
149 
150 
virtual const Vector & getResidual(Integrator *theIntegrator)
Computes and returns the residual vector.
Definition: TransformationFE.cpp:298
Unbalanced force vector and tangent stiffness matrix.
Definition: UnbalAndTangentStorage.h:42
Float vector abstraction.
Definition: Vector.h:93
~TransformationFE(void)
Destructor.
Definition: TransformationFE.cpp:139
const Vector & getLastResponse(void)
A method which invokes getLastResponse() on the Integrator object that was last passed as an argument...
Definition: TransformationFE.cpp:740
virtual void addM_Force(const Vector &accel, double fact=1.0)
Adds to the residual the product of elements current mass matrix and a Vector whose values are obtain...
Definition: TransformationFE.cpp:718
Vector of integers.
Definition: ID.h:93
TransformationFE objects handle MFreedom_Constraints using the transformation method T^t K T...
Definition: TransformationFE.h:89
virtual const ID & getID(void) const
Method to return the ID containing equation numbers.
Definition: TransformationFE.cpp:160
Base class for the finite elements.
Definition: Element.h:109
Container for FE_Element and DOF_Group objects created by the constraint handler. ...
Definition: AnalysisModel.h:133
virtual const ID & getDOFtags(void) const
Returns the tags of the associated DOF_Groups.
Definition: TransformationFE.cpp:154
Unbalanced force vector and tangent stiffness matrix.
Definition: UnbalAndTangent.h:40
Single freedom constraint.
Definition: SFreedom_Constraint.h:84
Base class for the objects that performs the integration of physical properties over the domain to fo...
Definition: Integrator.h:99
virtual const Vector & getM_Force(const Vector &accel, double fcat=1.0)
Returns the product of elements current mass matrix and a Vector whose values are obtained by taking ...
Definition: TransformationFE.cpp:473
virtual int setID(void)
Method to set the corresponding index of the ID to value.
Definition: TransformationFE.cpp:164
virtual void addD_Force(const Vector &vel, double fact=1.0)
Adds to the residual the product of elements current damping matrix and a Vector whose values are obt...
Definition: TransformationFE.cpp:699
virtual const Vector & getTangForce(const Vector &x, double fact=1.0)
Returns the product of FE_Elements current tangent matrix and a Vector whose values are obtained by t...
Definition: TransformationFE.cpp:353
Finite element as seen by analysis.
Definition: FE_Element.h:107
virtual const Matrix & getTangent(Integrator *theIntegrator)
Computes and returns the tangent stiffness matrix.
Definition: TransformationFE.cpp:200
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Matrix of floats.
Definition: Matrix.h:108