t8  UNKNOWN
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  T8_ECLASS_ZERO = 0,
42  T8_ECLASS_VERTEX = T8_ECLASS_ZERO,
62 
64 #define T8_MPI_ECLASS_TYPE (T8_ASSERT (sizeof (int) == sizeof (t8_eclass_t)), sc_MPI_INT)
65 
67 #define T8_ECLASS_MAX_FACES 6
69 #define T8_ECLASS_MAX_EDGES 12
71 #define T8_ECLASS_MAX_EDGES_2D 4
73 #define T8_ECLASS_MAX_CORNERS_2D 4
75 #define T8_ECLASS_MAX_CORNERS 8
77 #define T8_ECLASS_MAX_DIM 3
78 
80 extern const int t8_eclass_to_dimension[T8_ECLASS_COUNT];
81 
83 extern const int t8_eclass_num_faces[T8_ECLASS_COUNT];
84 
86 extern const int t8_eclass_max_num_faces[T8_ECLASS_MAX_DIM + 1];
87 
91 
95 
99 
103 
107 
116 
119 
121 extern const int t8_eclass_num_vertices[T8_ECLASS_COUNT];
122 
124 extern const int t8_eclass_num_edges[T8_ECLASS_COUNT];
125 
127 extern const int t8_eclass_vtk_type[T8_ECLASS_COUNT];
128 
131 
134 
137 
140 
142 extern const char *t8_eclass_to_string[T8_ECLASS_COUNT];
143 
153 int
154 t8_eclass_count_boundary (t8_eclass_t theclass, int min_dim, int *per_eclass);
155 
165 int
166 t8_eclass_compare (t8_eclass_t eclass1, t8_eclass_t eclass2);
167 
174 int
176 T8_EXTERN_C_END ();
177 
178 #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:73
int t8_eclass_is_valid(t8_eclass_t eclass)
Check whether a class is a valid class.
Definition: t8_eclass.c:232
const int t8_eclass_to_dimension[T8_ECLASS_COUNT]
Map each of the element classes to its dimension.
Definition: t8_eclass.c:25
const int t8_eclass_vtk_type[T8_ECLASS_COUNT]
The vtk cell type for the eclass.
Definition: t8_eclass.c:130
const int t8_eclass_num_vertices[T8_ECLASS_COUNT]
The number of vertices of an element class.
Definition: t8_eclass.c:126
const int t8_edge_vertex_to_tree_vertex[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:67
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:55
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:77
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:180
const char * t8_eclass_to_string[T8_ECLASS_COUNT]
For each eclass, the name of this class as a string.
Definition: t8_eclass.c:177
const int t8_face_edge_to_tree_edge[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:43
const int t8_edge_to_face[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:90
#define T8_ECLASS_MAX_EDGES
The maximum number of boundary edges an element class can have.
Definition: t8_eclass.h:69
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:112
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:165
#define T8_ECLASS_MAX_CORNERS
The maximum number of cornes an element class can have.
Definition: t8_eclass.h:75
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:29
const int t8_eclass_num_faces[T8_ECLASS_COUNT]
The number of codimension-one boundaries of an element class.
Definition: t8_eclass.c:27
const int t8_reference_face_normal_tet[T8_ECLASS_MAX_FACES][3]
The direction of the normal of each face of a tetrahedron.
Definition: t8_eclass.c:124
t8_eclass
This enumeration contains all possible element classes.
Definition: t8_eclass.h:39
@ T8_ECLASS_PYRAMID
The pyramid has a quadrilateral as base and four triangles as sides.
Definition: t8_eclass.h:56
@ T8_ECLASS_TET
The tetrahedron is another three-dimensional element class.
Definition: t8_eclass.h:52
@ T8_ECLASS_PRISM
The prism has five sides: two opposing triangles joined by three quadrilaterals.
Definition: t8_eclass.h:54
@ 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:60
@ T8_ECLASS_HEX
The hexahedron is one three-dimensional element class.
Definition: t8_eclass.h:50
@ T8_ECLASS_COUNT
This is no element class but can be used as the number of element classes.
Definition: t8_eclass.h:58
@ T8_ECLASS_QUAD
The quadrilateral is one of two element classes in two dimensions.
Definition: t8_eclass.h:46
@ T8_ECLASS_LINE
The line is the only one-dimensional element class.
Definition: t8_eclass.h:44
@ T8_ECLASS_TRIANGLE
The element class for a triangle.
Definition: t8_eclass.h:48
@ T8_ECLASS_VERTEX
The vertex is the only zero-dimensional element class.
Definition: t8_eclass.h:42
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:31
#define T8_ECLASS_MAX_FACES
The maximum number of boundary faces an element class can have.
Definition: t8_eclass.h:67
#define T8_ECLASS_MAX_EDGES_2D
The maximum number of boundary edges a 2D element class can have.
Definition: t8_eclass.h:71
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:154
const int t8_eclass_num_edges[T8_ECLASS_COUNT]
The number of edges of an element class.
Definition: t8_eclass.c:128
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:201
const int t8_eclass_t8_to_vtk_corner_number[T8_ECLASS_COUNT][T8_ECLASS_MAX_CORNERS]
Map the t8code corner number to the vtk corner number.
Definition: t8_eclass.c:143
const int t8_eclass_vtk_to_t8_corner_number[T8_ECLASS_COUNT][T8_ECLASS_MAX_CORNERS]
Map the vtk corner number to the t8 corner number.
Definition: t8_eclass.c:132