# basix.numba_helpers

Helper functions for writing DOLFINx custom kernels using Numba.

basix.numba_helpers.T_apply(tdim: int, edge_count: int, face_count: int, entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[_ScalarT]]], entity_dofs: list[list[int]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int, face_types: list[str])

  Apply dof transformations to some data.

  Parameters:

    - tdim – The topological dimension of the cell.

    - edge_count – The number of edges the cell has.

    - face_count – The number of faces the cell has.

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

    - face_types – A list of strings giving the shapes of the faces of the cell.

basix.numba_helpers.T_apply_hexahedron(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Pre-apply dof transformations to some data on a hexahedron.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

basix.numba_helpers.T_apply_interval(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Apply dof transformations to some data on an interval.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

basix.numba_helpers.T_apply_prism(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Apply dof transformations to some data on an prism.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

basix.numba_helpers.T_apply_pyramid(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Apply dof transformations to some data on an prism.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

basix.numba_helpers.T_apply_quadrilateral(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Apply dof transformations to some data on an quadrilateral.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the sub-entities of the cell.

basix.numba_helpers.T_apply_tetrahedron(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Apply dof transformations to some data on a tetrahedron.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

basix.numba_helpers.T_apply_triangle(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Apply dof transformations to some data on a triangle.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the sub-entities of the cell.

basix.numba_helpers.Tt_apply_right(tdim: int, edge_count: int, face_count: int, entity_transformations: list[int], entity_dofs: list[int], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int, face_types: list[str])

  Right(post)-apply dof transformations to some transposed data.

  Parameters:

    - tdim – The topological dimension of the cell.

    - edge_count – The number of edges the cell has.

    - face_count – The number of faces the cell has.

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

    - face_types – A list of strings giving the shapes of the faces of the cell.

basix.numba_helpers.Tt_apply_right_hexahedron(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Right(post)-apply dof transformations to some transposed data on a hexahedron.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

basix.numba_helpers.Tt_apply_right_interval(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Right(post)-apply dof transformations to some transposed data on an interval.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

basix.numba_helpers.Tt_apply_right_prism(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Right(post)-apply dof transformations to some transposed data on an prism.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

basix.numba_helpers.Tt_apply_right_pyramid(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Right(post)-apply dof transformations to some transposed data on an prism.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

basix.numba_helpers.Tt_apply_right_quadrilateral(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Right(post)-apply dof transformations to some transposed data on an quadrilateral.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.

basix.numba_helpers.Tt_apply_right_tetrahedron(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Right(post)-apply dof transformations to some transposed data on a tetrahedron.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the

    - cell. (subentities of the)

basix.numba_helpers.Tt_apply_right_triangle(entity_transformations: dict[str, ndarray[tuple[Any, ...], dtype[float64]]], entity_dofs: dict[str, ndarray[tuple[Any, ...], dtype[int32]]], data: ndarray[tuple[Any, ...], dtype[_ScalarT]], cell_info: int)

  Right(post)-apply dof transformations to some transposed data on a triangle.

  Parameters:

    - entity_transformations – The DOF transformations for each entity.

    - entity_dofs – The number of DOFs on each entity.

    - data – The data. This will be changed by this function.

    - cell_info – An integer representing the orientations of the subentities of the cell.