CeedElemRestriction

int CeedPermutePadOffsets(const CeedInt *offsets, CeedInt *blk_offsets, CeedInt num_blk, CeedInt num_elem, CeedInt blk_size, CeedInt elem_size)

Permute and pad offsets for a blocked restriction.

Utility Functions

Parameters
  • offsets – Array of shape [num_elem, elem_size]. Row i holds the ordered list of the offsets (into the input CeedVector) for the unknowns corresponding to element i, where 0 <= i < num_elem. All offsets must be in the range [0, l_size - 1].

  • blk_offsets – Array of permuted and padded offsets of shape [num_blk, elem_size, blk_size].

  • num_blk – Number of blocks

  • num_elem – Number of elements

  • blk_size – Number of elements in a block

  • elem_size – Size of each element

Returns

An error code: 0 - success, otherwise - failure