t8  1.2.0
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
t8_dtet.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 
25 #ifndef T8_DTET_H
26 #define T8_DTET_H
27 
28 #include <t8.h>
29 
35 #define T8_DTET_CHILDREN 8
36 
38 #define T8_DTET_FACES 4
39 
41 #define T8_DTET_FACE_CHILDREN 4
42 
44 #define T8_DTET_CORNERS 4
45 
48 #define T8_DTET_MAXLEVEL 21
49 
51 #define T8_DTET_ROOT_LEN (1 << (T8_DTET_MAXLEVEL))
52 
54 #define T8_DTET_LEN(l) (1 << (T8_DTET_MAXLEVEL - (l)))
55 
57 #define T8_DTET_NUM_TYPES 6
58 
61 #define T8_DTRI_ROOT_BY_DTET_ROOT (1 << (T8_DTRI_MAXLEVEL - T8_DTET_MAXLEVEL))
62 
64 typedef int8_t t8_dtet_type_t;
65 
67 typedef int32_t t8_dtet_coord_t;
68 
70 typedef struct t8_dtet
71 {
72 #ifdef T8_ENABLE_DEBUG
73  /* TODO: enum to int8??? #defines ?? */
74  int8_t eclass_int8;
75 #endif
77  int8_t level;
78 
81 
85 }
87 
88 #endif /* T8_DTET_H */
This data type stores a tetrahedron.
Definition: t8_dtet.h:71
t8_dtet_coord_t y
The y integer coordinate of the anchor node.
Definition: t8_dtet.h:83
t8_dtet_coord_t z
The z integer coordinate of the anchor node.
Definition: t8_dtet.h:84
t8_dtet_coord_t x
The x integer coordinate of the anchor node.
Definition: t8_dtet.h:82
int8_t level
The refinement level of the tetrahedron relative to the root at level 0.
Definition: t8_dtet.h:77
t8_dtet_type_t type
Type of the tetrahedron in 0, ..., 5.
Definition: t8_dtet.h:80
This is the administrative header file for t8code.
int32_t t8_dtet_coord_t
The coordinates of a tetrahedron are integers relative to the maximum refinement.
Definition: t8_dtet.h:67
int8_t t8_dtet_type_t
The type of a tetrahedron designates its position relative to the surrounding cube.
Definition: t8_dtet.h:64
struct t8_dtet t8_dtet_t
This data type stores a tetrahedron.