xc
DispBeamColumn2dBase.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.14 $
49 // $Date: 2003/03/04 00:48:14 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/dispBeamColumn/DispBeamColumn2d.h,v $
51 
52 // Written: MHS
53 // Created: Feb 2001
54 //
55 // Description: This file contains the class definition for DispBeamColumn2d.
56 // The element displacement field gives rise to constant axial strain and
57 // linear curvature.
58 
59 #ifndef DispBeamColumn2dBase_h
60 #define DispBeamColumn2dBase_h
61 
62 #include <domain/mesh/element/truss_beam_column/BeamColumnWithSectionFDTrf2d.h>
63 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn2d.h"
64 #include "utility/matrix/Matrix.h"
65 #include "utility/matrix/Vector.h"
66 
67 namespace XC {
68 class Node;
69 class PrismaticBarCrossSection;
70 class CrdTransf2d;
71 class Response;
72 class BeamIntegration;
73 
78 //
81  {
82  private:
83  void free_mem(void);
84  void alloc(const BeamIntegration &);
85  protected:
87  mutable Vector q;
90 
91  // AddingSensitivity:BEGIN //////////////////////////////////////////
92  int parameterID;
93  // AddingSensitivity:END ///////////////////////////////////////////
94 
95  static Matrix K; // Element stiffness, damping, and mass Matrix
96  static Vector P; // Element resisting force vector
97 
98  static double workArea[];
99 
100  int sendData(Communicator &comm);
101  int recvData(const Communicator &comm);
102  public:
103  DispBeamColumn2dBase(int tag, int classTag, int nd1, int nd2,
104  int numSections,const std::vector<PrismaticBarCrossSection *> &s,
105  const BeamIntegration &bi, const CrdTransf2d &coordTransf, double rho = 0.0);
106  DispBeamColumn2dBase(int tag= 0, int classTag= 0);
107  DispBeamColumn2dBase(int tag, int classTag, int numSec,const Material *theSection,const BeamIntegration *bi, const CrdTransf *coordTransf);
109  DispBeamColumn2dBase &operator=(const DispBeamColumn2dBase &);
110  ~DispBeamColumn2dBase(void);
111 
112  int getNumDOF(void) const;
113  void setDomain(Domain *theDomain);
114 
115  // public methods to set the state of the element
116  int commitState(void);
117  int revertToLastCommit(void);
118  int revertToStart(void);
119 
120  // public methods to obtain stiffness, mass, damping and residual information
121  const Matrix &getMass(void) const;
122 
123  void zeroLoad();
124  int addLoad(ElementalLoad *, double loadFactor);
125  int addInertiaLoadToUnbalance(const Vector &accel);
126 
127  const Vector &getResistingForceIncInertia(void) const;
128 
129  // public methods for element output
130  int sendSelf(Communicator &);
131  int recvSelf(const Communicator &);
132  void Print(std::ostream &s, int flag =0) const;
133 
134  };
135 } // end of XC namespace
136 
137 #endif
138 
Float vector abstraction.
Definition: Vector.h:94
2D beam element with SectionForceDeformation type material.
Definition: BeamColumnWithSectionFDTrf2d.h:44
const Vector & getResistingForceIncInertia(void) const
Get resisting force including inertia effects.
Definition: DispBeamColumn2dBase.cc:342
FVectorBeamColumn2d q0
Fixed end forces in basic system.
Definition: DispBeamColumn2dBase.h:88
Communication parameters between processes.
Definition: Communicator.h:66
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: DispBeamColumn2dBase.cc:256
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
Base class for materials.
Definition: Material.h:93
int getNumDOF(void) const
return the number of DOF associated with the element.
Definition: DispBeamColumn2dBase.cc:180
double rho
Density per unit length.
Definition: BeamColumnWithSectionFD.h:50
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: DispBeamColumn2dBase.cc:428
int recvSelf(const Communicator &)
Receive the object.
Definition: DispBeamColumn2dBase.cc:415
int commitState(void)
Commit the state of the element.
Definition: DispBeamColumn2dBase.cc:209
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:78
~DispBeamColumn2dBase(void)
Destructor.
Definition: DispBeamColumn2dBase.cc:177
void zeroLoad()
Zeroes loads on element.
Definition: DispBeamColumn2dBase.cc:270
Base class for integration on beam elements.
Definition: BeamIntegration.h:80
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: DispBeamColumn2dBase.cc:391
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: DispBeamColumn2dBase.cc:379
Vector q
Basic force.
Definition: DispBeamColumn2dBase.h:87
DispBeamColumnGrp Finite elements based on displacement formulation.
Definition: DispBeamColumn2dBase.h:80
BeamIntegration * beamIntegration
Integration along the beam length.
Definition: DispBeamColumn2dBase.h:86
Internal forces for a beam-column 2D element.
Definition: FVectorBeamColumn2d.h:41
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
FVectorBeamColumn2d p0
Reactions in basic system.
Definition: DispBeamColumn2dBase.h:89
Matrix of floats.
Definition: Matrix.h:111
int revertToLastCommit(void)
Revert the state of the element to the last committed one.
Definition: DispBeamColumn2dBase.cc:226
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)
Revert the element to its initial state.
Definition: DispBeamColumn2dBase.cc:241
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: DispBeamColumn2dBase.cc:183
int sendSelf(Communicator &)
Send the object.
Definition: DispBeamColumn2dBase.cc:402