xc
DispBeamColumn3d.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.11 $
49 // $Date: 2003/02/25 23:32:50 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/element/dispBeamColumn/DispBeamColumn3d.h,v $
51 
52 // Written: MHS
53 // Created: Feb 2001
54 //
55 // Description: This file contains the class definition for DispBeamColumn3d.
56 // The element displacement field gives rise to constant axial strain,
57 // linear curvature, and constant twist angle.
58 
59 #ifndef DispBeamColumn3d_h
60 #define DispBeamColumn3d_h
61 
62 #include <domain/mesh/element/truss_beam_column/BeamColumnWithSectionFDTrf3d.h>
63 #include <utility/matrix/Matrix.h>
64 #include <utility/matrix/Vector.h>
65 #include "domain/mesh/element/utils/fvectors/FVectorBeamColumn3d.h"
66 
67 namespace XC {
68 class Node;
69 class PrismaticBarCrossSection;
70 class CrdTransf3d;
71 class Response;
72 class BeamIntegration;
73 
75 //
78  {
79  private:
80  void free_mem(void);
81  void alloc(const BeamIntegration &);
82  BeamIntegration *beamIntegration;
83  mutable Vector q;
84  FVectorBeamColumn3d q0; // Fixed end forces in basic system (no torsion)
85  FVectorBeamColumn3d p0; // Reactions in basic system (no torsion)
86 
87  const Matrix &getInitialBasicStiff(void) const;
88 
89  // AddingSensitivity:BEGIN //////////////////////////////////////////
90  int parameterID;
91  // AddingSensitivity:END ///////////////////////////////////////////
92 
93  static Matrix K; // Element stiffness, damping, and mass Matrix
94  static Vector P; // Element resisting force vector
95 
96 
97  static double workArea[];
98 
99  protected:
100  int sendData(Communicator &comm);
101  int recvData(const Communicator &comm);
102 
103  public:
104  DispBeamColumn3d(int tag= 0);
105  DispBeamColumn3d(int tag, int numSec, const Material *theSection, const CrdTransf *trf, const BeamIntegration *bi);
106  DispBeamColumn3d(int tag, int nd1, int nd2, int numSections, const std::vector <PrismaticBarCrossSection *> &, const CrdTransf3d &coordTransf, const BeamIntegration &bi, double rho = 0.0);
108  DispBeamColumn3d &operator=(const DispBeamColumn3d &);
109  ~DispBeamColumn3d(void);
110  Element *getCopy(void) const;
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  int update(void);
122  const Matrix &getTangentStiff(void) const;
123  const Matrix &getInitialStiff(void) const;
124  const Matrix &getMass(void) const;
125 
126  void zeroLoad(void);
127  int addLoad(ElementalLoad *, double loadFactor);
128  int addInertiaLoadToUnbalance(const Vector &accel);
129 
130  const Vector &getResistingForce(void) const;
131  const Vector &getResistingForceIncInertia(void) const;
132 
133  // public methods for element output
134  int sendSelf(Communicator &);
135  int recvSelf(const Communicator &);
136  void Print(std::ostream &s, int flag =0) const;
137 
138  Response *setResponse(const std::vector<std::string> &argv, Information &eleInfo);
139  int getResponse(int responseID, Information &eleInfo);
140  // AddingSensitivity:BEGIN //////////////////////////////////////////
141  int setParameter(const std::vector<std::string> &argv, Parameter &param);
142  int updateParameter(int parameterID, Information &info);
143  int activateParameter(int parameterID);
144  const Vector & getResistingForceSensitivity(int gradNumber);
145  const Matrix & getKiSensitivity(int gradNumber);
146  const Matrix & getMassSensitivity(int gradNumber);
147  int commitSensitivity(int gradNumber, int numGrads);
148  // AddingSensitivity:END ///////////////////////////////////////////
149  };
150 } // end of XC namespace
151 
152 #endif
153 
Float vector abstraction.
Definition: Vector.h:94
void setDomain(Domain *theDomain)
Sets the domain for the element.
Definition: DispBeamColumn3d.cpp:154
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
int getResponse(int responseID, Information &eleInfo)
Obtain information from an analysis.
Definition: DispBeamColumn3d.cpp:807
Internal forces for a beam column 3D element.
Definition: FVectorBeamColumn3d.h:41
int recvSelf(const Communicator &)
Receive the object.
Definition: DispBeamColumn3d.cpp:725
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
int activateParameter(int parameterID)
Activates the parameter identified by parameterID.
Definition: DispBeamColumn3d.cpp:996
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: DispBeamColumn3d.cpp:587
Base class for materials.
Definition: Material.h:93
Response * setResponse(const std::vector< std::string > &argv, Information &eleInfo)
setResponse() is a method invoked to determine if the element will respond to a request for a certain...
Definition: DispBeamColumn3d.cpp:766
int getNumDOF(void) const
return the number of DOF associated with the element.
Definition: DispBeamColumn3d.cpp:151
int commitState(void)
Commit the current element state.
Definition: DispBeamColumn3d.cpp:179
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: DispBeamColumn3d.cpp:690
~DispBeamColumn3d(void)
Destructor.
Definition: DispBeamColumn3d.cpp:144
double rho
Density per unit length.
Definition: BeamColumnWithSectionFD.h:50
Base class for the finite elements.
Definition: Element.h:112
3D beam colun element with PrismaticBarCrossSection material type.
Definition: BeamColumnWithSectionFDTrf3d.h:66
const Matrix & getTangentStiff(void) const
Return the tangent stiffness matrix.
Definition: DispBeamColumn3d.cpp:266
int revertToStart(void)
Revert the state of element to initial.
Definition: DispBeamColumn3d.cpp:203
Base class for integration on beam elements.
Definition: BeamIntegration.h:80
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: DispBeamColumn3d.cpp:702
const Matrix & getMass(void) const
Returns the mass matrix.
Definition: DispBeamColumn3d.cpp:504
int setParameter(const std::vector< std::string > &argv, Parameter &param)
@ Set value for parameter.
Definition: DispBeamColumn3d.cpp:887
int revertToLastCommit(void)
Revert the state of element to its last commit.
Definition: DispBeamColumn3d.cpp:191
Element * getCopy(void) const
Virtual constructor.
Definition: DispBeamColumn3d.cpp:148
3D beam element with PrismaticBarCrossSection type material.
Definition: DispBeamColumn3d.h:77
int sendSelf(Communicator &)
Send the object.
Definition: DispBeamColumn3d.cpp:713
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int updateParameter(int parameterID, Information &info)
Updates the parameter identified by parameterID with info.
Definition: DispBeamColumn3d.cpp:954
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: DispBeamColumn3d.cpp:651
Matrix of floats.
Definition: Matrix.h:111
Parameter.
Definition: Parameter.h:68
Base class for loads over elements.
Definition: ElementalLoad.h:79
int update(void)
Updates the element state.
Definition: DispBeamColumn3d.cpp:215
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: DispBeamColumn3d.cpp:737
Base class for 3D coordinate transformation.
Definition: CrdTransf3d.h:81
void zeroLoad(void)
Zeroes loads on element.
Definition: DispBeamColumn3d.cpp:522