polynomials.lagrange#

This module provides computational routines relevant to polynomials in the Lagrange basis.

minterpy.utils.polynomials.lagrange.integrate_monomials_lagrange(exponents, generating_points, split_positions, subtree_sizes, masks, bounds)[source]#

Integrate the monomials in the Lagrange basis given a set of exponents.

Parameters:
  • exponents (numpy.ndarray) – A set of exponents from a multi-index set that defines the polynomial, an (N, M) array, where N is the number of exponents (multi-indices) and M is the number of spatial dimensions. The number of exponents corresponds to the number of monomials.

  • generating_points (numpy.ndarray) – A set of generating points of the interpolating polynomial, a (P + 1, M) array, where P is the maximum degree of the polynomial in any dimensions and M is the number of spatial dimensions.

  • split_positions (TYPED_LIST) – The split positions of the multi-index tree.

  • subtree_sizes (TYPED_LIST) – The subtree sizes of the multi-index tree.

  • masks (ARRAY_DICT) – The masks that define the correspondence between left and right parts of the tree.

  • bounds (numpy.ndarray) – The bounds (lower and upper) of the definite integration, an (M, 2) array, where M is the number of spatial dimensions.

Returns:

The integrated Lagrange monomials, an (N,) array, where N is the number of monomials (exponents).

Return type:

numpy.ndarray

Notes

  • The Lagrange monomials are represented in the Newton basis. For integration, first integrate the Newton monomials and then transform the results back to the Lagrange basis. This is why the MultiIndexTree instance is needed.