ngsPETSc.utils.utils
====================

.. py:module:: ngsPETSc.utils.utils

.. autoapi-nested-parse::

   Convenience functions that are FiniteElement backend independent.



Functions
---------

.. autoapisummary::

   ngsPETSc.utils.utils.find_permutation


Module Contents
---------------

.. py:function:: 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)
   ```


