utils Module

Provides some auxilliary functions that are used in various points in the software.

pysofe.utils.unique_rows(A, return_index=False, return_inverse=False)[source]

Returns B, I, J where B is the array of unique rows from the input array A and I, J are arrays satisfying A = B[J,:] and B = A[I,:].

Parameters:
  • A (numpy.ndarray) – The 2d array for which to determine the unique rows
  • return_index (bool) – Whether to return I
  • return_inverse (bool) – Whether to return J
pysofe.utils.lagrange_nodes(dimension, order)[source]

Returns the nodes that determine the Lagrange shape functions of given order on a simplicial domain.

Parameters:
  • dimension (int) – The spatial dimension of the points
  • order (int) – The polynomial order of the shape functions