xc
QuadSectRegion.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 //QuadSectRegion.h
28 // Written by Remo M. de Souza
29 // December 1998
30 
31 #ifndef QuadSectRegion_h
32 #define QuadSectRegion_h
33 
34 #include <material/section/repres/geom_section/region/QuadCellRegion.h>
35 #include "utility/matrix/Matrix.h"
36 
37 class Quadrilateral2d;
38 
39 namespace XC {
40 
41 // Vertices order: I->J->K->L.
42 //
43 // L +---+---+---+---+ K
44 // | | | | |
45 // +---+---+---+---+ nDivJK= 2
46 // | | | | |
47 // I +---+---+---+---+ J
48 // nDivIJ= 4
49 
51 //
54  {
55  private:
56  Matrix vertCoord;
57  protected:
58 
59  public:
61  QuadSectRegion(Material *, int numSubdivIJ, int numSubdivJK, const Matrix &vertexCoords);
62 
63  // edition functions
64  void setVertCoords(const Matrix &vertexCoords);
65 
66  int setTileSizeIJ(const double &size);
67  int setTileSizeJK(const double &size);
68  int setTileSize(const double &sizeIJ, const double &sizeJK);
69 
70  const Grid2d &getMesh(void) const;
71  const VectorCells &getCells(void) const;
72  SectRegion *getCopy(void) const;
73 
74  const Matrix &getVertCoords(void) const;
75  double getMaxY(void) const;
76  double getMaxZ(void) const;
77  Pos2d getPMax(void) const;
78  void setPMax(const Pos2d &);
79  double getMinY(void) const;
80  double getMinZ(void) const;
81  Pos2d getPMin(void) const;
82  void setPMin(const Pos2d &);
83  Pos2d getIVertex(void) const;
84  Pos2d getJVertex(void) const;
85  Pos2d getKVertex(void) const;
86  Pos2d getLVertex(void) const;
87  Quadrilateral2d getQuad(void) const;
88  void setQuad(const Quadrilateral2d &);
89  Polygon2d getPolygon(void) const;
90  void swap(void);
91 
92 
93  void Print(std::ostream &s, int flag =0) const;
94  friend std::ostream &operator<<(std::ostream &, QuadSectRegion &);
95  };
96 
97 std::ostream &operator<<(std::ostream &, QuadSectRegion &);
98 } // end of XC namespace
99 
100 
101 #endif
102 
103 
SectRegion * getCopy(void) const
Returns a copy of the region.
Definition: QuadSectRegion.cc:263
Pos2d getJVertex(void) const
Returns position of J vertex.
Definition: QuadSectRegion.cc:154
Pos2d getPMax(void) const
Returns upper rigth corner.
Definition: QuadSectRegion.cc:120
Pos2d getIVertex(void) const
Returns position of I vertex.
Definition: QuadSectRegion.cc:150
int setTileSizeIJ(const double &size)
Sets numbers of divisions to get a tile IJ side smaller than size.
Definition: QuadSectRegion.cc:60
Region of a section that creates quadrilateral cells.
Definition: QuadCellRegion.h:50
Base class for materials.
Definition: Material.h:91
void setQuad(const Quadrilateral2d &)
Assigns vertex coordinates.
Definition: QuadSectRegion.cc:180
void setPMax(const Pos2d &)
Sets upper rigth corner.
Definition: QuadSectRegion.cc:124
Quadrilateral2d getQuad(void) const
Returns a quadrilateral object (geometry).
Definition: QuadSectRegion.cc:166
int setTileSize(const double &sizeIJ, const double &sizeJK)
Sets numbers of divisions to get tile sizes smaller than sizeIJ and sizeJK.
Definition: QuadSectRegion.cc:78
Quad that discretizes in quad cells.
Definition: QuadSectRegion.h:53
Pos2d getPMin(void) const
Returns lower left corner.
Definition: QuadSectRegion.cc:135
Polygon2d getPolygon(void) const
Return the region contour.
Definition: QuadSectRegion.cc:190
void setPMin(const Pos2d &)
Sets upper rigth corner.
Definition: QuadSectRegion.cc:139
Region of a section that corresponds with a material.
Definition: SectRegion.h:57
const VectorCells & getCells(void) const
Returns the cell container.
Definition: QuadSectRegion.cc:204
Pos2d getLVertex(void) const
Returns position of L vertex.
Definition: QuadSectRegion.cc:162
Cells vector.
Definition: VectorCells.h:42
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Matrix of floats.
Definition: Matrix.h:108
int setTileSizeJK(const double &size)
Sets numbers of divisions to get a tile JK side smaller than size.
Definition: QuadSectRegion.cc:69
Pos2d getKVertex(void) const
Returns position of K vertex.
Definition: QuadSectRegion.cc:158