xc
BaseElasticSection3d.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 //BaseElasticSection3d.h
29 
30 #ifndef BaseElasticSection3d_h
31 #define BaseElasticSection3d_h
32 
33 #include "BaseElasticSection.h"
34 #include <utility/matrix/Vector.h>
35 #include "material/section/repres/CrossSectionProperties3d.h"
36 
37 namespace XC {
38 
65  {
66  protected:
68  int sendData(Communicator &);
69  int recvData(const Communicator &);
70  bool isEqual(const BaseElasticSection3d &) const;
71  public:
72  BaseElasticSection3d(int tag,int classTag,const size_t &dim,const CrossSectionProperties3d &ctes,MaterialHandler *mat_ldr= nullptr);
73  BaseElasticSection3d(int tag,int classTag,const size_t &dim,MaterialHandler *mat_ldr= nullptr);
74 
78  void sectionGeometry(const std::string &);
79  virtual const double &EIz(void) const;
80  virtual const double &EIy(void) const;
81  virtual const double &EIyz(void) const;
82  virtual const double &GJ(void) const;
83 
84  inline double getRho(void) const
85  { return ctes_scc.getRho(); }
86  inline void setRho(const double &r)
87  { ctes_scc.setRho(r); }
88  virtual double getLinearRho(void) const
89  { return ctes_scc.getLinearRho(); }
90 
91  double getStrain(const double &y,const double &z) const;
92 
93  boost::python::dict getPyDict(void) const;
94  void setPyDict(const boost::python::dict &);
95  void Print(std::ostream &s, int flag =0) const;
96  };
97 
99 inline std::ostream &operator<<(std::ostream &os,const BaseElasticSection3d &scc)
100  {
101  scc.Print(os);
102  return os;
103  }
104 } // end of XC namespace
105 
106 #endif
Mechanical (E, G) and mass properties of a section (area, moments of inertia,...) in a three-dimensio...
Definition: CrossSectionProperties3d.h:42
Base class for cross sections with linear elastic material.
Definition: BaseElasticSection.h:45
Communication parameters between processes.
Definition: Communicator.h:66
virtual const double & EIy(void) const
Returns the bending stiffness of the cross-section with respect to eht y axis.
Definition: BaseElasticSection3d.cc:116
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: BaseElasticSection3d.cc:150
double getRho(void) const
Returns the density (mass per unit length/area/volume) of the section.
Definition: BaseElasticSection3d.h:84
const CrossSectionProperties3d & getCrossSectionProperties(void) const
Returns the mass properties of the section.
Definition: BaseElasticSection3d.cc:94
bool isEqual(const BaseElasticSection3d &) const
Return true if both objects are equal.
Definition: BaseElasticSection3d.cc:53
BaseElasticSection3d(int tag, int classTag, const size_t &dim, const CrossSectionProperties3d &ctes, MaterialHandler *mat_ldr=nullptr)
Constructor.
Definition: BaseElasticSection3d.cc:49
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: BaseElasticSection3d.cc:142
void sectionGeometry(const std::string &)
Set the mass properties of the section from the section geometry identified by the argument...
Definition: BaseElasticSection3d.cc:69
void setCrossSectionProperties(const CrossSectionProperties3d &)
Setst the mass properties of the section.
Definition: BaseElasticSection3d.cc:137
double getStrain(const double &y, const double &z) const
Returns strain at position being passed as parameter.
Definition: BaseElasticSection3d.cc:102
Base class for cross sections with linear elastic material on a three-dimensional problem (6 DOFs on ...
Definition: BaseElasticSection3d.h:64
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: BaseElasticSection3d.cc:158
Material handler (definition, searching,...).
Definition: MaterialHandler.h:46
CrossSectionProperties3d ctes_scc
Mechanical properties of the section.
Definition: BaseElasticSection3d.h:67
virtual const double & EIz(void) const
Returns the bending stiffness of the cross-section around the z axis.
Definition: BaseElasticSection3d.cc:109
void Print(std::ostream &s, int flag=0) const
Printing.
Definition: BaseElasticSection3d.cc:173
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
virtual const double & GJ(void) const
Returns the torsional stiffness.
Definition: BaseElasticSection3d.cc:130
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: BaseElasticSection3d.cc:166
virtual const double & EIyz(void) const
Returns the product of inertia multiplied by the Young modulus.
Definition: BaseElasticSection3d.cc:123
virtual double getLinearRho(void) const
Returns the mass per unit length of the section.
Definition: BaseElasticSection3d.h:88