Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/basix/v0.9.0/cpp/namespacebasix_1_1cell.html

Basix 0.7.0

Home     Installation     Demos     C++ docs     Python docs

Enumerations | Functions
basix::cell Namespace Reference

Information about reference cells. More...

Enumerations

enum class  type {
  point = 0 , interval = 1 , triangle = 2 , tetrahedron = 3 ,
  quadrilateral = 4 , hexahedron = 5 , prism = 6 , pyramid = 7
}
 Cell type.
 

Functions

template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 2 > > geometry (cell::type celltype)
 
std::vector< std::vector< std::vector< int > > > topology (cell::type celltype)
 
std::vector< std::vector< std::vector< std::vector< int > > > > sub_entity_connectivity (cell::type celltype)
 
template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 2 > > sub_entity_geometry (cell::type celltype, int dim, int index)
 
int num_sub_entities (cell::type celltype, int dim)
 
int topological_dimension (cell::type celltype)
 
cell::type sub_entity_type (cell::type celltype, int dim, int index)
 
template<std::floating_point T>
volume (cell::type cell_type)
 
template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 2 > > facet_outward_normals (cell::type cell_type)
 
template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 2 > > facet_normals (cell::type cell_type)
 
std::vector< bool > facet_orientations (cell::type cell_type)
 
template<std::floating_point T>
std::vector< T > facet_reference_volumes (cell::type cell_type)
 
std::vector< std::vector< cell::type > > subentity_types (cell::type cell_type)
 
template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 3 > > facet_jacobians (cell::type cell_type)
 

Detailed Description

Information about reference cells.

This namespace include functions that can be used to obtain geometric and topological information about reference cells

Function Documentation

◆ facet_jacobians()

template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 3 > > basix::cell::facet_jacobians ( cell::type  cell_type)

Get the jacobians of the facets of a reference cell

Parameters
cell_typeType of cell
Returns
The jacobians of the facets. Shape is (nfacets, gdim, gdim - 1)

◆ facet_normals()

template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 2 > > basix::cell::facet_normals ( cell::type  cell_type)

Get the normals to the facets of a reference cell oriented using the low-to-high ordering of the facet

Parameters
cell_typeType of cell
Returns
The normals. Shape is (nfacets, gdim)

◆ facet_orientations()

std::vector< bool > basix::cell::facet_orientations ( cell::type  cell_type)

Get an array of bools indicating whether or not the facet normals are outward pointing

Parameters
cell_typeType of cell
Returns
The orientations

◆ facet_outward_normals()

template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 2 > > basix::cell::facet_outward_normals ( cell::type  cell_type)

Get the (outward) normals to the facets of a reference cell

Parameters
cell_typeType of cell
Returns
The outward normals. Shape is (nfacets, gdim)

◆ facet_reference_volumes()

template<std::floating_point T>
std::vector< T > basix::cell::facet_reference_volumes ( cell::type  cell_type)

Get the reference volumes of the facets of a reference cell

Parameters
cell_typeType of cell
Returns
The volumes of the references associated with each facet

◆ geometry()

template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 2 > > basix::cell::geometry ( cell::type  celltype)

Cell geometry

Parameters
celltypeCell Type
Returns
(0) Vertex point data of the cell and (1) the shape of the data array. The points are stored in row-major format and the shape is is (npoints, gdim)

◆ num_sub_entities()

int basix::cell::num_sub_entities ( cell::type  celltype,
int  dim 
)

Number of sub-entities of a cell by topological dimension

Parameters
celltypeThe cell::type
dimDimension of sub-entity
Returns
The number of sub-entities of the given dimension

◆ sub_entity_connectivity()

std::vector< std::vector< std::vector< std::vector< int > > > > basix::cell::sub_entity_connectivity ( cell::type  celltype)

Get the numbers of entities connected to each subentity of the cell.

Returns a vector of the form: output[dim][entity_n][connected_dim] = [connected_entity_n0, connected_entity_n1, ...] This indicates that the entity of dimension dim and number entity_n is connected to the entities of dimension connected_dim and numbers connected_entity_n0, connected_entity_n1, ...

Parameters
celltypeCell Type
Returns
List of topology (vertex indices) for each dimension (0..tdim)

◆ sub_entity_geometry()

template<std::floating_point T>
std::pair< std::vector< T >, std::array< std::size_t, 2 > > basix::cell::sub_entity_geometry ( cell::type  celltype,
int  dim,
int  index 
)

Sub-entity of a cell, given by topological dimension and index

Parameters
celltypeThe cell::type
dimDimension of sub-entity
indexLocal index of sub-entity
Returns
Set of vertex points of the sub-entity. Shape is (npoints, gdim)

◆ sub_entity_type()

cell::type basix::cell::sub_entity_type ( cell::type  celltype,
int  dim,
int  index 
)

Get the cell type of a sub-entity of given dimension and index

Parameters
celltypeType of cell
dimTopological dimension of sub-entity
indexIndex of sub-entity
Returns
cell type of sub-entity

◆ subentity_types()

std::vector< std::vector< cell::type > > basix::cell::subentity_types ( cell::type  cell_type)

Get the types of the subentities of a reference cell

Parameters
cell_typeType of cell
Returns
The subentity types. Indices are (tdim, entity)

◆ topological_dimension()

int basix::cell::topological_dimension ( cell::type  celltype)

Get the topological dimension for a given cell type

Parameters
celltypeCell type
Returns
the topological dimension

◆ topology()

std::vector< std::vector< std::vector< int > > > basix::cell::topology ( cell::type  celltype)

Cell topology

Parameters
celltypeCell Type
Returns
List of topology (vertex indices) for each dimension (0..tdim)

◆ volume()

template<std::floating_point T>
T basix::cell::volume ( cell::type  cell_type)

Get the volume of a reference cell

Parameters
cell_typeType of cell
Returns
The volume of the cell