XC Open source finite element analysis program
DOF_Group.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.11 $
48 // $Date: 2005/11/28 21:40:46 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/model/dof_grp/DOF_Group.h,v $
50 
51 
52 #ifndef DOF_Group_h
53 #define DOF_Group_h
54 
55 // File: ~/analysis/model/dof_grp/DOF_Group.h
56 //
57 // Written: fmk
58 // Created: 11/96
59 // Revision: A
60 //
61 // Description: This file contains the class definition for DOF_Group.
62 // A DOF_Group object is instantiated by the ConstraintHandler for
63 // every unconstrained node in the domain. The constrained nodes require
64 // specialised types of DOF_Group; which deal with the constraints. DOF_Group
65 // objects can handle 0 boundary constraints; if the eqn number of a DOF is
66 // less than START_EQN_NUM a value of 0.0 is set for disp, vel and accel when
67 // a setNode*(Vector &) is invoked.
68 //
69 // What: "@(#) DOF_Group.h, revA"
70 
71 #include <utility/matrix/ID.h>
72 #include <utility/tagged/TaggedObject.h>
73 #include <vector>
74 #include "solution/analysis/UnbalAndTangent.h"
75 
76 namespace XC {
77 class Node;
78 class Vector;
79 class Matrix;
80 class TransientIntegrator;
81 class Integrator;
82 
84 //
86 //
94 class DOF_Group: public TaggedObject
95  {
96  private:
97  // private variables - a copy for each object of the class
98  ID myID;
99 
100  // static variables - single copy for all objects of the class
101  static Matrix errMatrix;
102  static Vector errVect;
103  static UnbalAndTangentStorage unbalAndTangentArray;
104  static int numDOF_Groups;
105 
106  void inicID(void);
107  protected:
108  void addLocalM_Force(const Vector &Udotdot, double fact = 1.0);
109 
110  // protected variables - a copy for each object of the class
111  UnbalAndTangent unbalAndTangent;
112  Node *myNode;
113 
114  friend class AnalysisModel;
115  DOF_Group(int tag, Node *myNode);
116  DOF_Group(int tag, int ndof);
117  public:
118  virtual ~DOF_Group();
119 
120  virtual void setID(int dof, int value);
121  virtual void setID(const ID &values);
122  virtual const ID &getID(void) const;
123  int inicID(const int &value);
124 
125  virtual int getNodeTag(void) const;
126  inline virtual int getNumDOF(void) const
127  { return myID.Size(); }
128  virtual int getNumFreeDOF(void) const;
129  virtual int getNumConstrainedDOF(void) const;
130 
131  // methods to form the tangent
132  virtual const Matrix &getTangent(Integrator *theIntegrator);
133  virtual void zeroTangent(void);
134  virtual void addMtoTang(double fact = 1.0);
135  virtual void addCtoTang(double fact = 1.0);
136 
137  // methods to form the unbalance
138  virtual const Vector &getUnbalance(Integrator *theIntegrator);
139  virtual void zeroUnbalance(void);
140  virtual void addPtoUnbalance(double fact = 1.0);
141  virtual void addPIncInertiaToUnbalance(double fact = 1.0);
142  virtual void addM_Force(const Vector &Udotdot, double fact = 1.0);
143 
144  virtual const Vector &getTangForce(const Vector &x, double fact = 1.0);
145  virtual const Vector &getC_Force(const Vector &x, double fact = 1.0);
146  virtual const Vector &getM_Force(const Vector &x, double fact = 1.0);
147 
148  // methods to obtain committed responses from the nodes
149  virtual const Vector & getCommittedDisp(void);
150  virtual const Vector & getCommittedVel(void);
151  virtual const Vector & getCommittedAccel(void);
152 
153  // methods to update the trial response at the nodes
154  virtual void setNodeDisp(const Vector &u);
155  virtual void setNodeVel(const Vector &udot);
156  virtual void setNodeAccel(const Vector &udotdot);
157 
158  virtual void incrNodeDisp(const Vector &u);
159  virtual void incrNodeVel(const Vector &udot);
160  virtual void incrNodeAccel(const Vector &udotdot);
161 
162  // methods to set the eigen vectors
163  virtual void setEigenvector(int mode, const Vector &eigenvalue);
164 
165  // method added for TransformationDOF_Groups
166  virtual Matrix *getT(void);
167 
168 // AddingSensitivity:BEGIN ////////////////////////////////////
169  virtual void addM_ForceSensitivity(const Vector &Udotdot, double fact = 1.0);
170  virtual void addD_ForceSensitivity(const Vector &vel, double fact = 1.0);
171  virtual void addD_Force(const Vector &vel, double fact = 1.0);
172 
173  virtual const Vector & getDispSensitivity(int gradNumber);
174  virtual const Vector & getVelSensitivity(int gradNumber);
175  virtual const Vector & getAccSensitivity(int gradNumber);
176  virtual int saveSensitivity(Vector *v,Vector *vdot,Vector *vdotdot,int gradNum,int numGrads);
177 // AddingSensitivity:END //////////////////////////////////////
178  virtual void Print(std::ostream &, int = 0) {return;};
179  virtual void resetNodePtr(void);
180  };
181 } // end of XC namespace
182 
183 #endif
184 
Vector de fuerza desequilibrada y tangent stiffness matrix.
Definition: UnbalAndTangentStorage.h:42
A DOF_Group object is instantiated by the ConstraintHandler for every unconstrained node in the domai...
Definition: DOF_Group.h:94
Definition: Vector.h:82
virtual const ID & getID(void) const
Method to return the current ID.
Definition: DOF_Group.cpp:158
Mesh node.
Definition: Node.h:99
virtual void setID(int dof, int value)
to set the corresponding index of the ID to value.
Definition: DOF_Group.cpp:139
Vector de fuerza desequilibrada y tangent stiffness matrix.
Definition: UnbalAndTangent.h:40
virtual void incrNodeDisp(const Vector &u)
Method to set the corresponding nodes displacements to the.
Definition: DOF_Group.cpp:513
Definition: ID.h:77
Definition: Matrix.h:82
Object idenfied by an integer (tag).
Definition: TaggedObject.h:82
Los objetos de esta clase, dan acceso a los objetos FE_Element y DOF_Group creados por el Constraint ...
Definition: AnalysisModel.h:113
virtual void Print(std::ostream &, int=0)
Imprime el objeto.
Definition: DOF_Group.h:178
================================================================================
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