basix.utils

Utility funcitons.

Functions

index(p[, q, r])

Compute the indexing in a 1D, 2D or 3D simplex.

basix.utils.index(p: int, q: int | None = None, r: int | None = None) int

Compute the indexing in a 1D, 2D or 3D simplex.

Parameters:
  • p – Index in x.

  • q – Index in y.

  • r – Index in z.

Returns:

Index in a flattened 1D array.