xc
NDMaterialPhysicalProperties.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 //NDMaterialPhysicalProperties.h
29 
30 #include "PhysicalProperties.h"
31 #include "material/nD/NDMaterial.h"
32 
33 #ifndef NDMaterialPhysicalProperties_h
34 #define NDMaterialPhysicalProperties_h
35 
36 namespace XC {
38 //
41  {
42  protected:
43  virtual bool check_material_type(const std::string &type) const;
44  public:
45  static bool check_material_elast_plana(const std::string &type);
46 
47  NDMaterialPhysicalProperties(const size_t &nMat= 0, const NDMaterial *ptr_mat= nullptr);
48  NDMaterialPhysicalProperties(const size_t &, NDMaterial &theMaterial, const std::string &type);
49 
50  inline const Vector &getCommittedStrain(const size_t &i) const
51  { return theMaterial[i]->getCommittedStrain(); }
52  inline const Vector &getCommittedStress(const size_t &i) const
53  { return theMaterial[i]->getCommittedStress(); }
54  Vector getCommittedAvgStrain(void) const;
55  Vector getCommittedAvgStress(void) const;
56  double getCommittedAvgStrain(const size_t &iComp) const;
57  double getCommittedAvgStress(const size_t &iComp) const;
58  double getMeanGeneralizedStrainByName(const std::string &) const;
59  double getMeanGeneralizedStressByName(const std::string &) const;
60  virtual size_t getComponentIndexFromCode(const std::string &) const;
61 
62  Matrix getCommittedStrain(void) const;
63  Matrix getCommittedStress(void) const;
64 
65  bool haveRho(void) const;
66  double getRho(void) const;
67  void setRho(const double &);
68  Vector getRhoi(const double &rhoDefault= 0.0) const;
69 
70  int getResponse(int responseID, Information &eleInformation);
71  Response *setResponse(const std::vector<std::string> &argv, Information &eleInformation);
72  };
73 
74 } // end of XC namespace
75 #endif
Base class for element&#39;s physical properties.
Definition: PhysicalProperties.h:48
Float vector abstraction.
Definition: Vector.h:94
Information about an element.
Definition: Information.h:81
Base class response objects.
Definition: Response.h:81
int getResponse(int responseID, Information &eleInformation)
Obtain information from an analysis.
Definition: NDMaterialPhysicalProperties.cc:219
Response * setResponse(const std::vector< std::string > &argv, Information &eleInformation)
Material response.
Definition: NDMaterialPhysicalProperties.cc:266
void setRho(const double &)
Set the density for all materials.
Definition: NDMaterialPhysicalProperties.cc:197
Matrix getCommittedStrain(void) const
returns committed strains at each Gauss point.
Definition: NDMaterialPhysicalProperties.cc:68
NDMaterialPhysicalProperties(const size_t &nMat=0, const NDMaterial *ptr_mat=nullptr)
Constructor.
Definition: NDMaterialPhysicalProperties.cc:35
Physical properties for solid mechanics.
Definition: NDMaterialPhysicalProperties.h:40
material_vector theMaterial
pointers to the material objects
Definition: PhysicalProperties.h:54
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
Vector getRhoi(const double &rhoDefault=0.0) const
Returns densities for each position.
Definition: NDMaterialPhysicalProperties.cc:205
double getMeanGeneralizedStrainByName(const std::string &) const
Returns the component of the average strain vector which has the code being passed as parameter...
Definition: NDMaterialPhysicalProperties.cc:146
Matrix getCommittedStress(void) const
returns committed stresses at each Gauss point.
Definition: NDMaterialPhysicalProperties.cc:83
double getRho(void) const
Returns the average of the densities for each material.
Definition: NDMaterialPhysicalProperties.cc:186
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
virtual bool check_material_type(const std::string &type) const
Check the material type, MUST be redefined in derived classes.
Definition: NDMaterialPhysicalProperties.cc:47
Matrix of floats.
Definition: Matrix.h:111
virtual const Vector & getCommittedStrain(void)
Returns committed strains.
Definition: NDMaterial.cpp:126
Vector getCommittedAvgStrain(void) const
Return the tensión media in the element.
Definition: NDMaterialPhysicalProperties.cc:110
double getMeanGeneralizedStressByName(const std::string &) const
Returns the component of the average strain vector which has the code being passed as parameter...
Definition: NDMaterialPhysicalProperties.cc:156
Vector getCommittedAvgStress(void) const
Return the tensión media in the element.
Definition: NDMaterialPhysicalProperties.cc:99
virtual const Vector & getCommittedStress(void)
Returns committed stresses.
Definition: NDMaterial.cpp:122