xc
NLBeamColumn2d.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.16 $
49 // $Date: 2004/06/07 23:42:46 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/nonlinearBeamColumn/element/NLBeamColumn2d.h,v $
51 
52 
53 // File: ~/model/element/NLBeamColumn2d.h
54 //
55 // Written by Remo Magalhaes de Souza on 09/98
56 // Revised: rms 10/98 (uses section class)
57 // rms 01/99 (with distributed loads)
58 // rms 07/99 (using setDomain)
59 // rms 08/99 (included P-Delta effect)
60 // fmk 10/99 setResponse() & getResponse()
61 // rms 11/99 (included rigid joint offsets)
62 // rms 04/00 (using transformation class w/ linear or corotational transf)
63 // rms 04/00 (generalized to iterative/non-iterative algorithm)
64 // mhs 06/00 (using new section class w/ variable dimensions)
65 // rms 06/00 (torsional stiffness considered at the section level)
66 // rms 06/00 (making copy of the sections)
67 // rms 06/00 (storing section history variables at the element level)
68 //
69 //
70 // Purpose: This file contains the class definition for NLBeamColumn2d.
71 // NLBeamColumn2d is a materially nonlinear flexibility based frame element.
72 
73 #ifndef NLBeamColumn2d_h
74 #define NLBeamColumn2d_h
75 
76 #include <domain/mesh/element/truss_beam_column/NLForceBeamColumn2dBase.h>
77 #include <utility/matrix/Matrix.h>
78 #include <utility/matrix/Vector.h>
79 #include <material/section/PrismaticBarCrossSection.h>
80 #include <domain/mesh/element/truss_beam_column/nonlinearBeamColumn/quadrule/GaussLobattoQuadRule1d01.h>
81 
82 namespace XC {
83 class Response;
84 class CrdTransf2d;
85 
89 //
93  {
94  int maxSubdivisions;
95  // internal data
96  // THESE SHOULD BE REMOVED!!! -- MHS
97  double cosTheta, sinTheta; // cossine directors
98  private:
99  void getGlobalDispls(Vector &dg) const;
100  void getGlobalAccels(Vector &ag) const;
101  void getForceInterpolatMatrix(double xi, Matrix &b, const ID &code);
102  void getDistrLoadInterpolatMatrix(double xi, Matrix &bp, const ID &code);
103  void compSectionDisplacements(std::vector<Vector> &,std::vector<Vector> &) const;
104 
105  static GaussLobattoQuadRule1d01 quadRule;
106 
107  protected:
108  int sendData(Communicator &);
109  int recvData(const Communicator &);
110  public:
111  NLBeamColumn2d(int tag= 0);
112  NLBeamColumn2d(int tag,int numSec,const Material *theSection,const CrdTransf *coordTransf);
113  NLBeamColumn2d(int tag, int nodeI, int nodeJ,
114  int numSections,const std::vector<PrismaticBarCrossSection *> &,
115  CrdTransf2d &coordTransf, double massDensPerUnitLength = 0.0,
116  int maxNumIters = 10, double tolerance = 1e-12, int maxSub = 10);
117  Element *getCopy(void) const;
118 
119  void setDomain(Domain *theDomain);
120 
121  int commitState(void);
122  int revertToLastCommit(void);
123  int revertToStart(void);
124  int update(void);
125 
126  const Matrix &getInitialStiff(void) const;
127  const Matrix &getMass(void) const;
128 
129  void zeroLoad(void);
130  int addLoad(ElementalLoad *, double loadFactor);
131  int addInertiaLoadToUnbalance(const Vector &accel);
132 
133 
134  const Vector &getResistingForceIncInertia(void) const;
135 
136  bool isSubdomain(void);
137 
138  int sendSelf(Communicator &);
139  int recvSelf(const Communicator &);
140 
141  friend std::ostream &operator<<(std::ostream &, const NLBeamColumn2d &);
142  void Print(std::ostream &s, int flag =0) const;
143 
144  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
145  int getResponse(int responseID, Information &eleInformation);
146 
147  int setParameter(const std::vector<std::string> &argv, Parameter &param);
148  int updateParameter(int parameterID, Information &info);
149  };
150 
151  std::ostream &operator<<(std::ostream &, const NLBeamColumn2d &);
152 } // end of XC namespace
153 
154 #endif
155 
156 
Float vector abstraction.
Definition: Vector.h:94
Information about an element.
Definition: Information.h:81
int revertToStart(void)
Revert the state of element to initial.
Definition: NLBeamColumn2d.cpp:256
Communication parameters between processes.
Definition: Communicator.h:66
bool isSubdomain(void)
Returns true if the element is a subdomain.
Definition: NLBeamColumn2d.cpp:976
Base class response objects.
Definition: Response.h:81
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
int commitState(void)
Commit the current element state.
Definition: NLBeamColumn2d.cpp:174
Base class for materials.
Definition: Material.h:93
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: NLBeamColumn2d.cpp:1267
Vector of integers.
Definition: ID.h:95
int recvSelf(const Communicator &)
Receive the object.
Definition: NLBeamColumn2d.cpp:1009
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: NLBeamColumn2d.cpp:940
int sendData(Communicator &)
Send members through the communicator argument.
Definition: NLBeamColumn2d.cpp:981
Base class for the finite elements.
Definition: Element.h:112
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:78
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: NLBeamColumn2d.cpp:1102
int sendSelf(Communicator &)
Send the object.
Definition: NLBeamColumn2d.cpp:996
Definition: NLForceBeamColumn2dBase.h:44
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: NLBeamColumn2d.cpp:1149
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: NLBeamColumn2d.cpp:872
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Nonlinear beam-column bidimensional elements.
Definition: NLBeamColumn2d.h:92
int recvData(const Communicator &)
Receives members through the communicator argument.
Definition: NLBeamColumn2d.cpp:989
Matrix of floats.
Definition: Matrix.h:111
Parameter.
Definition: Parameter.h:68
Base class for loads over elements.
Definition: ElementalLoad.h:79
int revertToLastCommit(void)
Revert the state of element to its last commit.
Definition: NLBeamColumn2d.cpp:220
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: NLBeamColumn2d.cpp:145
One-dimensional Gauss-Lobatto quadrature.
Definition: GaussLobattoQuadRule1d01.h:70
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
Element * getCopy(void) const
Virtual constructor.
Definition: NLBeamColumn2d.cpp:141
void zeroLoad(void)
Zeroes loads on element.
Definition: NLBeamColumn2d.cpp:883
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: NLBeamColumn2d.cpp:1202
int update(void)
Updates the element state.
Definition: NLBeamColumn2d.cpp:400
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: NLBeamColumn2d.cpp:1180