xc
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 
73 //
92  {
93  private:
94  Matrix A;
95  mutable Vector v;
96 
97  Matrix *K;
98  Vector *P;
99 
100  SectionForceDeformation *theSection;
101  int order;
102 
103  // Class wide matrices for return
104  static Matrix K6;
105  static Matrix K12;
106 
107  // Class wide vectors for return
108  static Vector P6;
109  static Vector P12;
110 
111  // private methods
112  void setTransformation(void);
113  void computeSectionDefs(void) const;
114 
115  void setup_section(const Material *sec);
116  void inicAv(void);
117  void free_mem(void);
118  protected:
119  int sendData(CommParameters &);
120  int recvData(const CommParameters &);
121  public:
122  ZeroLengthSection(int tag, int dimension, int Nd1, int Nd2, const Vector& x, const Vector& yprime, SectionForceDeformation& theSection);
123  ZeroLengthSection(int tag, int dimension,const Material *theSection);
124  ZeroLengthSection(void);
127  Element *getCopy(void) const;
128  ~ZeroLengthSection(void);
129 
130  void setDomain(Domain *theDomain);
131 
132  inline int getOrder(void) const
133  { return order; }
134 
135  // public methods to set the state of the element
136  int commitState(void);
137  int revertToLastCommit(void);
138  int revertToStart(void);
139 
141  inline const Matrix &getInternalForcesTransformation(void) const
142  { return A; }
143  void setUpVectors(const Vector &, const Vector &);
144 
145  // public methods to obtain stiffness, mass, damping and residual information
146  const Matrix &getTangentStiff(void) const;
147  const Matrix &getInitialStiff(void) const;
148 
149  int addLoad(ElementalLoad *theLoad, double loadFactor);
150  int addInertiaLoadToUnbalance(const Vector &accel);
151 
152  const Vector &getResistingForce(void) const;
153  const Vector &getResistingForceIncInertia(void) const;
154 
156  Vector getVDirWeakAxisLocalCoord(void) const;
157  double getStrongAxisAngle(void) const;
158  double getWeakAxisAngle(void) const;
159  const Vector &getVDirStrongAxisGlobalCoord(bool initialGeometry) const;
160  const Vector &getVDirWeakAxisGlobalCoord(bool initialGeometry) const;
161 
162  inline SectionForceDeformation *getSection(void)
163  { return theSection; }
164 
165  // public methods for element output
166  int sendSelf(CommParameters &);
167  int recvSelf(const CommParameters &);
168  void Print(std::ostream &s, int flag =0);
169 
170  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
171  int getResponse(int responseID, Information &eleInformation);
172  };
173 } // end of XC namespace
174 
175 #endif
176 
177 
178 
179 
void setUpVectors(const Vector &, const Vector &)
Set up the transformation matrix for orientation.
Definition: ZeroLengthSection.cpp:671
ZeroLengthSection & operator=(const ZeroLengthSection &)
Assignment operator.
Definition: ZeroLengthSection.cpp:164
Base class for force deformation section models.
Definition: SectionForceDeformation.h:86
Float vector abstraction.
Definition: Vector.h:93
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: ZeroLengthSection.cpp:510
const Vector & getVDirStrongAxisGlobalCoord(bool initialGeometry) const
Returns the direction vector of element strong axis expressed in the global coordinate system...
Definition: ZeroLengthSection.cpp:445
Information about an element.
Definition: Information.h:80
Definition: Response.h:71
const Matrix & getInternalForcesTransformation(void) const
Return the matrix that transforms internal forces into element reactions.
Definition: ZeroLengthSection.h:141
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: ZeroLengthSection.cpp:307
Base class for materials.
Definition: Material.h:91
int commitState(void)
Commit state of element by commiting state of the section.
Definition: ZeroLengthSection.cpp:276
~ZeroLengthSection(void)
Destructor.
Definition: ZeroLengthSection.cpp:184
double getStrongAxisAngle(void) const
Returns the angle between element strong axis and local XZ plane.
Definition: ZeroLengthSection.cpp:429
const Vector & getResistingForce(void) const
Return resisting force vector for element.
Definition: ZeroLengthSection.cpp:360
Base class for the finite elements.
Definition: Element.h:109
void setDomain(Domain *theDomain)
Set the enclosing domain.
Definition: ZeroLengthSection.cpp:195
const Vector & getResistingForceIncInertia(void) const
Returns the result of getResistingForce() as there is no element mass.
Definition: ZeroLengthSection.cpp:380
int dimension
= 2 or 3 dimensions
Definition: Element0D.h:59
void Print(std::ostream &s, int flag=0)
Prints the element node tags and section model to the stream {em s}.
Definition: ZeroLengthSection.cpp:531
int addInertiaLoadToUnbalance(const Vector &accel)
The element has no mass, so this operation has no effect and returns 0.
Definition: ZeroLengthSection.cpp:351
ZeroLengthSection(void)
Default constructor.
Definition: ZeroLengthSection.cpp:175
int revertToStart(void)
Revert state of element to initial sate by reverting to initial state of the section.
Definition: ZeroLengthSection.cpp:301
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: ZeroLengthSection.cpp:495
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: ZeroLengthSection.cpp:468
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: ZeroLengthSection.cpp:482
Vector getVDirStrongAxisLocalCoord(void) const
Returns the direction vector of element strong axis expressed in the local coordinate system...
Definition: ZeroLengthSection.cpp:394
Zero length element with SectionForceDeformation material.
Definition: ZeroLengthSection.h:91
double getWeakAxisAngle(void) const
Returns the angle between element weak axis and local XZ plane.
Definition: ZeroLengthSection.cpp:437
int addLoad(ElementalLoad *theLoad, double loadFactor)
The element has no loads, so this operation has no effect and returns 0.
Definition: ZeroLengthSection.cpp:341
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
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: ZeroLengthSection.cpp:538
Communication parameters between processes.
Definition: CommParameters.h:65
Matrix of floats.
Definition: Matrix.h:108
int revertToLastCommit(void)
Revert state of element to last commit by reverting to last committed state of the section...
Definition: ZeroLengthSection.cpp:293
Vector getVDirWeakAxisLocalCoord(void) const
Returns the direction vector of element weak axis expressed in the local coordinate system...
Definition: ZeroLengthSection.cpp:412
Base class for loads over elements.
Definition: ElementalLoad.h:77
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:116
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: ZeroLengthSection.cpp:555
const Vector & getVDirWeakAxisGlobalCoord(bool initialGeometry) const
Returns the direction vector of element weak axis expressed in the global coordinate system...
Definition: ZeroLengthSection.cpp:457
Element * getCopy(void) const
Virtual constructor.
Definition: ZeroLengthSection.cpp:180
const Matrix & getInitialStiff(void) const
Return tangent stiffness matrix for element.
Definition: ZeroLengthSection.cpp:329
Element of dimension 0 (both nodes have the same position).
Definition: Element0D.h:43