Basix 0.5.1

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 
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 double volume(cell::type cell_type);
90 
94 std::pair<std::vector<double>, std::array<std::size_t, 2>>
96 
101 std::pair<std::vector<double>, std::array<std::size_t, 2>>
102 facet_normals(cell::type cell_type);
103 
108 std::vector<bool> facet_orientations(cell::type cell_type);
109 
113 // FIXME: This could be a std::vector<double>
114 std::vector<double> facet_reference_volumes(cell::type cell_type);
115 
119 std::vector<std::vector<cell::type>> subentity_types(cell::type cell_type);
120 
124 std::pair<std::vector<double>, std::array<std::size_t, 3>>
125 facet_jacobians(cell::type cell_type);
126 
127 } // namespace basix::cell
basix::cell::topological_dimension
int topological_dimension(cell::type celltype)
Definition: cell.cpp:293
basix::cell::type
type
Cell type.
Definition: cell.h:19
basix::cell::topology
std::vector< std::vector< std::vector< int > > > topology(cell::type celltype)
Definition: cell.cpp:51
basix::cell::geometry
std::pair< std::vector< double >, std::array< std::size_t, 2 > > geometry(cell::type celltype)
Definition: cell.cpp:19
basix::cell::sub_entity_geometry
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
basix::cell::volume
double volume(cell::type cell_type)
Definition: cell.cpp:375
basix::cell::subentity_types
std::vector< std::vector< cell::type > > subentity_types(cell::type cell_type)
Definition: cell.cpp:521
basix::cell::facet_jacobians
std::pair< std::vector< double >, std::array< std::size_t, 3 > > facet_jacobians(cell::type cell_type)
Definition: cell.cpp:584
basix::cell::facet_reference_volumes
std::vector< double > facet_reference_volumes(cell::type cell_type)
Definition: cell.cpp:508
basix::cell::num_sub_entities
int num_sub_entities(cell::type celltype, int dim)
Definition: cell.cpp:344
basix::cell::facet_normals
std::pair< std::vector< double >, std::array< std::size_t, 2 > > facet_normals(cell::type cell_type)
Definition: cell.cpp:420
basix::cell::facet_outward_normals
std::pair< std::vector< double >, std::array< std::size_t, 2 > > facet_outward_normals(cell::type cell_type)
Definition: cell.cpp:401
basix::cell::facet_orientations
std::vector< bool > facet_orientations(cell::type cell_type)
Definition: cell.cpp:477
basix::cell::sub_entity_connectivity
std::vector< std::vector< std::vector< std::vector< int > > > > sub_entity_connectivity(cell::type celltype)
Definition: cell.cpp:142
basix::cell::sub_entity_type
cell::type sub_entity_type(cell::type celltype, int dim, int index)
Definition: cell.cpp:351
basix::cell
Information about reference cells.
Definition: cell.h:15