10#include <basix/cell.h>
11#include <dolfinx/graph/AdjacencyList.h>
50 case CellType::interval:
52 case CellType::triangle:
54 case CellType::quadrilateral:
56 case CellType::tetrahedron:
58 case CellType::hexahedron:
62 case CellType::pyramid:
65 throw std::runtime_error(
"Unsupported cell type");
83 return CellType::point;
84 case CellType::interval:
85 return CellType::point;
86 case CellType::triangle:
87 return CellType::interval;
88 case CellType::tetrahedron:
89 return CellType::triangle;
90 case CellType::quadrilateral:
91 return CellType::interval;
92 case CellType::pyramid:
94 return CellType::quadrilateral;
96 return CellType::triangle;
98 if (index == 0 or index == 4)
99 return CellType::triangle;
101 return CellType::quadrilateral;
102 case CellType::hexahedron:
103 return CellType::quadrilateral;
105 throw std::runtime_error(
"Unknown cell type.");
115 return CellType::interval;
116 else if (d == (dim - 1))
119 return CellType::point;
154std::map<std::array<int, 2>, std::vector<std::set<int>>>
This class provides a static adjacency list data structure.
Definition AdjacencyList.h:38
Mesh data structures and algorithms on meshes.
Definition DofMap.h:32
CellType cell_facet_type(CellType type, int index)
Return facet type of cell.
Definition cell_types.h:78
int cell_dim(CellType type)
Return topological dimension of cell type.
Definition cell_types.h:44
CellType cell_type_from_basix_type(basix::cell::type celltype)
Get a cell type from a Basix cell type.
Definition cell_types.cpp:188
CellType
Cell type identifier.
Definition cell_types.h:21
int num_cell_vertices(CellType type)
Number vertices for a cell type.
Definition cell_types.cpp:98
graph::AdjacencyList< int > get_entity_vertices(CellType type, int dim)
List of entities, where entity (e, k) is the local vertex index for the kth vertex of entity e of dim...
Definition cell_types.cpp:64
basix::cell::type cell_type_to_basix_type(CellType celltype)
Convert a cell type to a Basix cell type.
Definition cell_types.cpp:163
std::map< std::array< int, 2 >, std::vector< std::set< int > > > cell_entity_closure(CellType cell_type)
Definition cell_types.cpp:104
int cell_num_entities(CellType type, int dim)
Number of entities of dimension.
Definition cell_types.cpp:90
bool is_simplex(CellType type)
Check if cell is a simplex.
Definition cell_types.cpp:96
std::string to_string(CellType type)
Definition cell_types.cpp:17
CellType to_type(const std::string &cell)
Definition cell_types.cpp:42
CellType cell_entity_type(CellType type, int d, int index)
Return type of cell for entity of dimension d at given entity index.
Definition cell_types.h:110
graph::AdjacencyList< int > get_sub_entities(CellType type, int dim0, int dim1)
Definition cell_types.cpp:71