Basix 0.9.0

Home     Installation     Demos     C++ docs     Python docs

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 
16 namespace basix::cell
17 {
18 
20 enum 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 
37 template <std::floating_point T>
38 std::pair<std::vector<T>, std::array<std::size_t, 2>>
39 geometry(cell::type celltype);
40 
44 std::vector<std::vector<std::vector<int>>> topology(cell::type celltype);
45 
56 std::vector<std::vector<std::vector<std::vector<int>>>>
58 
64 template <std::floating_point T>
65 std::pair<std::vector<T>, std::array<std::size_t, 2>>
66 sub_entity_geometry(cell::type celltype, int dim, int index);
67 
72 int num_sub_entities(cell::type celltype, int dim);
73 
77 int topological_dimension(cell::type celltype);
78 
84 cell::type sub_entity_type(cell::type celltype, int dim, int index);
85 
89 template <std::floating_point T>
90 T volume(cell::type cell_type);
91 
95 template <std::floating_point T>
96 std::pair<std::vector<T>, std::array<std::size_t, 2>>
98 
103 template <std::floating_point T>
104 std::pair<std::vector<T>, std::array<std::size_t, 2>>
105 facet_normals(cell::type cell_type);
106 
111 std::vector<bool> facet_orientations(cell::type cell_type);
112 
116 template <std::floating_point T>
117 std::vector<T> facet_reference_volumes(cell::type cell_type);
118 
122 std::vector<std::vector<cell::type>> subentity_types(cell::type cell_type);
123 
127 template <std::floating_point T>
128 std::pair<std::vector<T>, std::array<std::size_t, 3>>
129 facet_jacobians(cell::type cell_type);
130 
131 } // namespace basix::cell
Information about reference cells.
Definition: cell.h:17
std::vector< bool > facet_orientations(cell::type cell_type)
Definition: cell.cpp:506
int num_sub_entities(cell::type celltype, int dim)
Definition: cell.cpp:346
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:611
cell::type sub_entity_type(cell::type celltype, int dim, int index)
Definition: cell.cpp:380
std::vector< T > facet_reference_volumes(cell::type cell_type)
Definition: cell.cpp:537
std::vector< std::vector< std::vector< int > > > topology(cell::type celltype)
Definition: cell.cpp:53
std::vector< std::vector< cell::type > > subentity_types(cell::type cell_type)
Definition: cell.cpp:547
int topological_dimension(cell::type celltype)
Definition: cell.cpp:295
std::vector< std::vector< std::vector< std::vector< int > > > > sub_entity_connectivity(cell::type celltype)
Definition: cell.cpp:144
std::pair< std::vector< T >, std::array< std::size_t, 2 > > sub_entity_geometry(cell::type celltype, int dim, int index)
Definition: cell.cpp:322
std::pair< std::vector< T >, std::array< std::size_t, 2 > > facet_normals(cell::type cell_type)
Definition: cell.cpp:451
T volume(cell::type cell_type)
Definition: cell.cpp:405
std::pair< std::vector< T >, std::array< std::size_t, 2 > > facet_outward_normals(cell::type cell_type)
Definition: cell.cpp:432
std::pair< std::vector< T >, std::array< std::size_t, 2 > > geometry(cell::type celltype)
Definition: cell.cpp:21