xc
Joint2D.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 // $Revision: 1.7 $
49 // $Date: 2004/09/01 04:01:27 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/special/joint/Joint2D.h,v $
51 
52 // Written: Arash & GGD
53 // Created: 03/02
54 // Revision: Arash
55 
56 // Joint2D.h: interface for the Joint2d class.
57 //
59 
60 #ifndef Joint2D_h
61 #define Joint2D_h
62 
63 
64 #include <domain/mesh/element/ElemWithMaterial.h>
65 #include <domain/mesh/element/utils/physical_properties/Joint2DPhysicalProperties.h>
66 #include <utility/matrix/Matrix.h>
67 #include <utility/matrix/Vector.h>
68 #include <utility/matrix/ID.h>
69 #include <domain/domain/Domain.h>
70 
71 namespace XC {
72 class Node;
73 class Response;
74 class DamageModelVector;
75 class SpringModels;
76 
77 
124 class Joint2D: public ElemWithMaterial<5,Joint2DPhysicalProperties>
125  {
126  private:
128  ID InternalConstraints;
129  int numDof, nodeDbTag, dofDbTag;
130  static Matrix K;
131  static Vector V;
132 
133  // AddingSensitivity:BEGIN //////////////////////////////////////////
134  int parameterID;
135  Vector *theLoadSens;
136  // AddingSensitivity:END ///////////////////////////////////////////
137  protected:
138  int sendData(Communicator &);
139  int recvData(const Communicator &);
140  public:
141  Joint2D(void);
142  Joint2D(int tag, int nd1, int nd2, int nd3, int nd4, int IntNodeTag, const SpringModels &springModels, Domain *theDomain, int LrgDisp);
143 
144  Joint2D(int tag, int nd1, int nd2, int nd3, int nd4, int IntNodeTag, const SpringModels &springModels, Domain *theDomain, int LrgDisp, const DamageModelVector &damageModels);
145  Element *getCopy(void) const;
146  ~Joint2D();
147  // methods dealing with domain
148  int getNumDOF(void) const;
149 
150  void setDomain(Domain *theDomain);
151  bool isSubdomain(void) { return false; } ;
152 
153  // methods dealing with committed state and update
154  int update(void);
155  int commitState(void);
156  int revertToLastCommit(void);
157  int revertToStart(void);
158 
159  // methods to return the current linearized stiffness,
160  // damping and mass matrices
161  const Matrix &getTangentStiff(void) const;
162  const Matrix &getInitialStiff(void) const;
163  const Matrix &getDamp(void) const;
164  const Matrix &getMass(void) const;
165 
166  // methods for returning and applying loads
167  //virtual Vector &getUVLoadVector(double q1, double q2);
168  int addLoad(ElementalLoad *theLoad, double loadFactor);
169  int addInertiaLoadToUnbalance(const Vector &accel);
170 
171  const Vector &getResistingForce(void) const;
172  const Vector &getResistingForceIncInertia(void) const;
173 
174  // method for obtaining information specific to an element
175  Response* setResponse(const std::vector<std::string> &argv, Information &eleInformation);
176  int getResponse(int responseID, Information &eleInformation);
177  int sendSelf(Communicator &);
178  int recvSelf(const Communicator &);
179  void Print(std::ostream &s, int flag =0) const;
180 
181  // AddingSensitivity:BEGIN //////////////////////////////////////////
182  int addInertiaLoadSensitivityToUnbalance(const Vector &accel, bool tag);
183  int setParameter(const std::vector<std::string> &argv, Parameter &param);
184  int updateParameter(int parameterID, Information &info);
185  int activateParameter(int parameterID);
186  const Vector & getResistingForceSensitivity(int gradNumber);
187  const Matrix & getKiSensitivity(int gradNumber);
188  const Matrix & getMassSensitivity(int gradNumber);
189  int commitSensitivity(int gradNumber, int numGrads);
190  // AddingSensitivity:END ///////////////////////////////////////////
191 
192  protected:
193  int addMFreedom_Joint(Domain *theDomain, int mpNum, int RnodeID, int CnodeID, int MainDOF, int FixedEnd, int LrgDispFlag );
194 };
195 } // end of XC namespace
196 
197 #endif
int activateParameter(int parameterID)
Activates the parameter identified by parameterID.
Definition: Joint2D.cpp:913
Joint element for two-dimensional problems.
Definition: Joint2D.h:124
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: Joint2D.cpp:595
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: Joint2D.cpp:787
Float vector abstraction.
Definition: Vector.h:94
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: Joint2D.cpp:893
Joint2D(void)
Default constructor.
Definition: Joint2D.cpp:73
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: Joint2D.cpp:558
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: Joint2D.cpp:381
Base class response objects.
Definition: Response.h:81
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: Joint2D.cpp:478
const Matrix & getDamp(void) const
Returns the damping matrix.
Definition: Joint2D.cpp:546
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: Joint2D.cpp:552
Vector of integers.
Definition: ID.h:95
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: Joint2D.cpp:578
int revertToLastCommit(void)
Revert to the last committed state.
Definition: Joint2D.cpp:458
Base class for the finite elements.
Definition: Element.h:112
Response * setResponse(const std::vector< std::string > &argv, Information &eleInformation)
setResponse() is a method invoked to determine if the element will respond to a request for a certain...
Definition: Joint2D.cpp:599
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: Joint2D.cpp:778
int update(void)
Updates the element state.
Definition: Joint2D.cpp:423
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: Joint2D.cpp:769
Spring models for Joint elements.
Definition: SpringModels.h:41
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: Joint2D.cpp:802
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: Joint2D.cpp:636
int commitState(void)
Commit the current element state.
Definition: Joint2D.cpp:447
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int getNumDOF(void) const
return the number of DOF associated with the element.
Definition: Joint2D.cpp:475
Element with material.
Definition: ElemWithMaterial.h:45
Matrix of floats.
Definition: Matrix.h:111
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: Joint2D.cpp:838
bool isSubdomain(void)
Returns true if the element is a subdomain.
Definition: Joint2D.h:151
Parameter.
Definition: Parameter.h:68
int revertToStart(void)
Reverts the element to its initial state.
Definition: Joint2D.cpp:466
Vector of pointers to damage models.
Definition: DamageModelVector.h:46
Element * getCopy(void) const
Virtual constructor.
Definition: Joint2D.cpp:353
Base class for loads over elements.
Definition: ElementalLoad.h:79
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117