Basix
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
15namespace basix::cell
16{
17
19enum 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
36std::pair<std::vector<double>, std::array<std::size_t, 2>>
37geometry(cell::type celltype);
38
42std::vector<std::vector<std::vector<int>>> topology(cell::type celltype);
43
54std::vector<std::vector<std::vector<std::vector<int>>>>
56
62std::pair<std::vector<double>, std::array<std::size_t, 2>>
63sub_entity_geometry(cell::type celltype, int dim, int index);
64
72int num_sub_entities(cell::type celltype, int dim);
73
78
84cell::type sub_entity_type(cell::type celltype, int dim, int index);
85
89double volume(cell::type cell_type);
90
94std::pair<std::vector<double>, std::array<std::size_t, 2>>
96
101std::pair<std::vector<double>, std::array<std::size_t, 2>>
102facet_normals(cell::type cell_type);
103
108std::vector<bool> facet_orientations(cell::type cell_type);
109
113// FIXME: This could be a std::vector<double>
114std::vector<double> facet_reference_volumes(cell::type cell_type);
115
119std::vector<std::vector<cell::type>> subentity_types(cell::type cell_type);
120
124std::pair<std::vector<double>, std::array<std::size_t, 3>>
125facet_jacobians(cell::type cell_type);
126
127} // namespace basix::cell
Information about reference cells.
Definition: cell.h:16
std::vector< bool > facet_orientations(cell::type cell_type)
Definition: cell.cpp:477
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:584
cell::type sub_entity_type(cell::type celltype, int dim, int index)
Definition: cell.cpp:351
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:521
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:420
std::vector< double > facet_reference_volumes(cell::type cell_type)
Definition: cell.cpp:508
double volume(cell::type cell_type)
Definition: cell.cpp:375
std::pair< std::vector< double >, std::array< std::size_t, 2 > > facet_outward_normals(cell::type cell_type)
Definition: cell.cpp:401