11#include <dolfinx/mesh/cell_types.h>
156std::vector<std::uint16_t>
transpose(std::span<const std::uint16_t> map);
170 std::array<std::size_t, 2> shape,
171 std::span<const std::uint16_t> p);
185inline std::tuple<mesh::CellType, std::int8_t>
191 switch (vtk_cell_type)
197 return {interval, 1};
199 return {triangle, 1};
201 return {quadrilateral, 1};
203 return {tetrahedron, 1};
205 return {hexahedron, 1};
211 return {interval, 2};
213 return {triangle, 2};
215 return {quadrilateral, 2};
217 return {tetrahedron, 2};
219 return {hexahedron, 2};
225 return {interval, 3};
227 return {interval, -1};
229 return {triangle, -1};
231 return {quadrilateral, -1};
233 return {tetrahedron, -1};
235 return {hexahedron, -1};
244 throw std::runtime_error(
"Unknown VTK cell type");
Functions for the re-ordering of input mesh topology to the DOLFINx ordering, and transpose orderings...
Definition cells.h:119
std::tuple< mesh::CellType, std::int8_t > vtk_to_dolfinx(std::int8_t vtk_cell_type)
Get DOLFINx cell type and degree from VTK cell type.
Definition cells.h:186
std::int8_t get_vtk_cell_type(mesh::CellType cell, int dim)
Get VTK cell identifier.
Definition cells.cpp:715
std::vector< std::uint16_t > perm_vtk(mesh::CellType type, int num_nodes)
Permutation array to map from VTK to DOLFINx node ordering.
Definition cells.cpp:533
std::vector< std::uint16_t > transpose(std::span< const std::uint16_t > map)
Compute the transpose of a re-ordering map.
Definition cells.cpp:687
std::vector< std::int64_t > apply_permutation(std::span< const std::int64_t > cells, std::array< std::size_t, 2 > shape, std::span< const std::uint16_t > p)
Permute cell topology by applying a permutation array for each cell.
Definition cells.cpp:696
std::vector< std::uint16_t > perm_gmsh(mesh::CellType type, int num_nodes)
Permutation array to map from Gmsh to DOLFINx node ordering.
Definition cells.cpp:571
int cell_degree(mesh::CellType type, int num_nodes)
Get the Lagrange order of a given cell with a given number of nodes.
Definition cells.cpp:609
CellType
Cell type identifier.
Definition cell_types.h:21