XC Open source finite element analysis program
RgQuadCell.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 //RgQuadCell.h
28 
29 #ifndef RgQuadCell_h
30 #define RgQuadCell_h
31 
32 
33 #include <iostream>
34 #include "material/section/repres/geom_section/region/RegionSecc.h"
35 
36 class Rejilla2d;
37 
38 namespace XC {
39 
41 //
43 //
44 // nDivIJ= 4
45 // L +---+---+---+---+ K
46 // | | | | |
47 // +---+---+---+---+ nDivKL= 2
48 // | | | | |
49 // I +---+---+---+---+ J
50 class RgQuadCell: public RegionSecc
51  {
52  mutable Rejilla2d *rejilla;
53  protected:
54  int nDivIJ, nDivJK;
55  void libera(void) const;
56  const Rejilla2d &alloc(const Rejilla2d &) const;
57 
58  public:
60  RgQuadCell(Material *, int numSubdivIJ, int numSubdivJK);
61  RgQuadCell(const RgQuadCell &otro);
62  RgQuadCell &operator=(const RgQuadCell &otro);
63  virtual ~RgQuadCell(void);
64 
65  void setDiscretization(int numSubdivIJ, int numSubdivJK);
66 
67  inline void setNDivIJ(const int &n)
68  { nDivIJ= n; }
69  inline int getNDivIJ(void) const
70  { return nDivIJ; }
71  inline void setNDivJK(const int &n)
72  { nDivJK= n; }
73  inline int getNDivJK(void) const
74  { return nDivJK; }
75  //inquiring functions
76  inline const int &nDivCirc(void) const
77  { return nDivIJ; }
78  inline int &nDivCirc(void)
79  { return nDivIJ; }
80  inline const int &nDivRad(void) const
81  { return nDivJK; }
82  inline int &nDivRad(void)
83  { return nDivJK; }
84  int getNumCells(void) const;
85  void getDiscretization(int &numSubdivIJ, int &numSubdivJK) const;
86  virtual const Rejilla2d &getMesh(void) const=0;
87  Vector getCdgRejilla(void) const;
88  Vector getVertCoords(const size_t &,const size_t &) const;
89  Matrix getCellVertCoords(const size_t &,const size_t &) const;
90 
91 
92  };
93 } // end of XC namespace
94 
95 
96 #endif
97 
Base class for materials.
Definition: Material.h:85
void setDiscretization(int numSubdivIJ, int numSubdivJK)
Sets the number of divisions on each direction.
Definition: RgQuadCell.cc:78
Definition: Vector.h:82
Vector getCdgRejilla(void) const
Returns the centro de gravedad de la rejilla.
Definition: RgQuadCell.cc:97
Region of a section that corresponds with a material.
Definition: RegionSecc.h:57
RgQuadCell & operator=(const RgQuadCell &otro)
Assignment operator.
Definition: RgQuadCell.cc:64
Region of a section that creates quadrilateral cells.
Definition: RgQuadCell.h:50
int nDivJK
number of divisions.
Definition: RgQuadCell.h:54
Matrix getCellVertCoords(const size_t &, const size_t &) const
Returns the coordinates of the vertices of the (i,j) cell.
Definition: RgQuadCell.cc:123
Vector getVertCoords(const size_t &, const size_t &) const
Returns the coordenadas of the punto i,j.
Definition: RgQuadCell.cc:108
Definition: Matrix.h:82
void getDiscretization(int &numSubdivIJ, int &numSubdivJK) const
Returns the number of divisions on each direction.
Definition: RgQuadCell.cc:85
================================================================================
Definition: ContinuaReprComponent.h:34
int getNumCells(void) const
Returns the número de celdas.
Definition: RgQuadCell.cc:92