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