xc
ForceBeamColumn2d.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/10/06 18:37:50 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/element/forceBeamColumn/ForceBeamColumn2d.h,v $
50 
51 #ifndef ForceBeamColumn2d_h
52 #define ForceBeamColumn2d_h
53 
54 #include <domain/mesh/element/truss_beam_column/NLForceBeamColumn2dBase.h>
55 #include <utility/matrix/Matrix.h>
56 #include <utility/matrix/Vector.h>
57 
58 namespace XC {
59 class Response;
60 class ElementalLoad;
61 class BeamIntegration;
62 class PrismaticBarCrossSection;
63 
67 //
71  {
72  private:
73  // internal data
74  BeamIntegration *beamIntegr;
75  FVectorBeamColumn2d v0; // Initial deformations due to element loads
76 
77  // following are added for subdivision of displacement increment
78  int maxSubdivisions; // maximum number of subdivisons of dv for local iterations
79 
80  void free_mem(void);
81  void alloc(const BeamIntegration &);
82 
83  protected:
84  int sendData(CommParameters &);
85  int recvData(const CommParameters &);
86  public:
87  ForceBeamColumn2d(int tag= 0);
89  ForceBeamColumn2d(int tag,int numSec,const Material *theSection,const CrdTransf *trf,const BeamIntegration *integ);
90  ForceBeamColumn2d(int tag, int nodeI, int nodeJ,
91  int numSections,const std::vector<PrismaticBarCrossSection *> &,
92  BeamIntegration &beamIntegr,
93  CrdTransf2d &coordTransf, double rho = 0.0,
94  int maxNumIters = 10, double tolerance = 1.0e-12);
96  Element *getCopy(void) const;
97  virtual ~ForceBeamColumn2d(void);
98 
99  void setDomain(Domain *theDomain);
100  int commitState(void);
101  int revertToLastCommit(void);
102  int revertToStart(void);
103  int update(void);
104 
105  const Matrix &getInitialStiff(void) const;
106  const Matrix &getMass(void) const;
107 
108  void zeroLoad(void);
109  int addLoad(ElementalLoad *theLoad, double loadFactor);
110  int addInertiaLoadToUnbalance(const Vector &accel);
111 
112  const Vector &getResistingForceIncInertia(void) const;
113 
114  int sendSelf(CommParameters &);
115  int recvSelf(const CommParameters &);
116 
117  friend std::ostream &operator<<(std::ostream &s, ForceBeamColumn2d &E);
118  void Print(std::ostream &s, int flag =0);
119 
120  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
121  int getResponse(int responseID, Information &eleInformation);
122 
123  int setParameter(const std::vector<std::string> &argv, Parameter &param);
124  int updateParameter(int parameterID, Information &info);
125 
126 
127 
128  protected:
129  void setSectionPointers(const std::vector<PrismaticBarCrossSection *> &);
130  int getInitialFlexibility(Matrix &fe) const;
131 
132  private:
133  void getForceInterpolatMatrix(double xi, Matrix &b, const ID &code);
134  void getDistrLoadInterpolatMatrix(double xi, Matrix &bp, const ID &code);
135  void compSectionDisplacements(std::vector<Vector> &,std::vector<Vector> &) const;
136  };
137 
138 std::ostream &operator<<(std::ostream &, ForceBeamColumn2d &);
139 } // end of XC namespace
140 
141 #endif
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: ForceBeamColumn2d.cpp:1216
Float vector abstraction.
Definition: Vector.h:93
Information about an element.
Definition: Information.h:80
Definition: Response.h:71
virtual ~ForceBeamColumn2d(void)
Destructor.
Definition: ForceBeamColumn2d.cpp:187
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:87
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: ForceBeamColumn2d.cpp:1270
int recvSelf(const CommParameters &)
Send the object.
Definition: ForceBeamColumn2d.cpp:944
Base class for materials.
Definition: Material.h:91
Vector of integers.
Definition: ID.h:93
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: ForceBeamColumn2d.cpp:1376
Base class for the finite elements.
Definition: Element.h:109
Force based 2D beam column element with PrismaticBarCrossSection type nonlinear material.
Definition: ForceBeamColumn2d.h:70
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: ForceBeamColumn2d.cpp:910
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:77
double rho
mass density per unit length
Definition: NLForceBeamColumn2dBase.h:54
void Print(std::ostream &s, int flag=0)
Prints element information in the stream being passed as parameter.
Definition: ForceBeamColumn2d.cpp:1127
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: ForceBeamColumn2d.cpp:920
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: ForceBeamColumn2d.cpp:793
ForceBeamColumn2d & operator=(const ForceBeamColumn2d &)
Assignment operator.
Definition: ForceBeamColumn2d.cpp:136
int revertToLastCommit(void)
Revert to the last commited state.
Definition: ForceBeamColumn2d.cpp:251
Base class for integration on beam elements.
Definition: BeamIntegration.h:73
int sendSelf(CommParameters &)
Send the object.
Definition: ForceBeamColumn2d.cpp:930
Definition: NLForceBeamColumn2dBase.h:43
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: ForceBeamColumn2d.cpp:1456
int addLoad(ElementalLoad *theLoad, double loadFactor)
Calcula la respuesta of the element a the load being passed as parameter.
Definition: ForceBeamColumn2d.cpp:811
int revertToStart(void)
Reverts the element to its initial state.
Definition: ForceBeamColumn2d.cpp:284
Internal forces for a beam-column 2D element.
Definition: FVectorBeamColumn2d.h:40
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: ForceBeamColumn2d.cpp:190
const Vector & getResistingForceIncInertia(void) const
Returns the actions of the element over the nodes including inertial ones.
Definition: ForceBeamColumn2d.cpp:875
void zeroLoad(void)
Zeroes loads on element.
Definition: ForceBeamColumn2d.cpp:802
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
int update(void)
Updates the element state.
Definition: ForceBeamColumn2d.cpp:335
int commitState(void)
Commit the current element state.
Definition: ForceBeamColumn2d.cpp:218
Communication parameters between processes.
Definition: CommParameters.h:65
int addInertiaLoadToUnbalance(const Vector &accel)
Add the inertial loads to the unbalanced load vector.
Definition: ForceBeamColumn2d.cpp:850
Matrix of floats.
Definition: Matrix.h:108
Definition: Parameter.h:65
Base class for loads over elements.
Definition: ElementalLoad.h:77
Element * getCopy(void) const
Virtual constructor.
Definition: ForceBeamColumn2d.cpp:183
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:116