XC Open source finite element analysis program
Set.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 //Set.h
28 
29 #ifndef SET_H
30 #define SET_H
31 
32 #include "preprocessor/set_mgmt/SetMeshComp.h"
33 #include "DqPtrsNmb.h"
34 #include <set>
35 
36 class Pos3d;
37 
38 namespace XC {
39 class Pnt;
40 class Edge;
41 class Face;
42 class Body;
43 class UniformGrid;
44 class TrfGeom;
45 class SFreedom_Constraint;
46 class ID;
47 class Element;
48 class Node;
49 class Constraint;
50 
63 class Set: public SetMeshComp
64  {
65  public:
66  void numera(void);
68  typedef lst_ptr_points::iterator pnt_iterator;
69  typedef lst_ptr_points::const_iterator pnt_const_iterator;
70 
72  typedef lst_ptr_lineas::iterator lin_iterator;
73  typedef lst_ptr_lineas::const_iterator lin_const_iterator;
74 
76  typedef lst_surface_ptrs::iterator sup_iterator;
77  typedef lst_surface_ptrs::const_iterator sup_const_iterator;
78 
80 
82 
83  protected:
84  lst_ptr_points puntos;
85  lst_ptr_lineas lineas;
86  lst_surface_ptrs surfaces;
87  lst_ptr_cuerpos cuerpos;
88  lst_ptr_uniform_grids uniform_grids;
89 
90  void clearAll(void);
91  void copia_listas(const Set &);
92  //void extend_lists_cond(const Set &,const std::string &);
93  void create_copy(const std::string &,const Vector3d &v);
94 
95  DbTagData &getDbTagData(void) const;
96  int sendData(CommParameters &);
97  int recvData(const CommParameters &);
98 
99  //Mesh generation.
100  void point_meshing(meshing_dir dm);
101  void line_meshing(meshing_dir dm);
102  void surface_meshing(meshing_dir dm);
103  void body_meshing(meshing_dir dm);
104  void uniform_grid_meshing(meshing_dir dm);
105 
106  void mueve(const Vector3d &);
107  public:
108  Set(const std::string &nmb="",Preprocessor *preprocessor= nullptr);
109  Set(const Set &otro);
110  Set &operator=(const Set &otro);
111 
112  void clear(void);
113 
115  virtual const lst_ptr_points &GetPuntos(void) const
116  { return puntos; }
118  virtual lst_ptr_points &GetPuntos(void)
119  { return puntos; }
120  void sel_points_lista(const ID &);
121  bool In(const Pnt *) const;
122 
124  virtual const lst_ptr_lineas &GetLineas(void) const
125  { return lineas; }
127  virtual lst_ptr_lineas &GetLineas(void)
128  { return lineas; }
129  void sel_lineas_lista(const ID &);
130  bool In(const Edge *) const;
131 
133  virtual const lst_surface_ptrs &getSurfaces(void) const
134  { return surfaces; }
136  virtual lst_surface_ptrs &getSurfaces(void)
137  { return surfaces; }
138  void sel_surfaces_lst(const ID &);
139  bool In(const Face *) const;
140 
142  virtual const lst_ptr_cuerpos &GetCuerpos(void) const
143  { return cuerpos; }
145  virtual lst_ptr_cuerpos &GetCuerpos(void)
146  { return cuerpos; }
147  bool In(const Body *) const;
148 
150  virtual const lst_ptr_uniform_grids &GetUniformGrids(void) const
151  { return uniform_grids; }
153  virtual lst_ptr_uniform_grids &GetUniformGrids(void)
154  { return uniform_grids; }
155  bool In(const UniformGrid *) const;
156 
157  void genMesh(meshing_dir dm);
158 
159  void extend_lists(const Set &);
160 
161  void CompletaHaciaArriba(void);
162  void CompletaHaciaAbajo(void);
163 
164  void Transforma(const TrfGeom &trf);
165  void Transforma(const size_t &indice_trf);
166 
167  virtual int sendSelf(CommParameters &);
168  virtual int recvSelf(const CommParameters &);
169 
170 
171  ~Set(void);
172  };
173 } //end of XC namespace
174 #endif
virtual const lst_ptr_points & GetPuntos(void) const
Returns a const reference to the point container.
Definition: Set.h:115
virtual int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: Set.cc:520
Base class for one-dimensional geometry objects.
Definition: Edge.h:46
Surface.
Definition: Face.h:41
DqPtrsNmb< Edge > lst_ptr_lineas
Line set.
Definition: Set.h:71
virtual const lst_ptr_uniform_grids & GetUniformGrids(void) const
Return a const reference to the UniformGrids container.
Definition: Set.h:150
int recvData(const CommParameters &)
Receives members through the channel being passed as parameter.
Definition: Set.cc:485
void point_meshing(meshing_dir dm)
Create nodes and, where appropriate, elements on set points.
Definition: Set.cc:218
Six-faced solid.
Definition: Body.h:64
virtual lst_ptr_cuerpos & GetCuerpos(void)
Return a reference to the body container.
Definition: Set.h:145
lst_ptr_cuerpos cuerpos
body set.
Definition: Set.h:87
void CompletaHaciaArriba(void)
Appends to this set the objects that make reference to one or more of the objects that already make p...
Definition: Set.cc:365
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
void line_meshing(meshing_dir dm)
Create nodes and, where appropriate, elements on set lines.
Definition: Set.cc:229
void extend_lists(const Set &)
Extend this set with the objects of the set being passed as parameter.
Definition: Set.cc:89
lst_ptr_lineas::iterator lin_iterator
Line set iterator.
Definition: Set.h:72
void numera(void)
Set indices for the set objects (nodes,elements,points...) to its use in VTK.
Definition: Set.cc:134
void body_meshing(meshing_dir dm)
Create nodes and, where appropriate, elements on set bodies.
Definition: Set.cc:251
bool In(const Pnt *) const
Returns true if the point belongs to the set.
Definition: Set.cc:297
DqPtrsNmb< Body > lst_ptr_cuerpos
body set.
Definition: Set.h:79
lst_ptr_points::iterator pnt_iterator
point set iterator.
Definition: Set.h:68
void copia_listas(const Set &)
Copia las listas de objetos of the set s.
Definition: Set.cc:72
int sendData(CommParameters &)
Send members through the channel being passed as parameter.
Definition: Set.cc:473
virtual lst_ptr_uniform_grids & GetUniformGrids(void)
Return a reference to the UniformGrids container.
Definition: Set.h:153
virtual int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: Set.cc:506
lst_surface_ptrs::const_iterator sup_const_iterator
surface set const iterator.
Definition: Set.h:77
void clearAll(void)
Uniform mesh set.
Definition: Set.cc:123
void sel_points_lista(const ID &)
Selecciona los puntos cuyos tags being passed as parameters.
Definition: Set.cc:388
~Set(void)
Destructor.
Definition: Set.cc:502
void Transforma(const TrfGeom &trf)
Applies the transformation to the elements of the set.
Definition: Set.cc:152
virtual const lst_surface_ptrs & getSurfaces(void) const
Returns a const reference to the surface container.
Definition: Set.h:133
DqPtrsNmb< Pnt > lst_ptr_points
Point set.
Definition: Set.h:67
Finite element model generation tools.
Definition: Preprocessor.h:58
DbTagData & getDbTagData(void) const
Returns a vector para almacenar los dbTags de los miembros de la clase.
Definition: Set.cc:466
Definition: ID.h:77
Set(const std::string &nmb="", Preprocessor *preprocessor=nullptr)
Constructor.
Definition: Set.cc:49
Punto (KPoint).
Definition: Pnt.h:49
Definition: TrfGeom.h:49
void CompletaHaciaAbajo(void)
Appends to the set being passed as parameter the elements that intervene on the definition of those e...
Definition: Set.cc:319
virtual const lst_ptr_lineas & GetLineas(void) const
Return a const reference to the line container.
Definition: Set.h:124
void clear(void)
Vacía las listas of the set.
Definition: Set.cc:112
lst_surface_ptrs surfaces
surface set.
Definition: Set.h:86
void mueve(const Vector3d &)
Moves the objects of the set.
Definition: Set.cc:144
void uniform_grid_meshing(meshing_dir dm)
Creates nodes and, eventually, elements on the points of the set.
Definition: Set.cc:262
Set of mesh components (nodes, elements and constraints).
Definition: SetMeshComp.h:58
Set & operator=(const Set &otro)
Assignment operator.
Definition: Set.cc:61
lst_ptr_points puntos
point set.
Definition: Set.h:84
Object set.
Definition: Set.h:63
lst_surface_ptrs::iterator sup_iterator
surface set iterator.
Definition: Set.h:76
virtual lst_ptr_lineas & GetLineas(void)
Return a reference to the line container.
Definition: Set.h:127
void genMesh(meshing_dir dm)
Triggers mesh generation from set components.
Definition: Set.cc:275
virtual lst_ptr_points & GetPuntos(void)
Return a reference to the the point container.
Definition: Set.h:118
void sel_surfaces_lst(const ID &)
Selects the surfaces with the identifiers being passed as parameter.
Definition: Set.cc:440
Uniform mesh. Uniform node distributionn on x, y and z.
Definition: UniformGrid.h:40
virtual const lst_ptr_cuerpos & GetCuerpos(void) const
Return a const reference to the body container.
Definition: Set.h:142
Communication parameters between processes.
Definition: CommParameters.h:65
void create_copy(const std::string &, const Vector3d &v)
Creates a copy of the elements of the set and put them in another set with the name is being passed a...
Definition: Set.cc:171
================================================================================
Definition: ContinuaReprComponent.h:34
DqPtrsNmb< UniformGrid > lst_ptr_uniform_grids
Unifrom grid set.
Definition: Set.h:81
DqPtrsNmb< Face > lst_surface_ptrs
surface set.
Definition: Set.h:75
lst_ptr_points::const_iterator pnt_const_iterator
point set const iterator.
Definition: Set.h:69
void surface_meshing(meshing_dir dm)
Create nodes and, where appropriate, elements on surfaces.
Definition: Set.cc:240
void sel_lineas_lista(const ID &)
Selecciona las lineas cuyos tags being passed as parameters.
Definition: Set.cc:414
virtual lst_surface_ptrs & getSurfaces(void)
Returns a reference to the surface container.
Definition: Set.h:136
lst_ptr_lineas lineas
line set.
Definition: Set.h:85
lst_ptr_lineas::const_iterator lin_const_iterator
Line set const iterator.
Definition: Set.h:73