XC Open source finite element analysis program
beam3dBase.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 //beam3dBase.h
28 
29 #ifndef beam3dBase_h
30 #define beam3dBase_h
31 
32 #include "domain/mesh/element/truss_beam_column/ProtoBeam3d.h"
33 #include "utility/matrix/Matrix.h"
34 #include "utility/matrix/Vector.h"
35 
36 namespace XC {
37 
39 //
41 class beam3dBase : public ProtoBeam3d
42  {
43  protected:
44  double theta;
45  mutable double L;
46  mutable Vector rForce;
47  mutable bool isStiffFormed;
48 
49  static Matrix k; // the stiffness matrix
50  static Matrix m; // the mass matrix
51  static Matrix d; // the damping matrix
52 
53  virtual const Matrix &getStiff(void) const= 0;
54 
55  int sendData(CommParameters &);
56  int recvData(const CommParameters &);
57  public:
58  beam3dBase(int classTag, int tag= 0);
59  beam3dBase(int tag, int classTag, double A, double E, double G, double Jx, double Iy, double Iz, int Nd1, int Nd2, double theta);
60 
61  int revertToLastCommit(void);
62 
63  int addLoad(ElementalLoad *theLoad, double loadFactor);
64  int addInertiaLoadToUnbalance(const Vector &accel);
65 
66  const Matrix &getTangentStiff(void) const;
67  const Matrix &getInitialStiff(void) const;
68 
69  const Vector &getResistingForce(void) const;
70  const Vector &getResistingForceIncInertia(void) const;
71 
72  void Print(std::ostream &s, int flag =0);
73  };
74 } // end of XC namespace
75 
76 #endif
77 
78 
Definition: Vector.h:82
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: beam3dBase.cc:175
const Matrix & getInitialStiff(void) const
Returns initial tangent stiffness matrix.
Definition: beam3dBase.cc:99
Base class for loads over elements.
Definition: ElementalLoad.h:73
Base class for 3D beams.
Definition: ProtoBeam3d.h:39
int revertToLastCommit(void)
Returns to the last commited state.
Definition: beam3dBase.cc:89
Definition: Matrix.h:82
const Vector & getResistingForceIncInertia(void) const
Returns the action of the element over its attached nodes. Computes damping matrix.
Definition: beam3dBase.cc:113
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: beam3dBase.cc:185
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: beam3dBase.cc:164
Communication parameters between processes.
Definition: CommParameters.h:65
const Matrix & getTangentStiff(void) const
Returns tangent stiffness matrix.
Definition: beam3dBase.cc:95
Base class for 3D beam elements.
Definition: beam3dBase.h:41
================================================================================
Definition: ContinuaReprComponent.h:34
int addLoad(ElementalLoad *theLoad, double loadFactor)
Adds the load being passed as parameter.
Definition: beam3dBase.cc:103