t8  1.2.0
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
t8_eclass.h
Go to the documentation of this file.
1 /*
2  This file is part of t8code.
3  t8code is a C library to manage a collection (a forest) of multiple
4  connected adaptive space-trees of general element classes in parallel.
5 
6  Copyright (C) 2015 the developers
7 
8  t8code is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  t8code is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with t8code; if not, write to the Free Software Foundation, Inc.,
20  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22 
31 #ifndef T8_ECLASS_H
32 #define T8_ECLASS_H
33 
34 #include <t8.h>
35 
36 T8_EXTERN_C_BEGIN ();
37 
39 typedef enum t8_eclass
40 {
41  T8_ECLASS_ZERO = 0,
43  T8_ECLASS_VERTEX = T8_ECLASS_ZERO,
62 }
64 
66 #define T8_MPI_ECLASS_TYPE (T8_ASSERT (sizeof (int) == sizeof (t8_eclass_t)),\
67  sc_MPI_INT)
68 
70 #define T8_ECLASS_MAX_FACES 6
72 #define T8_ECLASS_MAX_EDGES 12
74 #define T8_ECLASS_MAX_EDGES_2D 4
76 #define T8_ECLASS_MAX_CORNERS_2D 4
78 #define T8_ECLASS_MAX_CORNERS 8
80 #define T8_ECLASS_MAX_DIM 3
81 
83 extern const int t8_eclass_to_dimension[T8_ECLASS_COUNT];
84 
86 extern const int t8_eclass_num_faces[T8_ECLASS_COUNT];
87 
89 extern const int t8_eclass_max_num_faces[T8_ECLASS_MAX_DIM + 1];
90 
93 extern const int
96 
99 extern const int
102 
105 extern const int
108 
111 extern const int
113 
116 extern const int
118 
126 extern const int
128 
130 extern const int t8_eclass_num_vertices[T8_ECLASS_COUNT];
131 
133 extern const int t8_eclass_num_edges[T8_ECLASS_COUNT];
134 
136 extern const int t8_eclass_vtk_type[T8_ECLASS_COUNT];
137 
139 extern const int
141 
143 extern const int
145 
147 extern const int
149 
151 extern const char *t8_eclass_to_string[T8_ECLASS_COUNT];
152 
163  int min_dim, int *per_eclass);
164 
174 int t8_eclass_compare (t8_eclass_t eclass1,
175  t8_eclass_t eclass2);
176 
183 int t8_eclass_is_valid (t8_eclass_t eclass);
184 T8_EXTERN_C_END ();
185 
186 #endif /* !T8_ELEMENT_H */
This is the administrative header file for t8code.
#define T8_ECLASS_MAX_CORNERS_2D
The maximum number of cornes a 2-dimensional element class can have.
Definition: t8_eclass.h:76
int t8_eclass_is_valid(t8_eclass_t eclass)
Check whether a class is a valid class.
Definition: t8_eclass.c:214
const int t8_eclass_to_dimension[T8_ECLASS_COUNT]
Map each of the element classes to its dimension.
Definition: t8_eclass.c:26
const int t8_edge_vertex_to_tree_vertex_n[T8_ECLASS_COUNT][T8_ECLASS_MAX_EDGES][2]
For each eclass and each edge e the entry i gives the vertex number of e's i-th vertex within all ver...
Definition: t8_eclass.c:73
const int t8_eclass_vtk_type[T8_ECLASS_COUNT]
The vtk cell type for the eclass.
Definition: t8_eclass.c:114
const int t8_eclass_num_vertices[T8_ECLASS_COUNT]
The number of vertices of an element class.
Definition: t8_eclass.c:108
const int t8_face_to_edge_neighbor[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES][T8_ECLASS_MAX_CORNERS_2D]
For each eclass, each face f and the face vertex v, we get the edge number of the tree which is incid...
Definition: t8_eclass.c:60
enum t8_eclass t8_eclass_t
This enumeration contains all possible element classes.
#define T8_ECLASS_MAX_DIM
The maximal possible dimension for an eclass.
Definition: t8_eclass.h:80
const int t8_eclass_vtk_corner_number[T8_ECLASS_COUNT][T8_ECLASS_MAX_CORNERS]
Map the t8code corner number to the vtk corner number.
Definition: t8_eclass.c:117
int t8_eclass_count_boundary(t8_eclass_t theclass, int min_dim, int *per_eclass)
Query the element class and count of boundary points.
Definition: t8_eclass.c:162
const int t8_face_edge_to_tree_edge_n[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES][T8_ECLASS_MAX_EDGES_2D]
For each eclass and each face f the entry i gives the edge number of f's i-th edge within all edges o...
Definition: t8_eclass.c:48
const char * t8_eclass_to_string[T8_ECLASS_COUNT]
For each eclass, the name of this class as a string.
Definition: t8_eclass.c:150
#define T8_ECLASS_MAX_EDGES
The maximum number of boundary edges an element class can have.
Definition: t8_eclass.h:72
const int t8_eclass_face_orientation[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES]
Each face is either 0 or 1 oriented, depending on the order of its vertices.
Definition: t8_eclass.c:97
const int t8_eclass_boundary_count[T8_ECLASS_COUNT][T8_ECLASS_COUNT]
For each of the element classes, count the boundary points.
Definition: t8_eclass.c:139
#define T8_ECLASS_MAX_CORNERS
The maximum number of cornes an element class can have.
Definition: t8_eclass.h:78
const int t8_eclass_max_num_faces[T8_ECLASS_MAX_DIM+1]
For each dimension the maximum possible number of faces of an eclass of that dimension.
Definition: t8_eclass.c:32
const int t8_eclass_num_faces[T8_ECLASS_COUNT]
The number of codimension-one boundaries of an element class.
Definition: t8_eclass.c:29
t8_eclass
This enumeration contains all possible element classes.
Definition: t8_eclass.h:40
@ T8_ECLASS_PYRAMID
The pyramid has a quadrilateral as base and four triangles as sides.
Definition: t8_eclass.h:57
@ T8_ECLASS_TET
The tetrahedron is another three-dimensional element class.
Definition: t8_eclass.h:53
@ T8_ECLASS_PRISM
The prism has five sides: two opposing triangles joined by three quadrilaterals.
Definition: t8_eclass.h:55
@ T8_ECLASS_INVALID
This is no element class but can be used for the case a class of a third party library is not support...
Definition: t8_eclass.h:61
@ T8_ECLASS_HEX
The hexahedron is one three-dimensional element class.
Definition: t8_eclass.h:51
@ T8_ECLASS_COUNT
This is no element class but can be used as the number of element classes.
Definition: t8_eclass.h:59
@ T8_ECLASS_QUAD
The quadrilateral is one of two element classes in two dimensions.
Definition: t8_eclass.h:47
@ T8_ECLASS_LINE
The line is the only one-dimensional element class.
Definition: t8_eclass.h:45
@ T8_ECLASS_TRIANGLE
The element class for a triangle.
Definition: t8_eclass.h:49
@ T8_ECLASS_VERTEX
The vertex is the only zero-dimensional element class.
Definition: t8_eclass.h:43
const int t8_face_vertex_to_tree_vertex[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES][T8_ECLASS_MAX_CORNERS_2D]
For each eclass and each face f the entry i gives the vertex number of f's i-th vertex within all ver...
Definition: t8_eclass.c:35
#define T8_ECLASS_MAX_FACES
The maximum number of boundary faces an element class can have.
Definition: t8_eclass.h:70
#define T8_ECLASS_MAX_EDGES_2D
The maximum number of boundary edges a 2D element class can have.
Definition: t8_eclass.h:74
const int t8_eclass_face_types[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES]
For each of the element classes, list the type of the faces.
Definition: t8_eclass.c:128
const int t8_eclass_num_edges[T8_ECLASS_COUNT]
The number of edges of an element class.
Definition: t8_eclass.c:111
int t8_eclass_compare(t8_eclass_t eclass1, t8_eclass_t eclass2)
Compare two eclasses of the same dimension as necessary for face neighbor orientation.
Definition: t8_eclass.c:183
const int t8_edge_to_face_n[T8_ECLASS_COUNT][T8_ECLASS_MAX_EDGES][2]
For each eclass and each edge e the entry i gives the face number of e's i-th incident face within al...
Definition: t8_eclass.c:86