xc
MultiBlockTopology.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 //MultiBlockTopology.h
28 
29 #ifndef MULTIBLOCKTOPOLOGY_H
30 #define MULTIBLOCKTOPOLOGY_H
31 
32 #include "preprocessor/PreprocessorContainer.h"
33 #include <map>
34 #include "boost/lexical_cast.hpp"
35 #include "preprocessor/multi_block_topology/entities/PntMap.h"
36 #include "preprocessor/multi_block_topology/entities/LineMap.h"
37 #include "preprocessor/multi_block_topology/entities/SurfaceMap.h"
38 #include "preprocessor/multi_block_topology/entities/BodyMap.h"
39 #include "preprocessor/multi_block_topology/entities/UniformGridMap.h"
40 #include "preprocessor/multi_block_topology/trf/MapTrfGeom.h"
41 #include "preprocessor/multi_block_topology/ReferenceFrameMap.h"
42 #include "preprocessor/multi_block_topology/matrices/Framework2d.h"
43 #include "preprocessor/multi_block_topology/matrices/Framework3d.h"
44 
45 class Pos3d;
46 class Line3d;
47 class Plane;
48 class Vector3d;
49 
50 namespace XC {
51 
52 class Pnt;
53 class UniformGrid;
54 class SetEstruct;
55 class ReferenceFrame;
56 
60 //
62 //
69  {
70  friend class Preprocessor;
71  private:
72  template <class L>
73  static void numera_lista(L &l);
74  void numera(void);
75  ReferenceFrameMap reference_systems;
76  MapTrfGeom transformaciones_geometricas;
77 
78  PntMap points;
79  LineMap edges;
80  SurfaceMap faces;
81  BodyMap cuerpos;
82  UniformGridMap unif_grid;
83  Framework2d framework2d;
84  Framework3d framework3d;
85 
86  protected:
87 
88  SetEstruct *busca_set_estruct(const UniformGridMap::Indice &nmb);
89  public:
91  MultiBlockTopology(Preprocessor *mod= nullptr);
92 
93  Edge *busca_edge_extremos(const PntMap::Indice &,const PntMap::Indice &);
94  const Edge *busca_edge_extremos(const PntMap::Indice &,const PntMap::Indice &) const;
95 
96  void conciliaNDivs(void);
97 
98  void clearAll(void);
100  virtual ~MultiBlockTopology(void);
101 
102  inline const PntMap &getPoints(void) const
103  { return points; }
104  inline PntMap &getPoints(void)
105  { return points; }
106  inline const LineMap &getLines(void) const
107  { return edges; }
108  inline LineMap &getLines(void)
109  { return edges; }
110  inline const SurfaceMap &getSurfaces(void) const
111  { return faces; }
112  inline SurfaceMap &getSurfaces(void)
113  { return faces; }
114  inline const MapTrfGeom &getTransformacionesGeometricas(void) const
115  { return transformaciones_geometricas; }
116  inline MapTrfGeom &getTransformacionesGeometricas(void)
117  { return transformaciones_geometricas; }
118  inline const ReferenceFrameMap &getReferenceSystems(void) const
119  { return reference_systems; }
120  inline ReferenceFrameMap &getReferenceSystems(void)
121  { return reference_systems; }
122  inline const Framework2d &getFramework2d(void) const
123  { return framework2d; }
124  inline Framework2d &getFramework2d(void)
125  { return framework2d; }
126  inline const Framework3d &getFramework3d(void) const
127  { return framework3d; }
128  inline Framework3d &getFramework3d(void)
129  { return framework3d; }
130  inline const UniformGridMap &getUniformGrids(void) const
131  { return unif_grid; }
132  inline UniformGridMap &getUniformGrids(void)
133  { return unif_grid; }
134  };
135 
136 
137 } //end of XC namespace
138 #endif
Base class for one-dimensional geometry objects.
Definition: Edge.h:46
SetEstruct * busca_set_estruct(const UniformGridMap::Indice &nmb)
Search for the entity whose name is passed as a parameter.
Definition: MultiBlockTopology.cc:159
Finite element model generation tools.
Definition: Preprocessor.h:58
Model geometry manager.
Definition: MultiBlockTopology.h:68
Model points container.
Definition: SurfaceMap.h:41
Reference systems container.
Definition: ReferenceFrameMap.h:42
Uniform grid container.
Definition: UniformGridMap.h:44
Bidimensional framework container.
Definition: Framework2d.h:42
void conciliaNDivs(void)
Conciliate number of divisions of the lines.
Definition: MultiBlockTopology.cc:123
virtual ~MultiBlockTopology(void)
Destructor.
Definition: MultiBlockTopology.cc:182
Line container.
Definition: LineMap.h:49
void clearAll(void)
Erase all the geometry entities.
Definition: MultiBlockTopology.cc:168
Point container.
Definition: PntMap.h:51
Geometric transformations container.
Definition: MapTrfGeom.h:42
Base class for preprocessor containers i.
Definition: PreprocessorContainer.h:43
structured set, i.
Definition: SetEstruct.h:45
Edge * busca_edge_extremos(const PntMap::Indice &, const PntMap::Indice &)
Return the «edge» that has as end points those whose indices are passed as parameters.
Definition: MultiBlockTopology.cc:78
Body container.
Definition: BodyMap.h:40
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
MultiBlockTopology(Preprocessor *mod=nullptr)
Constructor.
Definition: MultiBlockTopology.cc:60
Three dimensional framework container.
Definition: Framework3d.h:42