12#include <dolfinx/mesh/cell_types.h>
170std::vector<std::uint16_t>
transpose(std::span<const std::uint16_t> map);
184 std::array<std::size_t, 2> shape,
185 std::span<const std::uint16_t> p);
212inline std::tuple<mesh::CellType, std::int8_t>
218 switch (vtk_cell_type)
224 return {interval, 1};
226 return {triangle, 1};
228 return {quadrilateral, 1};
230 return {tetrahedron, 1};
232 return {hexahedron, 1};
238 return {interval, 2};
240 return {triangle, 2};
242 return {quadrilateral, 2};
244 return {tetrahedron, 2};
246 return {hexahedron, 2};
252 return {interval, 3};
254 return {interval, -1};
256 return {triangle, -1};
258 return {quadrilateral, -1};
260 return {tetrahedron, -1};
262 return {hexahedron, -1};
271 throw std::invalid_argument(
"Unknown VTK cell type");
Functions for the re-ordering of input mesh topology to the DOLFINx ordering, and transpose orderings...
Definition cells.h:122
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:213
std::int8_t get_vtk_cell_type(mesh::CellType cell, int num_nodes)
Get the VTK cell identifier for a cell type and node layout.
Definition cells.cpp:749
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:556
std::vector< std::uint16_t > transpose(std::span< const std::uint16_t > map)
Compute the transpose of a re-ordering map.
Definition cells.cpp:720
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:729
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:594
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:632
CellType
Cell type identifier.
Definition cell_types.h:24