xc
ElasticBeam2dBase.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 #ifndef ElasticBeam2dBase_h
30 #define ElasticBeam2dBase_h
31 
32 #include "domain/mesh/element/truss_beam_column/ProtoBeam2d.h"
33 
34 namespace XC {
35 
36 
40  {
41  protected:
43 
44  void set_transf(const CrdTransf *trf);
45 
46  int sendData(Communicator &comm);
47  int recvData(const Communicator &comm);
48 
49  public:
50  ElasticBeam2dBase(int tag, int classTag);
51  ElasticBeam2dBase(int tag, int classTag, const Material *m,const CrdTransf *trf);
52  ElasticBeam2dBase(int tag, int classTag, double A, double E, double I,
53  int Nd1, int Nd2, CrdTransf2d &theTransf,
54  double rho = 0.0);
55  ElasticBeam2dBase(int tag, int classTag, double A, double alpha, double E,
56  double G, double I,
57  int Nd1, int Nd2, CrdTransf2d &theTransf,
58  double rho = 0.0);
61  ~ElasticBeam2dBase(void);
62 
63  void setDomain(Domain *theDomain);
64 
65  const Vector &getVDirStrongAxisGlobalCoord(bool initialGeometry) const;
66  const Vector &getVDirWeakAxisGlobalCoord(bool initialGeometry) const;
67 
68  virtual CrdTransf *getCoordTransf(void);
69  virtual const CrdTransf *getCoordTransf(void) const;
70 
72  virtual double getV1(void) const= 0;
74  virtual double getV2(void) const= 0;
76  inline virtual double getV(void) const
77  { return (getV1()+getV2())/2.0; }
78 
80  virtual double getN1(void) const= 0;
82  virtual double getN2(void) const= 0;
85  inline virtual double getN(void) const
86  { return (this->getN1()+this->getN2())/2.0; }
87 
89  virtual double getM1(void) const= 0;
91  virtual double getM2(void) const= 0;
94  inline virtual double getM(void) const
95  { return (this->getM1()+this->getM2())/2.0; }
96 
97  boost::python::list getValuesAtNodes(const std::string &, bool silent= false) const;
98  };
99 } // end of XC namespace
100 
101 #endif
102 
103 
virtual double getM2(void) const =0
Internal bending moment at the front end.
Float vector abstraction.
Definition: Vector.h:94
ElasticBeam2dBase & operator=(const ElasticBeam2dBase &)
Assignment operator.
Definition: ElasticBeam2dBase.cc:124
int sendData(Communicator &comm)
Send members through the communicator argument.
Definition: ElasticBeam2dBase.cc:225
Communication parameters between processes.
Definition: Communicator.h:66
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:88
void setDomain(Domain *theDomain)
Set the element domain.
Definition: ElasticBeam2dBase.cc:150
void set_transf(const CrdTransf *trf)
Set the coordinate transformation for the element.
Definition: ElasticBeam2dBase.cc:37
virtual double getN1(void) const =0
Internal axial force at the back end.
virtual double getV2(void) const =0
Internal shear force at the front end.
Base class for materials.
Definition: Material.h:93
~ElasticBeam2dBase(void)
brief Destructor.
Definition: ElasticBeam2dBase.cc:132
virtual CrdTransf * getCoordTransf(void)
Returns (if possible) a pointer to the coordinate transformation.
Definition: ElasticBeam2dBase.cc:142
virtual double getV1(void) const =0
Internal shear force at the back end.
virtual double getN(void) const
Mean axial force.
Definition: ElasticBeam2dBase.h:85
boost::python::list getValuesAtNodes(const std::string &, bool silent=false) const
Return a python list with the values of the argument property at element nodes.
Definition: ElasticBeam2dBase.cc:249
Base class for 2D coordinate transformation.
Definition: CrdTransf2d.h:78
virtual double getM1(void) const =0
Internal bending moment at the back end.
const Vector & getVDirWeakAxisGlobalCoord(bool initialGeometry) const
Returns the direction vector of element weak axis expressed in the global coordinate system...
Definition: ElasticBeam2dBase.cc:204
Base class for 2D beam elements.
Definition: ProtoBeam2d.h:46
int recvData(const Communicator &comm)
Receives members through the communicator argument.
Definition: ElasticBeam2dBase.cc:233
virtual double getV(void) const
Internal shear force in the middle of the element.
Definition: ElasticBeam2dBase.h:76
CrdTransf2d * theCoordTransf
Coordinate transformation.
Definition: ElasticBeam2dBase.h:42
virtual double getN2(void) const =0
Internal axial force at the front end.
virtual double getM(void) const
Mean bending moment.
Definition: ElasticBeam2dBase.h:94
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
ElasticBeam2dBase(int tag, int classTag)
Default constructor.
Definition: ElasticBeam2dBase.cc:66
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117
Base class for 2D elastic beam elements.
Definition: ElasticBeam2dBase.h:39
const Vector & getVDirStrongAxisGlobalCoord(bool initialGeometry) const
Returns the direction vector of element strong axis expressed in the global coordinate system...
Definition: ElasticBeam2dBase.cc:182