xc
ZeroLengthMaterials.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 //ZeroLengthMaterials.h
28 
29 
30 #ifndef ZeroLengthMaterials_h
31 #define ZeroLengthMaterials_h
32 
33 #include <material/uniaxial/DqUniaxialMaterial.h>
34 
35 namespace XC {
36 class UniaxialMaterial;
37 class ZeroLength;
38 class MaterialHandler;
39 
41 //
54  {
55  private:
56  // private methods
57  void checkDirection(void);
58 
59  // Storage for uniaxial material models
60  std::deque<int> directions;
61 
62  protected:
64 
65  public:
66  // Constructor for a single 1d material model
67  ZeroLengthMaterials(ZeroLength *owner,UniaxialMaterial &theMaterial,int direction);
68  ZeroLengthMaterials(ZeroLength *owner,UniaxialMaterial *theMaterial,int direction );
69  // Constructor for a multiple 1d material models
70  ZeroLengthMaterials(ZeroLength *owner,const DqUniaxialMaterial &theMaterial,const ID &direction);
71  ZeroLengthMaterials(ZeroLength *owner= nullptr);
72  void push_back(const int &dir,const UniaxialMaterial *);
73  void push_front(const int &dir,const UniaxialMaterial *);
74 
75  inline const int &getDir(const size_t i) const
76  { return directions[i]; }
77  inline int &getDir(const size_t i)
78  { return directions[i]; }
79 
80  int sendSelf(CommParameters &);
81  int recvSelf(const CommParameters &);
82  void Print(std::ostream &s, int flag =0);
83 
84  void clear(void);
85 
86 
87  };
88 } // end of XC namespace
89 
90 #endif
91 
92 
93 
94 
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:53
void clear(void)
Free memory.
Definition: ZeroLengthMaterials.cc:72
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:92
Vector of integers.
Definition: ID.h:93
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: ZeroLengthMaterials.cc:166
Pointers to UniaxialMaterial container.
Definition: DqUniaxialMaterial.h:44
Material handler (definition, searching,...).
Definition: MaterialHandler.h:45
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Communication parameters between processes.
Definition: CommParameters.h:65
MaterialHandler * get_material_handler(void)
Return the material handler.
Definition: ZeroLengthMaterials.cc:79
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: ZeroLengthMaterials.cc:146
Zero length element.
Definition: ZeroLength.h:99