xc
ZeroLengthMaterials.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 //ZeroLengthMaterials.h
29 
30 
31 #ifndef ZeroLengthMaterials_h
32 #define ZeroLengthMaterials_h
33 
34 #include <material/uniaxial/DqUniaxialMaterial.h>
35 
36 namespace XC {
37 class UniaxialMaterial;
38 class ZeroLength;
39 class MaterialHandler;
40 
42 //
55  {
56  private:
57  // private methods
58  void checkDirection(void);
59 
60  // Storage for uniaxial material models
61  std::deque<int> directions;
62 
63  protected:
65 
66  DbTagData &getDbTagData(void) const;
67  int sendData(Communicator &);
68  int recvData(const Communicator &);
69  public:
70  // Constructor for a single 1d material model
71  ZeroLengthMaterials(ZeroLength *owner,UniaxialMaterial &theMaterial,int direction);
72  ZeroLengthMaterials(ZeroLength *owner,UniaxialMaterial *theMaterial,int direction );
73  // Constructor for a multiple 1d material models
74  ZeroLengthMaterials(ZeroLength *owner,const DqUniaxialMaterial &theMaterial,const ID &direction);
75  ZeroLengthMaterials(ZeroLength *owner= nullptr);
76  void push_back(const int &dir,const UniaxialMaterial *);
77  void push_front(const int &dir,const UniaxialMaterial *);
78 
79  inline const int &getDir(const size_t i) const
80  { return directions[i]; }
81  inline int &getDir(const size_t i)
82  { return directions[i]; }
83  boost::python::list getDirections(void) const;
84  void setDirections(const boost::python::list &);
85 
86  int sendSelf(Communicator &);
87  int recvSelf(const Communicator &);
88  void Print(std::ostream &s, int flag =0) const;
89  boost::python::dict getPyDict(void) const;
90  void setPyDict(const boost::python::dict &);
91 
92  size_t getGeneralizedStressSize(void) const;
93  size_t getGeneralizedStrainSize(void) const;
94  Matrix getGeneralizedStresses(void) const;
95  Matrix getGeneralizedStrains(void) const;
96 
97  void clear(void);
98  };
99 } // end of XC namespace
100 
101 #endif
102 
103 
104 
105 
ZeroLengthMaterials(ZeroLength *owner, UniaxialMaterial &theMaterial, int direction)
Constructor:
Definition: ZeroLengthMaterials.cc:39
A ZeroLengthElement is defined by two nodes with the same coordinate.
Definition: ZeroLengthMaterials.h:54
Communication parameters between processes.
Definition: Communicator.h:66
void setDirections(const boost::python::list &)
Set the directions of the materials from a Python list.
Definition: ZeroLengthMaterials.cc:229
void clear(void)
Free memory.
Definition: ZeroLengthMaterials.cc:72
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:93
DbTagData & getDbTagData(void) const
Returns a vector to store the dbTags of the class members.
Definition: ZeroLengthMaterials.cc:185
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
int recvSelf(const Communicator &)
Receive the object through the communicator.
Definition: ZeroLengthMaterials.cc:279
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: ZeroLengthMaterials.cc:192
Vector of integers.
Definition: ID.h:95
boost::python::list getDirections(void) const
Return the directions or the materials in a Python list.
Definition: ZeroLengthMaterials.cc:219
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: ZeroLengthMaterials.cc:206
Pointers to UniaxialMaterial container.
Definition: DqUniaxialMaterial.h:45
size_t getGeneralizedStrainSize(void) const
Return the size of the generalized strain vector.
Definition: ZeroLengthMaterials.cc:151
Matrix getGeneralizedStresses(void) const
Returns generalized stress values on each direction.
Definition: ZeroLengthMaterials.cc:155
Material handler (definition, searching,...).
Definition: MaterialHandler.h:46
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: ZeroLengthMaterials.cc:238
int sendSelf(Communicator &)
Send the object through the communicator.
Definition: ZeroLengthMaterials.cc:260
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: ZeroLengthMaterials.cc:247
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
MaterialHandler * get_material_handler(void)
Return the material handler.
Definition: ZeroLengthMaterials.cc:79
Matrix of floats.
Definition: Matrix.h:111
Zero length element.
Definition: ZeroLength.h:100
void Print(std::ostream &s, int flag=0) const
Pring stuff.
Definition: ZeroLengthMaterials.cc:298
Matrix getGeneralizedStrains(void) const
Returns generalized strain values on each direction.
Definition: ZeroLengthMaterials.cc:169
size_t getGeneralizedStressSize(void) const
Return the size of the generalized stress vector.
Definition: ZeroLengthMaterials.cc:147