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
69int num_sub_entities(cell::type celltype, int dim);
70
75
81cell::type sub_entity_type(cell::type celltype, int dim, int index);
82
86double volume(cell::type cell_type);
87
91std::pair<std::vector<double>, std::array<std::size_t, 2>>
93
98std::pair<std::vector<double>, std::array<std::size_t, 2>>
99facet_normals(cell::type cell_type);
100
105std::vector<bool> facet_orientations(cell::type cell_type);
106
110// FIXME: This could be a std::vector<double>
111std::vector<double> facet_reference_volumes(cell::type cell_type);
112
116std::vector<std::vector<cell::type>> subentity_types(cell::type cell_type);
117
121std::pair<std::vector<double>, std::array<std::size_t, 3>>
122facet_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