xc
SolidMech2D.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 //SolidMech2D.h
29 
30 #include "NDMaterialPhysicalProperties.h"
31 
32 #ifndef SolidMech2D_h
33 #define SolidMech2D_h
34 
35 namespace XC {
37 //
40  {
41  protected:
42  double thickness;
43 
44  DbTagData &getDbTagData(void) const;
45  int sendData(Communicator &);
46  int recvData(const Communicator &);
47 
48  public:
49  SolidMech2D(const size_t &nMat= 0, const NDMaterial *ptr_mat= nullptr, const double &t=0.0);
50  SolidMech2D(const size_t &, NDMaterial &,const std::string &, const double &t=0.0);
51 
52  virtual size_t getComponentIndexFromCode(const std::string &) const;
53 
55  inline double getThickness(void) const
56  { return thickness; }
58  inline void setThickness(const double &t)
59  { thickness= t; }
60 
61  double getMeanInternalForce(const std::string &) const;
62  double getMeanInternalDeformation(const std::string &) const;
63 
65  double getArealRho(void) const
68  void setArealRho(const double &r)
69  { NDMaterialPhysicalProperties::setRho(r/thickness); }
70 
71  int sendSelf(Communicator &);
72  int recvSelf(const Communicator &);
73  };
74 
75 } // end of XC namespace
76 #endif
int sendSelf(Communicator &)
Sends object.
Definition: SolidMech2D.cc:119
Communication parameters between processes.
Definition: Communicator.h:66
void setArealRho(const double &r)
Assign density per unit area.
Definition: SolidMech2D.h:68
double getThickness(void) const
Return the material thickness.
Definition: SolidMech2D.h:55
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: SolidMech2D.cc:111
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
SolidMech2D(const size_t &nMat=0, const NDMaterial *ptr_mat=nullptr, const double &t=0.0)
Constructor.
Definition: SolidMech2D.cc:32
double getArealRho(void) const
Return density per unit area.
Definition: SolidMech2D.h:65
void setRho(const double &)
Set the density for all materials.
Definition: NDMaterialPhysicalProperties.cc:197
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: SolidMech2D.cc:96
double thickness
Element thickness.
Definition: SolidMech2D.h:42
Physical properties for solid mechanics.
Definition: NDMaterialPhysicalProperties.h:40
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: SolidMech2D.cc:103
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
double getRho(void) const
Returns the average of the densities for each material.
Definition: NDMaterialPhysicalProperties.cc:186
void setThickness(const double &t)
Set the material thickness.
Definition: SolidMech2D.h:58
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Physical properties for solid mechanics.
Definition: SolidMech2D.h:39
double getMeanInternalForce(const std::string &) const
Returns mean value of internal force.
Definition: SolidMech2D.cc:59
int recvSelf(const Communicator &)
Receives object.
Definition: SolidMech2D.cc:133
double getMeanInternalDeformation(const std::string &) const
Returns mean value of internal force.
Definition: SolidMech2D.cc:77