xc
BaseElasticSection2d.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 //BaseElasticSection2d.h
29 
30 #ifndef BaseElasticSection2d_h
31 #define BaseElasticSection2d_h
32 
33 #include "BaseElasticSection.h"
34 #include <utility/matrix/Vector.h>
35 #include "material/section/repres/CrossSectionProperties2d.h"
36 
37 namespace XC {
38 
40 //
44  {
45  protected:
47 
48  int sendData(Communicator &);
49  int recvData(const Communicator &);
50  bool isEqual(const BaseElasticSection2d &) const;
51  public:
52  BaseElasticSection2d(int tag,int classTag,const size_t &dim, const double &E, const double &A, const double &I,double G, const double &alpha);
53  BaseElasticSection2d(int tag,int classTag,const size_t &dim,MaterialHandler *mat_ldr= nullptr);
54  BaseElasticSection2d(int classTag,const size_t &dim);
55 
58  void setCrossSectionProperties(const CrossSectionProperties2d &);
59  void sectionGeometry(const std::string &);
60  virtual const double &EIz(void) const;
61 
62  inline double getRho(void) const
63  { return ctes_scc.getRho(); }
64  inline void setRho(const double &r)
65  { ctes_scc.setRho(r); }
66  virtual double getLinearRho(void) const
67  { return ctes_scc.getLinearRho(); }
68 
69  double getStrain(const double &y,const double &z= 0) const;
70 
71  void Print(std::ostream &s, int flag =0) const;
72  };
73 } // end of XC namespace
74 
75 #endif
BaseElasticSection2d(int tag, int classTag, const size_t &dim, const double &E, const double &A, const double &I, double G, const double &alpha)
Constructor.
Definition: BaseElasticSection2d.cc:50
Base class for cross sections with linear elastic material.
Definition: BaseElasticSection.h:45
Communication parameters between processes.
Definition: Communicator.h:66
virtual double getLinearRho(void) const
Returns the mass per unit length of the section.
Definition: BaseElasticSection2d.h:66
Base class for cross sections with linear elastic material on a bi-dimensional problem (3 DOFs on eac...
Definition: BaseElasticSection2d.h:43
CrossSectionProperties2d ctes_scc
Mechanical properties of the section.
Definition: BaseElasticSection2d.h:46
virtual const double & EIz(void) const
Returns the bending stiffness of the cross-section around the z axis.
Definition: BaseElasticSection2d.cc:99
const CrossSectionProperties2d & getCrossSectionProperties(void) const
Returns the mechanical properties of the section.
Definition: BaseElasticSection2d.cc:123
double getStrain(const double &y, const double &z=0) const
brief Returns strain at position being passed as parameter.
Definition: BaseElasticSection2d.cc:92
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: BaseElasticSection2d.cc:107
Mechanical (E, G) and mass properties of a section (area, moments of inertia,...) for a bi-dimensiona...
Definition: CrossSectionProperties2d.h:55
bool isEqual(const BaseElasticSection2d &) const
Return true if both objects are equal.
Definition: BaseElasticSection2d.cc:54
Material handler (definition, searching,...).
Definition: MaterialHandler.h:46
double getRho(void) const
Returns the density (mass per unit length/area/volume) of the section.
Definition: BaseElasticSection2d.h:62
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: BaseElasticSection2d.cc:134
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: BaseElasticSection2d.cc:115