DOLFINx 0.12.0.0
DOLFINx C++
Loading...
Searching...
No Matches
permutationcomputation.h
1// Copyright (C) 2020 Matthew Scroggs
2// Copyright (C) 2020-2026 Matthew Scroggs, Jørgen S. Dokken and Garth N. Wells
3//
4// This file is part of DOLFINx (https://www.fenicsproject.org)
5//
6// SPDX-License-Identifier: LGPL-3.0-or-later
7
8#pragma once
9
10#include <cstdint>
11#include <vector>
12
13namespace dolfinx::mesh
14{
15class Topology;
16
28constexpr std::uint32_t reversed_facet_bit(int f)
29{
30 return std::uint32_t(1) << (27 + f);
31}
32
40constexpr std::uint32_t orientation_mask(int tdim)
41{
42 if (tdim == 2)
43 {
46 }
47 return 0;
48}
49
82std::vector<std::uint8_t> compute_entity_permutations(const Topology& topology,
83 int dim, int num_threads);
84
137std::vector<std::uint32_t> compute_cell_permutations(const Topology& topology,
138 int num_threads);
139
160std::vector<std::uint32_t> compute_facet_orientations(const Topology& topology);
161
162} // namespace dolfinx::mesh
Topology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relat...
Definition Topology.h:52
Mesh data structures and algorithms on meshes.
Definition DofMap.h:32
std::vector< std::uint32_t > compute_cell_permutations(const Topology &topology, int num_threads)
Compute the packed per-cell permutation data.
Definition permutationcomputation.cpp:469
std::vector< std::uint8_t > compute_entity_permutations(const Topology &topology, int dim, int num_threads)
Compute the permutation to apply to each cell-local entity of a given dimension.
Definition permutationcomputation.cpp:404
constexpr std::uint32_t reversed_facet_bit(int f)
Bit of the cell permutation info that negates the degrees-of-freedom on facet f of a cell (see Topolo...
Definition permutationcomputation.h:28
std::vector< std::uint32_t > compute_facet_orientations(const Topology &topology)
Find the facets whose two cells disagree on the normal (see Topology::create_facet_orientations).
Definition permutationcomputation.cpp:535
constexpr std::uint32_t orientation_mask(int tdim)
Bits of the cell permutation info that hold the facet signs of a cell of topological dimension tdim.
Definition permutationcomputation.h:40