xc
QuadSurface.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 //QuadSurface.h
28 
29 #ifndef QUADSURFACE_H
30 #define QUADSURFACE_H
31 
32 #include "Face.h"
33 #include "preprocessor/multi_block_topology/matrices/PntPtrArray.h"
34 
35 class Polygon3d;
36 namespace XC {
37 
41 class QuadSurface: public Face
42  {
43  protected:
44  Pos3dArray get_positions(void) const;
45  const Edge *get_lado_homologo(const Edge *l) const;
46  public:
47  QuadSurface(Preprocessor *m,const size_t &ndivI= 4, const size_t &ndivJ= 4);
48  virtual SetEstruct *getCopy(void) const;
50  inline virtual size_t getNumberOfVertices(void) const
51  { return 4; }
52 
53  void setPoints(const ID &);
54  void setPoints(const PntPtrArray &pntPtrs);
55  void setPoints(const m_int &);
56  void defGridPoints(const boost::python::list &);
57 
58  Pos3d getCentroid(void) const;
59  Polygon3d getPolygon(void) const;
60  Vector3d getIVector(void) const;
61  Vector3d getJVector(void) const;
62  Vector3d getKVector(void) const;
63  Matrix getLocalAxes(void) const;
64 
65  void SetNDiv(const Edge *l,const size_t &nd);
66  virtual void ConciliaNDivIJ(void);
67  virtual void SetNDivI(const size_t &ndi);
68  virtual void SetNDivJ(const size_t &ndi);
69  void SetElemSizeI(const double &sz);
70  void SetElemSizeJ(const double &sz);
71  void SetElemSizeIJ(const double &,const double &);
72 
73  bool checkNDivs(const size_t &i,const size_t &j) const;
74  bool checkNDivs(void) const;
75  void create_nodes(void);
76  void genMesh(meshing_dir dm);
77  };
78 
79 } //end of XC namespace
80 #endif
void SetElemSizeI(const double &sz)
Computes the number of divisions on the i axis for an element edge size equal or lesser than the size...
Definition: QuadSurface.cc:199
QuadSurface(Preprocessor *m, const size_t &ndivI=4, const size_t &ndivJ=4)
Constructor.
Definition: QuadSurface.cc:40
void SetElemSizeJ(const double &sz)
Computes the number of divisions on the j axis for an element edge size equal or lesser than the size...
Definition: QuadSurface.cc:210
Vector3d getIVector(void) const
Returns a vector int the direction of the local X axis.
Definition: QuadSurface.cc:392
Base class for one-dimensional geometry objects.
Definition: Edge.h:46
Finite element model generation tools.
Definition: Preprocessor.h:58
bool checkNDivs(void) const
Verifies that the number of divisions of the lines are compatible.
Definition: QuadSurface.cc:193
Vector of integers.
Definition: ID.h:93
Pointers to points in a matrix structure.
Definition: PntPtrArray.h:49
Vector3d getJVector(void) const
Returns a vector int the direction of the local Y axis.
Definition: QuadSurface.cc:405
virtual size_t getNumberOfVertices(void) const
Returns the number of vertices.
Definition: QuadSurface.h:50
void genMesh(meshing_dir dm)
Triggers mesh creation.
Definition: QuadSurface.cc:516
Matrix getLocalAxes(void) const
Returs a matrix with the axes of the surface as matrix rows [[x1,y1,z1],[x2,y2,z2],...·].
Definition: QuadSurface.cc:430
Polygon3d getPolygon(void) const
Return the surface contour as a polygon.
Definition: QuadSurface.cc:457
void create_nodes(void)
Creates surface nodes.
Definition: QuadSurface.cc:469
void SetElemSizeIJ(const double &, const double &)
Computes the number of divisions on the i and j axis for an element edges sizes equal or lesser than ...
Definition: QuadSurface.cc:222
Vector3d getKVector(void) const
Returns a vector int the direction of the local Z axis.
Definition: QuadSurface.cc:421
Quadrangle defined by its four vertices.
Definition: QuadSurface.h:41
const Edge * get_lado_homologo(const Edge *l) const
Return the homologous side with respect to the one being passed as parameter.
Definition: QuadSurface.cc:91
structured set, i.
Definition: SetEstruct.h:45
virtual void SetNDivJ(const size_t &ndi)
Set the number of divisions on the j axis.
Definition: QuadSurface.cc:139
void setPoints(const ID &)
Creates and inserts the lines from the points identified by the indexes being passed as parameter...
Definition: QuadSurface.cc:230
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
virtual void ConciliaNDivIJ(void)
Conciliate lines division numbers with those of the surface.
Definition: QuadSurface.cc:161
Matrix of floats.
Definition: Matrix.h:108
virtual void SetNDivI(const size_t &ndi)
Set the number of divisions on the i axis.
Definition: QuadSurface.cc:118
Surface.
Definition: Face.h:41
Pos3dArray get_positions(void) const
Returns (ndivI+1)*(ndivJ+1) positions to place the nodes.
Definition: QuadSurface.cc:369
virtual SetEstruct * getCopy(void) const
Virtual constructor.
Definition: QuadSurface.cc:44
Pos3d getCentroid(void) const
Returns the centroid of the quad surface.
Definition: QuadSurface.cc:444