Basix 0.6.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 <utility>
9 #include <vector>
10 
12 
15 namespace basix::cell
16 {
17 
19 enum class type
20 {
21  point = 0,
22  interval = 1,
23  triangle = 2,
24  tetrahedron = 3,
25  quadrilateral = 4,
26  hexahedron = 5,
27  prism = 6,
28  pyramid = 7
29 };
30 
36 std::pair<std::vector<double>, std::array<std::size_t, 2>>
37 geometry(cell::type celltype);
38 
42 std::vector<std::vector<std::vector<int>>> topology(cell::type celltype);
43 
54 std::vector<std::vector<std::vector<std::vector<int>>>>
56 
62 std::pair<std::vector<double>, std::array<std::size_t, 2>>
63 sub_entity_geometry(cell::type celltype, int dim, int index);
64 
69 int num_sub_entities(cell::type celltype, int dim);
70 
74 int topological_dimension(cell::type celltype);
75 
81 cell::type sub_entity_type(cell::type celltype, int dim, int index);
82 
86 double volume(cell::type cell_type);
87 
91 std::pair<std::vector<double>, std::array<std::size_t, 2>>
93 
98 std::pair<std::vector<double>, std::array<std::size_t, 2>>
99 facet_normals(cell::type cell_type);
100 
105 std::vector<bool> facet_orientations(cell::type cell_type);
106 
110 // FIXME: This could be a std::vector<double>
111 std::vector<double> facet_reference_volumes(cell::type cell_type);
112 
116 std::vector<std::vector<cell::type>> subentity_types(cell::type cell_type);
117 
121 std::pair<std::vector<double>, std::array<std::size_t, 3>>
122 facet_jacobians(cell::type cell_type);
123 
124 } // namespace basix::cell
Information about reference cells.
Definition: cell.h:16
std::vector< bool > facet_orientations(cell::type cell_type)
Definition: cell.cpp:504
int num_sub_entities(cell::type celltype, int dim)
Definition: cell.cpp:344
std::pair< std::vector< double >, 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:378
std::pair< std::vector< double >, std::array< std::size_t, 2 > > sub_entity_geometry(cell::type celltype, int dim, int index)
Definition: cell.cpp:319
std::vector< std::vector< std::vector< int > > > topology(cell::type celltype)
Definition: cell.cpp:51
std::vector< std::vector< cell::type > > subentity_types(cell::type cell_type)
Definition: cell.cpp:548
type
Cell type.
Definition: cell.h:20
int topological_dimension(cell::type celltype)
Definition: cell.cpp:293
std::vector< std::vector< std::vector< std::vector< int > > > > sub_entity_connectivity(cell::type celltype)
Definition: cell.cpp:142
std::pair< std::vector< double >, std::array< std::size_t, 2 > > geometry(cell::type celltype)
Definition: cell.cpp:19
std::pair< std::vector< double >, std::array< std::size_t, 2 > > facet_normals(cell::type cell_type)
Definition: cell.cpp:447
std::vector< double > facet_reference_volumes(cell::type cell_type)
Definition: cell.cpp:535
double volume(cell::type cell_type)
Definition: cell.cpp:402
std::pair< std::vector< double >, std::array< std::size_t, 2 > > facet_outward_normals(cell::type cell_type)
Definition: cell.cpp:428