OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
refinedmesh.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef refinedmesh_h
36 #define refinedmesh_h
37 
38 #include <vector>
39 #include <cstdlib>
40 
41 namespace oofem {
42 #define SAVE /* memory savings */
43 //#define COMPLETE_DATA_STRUCTURE /* only for 2-manifolds */
44 
45 #ifdef SAVE
46  #undef COMPLETE_DATA_STRUCTURE
47 #endif
48 
49 class Domain;
50 class RefinedElement;
51 
53 {
54 public:
55  int completed;
56  int nodes, elems;
57  int edges, quads, hexas;
58 
59 private:
60  typedef struct fine_edge_rec {
61  int *fine_id;
62  } fine_edge_rec;
63 
64  typedef struct fine_quad_rec {
65  int *fine_id;
66  } fine_quad_rec;
67 
68  typedef struct fine_hexa_rec {
69  int *fine_id;
70  } fine_hexa_rec;
71 
72 
73  typedef struct fe_node_rec {
74  int id;
75  } fe_node_rec;
76 
77  typedef struct fe_edge_rec {
78  fe_node_rec *node [ 2 ];
79  } fe_edge_rec;
80 
81  typedef struct fe_face_rec {
82  fe_node_rec *node [ 3 ];
83  } fe_face_rec;
84 
85  typedef struct fe_quad_rec {
86  fe_node_rec *node [ 4 ];
87  } fe_quad_rec;
88 
89  typedef struct fe_tetra_rec {
90  fe_node_rec *node [ 4 ];
91  } fe_tetra_rec;
92 
93  typedef struct fe_hexa_rec {
94  fe_node_rec *node [ 8 ];
95  } fe_hexa_rec;
96 
97 
98 
99  typedef struct mesh_edge_rec {
102  int *fine_id [ 2 ];
103  } mesh_edge_rec;
104 
105  typedef struct mesh_face_rec {
108  int *fine_id [ 3 ];
109  } mesh_face_rec;
110 
111  typedef struct mesh_quad_rec {
114  int *fine_id [ 4 ];
115  } mesh_quad_rec;
116 
117 
118 
119 #ifdef COMPLETE_DATA_STRUCTURE
120  typedef struct tmp_face_rec {
121  int ngb_elem_id [ 3 ];
122  mesh_edge_rec *edge [ 3 ];
123  } tmp_face_rec;
124 
125  typedef struct tmp_quad_rec {
126  int ngb_elem_id [ 4 ];
127  mesh_edge_rec *edge [ 4 ];
128  } tmp_quad_rec;
129 #endif
130 
131 
132  typedef struct tmp_tetra_rec {
133  int ngb_elem_id [ 4 ];
134  mesh_face_rec *face [ 4 ];
135  } tmp_tetra_rec;
136 
137  typedef struct tmp_hexa_rec {
138  int ngb_elem_id [ 6 ];
139  mesh_quad_rec *quad [ 6 ];
140  } tmp_hexa_rec;
141 
142 
143 public:
145  completed = 0;
146  nodes = edges = quads = hexas = 0;
147  };
148 
150 
151  int refineMeshGlobally(Domain *d, int level, std :: vector< RefinedElement > &refinedElementList);
152 };
153 } // end namespace oofem
154 #endif // refinedmesh_h
struct oofem::RefinedMesh::fe_quad_rec fe_quad_rec
Class and object Domain.
Definition: domain.h:115
struct oofem::RefinedMesh::fine_quad_rec fine_quad_rec
struct oofem::RefinedMesh::mesh_face_rec mesh_face_rec
struct oofem::RefinedMesh::mesh_edge_rec mesh_edge_rec
struct oofem::RefinedMesh::fine_edge_rec fine_edge_rec
struct oofem::RefinedMesh::tmp_hexa_rec tmp_hexa_rec
struct oofem::RefinedMesh::fe_edge_rec fe_edge_rec
struct oofem::RefinedMesh::tmp_tetra_rec tmp_tetra_rec
struct oofem::RefinedMesh::fe_tetra_rec fe_tetra_rec
struct oofem::RefinedMesh::fe_hexa_rec fe_hexa_rec
struct oofem::RefinedMesh::fe_face_rec fe_face_rec
int refineMeshGlobally(Domain *d, int level, std::vector< RefinedElement > &refinedElementList)
Definition: refinedmesh.C:119
struct oofem::RefinedMesh::mesh_quad_rec mesh_quad_rec
struct oofem::RefinedMesh::fe_node_rec fe_node_rec
struct oofem::RefinedMesh::fine_hexa_rec fine_hexa_rec
the oofem namespace is to define a context or scope in which all oofem names are defined.

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011