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  double subdivideFactor;
81 
82  std::vector<Vector> persistentInitialDeformation;
83  void free_mem(void);
84  void alloc(const BeamIntegration &);
85 
86  protected:
87  int sendData(Communicator &);
88  int recvData(const Communicator &);
89  public:
90  ForceBeamColumn2d(int tag= 0);
92  ForceBeamColumn2d(int tag,int numSec,const Material *theSection,const CrdTransf *trf,const BeamIntegration *integ, const double &tolerance= 1.0e-12, const double &subFac= 10.0);
93  ForceBeamColumn2d(int tag, int nodeI, int nodeJ,
94  int numSections,const std::vector<PrismaticBarCrossSection *> &,
95  BeamIntegration &beamIntegr,
96  CrdTransf2d &coordTransf, double rho = 0.0,
97  int maxNumIters = 10, const double &tolerance= 1.0e-12,
98  const double &subFac= 10.0, int maxNumSub= 4);
100  Element *getCopy(void) const;
101  virtual ~ForceBeamColumn2d(void);
102 
103  double getMaxSubdivisions(void) const;
104  void setMaxSubdivisions(const double &);
105  double getSubdivideFactor(void) const;
106  void setSubdivideFactor(const double &);
107 
108  // Element birth and death stuff.
109  const std::vector<Vector> &getPersistentInitialSectionDeformation(void) const;
111 
112  void setDomain(Domain *theDomain);
113 
114  int commitState(void);
115  int revertToLastCommit(void);
116  int revertToStart(void);
117 
119  int update(void);
120 
121  const Matrix &getInitialStiff(void) const;
122  const Matrix &getMass(void) const;
123 
124  void alive(void);
125  void zeroLoad(void);
126  int addLoad(ElementalLoad *, double loadFactor);
127  int addInertiaLoadToUnbalance(const Vector &accel);
128 
129  const Vector &getResistingForceIncInertia(void) const;
130 
131  const BeamIntegration *getIntegrator(void) const;
132  boost::python::object getIntegratorPy(void) const;
133  boost::python::list getSectionLocationsPy(void) const;
134  boost::python::list getSectionWeightsPy(void) const;
135 
136  int sendSelf(Communicator &);
137  int recvSelf(const Communicator &);
138 
139  friend std::ostream &operator<<(std::ostream &s, const ForceBeamColumn2d &E);
140  void Print(std::ostream &s, int flag =0) const;
141 
142  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
143  int getResponse(int responseID, Information &eleInformation);
144 
145  int setParameter(const std::vector<std::string> &argv, Parameter &param);
146  int updateParameter(int parameterID, Information &info);
147 
148  protected:
149  void setSectionPointers(const std::vector<PrismaticBarCrossSection *> &);
150  int getInitialFlexibility(Matrix &fe) const;
151 
152  private:
153  void getForceInterpolatMatrix(double xi, Matrix &b, const ID &code);
154  void getDistrLoadInterpolatMatrix(double xi, Matrix &bp, const ID &code);
155  void compSectionDisplacements(std::vector<Vector> &,std::vector<Vector> &) const;
156  };
157 
158 std::ostream &operator<<(std::ostream &, const ForceBeamColumn2d &);
159 } // end of XC namespace
160 
161 #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:1344
Float vector abstraction.
Definition: Vector.h:94
void alive(void)
Reactivates the element.
Definition: ForceBeamColumn2d.cpp:910
int sendSelf(Communicator &)
Send the object.
Definition: ForceBeamColumn2d.cpp:1052
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:203
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
void setSubdivideFactor(const double &)
Set the factor to reduce newton scheme step size.
Definition: ForceBeamColumn2d.cpp:355
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: ForceBeamColumn2d.cpp:1398
Base class for materials.
Definition: Material.h:93
Vector of integers.
Definition: ID.h:95
double getMaxSubdivisions(void) const
Return the maximum number of subdivisons of dv for local iterations.
Definition: ForceBeamColumn2d.cpp:345
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: ForceBeamColumn2d.cpp:1504
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:1068
void getCurrentDisplacements(Vector &, Vector &)
Retrieves curreont displacements from the the coordinate transformation and returns them in the vecto...
Definition: ForceBeamColumn2d.cpp:410
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:78
double getSubdivideFactor(void) const
Return the factor to reduce newton scheme step size.
Definition: ForceBeamColumn2d.cpp:352
boost::python::object getIntegratorPy(void) const
Return a Python object wrapping the the beam integrator object.
Definition: ForceBeamColumn2d.cpp:211
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: ForceBeamColumn2d.cpp:900
ForceBeamColumn2d & operator=(const ForceBeamColumn2d &)
Assignment operator.
Definition: ForceBeamColumn2d.cpp:185
boost::python::list getSectionLocationsPy(void) const
Returns the location of the sections along the element.
Definition: ForceBeamColumn2d.cpp:215
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:224
int revertToLastCommit(void)
Revert the state of element to its last commit.
Definition: ForceBeamColumn2d.cpp:311
Base class for integration on beam elements.
Definition: BeamIntegration.h:81
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:931
boost::python::list getSectionWeightsPy(void) const
Return the weights corresponding to each section.
Definition: ForceBeamColumn2d.cpp:219
int recvData(const Communicator &)
Receives members through the communicator argument.
Definition: ForceBeamColumn2d.cpp:1041
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: ForceBeamColumn2d.cpp:1582
void setMaxSubdivisions(const double &)
Set the maximum number of subdivisons of dv for local iterations.
Definition: ForceBeamColumn2d.cpp:348
int revertToStart(void)
Revert the state of element to initial.
Definition: ForceBeamColumn2d.cpp:358
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:248
const Vector & getResistingForceIncInertia(void) const
Returns the actions of the element over the nodes including inertial ones.
Definition: ForceBeamColumn2d.cpp:995
void zeroLoad(void)
Removes the loads on the element.
Definition: ForceBeamColumn2d.cpp:922
void Print(std::ostream &s, int flag=0) const
Prints element information in the stream being passed as parameter.
Definition: ForceBeamColumn2d.cpp:1255
const BeamIntegration * getIntegrator(void) const
Return a pointer to the beam integrator object.
Definition: ForceBeamColumn2d.cpp:207
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int update(void)
NEWTON, SUBDIVIDE AND INITIAL ITERATIONS.
Definition: ForceBeamColumn2d.cpp:428
int commitState(void)
Commit the current element state.
Definition: ForceBeamColumn2d.cpp:275
int addInertiaLoadToUnbalance(const Vector &accel)
Add the inertia loads to the unbalanced load vector.
Definition: ForceBeamColumn2d.cpp:972
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:231
Parameter.
Definition: Parameter.h:68
Base class for loads over elements.
Definition: ElementalLoad.h:79
Element * getCopy(void) const
Virtual constructor.
Definition: ForceBeamColumn2d.cpp:199
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:1030