xc
ZeroLengthSection.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.6 $
49 // $Date: 2003/02/25 23:33:13 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/zeroLength/ZeroLengthSection.h,v $
51 
52 // Written: MHS
53 // Created: Sept 2000
54 //
55 // Description: This file contains the class definition for ZeroLengthSection.
56 // A ZeroLengthSection element is defined by two nodes with the same coordinate.
57 // A SectionForceDeformation object is associated with the nodes to
58 // provide the basic force-deformation relationship for the element.
59 
60 #ifndef ZeroLengthSection_h
61 #define ZeroLengthSection_h
62 
63 #include "domain/mesh/element/Element0D.h"
64 
65 namespace XC {
66 class Matrix;
67 class Channel;
68 class SectionForceDeformation;
69 class Response;
70 
74 //
93  {
94  private:
95  Matrix A;
96  mutable Vector v;
97 
98  Matrix *K;
99  Vector *P;
100 
101  SectionForceDeformation *theSection;
102  int order;
103 
104  // Class wide matrices for return
105  static Matrix K6;
106  static Matrix K12;
107 
108  // Class wide vectors for return
109  static Vector P6;
110  static Vector P12;
111 
112  // private methods
113  void setTransformation(void);
114  void computeSectionDefs(void) const;
115 
116  void setup_section(const Material *sec);
117  void inicAv(void);
118  void free_mem(void);
119  protected:
120  int sendData(Communicator &);
121  int recvData(const Communicator &);
122  public:
123  ZeroLengthSection(int tag, int dimension, int Nd1, int Nd2, const Vector& x, const Vector& yprime, SectionForceDeformation& theSection);
124  ZeroLengthSection(int tag, int dimension,const Material *theSection);
125  ZeroLengthSection(void);
128  Element *getCopy(void) const;
129  ~ZeroLengthSection(void);
130 
131  void setDomain(Domain *theDomain);
132 
133  inline int getOrder(void) const
134  { return order; }
135 
136  // public methods to set the state of the element
137  int update(void); // added by MSN to allow errors in setting section trial deformation
138  int commitState(void);
139  int revertToLastCommit(void);
140  int revertToStart(void);
141 
143  inline const Matrix &getInternalForcesTransformation(void) const
144  { return A; }
145  void setUpVectors(const Vector &, const Vector &);
146 
147  // public methods to obtain stiffness, mass, damping and residual information
148  const Matrix &getTangentStiff(void) const;
149  const Matrix &getInitialStiff(void) const;
150 
151  void alive(void);
152 
153  int addLoad(ElementalLoad *theLoad, double loadFactor);
154  int addInertiaLoadToUnbalance(const Vector &accel);
155 
156  const Vector &getResistingForce(void) const;
157  const Vector &getResistingForceIncInertia(void) const;
158 
160  Vector getVDirWeakAxisLocalCoord(void) const;
161  double getStrongAxisAngle(void) const;
162  double getWeakAxisAngle(void) const;
163  const Vector &getVDirStrongAxisGlobalCoord(bool initialGeometry) const;
164  const Vector &getVDirWeakAxisGlobalCoord(bool initialGeometry) const;
165 
166  inline SectionForceDeformation *getSection(void)
167  { return theSection; }
168 
169  // public methods for element output
170  int sendSelf(Communicator &);
171  int recvSelf(const Communicator &);
172  void Print(std::ostream &s, int flag =0) const;
173 
174  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
175  int getResponse(int responseID, Information &eleInformation);
176 
177 // AddingSensitivity:BEGIN //////////////////////////////////////////
178  const Vector &getResistingForceSensitivity(int gradIndex);
179  int commitSensitivity(int gradIndex, int numGrads);
180 // AddingSensitivity:END ///////////////////////////////////////////
181  };
182 } // end of XC namespace
183 
184 #endif
185 
186 
187 
188 
void setUpVectors(const Vector &, const Vector &)
Set up the transformation matrix for orientation.
Definition: ZeroLengthSection.cpp:711
ZeroLengthSection & operator=(const ZeroLengthSection &)
Assignment operator.
Definition: ZeroLengthSection.cpp:165
Base class for force deformation section models.
Definition: SectionForceDeformation.h:88
Float vector abstraction.
Definition: Vector.h:94
const Vector & getVDirStrongAxisGlobalCoord(bool initialGeometry) const
Returns the direction vector of element strong axis expressed in the global coordinate system...
Definition: ZeroLengthSection.cpp:485
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: ZeroLengthSection.cpp:535
const Matrix & getInternalForcesTransformation(void) const
Return the matrix that transforms internal forces into element reactions.
Definition: ZeroLengthSection.h:143
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: ZeroLengthSection.cpp:334
Base class for materials.
Definition: Material.h:93
int commitState(void)
Commit state of element by committing state of the section.
Definition: ZeroLengthSection.cpp:296
~ZeroLengthSection(void)
Destructor.
Definition: ZeroLengthSection.cpp:185
double getStrongAxisAngle(void) const
Returns the angle between element strong axis and local XZ plane.
Definition: ZeroLengthSection.cpp:469
int update(void)
Update element state.
Definition: ZeroLengthSection.cpp:277
const Vector & getResistingForce(void) const
Return resisting force vector for element.
Definition: ZeroLengthSection.cpp:400
Base class for the finite elements.
Definition: Element.h:112
void Print(std::ostream &s, int flag=0) const
Prints the element node tags and section model to the stream {em s}.
Definition: ZeroLengthSection.cpp:571
void setDomain(Domain *theDomain)
Set the enclosing domain.
Definition: ZeroLengthSection.cpp:196
const Vector & getResistingForceIncInertia(void) const
Returns the result of getResistingForce() as there is no element mass.
Definition: ZeroLengthSection.cpp:420
int dimension
= 2 or 3 dimensions
Definition: Element0D.h:61
int addInertiaLoadToUnbalance(const Vector &accel)
The element has no mass, so this operation has no effect and returns 0.
Definition: ZeroLengthSection.cpp:391
ZeroLengthSection(void)
Default constructor.
Definition: ZeroLengthSection.cpp:176
int revertToStart(void)
Revert state of element to initial state by reverting to initial state of the section.
Definition: ZeroLengthSection.cpp:326
Vector getVDirStrongAxisLocalCoord(void) const
Returns the direction vector of element strong axis expressed in the local coordinate system...
Definition: ZeroLengthSection.cpp:434
Zero length element with SectionForceDeformation material.
Definition: ZeroLengthSection.h:92
double getWeakAxisAngle(void) const
Returns the angle between element weak axis and local XZ plane.
Definition: ZeroLengthSection.cpp:477
int sendData(Communicator &)
Send members through the communicator argument.
Definition: ZeroLengthSection.cpp:508
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: ZeroLengthSection.cpp:550
int addLoad(ElementalLoad *theLoad, double loadFactor)
The element has no loads, so this operation has no effect and returns 0.
Definition: ZeroLengthSection.cpp:380
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
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:578
Matrix of floats.
Definition: Matrix.h:111
int revertToLastCommit(void)
Revert state of element to last commit by reverting to last committed state of the section...
Definition: ZeroLengthSection.cpp:313
void alive(void)
Reactivates the element.
Definition: ZeroLengthSection.cpp:368
Vector getVDirWeakAxisLocalCoord(void) const
Returns the direction vector of element weak axis expressed in the local coordinate system...
Definition: ZeroLengthSection.cpp:452
Base class for loads over elements.
Definition: ElementalLoad.h:79
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: ZeroLengthSection.cpp:595
const Vector & getVDirWeakAxisGlobalCoord(bool initialGeometry) const
Returns the direction vector of element weak axis expressed in the global coordinate system...
Definition: ZeroLengthSection.cpp:497
Element * getCopy(void) const
Virtual constructor.
Definition: ZeroLengthSection.cpp:181
const Matrix & getInitialStiff(void) const
Return tangent stiffness matrix for element.
Definition: ZeroLengthSection.cpp:356
int recvData(const Communicator &)
Receives members through the communicator argument.
Definition: ZeroLengthSection.cpp:522
Element of dimension 0 (both nodes have the same position).
Definition: Element0D.h:44