xc
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 index(Face *s) const;
43  void put(const size_t &i,Face *s);
44  protected:
45  void insert(const size_t &);
46  //XXX void add_points(const std::vector<size_t> &);
47  void append_faces(const std::vector<size_t> &);
48  void create_face_nodes(void);
49  Pos3dArray3d get_positions(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 getNumberOfLines(void) const;
57  virtual size_t getNumberOfVertices(void) const;
58  virtual size_t getNumberOfFaces(void) const;
59  void update_topology(void);
60  virtual std::set<const Face *> getSurfaces(void);
61  const BodyFace *getFace(const size_t &i) const;
62  const CmbEdge::Side *getEdge(const size_t &i) const;
63  Pnt *getVertex(const size_t &i);
64  const Pnt *getVertex(const size_t &i) const;
65  int getVtkCellType(void) const;
66 
67  size_t NDivI(void) const;
68  size_t NDivJ(void) const;
69  size_t NDivK(void) const;
70  bool checkNDivs(void) const;
71  void create_nodes(void);
72  void genMesh(meshing_dir dm);
73  };
74 } //end of XC namespace
75 
76 #endif
SetEstruct * getCopy(void) const
Virtual constructor.
Definition: Block.cc:78
Component of a compound line.
Definition: CmbEdge.h:57
int getVtkCellType(void) const
Interface with VTK.
Definition: Block.cc:83
void update_topology(void)
Update topology of the enclosing surface (neighbors).
Definition: Block.cc:179
virtual size_t getNumberOfLines(void) const
Return the number of lines of the object.
Definition: Block.cc:93
Finite element model generation tools.
Definition: Preprocessor.h:58
virtual std::set< const Face * > getSurfaces(void)
Return the surfaces that close the solid.
Definition: Block.cc:166
size_t NDivK(void) const
Return the number of divisions along the edge 1->5.
Definition: Block.cc:354
Surface that limits the body (face as seen by the body).
Definition: Body.h:70
bool checkNDivs(void) const
Check that number of divisions of the lines are compatible.
Definition: Block.cc:87
void create_nodes(void)
Create nodes for the block.
Definition: Block.cc:358
void genMesh(meshing_dir dm)
Trigger mesh generation.
Definition: Block.cc:475
Six-faced body.
Definition: Block.h:39
void insert(const size_t &)
Insert the surface with the identifier passed as parameter (if found).
Definition: Block.cc:270
Point (KPoint).
Definition: Pnt.h:49
void create_face_nodes(void)
Trigger the creation of nodes on faces.
Definition: Block.cc:291
structured set, i.
Definition: SetEstruct.h:45
const CmbEdge::Side * getEdge(const size_t &i) const
Return the i-th edge of the solid.
Definition: Block.cc:113
Pos3dArray3d get_positions(void) const
Return (ndivI+1)*(ndivJ+1)*(ndivK+1) positions for the nodes.
Definition: Block.cc:324
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Pnt * getVertex(const size_t &i)
Return the i-th vertex of the solid.
Definition: Block.cc:155
Six-faced solid.
Definition: Body.h:64
Block(Preprocessor *m, const std::string &nombre="")
Constructor.
Definition: Block.cc:74
void append_faces(const std::vector< size_t > &)
Create and insert the faces from the indices passed as parameter.
Definition: Block.cc:283
virtual size_t getNumberOfVertices(void) const
Return the number of vertices.
Definition: Block.cc:97
size_t NDivI(void) const
Return the number of divisions along the edge 1->2.
Definition: Block.cc:346
virtual BodyFace * getFace(const size_t &i)
Return the face with the index passed as parameter.
Definition: Block.cc:109
Surface.
Definition: Face.h:41
size_t NDivJ(void) const
Return the number of divisions along the edge 2->3.
Definition: Block.cc:350
virtual size_t getNumberOfFaces(void) const
Return the number of faces.
Definition: Block.cc:101