xc
EncapsulatedUniaxialMaterial.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 
29 #ifndef EncapsulatedUniaxialMaterial_h
30 #define EncapsulatedUniaxialMaterial_h
31 
32 #include "material/uniaxial/UniaxialMaterial.h"
33 #include "material/uniaxial/UniaxialMaterialWrapper.h"
34 
35 namespace XC {
37 //
40  {
41  protected:
42  UniaxialMaterialWrapper theMaterial;
43 
44  public:
45  EncapsulatedUniaxialMaterial(int tag, int classTag, const UniaxialMaterial &material);
46  EncapsulatedUniaxialMaterial(int tag= 0,int classTag= 0);
47 
49  inline const UniaxialMaterial *getMaterial(void) const
50  { return theMaterial.getMaterial(); }
53  { return theMaterial.getMaterial(); }
54  virtual void setMaterial(const UniaxialMaterial &);
55  void setMaterial(const std::string &);
56 
57  double getStrain(void) const;
58  double getStrainRate(void) const;
59 
60  int sendData(Communicator &);
61  int recvData(const Communicator &);
62  };
63 } // end of XC namespace
64 
65 
66 #endif
67 
Communication parameters between processes.
Definition: Communicator.h:66
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:93
const MatType * getMaterial(void) const
Return a pointer to the wrapped material.
Definition: MaterialWrapper.h:58
UniaxialMaterial * getMaterial(void)
Return a pointer to the encapsulated material.
Definition: EncapsulatedUniaxialMaterial.h:52
double getStrainRate(void) const
default operation for strain rate is zero
Definition: EncapsulatedUniaxialMaterial.cc:67
virtual void setMaterial(const UniaxialMaterial &)
Sets the encapsulated material.
Definition: EncapsulatedUniaxialMaterial.cc:32
EncapsulatedUniaxialMaterial(int tag, int classTag, const UniaxialMaterial &material)
Constructor.
Definition: EncapsulatedUniaxialMaterial.cc:56
const UniaxialMaterial * getMaterial(void) const
Return a pointer to the encapsulated material.
Definition: EncapsulatedUniaxialMaterial.h:49
Encapsulates a copy to an uniaxial material.
Definition: UniaxialMaterialWrapper.h:39
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Encapsulates a copy to an uniaxial material.
Definition: EncapsulatedUniaxialMaterial.h:39