XC Open source finite element analysis program
Block.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 //Block.h
28 
29 #ifndef BLOCK_H
30 #define BLOCK_H
31 
32 #include "Body.h"
33 
34 namespace XC {
35 
39 class Block: public Body
40  {
41  BodyFace sups[6];
42  size_t indice(Face *s) const;
43  void coloca(const size_t &i,Face *s);
44  protected:
45  void inserta(const size_t &);
46  //XXX void add_puntos(const std::vector<size_t> &);
47  void add_caras(const std::vector<size_t> &);
48  void create_nodes_caras(void);
49  TritrizPos3d get_posiciones(void) const;
50 
51  virtual BodyFace *GetFace(const size_t &i);
52  public:
53  Block(Preprocessor *m,const std::string &nombre= "");
54  SetEstruct *getCopy(void) const;
56  virtual size_t NumLineas(void) const;
57  virtual size_t NumVertices(void) const;
58  virtual size_t NumFaces(void) const;
59  void actualiza_topologia(void);
60  virtual std::set<const Face *> getSurfaces(void);
61  const BodyFace *GetFace(const size_t &i) const;
62  const CmbEdge::Lado *GetArista(const size_t &i) const;
63  Pnt *GetVertice(const size_t &i);
64  const Pnt *GetVertice(const size_t &i) const;
65  int getVtkCellType(void) const;
66  int getMEDCellType(void) const;
67 
68  size_t NDivI(void) const;
69  size_t NDivJ(void) const;
70  size_t NDivK(void) const;
71  bool checkNDivs(void) const;
72  void create_nodes(void);
73  void genMesh(meshing_dir dm);
74 
75 
76  };
77 
78 
79 } //end of XC namespace
80 
81 #endif
size_t NDivI(void) const
Return the number of divisions along the edge 1->2.
Definition: Block.cc:342
void genMesh(meshing_dir dm)
Trigger mesh generation.
Definition: Block.cc:469
Surface.
Definition: Face.h:41
size_t NDivK(void) const
Return the number of divisions along the edge 1->5.
Definition: Block.cc:350
Six-faced solid.
Definition: Body.h:64
TritrizPos3d get_posiciones(void) const
Return (ndivI+1)*(ndivJ+1)*(ndivK+1) positions for the nodes.
Definition: Block.cc:320
Six-faced body.
Definition: Block.h:39
Surface that limits the body (face as seen by the body).
Definition: Body.h:70
void inserta(const size_t &)
Insert the surface with the identifier passed as parameter (if found).
Definition: Block.cc:267
const CmbEdge::Lado * GetArista(const size_t &i) const
Return the i-th edge of the solid.
Definition: Block.cc:117
virtual size_t NumFaces(void) const
Return the number of faces.
Definition: Block.cc:105
int getVtkCellType(void) const
Interface with VTK.
Definition: Block.cc:83
bool checkNDivs(void) const
Check that number of divisions of the lines are compatible.
Definition: Block.cc:91
SetEstruct * getCopy(void) const
Virtual constructor.
Definition: Block.cc:78
void create_nodes_caras(void)
Trigger the creation of nodes on faces.
Definition: Block.cc:287
void create_nodes(void)
Create nodes for the block.
Definition: Block.cc:354
Component of a compound line.
Definition: CmbEdge.h:57
virtual size_t NumVertices(void) const
Return the number of vertices.
Definition: Block.cc:101
Finite element model generation tools.
Definition: Preprocessor.h:58
structured set, i. e. a set that can return a pointer a to a node or an element from its indices i...
Definition: SetEstruct.h:45
size_t NDivJ(void) const
Return the number of divisions along the edge 2->3.
Definition: Block.cc:346
Punto (KPoint).
Definition: Pnt.h:49
Pnt * GetVertice(const size_t &i)
Return the i-th vertex of the solid.
Definition: Block.cc:159
virtual size_t NumLineas(void) const
Returns the number of lines of the object.
Definition: Block.cc:97
virtual BodyFace * GetFace(const size_t &i)
Return the face with the index passed as parameter.
Definition: Block.cc:113
virtual std::set< const Face * > getSurfaces(void)
Return the surfaces that close the solid.
Definition: Block.cc:170
int getMEDCellType(void) const
Interface with MED format of Salome.
Definition: Block.cc:87
================================================================================
Definition: ContinuaReprComponent.h:34
void actualiza_topologia(void)
Update topology of the enclosing surface (neighbors).
Definition: Block.cc:183
Block(Preprocessor *m, const std::string &nombre="")
Constructor.
Definition: Block.cc:74
void add_caras(const std::vector< size_t > &)
Create and insert the faces from the indices passed as parameter.
Definition: Block.cc:279