Loading...
Searching...
No Matches
cells.h
// Copyright (C) 2019 Jorgen S. Dokken
//
// This file is part of DOLFINx (https://www.fenicsproject.org)
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <array>
#include <cstdint>
#include <dolfinx/mesh/cell_types.h>
#include <span>
#include <vector>
namespace dolfinx::io::cells
{
int cell_degree(mesh::CellType type, int num_nodes);
std::vector<std::uint16_t> perm_vtk(mesh::CellType type, int num_nodes);
std::vector<std::uint16_t> perm_gmsh(mesh::CellType type, int num_nodes);
std::vector<std::uint16_t> transpose(std::span<const std::uint16_t> map);
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);
std::int8_t get_vtk_cell_type(mesh::CellType cell, int dim);
} // namespace dolfinx::io::cells
dolfinx::io::cells
Functions for the re-ordering of input mesh topology to the DOLFINx ordering, and transpose orderings...
Definition cells.h:119
dolfinx::io::cells::get_vtk_cell_type
std::int8_t get_vtk_cell_type(mesh::CellType cell, int dim)
Get VTK cell identifier.
Definition cells.cpp:707
dolfinx::io::cells::perm_vtk
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:525
dolfinx::io::cells::transpose
std::vector< std::uint16_t > transpose(std::span< const std::uint16_t > map)
Compute the transpose of a re-ordering map.
Definition cells.cpp:679
dolfinx::io::cells::apply_permutation
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:688
dolfinx::io::cells::perm_gmsh
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:563
dolfinx::io::cells::cell_degree
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:601
dolfinx::mesh::CellType
CellType
Cell type identifier.
Definition cell_types.h:22