xc
ForceBeamColumn3d.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.7 $
49 // $Date: 2003/10/06 18:37:50 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/forceBeamColumn/ForceBeamColumn3d.h,v $
51 
52 #ifndef ForceBeamColumn3d_h
53 #define ForceBeamColumn3d_h
54 
55 #include <domain/mesh/element/truss_beam_column/NLForceBeamColumn3dBase.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 CrdTransf3d;
63 class BeamIntegration;
64 
66 //
69  {
70  private:
71  void free_mem(void);
72  void alloc(const BeamIntegration &);
73  void getForceInterpolatMatrix(double xi, Matrix &b, const ID &code);
74  void getDistrLoadInterpolatMatrix(double xi, Matrix &bp, const ID &code);
75  void compSectionDisplacements(std::vector<Vector> &,std::vector<Vector> &) const;
76 
77  // internal data
78  BeamIntegration *beamIntegr;
79 
81 
82  // following are added for subdivision of displacement increment
83  int maxSubdivisions;
84  double subdivideFactor;
85 
86  std::vector<Vector> persistentInitialDeformation;
87  protected:
88  void setSectionPointers(const std::vector<PrismaticBarCrossSection *> &secPtrs);
89  int getInitialFlexibility(Matrix &) const;
90  int sendData(Communicator &);
91  int recvData(const Communicator &);
92  public:
93  ForceBeamColumn3d(int tag= 0);
95  ForceBeamColumn3d(int tag,int numSec,
96  const Material *theSection,
97  const CrdTransf *coordTransf,
98  const BeamIntegration *integ,
99  const double &tolerance= 1.0e-12,
100  const double &subFac= 10.0);
101  ForceBeamColumn3d(int tag, int nodeI, int nodeJ,
102  int numSections,
103  const std::vector<PrismaticBarCrossSection *> &,
104  BeamIntegration &beamIntegr,
105  CrdTransf3d &coordTransf,
106  double rho = 0.0,
107  int maxNumIters = 10,
108  const double &tolerance= 1.0e-12,
109  const double &subFac= 10.0,
110  int maxNumSub= 4);
112  Element *getCopy(void) const;
113  virtual ~ForceBeamColumn3d(void);
114 
115  double getMaxSubdivisions(void) const;
116  void setMaxSubdivisions(const double &);
117  double getSubdivideFactor(void) const;
118  void setSubdivideFactor(const double &);
119 
120  // Element birth and death stuff.
121  const std::vector<Vector> &getPersistentInitialSectionDeformation(void) const;
123 
124  void setDomain(Domain *theDomain);
125 
126  int commitState(void);
127  int revertToLastCommit(void);
128  int revertToStart(void);
129 
131  int update(void);
132 
133  const Matrix &getInitialStiff(void) const;
134  const Matrix &getMass(void) const;
135 
136  void alive(void);
137  void zeroLoad(void);
138  int addLoad(ElementalLoad *, double loadFactor);
139  int addInertiaLoadToUnbalance(const Vector &accel);
140 
141  const Vector &getResistingForceIncInertia(void) const;
142 
143  const BeamIntegration *getIntegrator(void) const;
144  boost::python::object getIntegratorPy(void) const;
145  boost::python::list getSectionLocationsPy(void) const;
146  boost::python::list getSectionWeightsPy(void) const;
147 
148  int sendSelf(Communicator &);
149  int recvSelf(const Communicator &);
150 
151  friend std::ostream &operator<<(std::ostream &, const ForceBeamColumn3d &);
152  void Print(std::ostream &s, int flag =0) const;
153 
154  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
155  int getResponse(int responseID, Information &eleInformation);
156  int setParameter(const std::vector<std::string> &argv, Parameter &param);
157  int updateParameter(int parameterID, Information &info);
158  };
159 std::ostream &operator<<(std::ostream &, const ForceBeamColumn3d &);
160 } // end of XC namespace
161 
162 #endif
virtual ~ForceBeamColumn3d(void)
Destructor.
Definition: ForceBeamColumn3d.cpp:176
double getSubdivideFactor(void) const
Return the factor to reduce newton scheme step size.
Definition: ForceBeamColumn3d.cpp:187
boost::python::list getSectionWeightsPy(void) const
Return the weights corresponding to each section.
Definition: ForceBeamColumn3d.cpp:206
Float vector abstraction.
Definition: Vector.h:94
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: ForceBeamColumn3d.cpp:1383
void getCurrentDisplacements(Vector &, Vector &)
Retrieves curreont displacements from the the coordinate transformation and returns them in the vecto...
Definition: ForceBeamColumn3d.cpp:396
void alive(void)
Reactivates the element.
Definition: ForceBeamColumn3d.cpp:985
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: ForceBeamColumn3d.cpp:974
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
Base class for 3D force beam column elements with PrismaticBarCrossSection type material.
Definition: NLForceBeamColumn3dBase.h:45
Internal forces for a beam column 3D element.
Definition: FVectorBeamColumn3d.h:41
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
int update(void)
Newton, subdivide and initial iterations.
Definition: ForceBeamColumn3d.cpp:414
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: ForceBeamColumn3d.cpp:1790
int sendData(Communicator &)
Send members through the communicator argument.
Definition: ForceBeamColumn3d.cpp:1103
Base class for materials.
Definition: Material.h:93
Vector of integers.
Definition: ID.h:95
boost::python::list getSectionLocationsPy(void) const
Returns the location of the sections along the element.
Definition: ForceBeamColumn3d.cpp:202
double rho
Density per unit length.
Definition: BeamColumnWithSectionFD.h:50
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: ForceBeamColumn3d.cpp:234
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: ForceBeamColumn3d.cpp:211
Base class for the finite elements.
Definition: Element.h:112
int commitState(void)
Consuma la coordinate transformation de acuerdo con el estado actual.
Definition: ForceBeamColumn3d.cpp:262
ForceBeamColumn3d & operator=(const ForceBeamColumn3d &)
Assignment operator.
Definition: ForceBeamColumn3d.cpp:105
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: ForceBeamColumn3d.cpp:1587
Base class for integration on beam elements.
Definition: BeamIntegration.h:81
int addInertiaLoadToUnbalance(const Vector &accel)
Add the inertia loads to the unbalanced load vector.
Definition: ForceBeamColumn3d.cpp:1045
void setSubdivideFactor(const double &)
Set the factor to reduce newton scheme step size.
Definition: ForceBeamColumn3d.cpp:190
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: ForceBeamColumn3d.cpp:1140
const BeamIntegration * getIntegrator(void) const
Return a pointer to the beam integrator object.
Definition: ForceBeamColumn3d.cpp:194
int getInitialFlexibility(Matrix &) const
Return the initial flexibility matrix.
Definition: ForceBeamColumn3d.cpp:1156
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: ForceBeamColumn3d.cpp:1125
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: ForceBeamColumn3d.cpp:1534
void incrementPersistentInitialDeformationWithCurrentDeformation(void)
Increments the persistent (does not get wiped out by zeroLoad) initial deformation of the section...
Definition: ForceBeamColumn3d.cpp:218
int setParameter(const std::vector< std::string > &argv, Parameter &param)
Sets the value param to the parameter argv.
Definition: ForceBeamColumn3d.cpp:1748
int revertToLastCommit(void)
Returns to the last committed state.
Definition: ForceBeamColumn3d.cpp:299
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
double getMaxSubdivisions(void) const
Return the maximum number of subdivisons of dv for local iterations.
Definition: ForceBeamColumn3d.cpp:180
Element * getCopy(void) const
Virtual constructor.
Definition: ForceBeamColumn3d.cpp:172
Matrix of floats.
Definition: Matrix.h:111
boost::python::object getIntegratorPy(void) const
Return a Python object wrapping the the beam integrator object.
Definition: ForceBeamColumn3d.cpp:198
int recvData(const Communicator &)
Receives members through the communicator argument.
Definition: ForceBeamColumn3d.cpp:1114
Parameter.
Definition: Parameter.h:68
void setMaxSubdivisions(const double &)
Set the maximum number of subdivisons of dv for local iterations.
Definition: ForceBeamColumn3d.cpp:183
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 revertToStart(void)
Returns to the initial state.
Definition: ForceBeamColumn3d.cpp:334
3D force based beam column element with nonlinear PrismaticBarCrossSection type material.
Definition: ForceBeamColumn3d.h:68
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: ForceBeamColumn3d.cpp:1067
Base class for 3D coordinate transformation.
Definition: CrdTransf3d.h:81
void zeroLoad(void)
Removes the loads on the element.
Definition: ForceBeamColumn3d.cpp:996