xc
beam3dBase.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 //beam3dBase.h
29 
30 #ifndef beam3dBase_h
31 #define beam3dBase_h
32 
33 #include "domain/mesh/element/truss_beam_column/ProtoBeam3d.h"
34 #include "utility/matrix/Matrix.h"
35 #include "utility/matrix/Vector.h"
36 
37 namespace XC {
38 
40 //
42 class beam3dBase: public ProtoBeam3d
43  {
44  protected:
45  double theta;
46  mutable double L;
47  mutable Vector rForce;
48  mutable bool isStiffFormed;
49 
50  static Matrix k; // the stiffness matrix
51  static Matrix m; // the mass matrix
52  static Matrix d; // the damping matrix
53 
54  virtual const Matrix &getStiff(void) const= 0;
55 
56  int sendData(Communicator &);
57  int recvData(const Communicator &);
58  public:
59  beam3dBase(int classTag, int tag= 0);
60  beam3dBase(int tag, int classTag, double A, double E, double G, double Jx, double Iy, double Iz, int Nd1, int Nd2, double theta);
61 
62  int revertToLastCommit(void);
63 
64  int addLoad(ElementalLoad *, double loadFactor);
65  int addInertiaLoadToUnbalance(const Vector &accel);
66 
67  const Matrix &getTangentStiff(void) const;
68  const Matrix &getInitialStiff(void) const;
69 
70  const Vector &getResistingForce(void) const;
71  const Vector &getResistingForceIncInertia(void) const;
72 
73  void Print(std::ostream &s, int flag =0) const;
74  };
75 } // end of XC namespace
76 
77 #endif
78 
79 
Float vector abstraction.
Definition: Vector.h:94
int revertToLastCommit(void)
Returns to the last committed state.
Definition: beam3dBase.cc:89
Base class for 3D beams.
Definition: ProtoBeam3d.h:40
Communication parameters between processes.
Definition: Communicator.h:66
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: beam3dBase.cc:185
const Matrix & getTangentStiff(void) const
Returns tangent stiffness matrix.
Definition: beam3dBase.cc:95
int addLoad(ElementalLoad *, double loadFactor)
Adds the load being passed as parameter.
Definition: beam3dBase.cc:103
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: beam3dBase.cc:175
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: beam3dBase.cc:164
Base class for 3D beam elements.
Definition: beam3dBase.h:42
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
const Matrix & getInitialStiff(void) const
Returns initial tangent stiffness matrix.
Definition: beam3dBase.cc:99
const Vector & getResistingForceIncInertia(void) const
Returns the resisting force vector including inertia forces.
Definition: beam3dBase.cc:113
Base class for loads over elements.
Definition: ElementalLoad.h:79
const Vector & getResistingForce(void) const
Returns the resisting force vector for the element.
Definition: beam3dBase.cc:126