/*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) 2015 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#include <t8_element_shape.h>2324const int t8_element_shape_max_num_corner[T8_ECLASS_MAX_DIM + 1] = { 0, 2, 4, 8 };2526/** The number of codimension-one boundaries of an element class. */27int28t8_element_shape_num_faces (int element_shape)29{30return t8_eclass_num_faces[element_shape];31}3233/** For each dimension the maximum possible number of faces of an element_shape of that dimension. */34int35t8_element_shape_max_num_faces (int element_shape)36{37return t8_eclass_max_num_faces[element_shape];38}3940/** The number of vertices of an element class. */41int42t8_element_shape_num_vertices (int element_shape)43{44return t8_eclass_num_vertices[element_shape];45}4647/** The vtk cell type for the element_shape */48int49t8_element_shape_vtk_type (int element_shape)50{51return t8_eclass_vtk_type[element_shape];52}5354/** Maps the t8code corner number of the element to the vtk corner number55* \param [in] element_shape The shape of the element.56* \param [in] index The index of the corner in z-order (t8code numeration).57* \return The corresponding vtk index.58*/59int60t8_element_shape_t8_to_vtk_corner_number (int element_shape, int index)61{62return t8_eclass_t8_to_vtk_corner_number[element_shape][index];63}6465/** Maps the vtk corner number of the element to the t8code corner number66* \param [in] element_shape The shape of the element.67* \param [in] index The index of the corner in vtk ordering.68* \return The corresponding t8code index.69*/70int71t8_element_shape_vtk_to_t8_corner_number (int element_shape, int index)72{73return t8_eclass_vtk_to_t8_corner_number[element_shape][index];74}7576/** For each element_shape, the name of this class as a string */77const char*78t8_element_shape_to_string (int element_shape)79{80return t8_eclass_to_string[element_shape];81}8283/* Currently t8_element_shape equals t8_eclass, if they will differ, this function has to be adapted. */84int85t8_element_shape_compare (t8_element_shape_t element_shape1, t8_element_shape_t element_shape2)86{87return t8_eclass_compare ((t8_eclass_t) element_shape1, (t8_eclass_t) element_shape2);88}899091