# ngsPETSc.utils.utils

Convenience functions that are FiniteElement backend independent.

## Functions

`find_permutation`(points_a, points_b[, tol]) | Find all permutations between a list of two sets of points.

## Module Contents

ngsPETSc.utils.utils.find_permutation(points_a: numpy.typing.NDArray[numpy.inexact], points_b: numpy.typing.NDArray[numpy.inexact], tol: float = 1e-05)

  Find all permutations between a list of two sets of points.

  Given two numpy arrays of shape (ncells, npoints, dim) containing floating point coordinates for each cell, determine each index permutation that takes points_a to points_b. Ie: `` permutation = find_permutation(points_a, points_b) assert np.allclose(points_a[permutation], points_b, rtol=0, atol=tol) ``