XC Open source finite element analysis program
ListRegiones.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 //ListRegiones.h
28 
29 #ifndef ListRegiones_h
30 #define ListRegiones_h
31 
32 #include <list>
33 #include "material/section/repres/SeccionInerte.h"
34 
35 class Pos2d;
36 class BND2d;
37 class Poligono2d;
38 class Semiplano2d;
39 
40 namespace XC {
41 
42 class RegionSecc;
43 class RgSccQuad;
44 class RgSccCirc;
45 class MaterialLoader;
46 class Vector;
47 class Matrix;
48 
50 //
52 class ListRegiones: protected std::list<RegionSecc *>, public SeccionInerte
53  {
54  public:
55  typedef std::list<RegionSecc *> l_reg;
56  typedef l_reg::reference reference;
57  typedef l_reg::const_reference const_reference;
58  typedef l_reg::iterator iterator;
59  typedef l_reg::const_iterator const_iterator;
60  private:
61  void libera(void);
62  void libera(const size_t i);
63  void copia(const ListRegiones &otra);
64  protected:
65 
67  public:
68 
70  ListRegiones(const ListRegiones &otro);
71  ListRegiones &operator=(const ListRegiones &otro);
72  ~ListRegiones(void);
73 
74  XC::RegionSecc *push_back(const RegionSecc &reg);
75  inline size_t size(void) const
76  { return l_reg::size(); }
77  inline bool empty(void) const
78  { return l_reg::empty(); }
79 
80  void clear(void);
81 
82  const_iterator begin(void) const;
83  const_iterator end(void) const;
84  iterator begin(void);
85  iterator end(void);
86 
87  RgSccQuad *newQuadRegion(const std::string &);
88  RgSccCirc *newCircularRegion(const std::string &);
89 
90  size_t getNumCells(void) const;
91 
92  std::list<Poligono2d> getRegionsContours(void) const;
93  std::list<Poligono2d> getContours(void) const;
94  BND2d getBnd(void) const;
95  ListRegiones Interseccion(const Semiplano2d &) const;
96 
97  //void Cumplen(const std::string &,ListRegiones &,bool );
98 
99  double getAreaGrossSection(void) const;
100  Vector getCdgGrossSection(void) const;
101  double getIyGrossSection(void) const;
102  double getIzGrossSection(void) const;
103  double getPyzGrossSection(void) const;
104 
105  Vector getCdgHomogenizedSection(const double &E0) const;
106  double getAreaHomogenizedSection(const double &E0) const;
107  double getIyHomogenizedSection(const double &E0) const;
108  double getIzHomogenizedSection(const double &E0) const;
109  double getPyzHomogenizedSection(const double &E0) const;
110 
111  void Print(std::ostream &s) const;
112  };
113 
114  std::ostream &operator<<(std::ostream &os,const ListRegiones &lr);
115 
116 } // end of XC namespace
117 
118 
119 #endif
RgSccQuad * newQuadRegion(const std::string &)
Aggregates a new quadrilateral region.
Definition: ListRegiones.cc:82
double getAreaHomogenizedSection(const double &E0) const
Returns the homogenized area de las regiones.
Definition: ListRegiones.cc:276
double getAreaGrossSection(void) const
Returns the área de las regiones.
Definition: ListRegiones.cc:187
MaterialLoader * material_loader
Material definition handler (searching,...).
Definition: ListRegiones.h:66
void clear(void)
Erases todas las regiones.
Definition: ListRegiones.cc:114
Definition: Vector.h:82
double getIyGrossSection(void) const
Returns the moment of inertia of the gross cross-section with respecto to the axis parallel to y pass...
Definition: ListRegiones.cc:220
double getPyzGrossSection(void) const
Returns the producto de inercia of the gross cross-section respecto a los ejes paralelos al y y al z ...
Definition: ListRegiones.cc:248
double getIzHomogenizedSection(const double &E0) const
Returns homogenized moment of inertia of the cross-section with respecto to the axis parallel to z pa...
Definition: ListRegiones.cc:357
Region of a section that corresponds with a material.
Definition: RegionSecc.h:57
ListRegiones & operator=(const ListRegiones &otro)
Assignment operator.
Definition: ListRegiones.cc:73
Lista de regiones.
Definition: ListRegiones.h:52
double getPyzHomogenizedSection(const double &E0) const
Returns homogenized product of inertia of the cross-section with respecto to the axis parallel to y a...
Definition: ListRegiones.cc:383
std::list< Poligono2d > getContours(void) const
Return the regions contours.
Definition: ListRegiones.cc:156
Quad that discretizes in quad cells.
Definition: RgSccQuad.h:53
Cross-section representation able to return mechanical propertis a area, moments of inertia...
Definition: SeccionInerte.h:49
ListRegiones(MaterialLoader *ml)
Constructor.
Definition: ListRegiones.cc:64
double getIzGrossSection(void) const
Returns the moment of inertia of the gross cross-section with respect to the axis paralelo al z por e...
Definition: ListRegiones.cc:234
~ListRegiones(void)
Destructor.
Definition: ListRegiones.cc:110
Material handler (definition, searching,...).
Definition: MaterialLoader.h:45
Circular shaped patch.
Definition: RgSccCirc.h:45
double getIyHomogenizedSection(const double &E0) const
Returns homogenized moment of inertia of the cross-section with respecto to the axis parallel to y pa...
Definition: ListRegiones.cc:331
================================================================================
Definition: ContinuaReprComponent.h:34
std::list< Poligono2d > getRegionsContours(void) const
Returns a list with the regions contours.
Definition: ListRegiones.cc:147
RgSccCirc * newCircularRegion(const std::string &)
Aggregates a new circularl region.
Definition: ListRegiones.cc:96
size_t getNumCells(void) const
Returns the número total de celdas.
Definition: ListRegiones.cc:135
XC::RegionSecc * push_back(const RegionSecc &reg)
Adds a region to the container.
Definition: ListRegiones.cc:118
Vector getCdgGrossSection(void) const
Returns the centro de gravedad of the gross cross-section.
Definition: ListRegiones.cc:196