xc
PolygonalFace.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 //PolygonalFace.h
29 
30 #ifndef POLYGONALFACE_H
31 #define POLYGONALFACE_H
32 
33 #include "Face.h"
34 #include "preprocessor/multi_block_topology/matrices/PntPtrArray.h"
35 #include "utility/geom/coo_sys/ref_sys/Ref2d3d.h"
36 #include "utility/geom/d2/Triangle3d.h"
37 
38 namespace XC {
39 
40 class Paver; // wrapper of the paving algorithm.
41 
45 class PolygonalFace: public Face
46  {
47  protected:
49 
50  void create_nodes_from_paving(Paver &paver);
51  int create_elements_from_paving(const Paver &paver);
52  void gen_mesh_paving(meshing_dir dm);
53  std::vector<std::tuple<int, Pos3d> > get_vertices_positions_for_gmsh(void) const;
54  //std::set<size_t> get_gmshtags_of_nodes_at_vertices(void) const;
55  //std::set<size_t> get_gmshtags_of_nodes_at_lines(void) const;
56  std::vector<std::tuple<std::size_t, Pos3d> > get_gmsh_positions(void) const;
57  void create_gmsh_points(const double &) const;
58  void create_gmsh_lines(void) const;
59  std::map<int, const Node *> create_nodes_from_gmsh(void);
60  int create_elements_from_gmsh(const std::map<int, const Node *> &);
61  void gen_mesh_gmsh(meshing_dir dm);
62  public:
64  virtual SetEstruct *getCopy(void) const;
65 
66  // Surface geometry.
67  void setPoints(const ID &);
68 
69 
70  // Surface orientation.
71  Vector3d getIVector(void) const;
72  Vector3d getJVector(void) const;
73 
74  // Mesh generation.
75  void genMesh(meshing_dir dm, bool paving= false);
76 
77  boost::python::dict getPyDict(void) const;
78  void setPyDict(const boost::python::dict &);
79  };
80 
81 } //end of XC namespace
82 #endif
std::vector< std::tuple< int, Pos3d > > get_vertices_positions_for_gmsh(void) const
Return the contour vertices to be used by Gmsh.
Definition: PolygonalFace.cc:290
virtual SetEstruct * getCopy(void) const
Virtual constructor.
Definition: PolygonalFace.cc:46
std::vector< std::tuple< std::size_t, Pos3d > > get_gmsh_positions(void) const
Extracts the positions of the nodes computed by Gmsh.
Definition: PolygonalFace.cc:403
void create_gmsh_lines(void) const
Create a Gmsh curve loop from its sides.
Definition: PolygonalFace.cc:361
Polygonal face defined by an arbitrary number of vertices.
Definition: PolygonalFace.h:45
PolygonalFace(Preprocessor *m)
Constructor.
Definition: PolygonalFace.cc:42
Finite element model generation tools.
Definition: Preprocessor.h:59
void create_nodes_from_paving(Paver &paver)
Creates surface nodes.
Definition: PolygonalFace.cc:88
Vector of integers.
Definition: ID.h:95
Ref2d3d ref
local reference system.
Definition: PolygonalFace.h:48
void gen_mesh_gmsh(meshing_dir dm)
Creates mesh using paving algorithm.
Definition: PolygonalFace.cc:628
Definition: Paver.h:42
Vector3d getJVector(void) const
Returns a vector in the direction of the local Y axis.
Definition: PolygonalFace.cc:84
void create_gmsh_points(const double &) const
Create Gmsh points from its vertices.
Definition: PolygonalFace.cc:346
structured set, i.
Definition: SetEstruct.h:47
std::map< int, const Node * > create_nodes_from_gmsh(void)
Create the nodes on this surface from the positions computed by Gmsh.
Definition: PolygonalFace.cc:429
void gen_mesh_paving(meshing_dir dm)
Creates mesh using paving algorithm.
Definition: PolygonalFace.cc:262
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: PolygonalFace.cc:699
void genMesh(meshing_dir dm, bool paving=false)
Triggers mesh creation.
Definition: PolygonalFace.cc:682
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int create_elements_from_gmsh(const std::map< int, const Node *> &)
Create the elements on this surface from the mesh computed by Gmsh.
Definition: PolygonalFace.cc:570
void setPoints(const ID &)
Creates and inserts the lines from the points identified by the indexes being passed as parameter...
Definition: PolygonalFace.cc:52
Vector3d getIVector(void) const
Returns a vector in the direction of the local X axis.
Definition: PolygonalFace.cc:79
Surface.
Definition: Face.h:45
Vector en tres dimensiones.
Definition: Vector3d.h:39
int create_elements_from_paving(const Paver &paver)
Creates elements on the nodes created in create_nodes_from_paving.
Definition: PolygonalFace.cc:204
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: PolygonalFace.cc:691
Two-dimensional reference system defined in a three-dimensional space.
Definition: Ref2d3d.h:41