/*1This file is part of t8code.2t8code is a C library to manage a collection (a forest) of multiple3connected adaptive space-trees of general element classes in parallel.45Copyright (C) 2025 the developers67t8code is free software; you can redistribute it and/or modify8it under the terms of the GNU General Public License as published by9the Free Software Foundation; either version 2 of the License, or10(at your option) any later version.1112t8code is distributed in the hope that it will be useful,13but WITHOUT ANY WARRANTY; without even the implied warranty of14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15GNU General Public License for more details.1617You should have received a copy of the GNU General Public License18along with t8code; if not, write to the Free Software Foundation, Inc.,1951 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.20*/2122/** \file t8_eclass.h23* We define all possible element classes that occur in hybrid meshes.24*25* Notable examples are triangles, tetrahedra, quadrilaterals and hexahedra.26* We cover all dimensions between zero and three, so it is in principal27* possible to build a topological complex out of these element classes.28*29* This file contains C and CPP definitions. Since C does not support constexpr30* everything is defined once and then declared twice.31*/3233#ifndef T8_ECLASS_H34#define T8_ECLASS_H3536#include <t8.h>3738/** We want to export the whole implementation to be callable from "C". */39T8_EXTERN_C_BEGIN ();4041/** This enumeration contains all possible element classes. */42typedef enum t8_eclass {43/** Zero-dimensional element class. */44T8_ECLASS_ZERO = 0,45/** The vertex is the only zero-dimensional element class. */46T8_ECLASS_VERTEX = T8_ECLASS_ZERO,47/** The line is the only one-dimensional element class. */48T8_ECLASS_LINE,49/** The quadrilateral is one of two element classes in two dimensions. */50T8_ECLASS_QUAD,51/** The element class for a triangle. */52T8_ECLASS_TRIANGLE,53/** The hexahedron is one three-dimensional element class. */54T8_ECLASS_HEX,55/** The tetrahedron is another three-dimensional element class. */56T8_ECLASS_TET,57/** The prism has five sides: two opposing triangles joined by three quadrilaterals. */58T8_ECLASS_PRISM,59/** The pyramid has a quadrilateral as base and four triangles as sides. */60T8_ECLASS_PYRAMID,61/** This is no element class but can be used as the number of element classes. */62T8_ECLASS_COUNT,63/** This is no element class but can be used for the case a class of a third party library is not supported by t8code*/64T8_ECLASS_INVALID65} t8_eclass_t;6667/** The MPI datatype used for t8_eclass_t */68#define T8_MPI_ECLASS_TYPE (T8_ASSERT (sizeof (int) == sizeof (t8_eclass_t)), sc_MPI_INT)6970/** The maximum number of boundary faces an element class can have. */71#define T8_ECLASS_MAX_FACES 672/** The maximum number of boundary edges an element class can have. */73#define T8_ECLASS_MAX_EDGES 1274/** The maximum number of boundary edges a 2D element class can have. */75#define T8_ECLASS_MAX_EDGES_2D 476/** The maximum number of corners a 2-dimensional element class can have. */77#define T8_ECLASS_MAX_CORNERS_2D 478/** The maximum number of corners an element class can have. */79#define T8_ECLASS_MAX_CORNERS 880/** The maximal possible dimension for an eclass */81#define T8_ECLASS_MAX_DIM 382/** The maximal number of children any element may have.*/83#define T8_ECLASS_MAX_CHILDREN 108485/* clang-format off */8687/** Define eclass values at a single point to use them for c and cpp. */88/** Dimension of each eclass. */89#define T8_ECLASS_TO_DIMENSION_VALUES { 0, 1, 2, 2, 3, 3, 3, 3 }90/** Number of faces of each eclass. */91#define T8_ECLASS_NUM_FACES_VALUES { 0, 2, 4, 3, 6, 4, 5, 5 }92/** Maximum number of faces of each eclass. */93#define T8_ECLASS_MAX_NUM_FACES_VALUES { 0, 2, 4, 6 }94/** Maximum number of children of each eclass. */95#define T8_ECLASS_MAX_NUM_CHILDREN_VALUES { 1, 2, 4, 4, 8, 8, 8, 10 }96/** Mapping of face vertex to tree vertex for each eclass. */97#define T8_FACE_VERTEX_TO_TREE_VERTEX_VALUES {\98{ { -1 } }, /* vertex */ \99{ { 0 }, { 1 } }, /* line */ \100{ { 0, 2 }, { 1, 3 }, { 0, 1 }, { 2, 3 } }, /* quad */ \101{ { 1, 2 }, { 0, 2 }, { 0, 1 } }, /* triangle */ \102{ { 0, 2, 4, 6 }, { 1, 3, 5, 7 }, { 0, 1, 4, 5 }, { 2, 3, 6, 7 }, { 0, 1, 2, 3 }, { 4, 5, 6, 7 } }, /* hex */ \103{ { 1, 2, 3 }, { 0, 2, 3 }, { 0, 1, 3 }, { 0, 1, 2 } }, /* tet */ \104{ { 1, 2, 4, 5 }, { 0, 2, 3, 5 }, { 0, 1, 3, 4 }, { 0, 1, 2 }, { 3, 4, 5 } }, /* prism */ \105{ { 0, 2, 4 }, { 1, 3, 4 }, { 0, 1, 4 }, { 2, 3, 4 }, { 0, 1, 2, 3 } } /* pyramid */ \106}107/** Mapping of face edge to tree edge for each eclass. */108#define T8_FACE_EDGE_TO_TREE_EDGE_VALUES {\109{ { -1 } }, /* vertex */ \110{ { 0 } }, /* line */ \111{ { 0 }, { 1 }, { 2 }, { 3 } }, /* quad */ \112{ { 0 }, { 1 }, { 2 } }, /* triangle */ \113{ { 8, 10, 4, 6 }, { 9, 11, 5, 7 }, { 8, 9, 0, 2 }, { 10, 11, 1, 3 }, { 4, 5, 0, 1 }, { 6, 7, 2, 3 } }, /* hex */ \114{ { 3, 4, 5 }, { 1, 2, 5 }, { 0, 2, 4 }, { 0, 1, 3 } }, /* tet */ \115{ { 0, 7, 3, 6 }, { 1, 8, 4, 7 }, { 2, 6, 5, 8 }, { 0, 1, 2 }, { 3, 4, 5 } }, /* prism */ \116{ { -1 } }, /* pyramid */ \117}118/** Mapping of face to edge neighbor for each eclass. */119#define T8_FACE_TO_EDGE_NEIGHBOR_VALUES {\120{ { -1 } }, /* vertex */ \121{ { -1 } }, /* line */ \122{ { 2, 3 }, { 2, 3 }, { 0, 1 }, { 0, 1 } }, /* quad */ \123{ { 2, 1 }, { 2, 0 }, { 1, 0 } }, /* triangle */ \124{ { 0, 1, 2, 3 }, { 0, 1, 2, 3 }, { 4, 5, 6, 7 }, { 4, 5, 6, 7 }, { 8, 9, 10, 11 }, { 8, 9, 10, 11 } }, /* hex */ \125{ { 0, 1, 2 }, { 0, 3, 4 }, { 1, 3, 5 }, { 2, 4, 5 } }, /* tet */ \126{ { 1, 2, 4, 5 }, { 0, 2, 3, 5 }, { 0, 1, 3, 4 }, { 6, 7, 8 }, { 6, 7, 8 } }, /* prism */ \127{ { -1 } }, /* pyramid */ \128}129/** Mapping of edge vertex to tree vertex for each eclass. */130#define T8_EDGE_VERTEX_TO_TREE_VERTEX_VALUES {\131{ { -1 } }, /* vertex */ \132{ { 0 }, { 1 } }, /* line */ \133{ { 0, 2 }, { 1, 3 }, { 0, 1 }, { 2, 3 } }, /* quad */ \134{ { 1, 2 }, { 0, 2 }, { 0, 1 } }, /* triangle */ \135{ { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 }, { 0, 2 }, { 1, 3 }, { 4, 6 }, { 5, 7 }, { 0, 4 }, { 1, 5 }, { 2, 6 }, { 3, 7 } }, /* hex */ \136{ { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 1, 3 }, { 2, 3 } }, /* tet */ \137{ { 1, 2 }, { 0, 2 }, { 0, 1 }, { 4, 5 }, { 3, 5 }, { 3, 4 }, { 1, 4 }, { 2, 5 }, { 0, 3 } }, /* prism */ \138{ { -1 } }, /* pyramid */ \139}140/** Mapping of edge to face for each eclass. */141#define T8_EDGE_TO_FACE_VALUES {\142{ { -1 } }, /* vertex */ \143{ { 0 } }, /* line */ \144{ { 0 }, { 1 }, { 2 }, { 3 } }, /* quad */ \145{ { 0 }, { 1 }, { 2 } }, /* triangle */ \146{ { 2, 4 }, { 3, 4 }, { 2, 5 }, { 3, 5 }, { 0, 4 }, { 1, 4 }, { 0, 5 }, { 1, 5 }, { 0, 2 }, { 1, 2 }, { 0, 3 }, { 1, 3 } }, /* hex */ \147{ { 2, 3 }, { 1, 3 }, { 1, 2 }, { 0, 3 }, { 0, 2 }, { 0, 1 } }, /* tet */ \148{ { 0, 3 }, { 1, 3 }, { 2, 3 }, { 0, 4 }, { 1, 4 }, { 2, 4 }, { 0, 2 }, { 0, 1 }, { 1, 2 } }, /* prism */ \149{ { -1 } }, /* pyramid */ \150}151/** Face orientation values for each eclass. */152#define T8_ECLASS_FACE_ORIENTATION_VALUES {\153{ 0, -1, -1, -1, -1, -1 }, /* vertex */ \154{ 0, 0, -1, -1, -1, -1 }, /* line */ \155{ 0, 0, 0, 0, -1, -1 }, /* quad */ \156{ 0, 0, 0, -1, -1, -1 }, /* triangle */ \157{ 0, 1, 1, 0, 0, 1 }, /* hex */ \158{ 0, 1, 0, 1, -1, -1 }, /* tet */ \159{ 1, 0, 1, 0, 1, -1 }, /* prism */ \160{ 0, 1, 1, 0, 0, -1 } /* pyramid */ \161}162/** The reference faces of normal tets. */163#define T8_REFERENCE_FACE_NORMAL_TET_VALUES { { -1, 0, 0 }, { 1, 0, -1 }, { 0, -1, 1 }, { 0, 1, 0 } }164165/** Number of vertices for each eclass. */166#define T8_ECLASS_NUM_VERTICES_VALUES { 1, 2, 4, 3, 8, 4, 6, 5 }167/** Number of edges for each eclass. */168#define T8_ECLASS_NUM_EDGES_VALUES { 0, 1, 4, 3, 12, 6, 9, 8 }169/** VTK type for each eclass. */170#define T8_ECLASS_VTK_TYPE_VALUES { 1, 3, 9, 5, 12, 10, 13, 14 }171/** Mapping of vtk to t8code corner numbers for each eclass. */172#define T8_ECLASS_VTK_TO_T8_CORNER_NUMBER_VALUES {\173{ 0, -1, -1, -1, -1, -1, -1, -1 }, /* vertex */ \174{ 0, 1, -1, -1, -1, -1, -1, -1 }, /* line */ \175{ 0, 1, 3, 2, -1, -1, -1, -1 }, /* quad */ \176{ 0, 1, 2, -1, -1, -1, -1, -1 }, /* triangle */ \177{ 0, 1, 3, 2, 4, 5, 7, 6 }, /* hex */ \178{ 0, 2, 1, 3, -1, -1, -1, -1 }, /* tet */ \179{ 0, 2, 1, 3, 5, 4, -1, -1 }, /* prism */ \180{ 0, 1, 3, 2, 4, -1, -1, -1 } /* pyramid */ \181}182/** Mapping of t8code to vtk corner numbers for each eclass. */183#define T8_ECLASS_T8_TO_VTK_CORNER_NUMBER_VALUES {\184{ 0, -1, -1, -1, -1, -1, -1, -1 }, /* vertex */ \185{ 0, 1, -1, -1, -1, -1, -1, -1 }, /* line */ \186{ 0, 1, 3, 2, -1, -1, -1, -1 }, /* quad */ \187{ 0, 1, 2, -1, -1, -1, -1, -1 }, /* triangle */ \188{ 0, 1, 3, 2, 4, 5, 7, 6 }, /* hex */ \189{ 0, 2, 1, 3, -1, -1, -1, -1 }, /* tet */ \190{ 0, 2, 1, 3, 5, 4, -1, -1 }, /* prism */ \191{ 0, 1, 3, 2, 4, -1, -1, -1 } /* pyramid */ \192}193/** The face type for each eclass. */194#define T8_ECLASS_FACE_TYPES_VALUES {\195{ -1, -1, -1, -1, -1, -1 }, /* vertex */ \196{ 0, 0, -1, -1, -1, -1 }, /* line */ \197{ 1, 1, 1, 1, -1, -1 }, /* quad */ \198{ 1, 1, 1, -1, -1, -1 }, /* triangle */ \199{ 2, 2, 2, 2, 2, 2 }, /* hex */ \200{ 3, 3, 3, 3, -1, -1 }, /* tet */ \201{ 2, 2, 2, 3, 3, -1 }, /* prism */ \202{ 3, 3, 3, 3, 2, -1 } /* pyramid */ \203}204/** Number of boundaries for each eclass. */205#define T8_ECLASS_BOUNDARY_COUNT_VALUES {\206{ 0, 0, 0, 0, 0, 0, 0, 0 }, /* vertex */ \207{ 2, 0, 0, 0, 0, 0, 0, 0 }, /* line */ \208{ 4, 4, 0, 0, 0, 0, 0, 0 }, /* quad */ \209{ 3, 3, 0, 0, 0, 0, 0, 0 }, /* triangle */ \210{ 8, 12, 6, 0, 0, 0, 0, 0 }, /* hex */ \211{ 4, 6, 0, 4, 0, 0, 0, 0 }, /* tet */ \212{ 6, 9, 3, 2, 0, 0, 0, 0 }, /* prism */ \213{ 5, 8, 1, 4, 0, 0, 0, 0 } /* pyramid */ \214}215/** String for each eclass. */216#define T8_ECLASS_TO_STRING_VALUES { "Vertex", "Line", "Quad", "Triangle", "Hex", "Tet", "Prism", "Pyramid", "Invalid" }217218/* clang-format on */219220#ifdef __cplusplus221/* constexpr variables for cpp. They are wrapped in a namespace to have a different symbol222* as the C variables. The namespace also gets activated for all files which are compiled223* by a cpp compiler. This is necessary, because this header will be compiled by a C and CPP224* compiler and will be linked into the same library. And the same library cannot contain225* the same symbol twice. T8_EXTERN_C is disabled, because it disables the namespace.*/226227T8_EXTERN_C_END ();228229namespace t8cpp230{231/** Map each of the element classes to its dimension. */232inline constexpr int t8_eclass_to_dimension[T8_ECLASS_COUNT] = T8_ECLASS_TO_DIMENSION_VALUES;233234/** The number of codimension-one boundaries of an element class. */235inline constexpr int t8_eclass_num_faces[T8_ECLASS_COUNT] = T8_ECLASS_NUM_FACES_VALUES;236237/** For each dimension the maximum possible number of faces of an eclass of that dimension. */238inline constexpr int t8_eclass_max_num_faces[T8_ECLASS_MAX_DIM + 1] = T8_ECLASS_MAX_NUM_FACES_VALUES;239240/** The max number of children for each eclass */241inline constexpr int t8_eclass_max_num_children[T8_ECLASS_COUNT] = T8_ECLASS_MAX_NUM_CHILDREN_VALUES;242243/** For each eclass and each face f the entry i gives the vertex number244* of f's i-th vertex within all vertices of the tree. */245inline constexpr int t8_face_vertex_to_tree_vertex[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES][T8_ECLASS_MAX_CORNERS_2D]246= T8_FACE_VERTEX_TO_TREE_VERTEX_VALUES;247248/** For each eclass and each face f the entry i gives the edge number249* of f's i-th edge within all edges of the tree. */250inline constexpr int t8_face_edge_to_tree_edge[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES][T8_ECLASS_MAX_EDGES_2D]251= T8_FACE_EDGE_TO_TREE_EDGE_VALUES;252253/** For each eclass, each face f and the face vertex v, we get the edge number254* of the tree which is incident to vertex v but not part of f. */255inline constexpr int t8_face_to_edge_neighbor[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES][T8_ECLASS_MAX_CORNERS_2D]256= T8_FACE_TO_EDGE_NEIGHBOR_VALUES;257258/** For each eclass and each edge e the entry i gives the vertex number259* of e's i-th vertex within all vertices of the tree. */260inline constexpr int t8_edge_vertex_to_tree_vertex[T8_ECLASS_COUNT][T8_ECLASS_MAX_EDGES][2]261= T8_EDGE_VERTEX_TO_TREE_VERTEX_VALUES;262263/** For each eclass and each edge e the entry i gives the face number264* of e's i-th incident face within all faces of the tree. */265inline constexpr int t8_edge_to_face[T8_ECLASS_COUNT][T8_ECLASS_MAX_EDGES][2] = T8_EDGE_TO_FACE_VALUES;266267/** Each face is either 0 or 1 oriented, depending on the order of its vertices.268* We say a face is 0 oriented, if its normal vector points inwards,269* 1 oriented otherwise.270* The normal vector is computed as the cross product of v_1 - v_0 and v_2 - v_0.271* v_i being the i-th vertex.272* The faces of an eclass of dimension 2 or lower are all 0 oriented.273* Invalid values return -1.274*/275inline constexpr int t8_eclass_face_orientation[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES]276= T8_ECLASS_FACE_ORIENTATION_VALUES;277278/** The direction of the normal of each face of a tetrahedron. */279inline constexpr int t8_reference_face_normal_tet[T8_ECLASS_MAX_FACES][3] = T8_REFERENCE_FACE_NORMAL_TET_VALUES;280281/** The number of vertices of an element class. */282inline constexpr int t8_eclass_num_vertices[T8_ECLASS_COUNT] = T8_ECLASS_NUM_VERTICES_VALUES;283284/** The number of edges of an element class. */285inline constexpr int t8_eclass_num_edges[T8_ECLASS_COUNT] = T8_ECLASS_NUM_EDGES_VALUES;286287/** The vtk cell type for the eclass */288inline constexpr int t8_eclass_vtk_type[T8_ECLASS_COUNT] = T8_ECLASS_VTK_TYPE_VALUES;289290/** Map the vtk corner number to the t8 corner number.291* Invalid values return -1. */292inline constexpr int t8_eclass_vtk_to_t8_corner_number[T8_ECLASS_COUNT][T8_ECLASS_MAX_CORNERS]293= T8_ECLASS_VTK_TO_T8_CORNER_NUMBER_VALUES;294295/** Map the t8code corner number to the vtk corner number.296* Invalid values return -1.297*/298inline constexpr int t8_eclass_t8_to_vtk_corner_number[T8_ECLASS_COUNT][T8_ECLASS_MAX_CORNERS]299= T8_ECLASS_T8_TO_VTK_CORNER_NUMBER_VALUES;300301/** For each of the element classes, list the type of the faces.302* Invalid values return -1. */303inline constexpr int t8_eclass_face_types[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES] = T8_ECLASS_FACE_TYPES_VALUES;304305/** For each of the element classes, count the boundary points. */306inline constexpr int t8_eclass_boundary_count[T8_ECLASS_COUNT][T8_ECLASS_COUNT] = T8_ECLASS_BOUNDARY_COUNT_VALUES;307308/** For each eclass, the name of this class as a string */309inline constexpr const char *t8_eclass_to_string[T8_ECLASS_INVALID] = T8_ECLASS_TO_STRING_VALUES;310} /* namespace t8cpp */311312using namespace t8cpp;313314T8_EXTERN_C_BEGIN ();315316#else /*!__cplusplus*/317318/* extern variables for c. */319320/** Map each of the element classes to its dimension. */321extern const int t8_eclass_to_dimension[T8_ECLASS_COUNT];322323/** The number of codimension-one boundaries of an element class. */324extern const int t8_eclass_num_faces[T8_ECLASS_COUNT];325326/** For each dimension the maximum possible number of faces of an eclass of that dimension. */327extern const int t8_eclass_max_num_faces[T8_ECLASS_MAX_DIM + 1];328329/** The max number of children for each eclass */330extern const int t8_eclass_max_num_children[T8_ECLASS_COUNT];331332/** For each eclass and each face f the entry i gives the vertex number333* of f's i-th vertex within all vertices of the tree. */334extern const int t8_face_vertex_to_tree_vertex[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES][T8_ECLASS_MAX_CORNERS_2D];335336/** For each eclass and each face f the entry i gives the edge number337* of f's i-th edge within all edges of the tree. */338extern const int t8_face_edge_to_tree_edge[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES][T8_ECLASS_MAX_EDGES_2D];339340/** For each eclass, each face f and the face vertex v, we get the edge number341* of the tree which is incident to vertex v but not part of f. */342extern const int t8_face_to_edge_neighbor[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES][T8_ECLASS_MAX_CORNERS_2D];343344/** For each eclass and each edge e the entry i gives the vertex number345* of e's i-th vertex within all vertices of the tree. */346extern const int t8_edge_vertex_to_tree_vertex[T8_ECLASS_COUNT][T8_ECLASS_MAX_EDGES][2];347348/** For each eclass and each edge e the entry i gives the face number349* of e's i-th incident face within all faces of the tree. */350extern const int t8_edge_to_face[T8_ECLASS_COUNT][T8_ECLASS_MAX_EDGES][2];351352/** Each face is either 0 or 1 oriented, depending on the order of its vertices.353* We say a face is 0 oriented, if its normal vector points inwards,354* 1 oriented otherwise.355* The normal vector is computed as the cross product of v_1 - v_0 and v_2 - v_0.356* v_i being the i-th vertex.357* The faces of an eclass of dimension 2 or lower are all 0 oriented.358* Invalid values return -1.359*/360extern const int t8_eclass_face_orientation[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES];361362/** The direction of the normal of each face of a tetrahedron. */363extern const int t8_reference_face_normal_tet[T8_ECLASS_MAX_FACES][3];364365/** The number of vertices of an element class. */366extern const int t8_eclass_num_vertices[T8_ECLASS_COUNT];367368/** The number of edges of an element class. */369extern const int t8_eclass_num_edges[T8_ECLASS_COUNT];370371/** The vtk cell type for the eclass */372extern const int t8_eclass_vtk_type[T8_ECLASS_COUNT];373374/** Map the vtk corner number to the t8 corner number.375* Invalid values return -1. */376extern const int t8_eclass_vtk_to_t8_corner_number[T8_ECLASS_COUNT][T8_ECLASS_MAX_CORNERS];377378/** Map the t8code corner number to the vtk corner number.379* Invalid values return -1. */380extern const int t8_eclass_t8_to_vtk_corner_number[T8_ECLASS_COUNT][T8_ECLASS_MAX_CORNERS];381382/** For each of the element classes, list the type of the faces.383* Invalid values return -1. */384extern const int t8_eclass_face_types[T8_ECLASS_COUNT][T8_ECLASS_MAX_FACES];385386/** For each of the element classes, count the boundary points. */387extern const int t8_eclass_boundary_count[T8_ECLASS_COUNT][T8_ECLASS_COUNT];388389/** For each eclass, the name of this class as a string */390extern const char *t8_eclass_to_string[T8_ECLASS_INVALID];391392#endif /* !__cplusplus */393394/* Undefine values so that they do not leak into other files.395* They can be kept using KEEP_ECLASS_VALUE_DEFINITIONS. This is needed396* to use them in the eclass.c file. */397#ifndef KEEP_ECLASS_VALUE_DEFINITIONS398399#undef T8_ECLASS_TO_DIMENSION_VALUES400#undef T8_ECLASS_NUM_FACES_VALUES401#undef T8_ECLASS_MAX_NUM_FACES_VALUES402#undef T8_ECLASS_MAX_NUM_CHILDREN_VALUES403#undef T8_FACE_VERTEX_TO_TREE_VERTEX_VALUES404#undef T8_FACE_EDGE_TO_TREE_EDGE_VALUES405#undef T8_FACE_TO_EDGE_NEIGHBOR_VALUES406#undef T8_EDGE_VERTEX_TO_TREE_VERTEX_VALUES407#undef T8_EDGE_TO_FACE_VALUES408#undef T8_ECLASS_FACE_ORIENTATION_VALUES409#undef T8_REFERENCE_FACE_NORMAL_TET_VALUES410#undef T8_ECLASS_NUM_VERTICES_VALUES411#undef T8_ECLASS_NUM_EDGES_VALUES412#undef T8_ECLASS_VTK_TYPE_VALUES413#undef T8_ECLASS_VTK_TO_T8_CORNER_NUMBER_VALUES414#undef T8_ECLASS_T8_TO_VTK_CORNER_NUMBER_VALUES415#undef T8_ECLASS_FACE_TYPES_VALUES416#undef T8_ECLASS_BOUNDARY_COUNT_VALUES417#undef T8_ECLASS_TO_STRING_VALUES418419#endif420421/** Query the element class and count of boundary points.422* \param [in] theclass We query a point of this element class.423* \param [in] min_dim Ignore boundary points of lesser dimension.424* The ignored points get a count value of 0.425* \param [out] per_eclass Array of length T8_ECLASS_COUNT to be filled426* with the count of the boundary objects,427* counted per each of the element classes.428* \return The count over all boundary points.429*/430int431t8_eclass_count_boundary (t8_eclass_t theclass, int min_dim, int *per_eclass);432433/** Compare two eclasses of the same dimension434* as necessary for face neighbor orientation.435* The implemented order is Triangle < Square in 2D and436* Tet < Hex < Prism < Pyramid in 3D.437* \param [in] eclass1 The first eclass to compare.438* \param [in] eclass2 The second eclass to compare.439* \return 0 if the eclasses are equal, 1 if eclass1 > eclass2440* and -1 if eclass1 < eclass2441*/442int443t8_eclass_compare (t8_eclass_t eclass1, t8_eclass_t eclass2);444445/** Check whether a class is a valid class. Returns non-zero if it is a valid class,446* returns zero, if the class is equal to T8_ECLASS_INVALID.447*448* \param [in] eclass The eclass to check.449* \return Non-zero if \a eclass is valid, zero otherwise.450*/451int452t8_eclass_is_valid (t8_eclass_t eclass);453454/** End of code that is callable from "C".*/455T8_EXTERN_C_END ();456457#endif /* !T8_ELEMENT_H */458459460