Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/basix/v0.9.0/cpp/cell_8h_source.html
Home Installation 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 <vector>
8 #include <xtensor/xtensor.hpp>
9 
12 namespace basix::cell
13 {
14 
16 enum class type
17 {
18  point = 0,
19  interval = 1,
20  triangle = 2,
21  tetrahedron = 3,
22  quadrilateral = 4,
23  hexahedron = 5,
24  prism = 6,
25  pyramid = 7
26 };
27 
31 xt::xtensor<double, 2> geometry(cell::type celltype);
32 
36 std::vector<std::vector<std::vector<int>>> topology(cell::type celltype);
37 
48 std::vector<std::vector<std::vector<std::vector<int>>>>
50 
56 xt::xtensor<double, 2> sub_entity_geometry(cell::type celltype, int dim,
57  int index);
58 
66 int num_sub_entities(cell::type celltype, int dim);
67 
71 int topological_dimension(cell::type celltype);
72 
78 cell::type sub_entity_type(cell::type celltype, int dim, int index);
79 
83 cell::type str_to_type(std::string name);
84 
86 const std::string& type_to_str(cell::type type);
87 
90 double volume(cell::type cell_type);
91 
94 xt::xtensor<double, 2> facet_outward_normals(cell::type cell_type);
95 
99 xt::xtensor<double, 2> facet_normals(cell::type cell_type);
100 
104 std::vector<bool> facet_orientations(cell::type cell_type);
105 
108 xt::xtensor<double, 1> facet_reference_volumes(cell::type cell_type);
109 
112 std::vector<std::vector<cell::type>> subentity_types(cell::type cell_type);
113 
116 xt::xtensor<double, 3> facet_jacobians(cell::type cell_type);
117 
118 } // namespace basix::cell
basix::cell::str_to_type
cell::type str_to_type(std::string name)
Definition: cell.cpp:366
basix::cell::topological_dimension
int topological_dimension(cell::type celltype)
Definition: cell.cpp:293
basix::cell::facet_outward_normals
xt::xtensor< double, 2 > facet_outward_normals(cell::type cell_type)
Definition: cell.cpp:427
basix::cell::type
type
Cell type.
Definition: cell.h:16
basix::cell::facet_jacobians
xt::xtensor< double, 3 > facet_jacobians(cell::type cell_type)
Definition: cell.cpp:581
basix::cell::topology
std::vector< std::vector< std::vector< int > > > topology(cell::type celltype)
Definition: cell.cpp:69
basix::cell::facet_reference_volumes
xt::xtensor< double, 1 > facet_reference_volumes(cell::type cell_type)
Definition: cell.cpp:508
basix::cell::facet_normals
xt::xtensor< double, 2 > facet_normals(cell::type cell_type)
Definition: cell.cpp:441
basix::cell::volume
double volume(cell::type cell_type)
Definition: cell.cpp:404
basix::cell::subentity_types
std::vector< std::vector< cell::type > > subentity_types(cell::type cell_type)
Definition: cell.cpp:521
basix::cell::num_sub_entities
int num_sub_entities(cell::type celltype, int dim)
Definition: cell.cpp:335
basix::cell::type_to_str
const std::string & type_to_str(cell::type type)
Convert cell type enum to string.
Definition: cell.cpp:385
basix::cell::geometry
xt::xtensor< double, 2 > geometry(cell::type celltype)
Definition: cell.cpp:28
basix::cell::facet_orientations
std::vector< bool > facet_orientations(cell::type cell_type)
Definition: cell.cpp:487
basix::cell::sub_entity_connectivity
std::vector< std::vector< std::vector< std::vector< int > > > > sub_entity_connectivity(cell::type celltype)
Definition: cell.cpp:155
basix::cell::sub_entity_geometry
xt::xtensor< double, 2 > sub_entity_geometry(cell::type celltype, int dim, int index)
Definition: cell.cpp:317
basix::cell::sub_entity_type
cell::type sub_entity_type(cell::type celltype, int dim, int index)
Definition: cell.cpp:342
basix::cell
Definition: cell.h:12