xc
ForceBeamColumn2d.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/10/06 18:37:50 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/forceBeamColumn/ForceBeamColumn2d.h,v $
51 
52 #ifndef ForceBeamColumn2d_h
53 #define ForceBeamColumn2d_h
54 
55 #include <domain/mesh/element/truss_beam_column/NLForceBeamColumn2dBase.h>
56 #include <utility/matrix/Matrix.h>
57 #include <utility/matrix/Vector.h>
58 
59 namespace XC {
60 class Response;
61 class ElementalLoad;
62 class BeamIntegration;
63 class PrismaticBarCrossSection;
64 
68 //
72  {
73  private:
74  // internal data
75  BeamIntegration *beamIntegr;
77 
78  // following are added for subdivision of displacement increment
79  int maxSubdivisions;
80 
81  std::vector<Vector> persistentInitialDeformation;
82  void free_mem(void);
83  void alloc(const BeamIntegration &);
84 
85  protected:
86  int sendData(Communicator &);
87  int recvData(const Communicator &);
88  public:
89  ForceBeamColumn2d(int tag= 0);
91  ForceBeamColumn2d(int tag,int numSec,const Material *theSection,const CrdTransf *trf,const BeamIntegration *integ);
92  ForceBeamColumn2d(int tag, int nodeI, int nodeJ,
93  int numSections,const std::vector<PrismaticBarCrossSection *> &,
94  BeamIntegration &beamIntegr,
95  CrdTransf2d &coordTransf, double rho = 0.0,
96  int maxNumIters = 10, double tolerance = 1.0e-12);
98  Element *getCopy(void) const;
99  virtual ~ForceBeamColumn2d(void);
100 
101  // Element birth and death stuff.
102  const std::vector<Vector> &getPersistentInitialSectionDeformation(void) const;
104 
105  void setDomain(Domain *theDomain);
106 
107  int commitState(void);
108  int revertToLastCommit(void);
109  int revertToStart(void);
110 
112  int update(void);
113 
114  const Matrix &getInitialStiff(void) const;
115  const Matrix &getMass(void) const;
116 
117  void alive(void);
118  void zeroLoad(void);
119  int addLoad(ElementalLoad *, double loadFactor);
120  int addInertiaLoadToUnbalance(const Vector &accel);
121 
122  const Vector &getResistingForceIncInertia(void) const;
123 
124  const BeamIntegration *getIntegrator(void) const;
125  boost::python::list getSectionLocationsPy(void) const;
126  boost::python::list getSectionWeightsPy(void) const;
127 
128  int sendSelf(Communicator &);
129  int recvSelf(const Communicator &);
130 
131  friend std::ostream &operator<<(std::ostream &s, const ForceBeamColumn2d &E);
132  void Print(std::ostream &s, int flag =0) const;
133 
134  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
135  int getResponse(int responseID, Information &eleInformation);
136 
137  int setParameter(const std::vector<std::string> &argv, Parameter &param);
138  int updateParameter(int parameterID, Information &info);
139 
140 
141 
142  protected:
143  void setSectionPointers(const std::vector<PrismaticBarCrossSection *> &);
144  int getInitialFlexibility(Matrix &fe) const;
145 
146  private:
147  void getForceInterpolatMatrix(double xi, Matrix &b, const ID &code);
148  void getDistrLoadInterpolatMatrix(double xi, Matrix &bp, const ID &code);
149  void compSectionDisplacements(std::vector<Vector> &,std::vector<Vector> &) const;
150  };
151 
152 std::ostream &operator<<(std::ostream &, const ForceBeamColumn2d &);
153 } // end of XC namespace
154 
155 #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:1283
Float vector abstraction.
Definition: Vector.h:94
void alive(void)
Reactivates the element.
Definition: ForceBeamColumn2d.cpp:855
int sendSelf(Communicator &)
Send the object.
Definition: ForceBeamColumn2d.cpp:994
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
virtual ~ForceBeamColumn2d(void)
Destructor.
Definition: ForceBeamColumn2d.cpp:185
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: ForceBeamColumn2d.cpp:1337
Base class for materials.
Definition: Material.h:93
Vector of integers.
Definition: ID.h:95
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: ForceBeamColumn2d.cpp:1443
double rho
Density per unit length.
Definition: BeamColumnWithSectionFD.h:50
Base class for the finite elements.
Definition: Element.h:112
Force based 2D beam column element with PrismaticBarCrossSection type nonlinear material.
Definition: ForceBeamColumn2d.h:71
int recvSelf(const Communicator &)
Send the object.
Definition: ForceBeamColumn2d.cpp:1009
void getCurrentDisplacements(Vector &, Vector &)
Retrieves curreont displacements from the the coordinate transformation and returns them in the vecto...
Definition: ForceBeamColumn2d.cpp:371
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:78
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: ForceBeamColumn2d.cpp:845
ForceBeamColumn2d & operator=(const ForceBeamColumn2d &)
Assignment operator.
Definition: ForceBeamColumn2d.cpp:167
boost::python::list getSectionLocationsPy(void) const
Returns the location of the sections along the element.
Definition: ForceBeamColumn2d.cpp:193
const std::vector< Vector > & getPersistentInitialSectionDeformation(void) const
Returns the value of the persistent (does not get wiped out by zeroLoad) initial deformation of the e...
Definition: ForceBeamColumn2d.cpp:202
int revertToLastCommit(void)
Revert the state of element to its last commit.
Definition: ForceBeamColumn2d.cpp:286
Base class for integration on beam elements.
Definition: BeamIntegration.h:80
Definition: NLForceBeamColumn2dBase.h:44
int addLoad(ElementalLoad *, double loadFactor)
Calcula la respuesta of the element a the load being passed as parameter.
Definition: ForceBeamColumn2d.cpp:876
boost::python::list getSectionWeightsPy(void) const
Return the weights corresponding to each section.
Definition: ForceBeamColumn2d.cpp:197
int recvData(const Communicator &)
Receives members through the communicator argument.
Definition: ForceBeamColumn2d.cpp:984
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: ForceBeamColumn2d.cpp:1521
int revertToStart(void)
Revert the state of element to initial.
Definition: ForceBeamColumn2d.cpp:319
Internal forces for a beam-column 2D element.
Definition: FVectorBeamColumn2d.h:41
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: ForceBeamColumn2d.cpp:226
const Vector & getResistingForceIncInertia(void) const
Returns the actions of the element over the nodes including inertial ones.
Definition: ForceBeamColumn2d.cpp:939
void zeroLoad(void)
Removes the loads on the element.
Definition: ForceBeamColumn2d.cpp:867
void Print(std::ostream &s, int flag=0) const
Prints element information in the stream being passed as parameter.
Definition: ForceBeamColumn2d.cpp:1194
const BeamIntegration * getIntegrator(void) const
Return a pointer to the beam integrator object.
Definition: ForceBeamColumn2d.cpp:189
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int update(void)
NEWTON, SUBDIVIDE AND INITIAL ITERATIONS.
Definition: ForceBeamColumn2d.cpp:389
int commitState(void)
Commit the current element state.
Definition: ForceBeamColumn2d.cpp:251
int addInertiaLoadToUnbalance(const Vector &accel)
Add the inertia loads to the unbalanced load vector.
Definition: ForceBeamColumn2d.cpp:916
Matrix of floats.
Definition: Matrix.h:111
void incrementPersistentInitialDeformationWithCurrentDeformation(void)
Increments the persistent (does not get wiped out by zeroLoad) initial deformation of the section...
Definition: ForceBeamColumn2d.cpp:209
Parameter.
Definition: Parameter.h:68
Base class for loads over elements.
Definition: ElementalLoad.h:79
Element * getCopy(void) const
Virtual constructor.
Definition: ForceBeamColumn2d.cpp:181
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
int sendData(Communicator &)
Send members through the communicator argument.
Definition: ForceBeamColumn2d.cpp:974