XC Open source finite element analysis program
ZeroLengthSection.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.6 $
48 // $Date: 2003/02/25 23:33:13 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/element/zeroLength/ZeroLengthSection.h,v $
50 
51 // Written: MHS
52 // Created: Sept 2000
53 //
54 // Description: This file contains the class definition for ZeroLengthSection.
55 // A ZeroLengthSection element is defined by two nodes with the same coordinate.
56 // A SectionForceDeformation object is associated with the nodes to
57 // provide the basic force-deformation relationship for the element.
58 
59 #ifndef ZeroLengthSection_h
60 #define ZeroLengthSection_h
61 
62 #include "domain/mesh/element/Element0D.h"
63 
64 namespace XC {
65 class Matrix;
66 class Channel;
67 class SectionForceDeformation;
68 class Response;
69 
71 //
73 //
78  {
79  private:
80  Matrix A;
81  mutable Vector v;
82 
83  Matrix *K;
84  Vector *P;
85 
86  SectionForceDeformation *theSection;
87  int order;
88 
89  // Class wide matrices for return
90  static Matrix K6;
91  static Matrix K12;
92 
93  // Class wide vectors for return
94  static Vector P6;
95  static Vector P12;
96 
97  // private methods
98  void setTransformation(void);
99  void computeSectionDefs(void) const;
100 
101  void setup_section(const Material *sec);
102  void inicAv(void);
103  void libera(void);
104  protected:
105  int sendData(CommParameters &);
106  int recvData(const CommParameters &);
107  public:
108  ZeroLengthSection(int tag, int dimension, int Nd1, int Nd2, const Vector& x, const Vector& yprime, SectionForceDeformation& theSection);
109  ZeroLengthSection(int tag, int dimension,const Material *theSection);
110  ZeroLengthSection(void);
113  Element *getCopy(void) const;
114  ~ZeroLengthSection(void);
115 
116  void setDomain(Domain *theDomain);
117 
118  inline int getOrder(void) const
119  { return order; }
120 
121  // public methods to set the state of the element
122  int commitState(void);
123  int revertToLastCommit(void);
124  int revertToStart(void);
125 
127  inline const Matrix &getInternalForcesTransformation(void) const
128  { return A; }
129  void setUpVectors(const Vector &, const Vector &);
130 
131  // public methods to obtain stiffness, mass, damping and residual information
132  const Matrix &getTangentStiff(void) const;
133  const Matrix &getInitialStiff(void) const;
134 
135  int addLoad(ElementalLoad *theLoad, double loadFactor);
136  int addInertiaLoadToUnbalance(const Vector &accel);
137 
138  const Vector &getResistingForce(void) const;
139  const Vector &getResistingForceIncInertia(void) const;
140 
142  Vector getVDirWeakAxisLocalCoord(void) const;
143  double getStrongAxisAngle(void) const;
144  double getWeakAxisAngle(void) const;
145  const Vector &getVDirStrongAxisGlobalCoord(void) const;
146  const Vector &getVDirWeakAxisGlobalCoord(void) const;
147 
148  inline SectionForceDeformation *getSection(void)
149  { return theSection; }
150 
151  // public methods for element output
152  int sendSelf(CommParameters &);
153  int recvSelf(const CommParameters &);
154  void Print(std::ostream &s, int flag =0);
155 
156  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
157  int getResponse(int responseID, Information &eleInformation);
158  };
159 } // end of XC namespace
160 
161 #endif
162 
163 
164 
165 
const Vector & getVDirWeakAxisGlobalCoord(void) const
Returns the direction vector of element weak axis expressed in the global coordinate system...
Definition: ZeroLengthSection.cpp:411
Base class for materials.
Definition: Material.h:85
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: ZeroLengthSection.cpp:463
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
Definition: Vector.h:82
int dimension
= 2 or 3 dimensions
Definition: Element0D.h:61
Zero length element with SectionForceDeformation material.
Definition: ZeroLengthSection.h:77
~ZeroLengthSection(void)
Destructor.
Definition: ZeroLengthSection.cpp:169
const Vector & getResistingForceIncInertia(void) const
Returns the action of the element over its attached nodes. Computes damping matrix.
Definition: ZeroLengthSection.cpp:338
Element * getCopy(void) const
Virtual constructor.
Definition: ZeroLengthSection.cpp:165
ZeroLengthSection & operator=(const ZeroLengthSection &otro)
Assignment operator.
Definition: ZeroLengthSection.cpp:149
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 sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: ZeroLengthSection.cpp:449
double getWeakAxisAngle(void) const
Returns the angle between element weak axis and local XZ plane.
Definition: ZeroLengthSection.cpp:391
Element of dimension 0 (both nodes have the same position).
Definition: Element0D.h:45
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: ZeroLengthSection.cpp:481
ZeroLengthSection(void)
Default constructor.
Definition: ZeroLengthSection.cpp:160
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: ZeroLengthSection.cpp:422
const Matrix & getInternalForcesTransformation(void) const
Return the matrix that transforms internal forces into element reactions.
Definition: ZeroLengthSection.h:127
Definition: Matrix.h:82
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: ZeroLengthSection.cpp:436
double getStrongAxisAngle(void) const
Returns the angle between element strong axis and local XZ plane.
Definition: ZeroLengthSection.cpp:383
int commitState(void)
Consuma el estado of the element.
Definition: ZeroLengthSection.cpp:248
Base class for force deformation section models. Constitutive equations of the section.
Definition: SectionForceDeformation.h:86
const Vector & getVDirStrongAxisGlobalCoord(void) const
Returns the direction vector of element strong axis expressed in the global coordinate system...
Definition: ZeroLengthSection.cpp:399
Vector getVDirStrongAxisLocalCoord(void) const
Returns the direction vector of element strong axis expressed in the local coordinate system...
Definition: ZeroLengthSection.cpp:352
Communication parameters between processes.
Definition: CommParameters.h:65
Vector getVDirWeakAxisLocalCoord(void) const
Returns the direction vector of element weak axis expressed in the local coordinate system...
Definition: ZeroLengthSection.cpp:368
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: Response.h:71
void setUpVectors(const Vector &, const Vector &)
Set up the transformation matrix for orientation.
Definition: ZeroLengthSection.cpp:621
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: ZeroLengthSection.cpp:178