XC Open source finite element analysis program
Joint2D.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.7 $
48 // $Date: 2004/09/01 04:01:27 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/element/special/joint/Joint2D.h,v $
50 
51 // Written: Arash & GGD
52 // Created: 03/02
53 // Revision: Arash
54 
55 // Joint2D.h: interface for the Joint2d class.
56 //
58 
59 #ifndef Joint2D_h
60 #define Joint2D_h
61 
62 
63 #include <domain/mesh/element/ElemWithMaterial.h>
64 #include <domain/mesh/element/utils/physical_properties/Joint2DPhysicalProperties.h>
65 #include <utility/matrix/Matrix.h>
66 #include <utility/matrix/Vector.h>
67 #include <utility/matrix/ID.h>
68 #include <domain/domain/Domain.h>
69 
70 namespace XC {
71 class Node;
72 class UniaxialMaterial;
73 class Response;
74 class DamageModel;
75 
77 //
79 class Joint2D : public ElemWithMaterial<5,Joint2DPhysicalProperties>
80  {
81  private:
83  DamageModel *theDamages[5];
84  ID InternalConstraints;
85  int numDof, nodeDbTag, dofDbTag;
86  static Matrix K;
87  static Vector V;
88 
89  // AddingSensitivity:BEGIN //////////////////////////////////////////
90  int parameterID;
91  Vector *theLoadSens;
92  // AddingSensitivity:END ///////////////////////////////////////////
93  protected:
94  int sendData(CommParameters &);
95  int recvData(const CommParameters &);
96  public:
97  Joint2D(void);
98  Joint2D(int tag, int nd1, int nd2, int nd3, int nd4, int IntNodeTag, const UniaxialMaterial &spring1, const UniaxialMaterial &spring2, const UniaxialMaterial &spring3, const UniaxialMaterial &spring4, const UniaxialMaterial &springC, Domain *theDomain, int LrgDisp);
99 
100  Joint2D(int tag, int nd1, int nd2, int nd3, int nd4, int IntNodeTag, const UniaxialMaterial &spring1, const UniaxialMaterial &spring2, const UniaxialMaterial &spring3, const UniaxialMaterial &spring4, const UniaxialMaterial &springC, Domain *theDomain, int LrgDisp, const DamageModel &dmg1, const DamageModel &dmg2, const DamageModel &dmg3, const DamageModel &dmg4, const DamageModel &dmgC);
101  Element *getCopy(void) const;
102  ~Joint2D();
103  // methods dealing with domain
104  int getNumDOF(void) const;
105 
106  void setDomain(Domain *theDomain);
107  bool isSubdomain(void) { return false; } ;
108 
109  // methods dealing with committed state and update
110  int update(void);
111  int commitState(void);
112  int revertToLastCommit(void);
113  int revertToStart(void);
114 
115  // methods to return the current linearized stiffness,
116  // damping and mass matrices
117  const Matrix &getTangentStiff(void) const;
118  const Matrix &getInitialStiff(void) const;
119  const Matrix &getDamp(void) const;
120  const Matrix &getMass(void) const;
121 
122  // methods for returning and applying loads
123  //virtual Vector &getUVLoadVector(double q1, double q2);
124  int addLoad(ElementalLoad *theLoad, double loadFactor);
125  int addInertiaLoadToUnbalance(const Vector &accel);
126 
127  const Vector &getResistingForce(void) const;
128  const Vector &getResistingForceIncInertia(void) const;
129 
130  // method for obtaining information specific to an element
131  Response* setResponse(const std::vector<std::string> &argv, Information &eleInformation);
132  int getResponse(int responseID, Information &eleInformation);
133  int sendSelf(CommParameters &);
134  int recvSelf(const CommParameters &);
135  void Print(std::ostream &s, int flag =0);
136 
137  // AddingSensitivity:BEGIN //////////////////////////////////////////
138  int addInertiaLoadSensitivityToUnbalance(const Vector &accel, bool tag);
139  int setParameter(const std::vector<std::string> &argv, Parameter &param);
140  int updateParameter(int parameterID, Information &info);
141  int activateParameter(int parameterID);
142  const Vector & getResistingForceSensitivity(int gradNumber);
143  const Matrix & getKiSensitivity(int gradNumber);
144  const Matrix & getMassSensitivity(int gradNumber);
145  int commitSensitivity(int gradNumber, int numGrads);
146  // AddingSensitivity:END ///////////////////////////////////////////
147 
148  protected:
149  int addMFreedom_Joint(Domain *theDomain, int mpNum, int RnodeID, int CnodeID, int MainDOF, int FixedEnd, int LrgDispFlag );
150 };
151 } // end of XC namespace
152 
153 #endif
int update(void)
Actualiza el estado of the element.
Definition: Joint2D.cpp:404
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: Joint2D.cpp:782
Element with material.
Definition: ElemWithMaterial.h:40
const Vector & getResistingForceIncInertia(void) const
Returns the action of the element over its attached nodes. Computes damping matrix.
Definition: Joint2D.cpp:576
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
Definition: Vector.h:82
Definition: DamageModel.h:87
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: Joint2D.cpp:533
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: Joint2D.cpp:539
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: Joint2D.cpp:365
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: Joint2D.cpp:750
Information about an element.
Definition: Information.h:80
Base calass for the finite elements.
Definition: Element.h:104
Base class for loads over elements.
Definition: ElementalLoad.h:73
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: Joint2D.cpp:759
Definition: ID.h:77
const Matrix & getDamp(void) const
Returns the matriz de amortiguamiento.
Definition: Joint2D.cpp:527
Definition: Matrix.h:82
Definition: Parameter.h:65
Communication parameters between processes.
Definition: CommParameters.h:65
2D joint element.
Definition: Joint2D.h:79
================================================================================
Definition: ContinuaReprComponent.h:34
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: Joint2D.cpp:768
Definition: Response.h:71
int commitState(void)
Consuma el estado of the element.
Definition: Joint2D.cpp:428
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:88
Element * getCopy(void) const
Virtual constructor.
Definition: Joint2D.cpp:337