XC Open source finite element analysis program
DqMeshRegion.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 //DqMeshRegiones.h
28 
29 #ifndef DqMeshRegion_h
30 #define DqMeshRegion_h
31 
32 #include <deque>
33 #include <iostream>
34 
35 namespace XC {
36 
37 class MeshRegion;
38 
40 class DqMeshRegion: protected std::deque<MeshRegion *>
41  {
42  public:
43  typedef std::deque<MeshRegion *> dq_Reg;
44  typedef dq_Reg::reference reference;
45  typedef dq_Reg::const_reference const_reference;
46  typedef dq_Reg::iterator iterator;
47  typedef dq_Reg::const_iterator const_iterator;
48  private:
49  void libera(void);
50  inline reference operator[](const size_t i)
51  { return dq_Reg::operator[](i); }
52  public:
53 
54  DqMeshRegion(void);
55  DqMeshRegion(const DqMeshRegion &otro);
56  DqMeshRegion &operator=(const DqMeshRegion &otro);
57  ~DqMeshRegion(void);
58 
59  inline size_t size(void) const
60  { return dq_Reg::size(); }
61 
62  void resize(const size_t sz);
63 
64  void add(const MeshRegion &c);
65  inline const_reference operator[](const size_t i) const
66  { return dq_Reg::operator[](i); }
67 
68  inline void clearAll(void)
69  { libera(); }
70 
71  MeshRegion *getRegion(int tag);
72 
73  void Print(std::ostream &s) const;
74  };
75 
76 } // end of XC namespace
77 
78 
79 #endif
Definition: MeshRegion.h:74
DqMeshRegion(void)
Constructor.
Definition: DqMeshRegion.cc:45
~DqMeshRegion(void)
Destructor.
Definition: DqMeshRegion.cc:76
void resize(const size_t sz)
Changes the container size.
Definition: DqMeshRegion.cc:81
DqMeshRegion & operator=(const DqMeshRegion &otro)
Assignment operator.
Definition: DqMeshRegion.cc:62
Vector de celdas.
Definition: DqMeshRegion.h:40
================================================================================
Definition: ContinuaReprComponent.h:34