warp.fem.polynomial.lagrange_scales#

warp.fem.polynomial.lagrange_scales(coords)[source]#

Return the scaling factors for Lagrange polynomials with roots at coords.

Parameters:

coords (ndarray) – NumPy array of coordinates defining the polynomial roots.

Returns:

A NumPy array of scaling factors for the Lagrange basis polynomials, in which the i-th element is the reciprocal of the product of differences between coords[i] and all other coordinates.

Return type:

ndarray