basix.cell

Functions to get cell geometry information and manipulate cell types.

Functions

string_to_type(cell)

Convert a string to a Basix CellType.

type_to_string(celltype)

Convert a Basix CellType to a string.

basix.cell.facet_jacobians()

cell_facet_jacobians(arg0: basix._basixcpp.CellType) -> numpy.ndarray[numpy.float64]

Get the jacobians of the facets of a reference cell

Parameters

cell_type – Type of cell

Returns

The jacobians of the facets. Shape is (nfacets, gdim, gdim - 1)

basix.cell.facet_normals()

cell_facet_normals(arg0: basix._basixcpp.CellType) -> numpy.ndarray[numpy.float64]

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

Parameters

cell_type – Type of cell

Returns

The normals. Shape is (nfacets, gdim)

basix.cell.facet_orientations()

cell_facet_orientations(arg0: basix._basixcpp.CellType) -> List[bool]

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

Parameters

cell_type – Type of cell

Returns

The orientations

basix.cell.facet_outward_normals()

cell_facet_outward_normals(arg0: basix._basixcpp.CellType) -> numpy.ndarray[numpy.float64]

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

Parameters

cell_type – Type of cell

Returns

The outward normals. Shape is (nfacets, gdim)

basix.cell.facet_reference_volumes()

cell_facet_reference_volumes(arg0: basix._basixcpp.CellType) -> numpy.ndarray[numpy.float64]

Get the reference volumes of the facets of a reference cell

Parameters

cell_type – Type of cell

Returns

The volumes of the references associated with each facet

basix.cell.string_to_type(cell: str) CellType

Convert a string to a Basix CellType.

Parameters

cell – The name of the cell as a string.

Returns

The cell type

basix.cell.sub_entity_connectivity(arg0: basix::cell::type) List[List[List[List[int]]]]

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

celltype – Cell Type

Returns

List of topology (vertex indices) for each dimension (0..tdim)

basix.cell.type_to_string(celltype: CellType) str

Convert a Basix CellType to a string.

Parameters

celltype – The cell type.

Returns

The name of the cell as a string.

basix.cell.volume()

cell_volume(arg0: basix._basixcpp.CellType) -> float

Get the volume of a reference cell

Parameters

cell_type – Type of cell

Returns

The volume of the cell