Basix 0.12.0.dev0
Loading...
Searching...
No Matches
cell.h
1// Copyright (c) 2020 Chris Richardson
2// FEniCS Project
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
7#include <array>
8#include <concepts>
9#include <utility>
10#include <vector>
11
13
16namespace basix::cell
17{
18
20enum class type : int
21{
22 point = 0,
23 interval = 1,
24 triangle = 2,
25 tetrahedron = 3,
26 quadrilateral = 4,
27 hexahedron = 5,
28 prism = 6,
29 pyramid = 7
30};
31
37template <std::floating_point T>
38std::pair<std::vector<T>, std::array<std::size_t, 2>>
39geometry(cell::type celltype);
40
44std::vector<std::vector<std::vector<int>>> topology(cell::type celltype);
45
57std::vector<std::vector<std::vector<std::vector<int>>>>
59
65template <std::floating_point T>
66std::pair<std::vector<T>, std::array<std::size_t, 2>>
67sub_entity_geometry(cell::type celltype, int dim, int index);
68
73int num_sub_entities(cell::type celltype, int dim);
74
79
85cell::type sub_entity_type(cell::type celltype, int dim, int index);
86
90template <std::floating_point T>
91T volume(cell::type cell_type);
92
96template <std::floating_point T>
97std::pair<std::vector<T>, std::array<std::size_t, 2>>
99
105template <std::floating_point T>
106std::pair<std::vector<T>, std::array<std::size_t, 2>>
108
113template <std::floating_point T>
114std::pair<std::vector<T>, std::array<std::size_t, 2>>
115facet_normals(cell::type cell_type);
116
121std::vector<bool> facet_orientations(cell::type cell_type);
122
126template <std::floating_point T>
127std::vector<T> facet_reference_volumes(cell::type cell_type);
128
132std::vector<std::vector<cell::type>> subentity_types(cell::type cell_type);
133
139template <std::floating_point T>
140std::pair<std::vector<T>, std::array<std::size_t, 3>>
141entity_jacobians(cell::type cell_type, std::size_t e_dim);
142
147template <std::floating_point T>
148std::pair<std::vector<T>, std::array<std::size_t, 3>>
149facet_jacobians(cell::type cell_type);
150
155template <std::floating_point T>
156std::pair<std::vector<T>, std::array<std::size_t, 3>>
157edge_jacobians(cell::type cell_type);
158
159} // namespace basix::cell
Information about reference cells.
Definition cell.h:17
std::vector< bool > facet_orientations(cell::type cell_type)
Definition cell.cpp:556
int num_sub_entities(cell::type celltype, int dim)
Definition cell.cpp:345
type
Cell type.
Definition cell.h:21
std::pair< std::vector< T >, std::array< std::size_t, 3 > > facet_jacobians(cell::type cell_type)
Definition cell.cpp:693
cell::type sub_entity_type(cell::type celltype, int dim, int index)
Definition cell.cpp:379
std::vector< T > facet_reference_volumes(cell::type cell_type)
Definition cell.cpp:587
std::vector< std::vector< std::vector< int > > > topology(cell::type celltype)
Definition cell.cpp:52
std::vector< std::vector< cell::type > > subentity_types(cell::type cell_type)
Definition cell.cpp:598
std::pair< std::vector< T >, std::array< std::size_t, 3 > > edge_jacobians(cell::type cell_type)
Definition cell.cpp:707
std::pair< std::vector< T >, std::array< std::size_t, 3 > > entity_jacobians(cell::type cell_type, std::size_t e_dim)
Definition cell.cpp:662
int topological_dimension(cell::type celltype)
Definition cell.cpp:294
std::vector< std::vector< std::vector< std::vector< int > > > > sub_entity_connectivity(cell::type celltype)
Definition cell.cpp:143
std::pair< std::vector< T >, std::array< std::size_t, 2 > > sub_entity_geometry(cell::type celltype, int dim, int index)
Definition cell.cpp:321
std::pair< std::vector< T >, std::array< std::size_t, 2 > > facet_normals(cell::type cell_type)
Definition cell.cpp:450
std::pair< std::vector< T >, std::array< std::size_t, 2 > > scaled_facet_normals(cell::type cell_type)
Definition cell.cpp:507
T volume(cell::type cell_type)
Definition cell.cpp:404
std::pair< std::vector< T >, std::array< std::size_t, 2 > > facet_outward_normals(cell::type cell_type)
Definition cell.cpp:431
std::pair< std::vector< T >, std::array< std::size_t, 2 > > geometry(cell::type celltype)
Definition cell.cpp:20