DOLFINx 0.9.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
cells.h
1// Copyright (C) 2019 Jorgen S. Dokken
2//
3// This file is part of DOLFINx (https://www.fenicsproject.org)
4//
5// SPDX-License-Identifier: LGPL-3.0-or-later
6
7#pragma once
8
9#include <array>
10#include <cstdint>
11#include <dolfinx/mesh/cell_types.h>
12#include <span>
13#include <vector>
14
20
119{
120
129std::vector<std::uint16_t> perm_vtk(mesh::CellType type, int num_nodes);
130
139std::vector<std::uint16_t> perm_gmsh(mesh::CellType type, int num_nodes);
140
146std::vector<std::uint16_t> transpose(std::span<const std::uint16_t> map);
147
157std::vector<std::int64_t> apply_permutation(std::span<const std::int64_t> cells,
158 std::array<std::size_t, 2> shape,
159 std::span<const std::uint16_t> p);
160
165std::int8_t get_vtk_cell_type(mesh::CellType cell, int dim);
166
167} // namespace dolfinx::io::cells
Functions for the re-ordering of input mesh topology to the DOLFINx ordering, and transpose orderings...
Definition cells.h:119
std::int8_t get_vtk_cell_type(mesh::CellType cell, int dim)
Definition cells.cpp:682
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:577
std::vector< std::uint16_t > transpose(std::span< const std::uint16_t > map)
Compute the transpose of a re-ordering map.
Definition cells.cpp:654
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)
Definition cells.cpp:663
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:615
CellType
Cell type identifier.
Definition cell_types.h:22