quadrature

Quadrature nodes used in recursivenodes.

recursivenodes.quadrature.gaussjacobi(n, a=0.0, b=0.0)[source]

The \(n\)-point Gauss-Jacobi quadrature points and weights for weight function \((1+x)^a (1-x)^b\) for the interval [-1,1], which exactly integrates polynomials with degree up to \(2n-1\).

Parameters
  • n (int) – The number of points.

  • a (float, optional) – the left exponent of the weight function.

  • b (float, optional) – the right exponent of the weight function.

Returns

Each of shape (\(n\),), the points (in ascending order) and weights of the quadrature rule.

Return type

(ndarray, ndarray)

Reference:

[GW69]

recursivenodes.quadrature.lobattogaussjacobi(n, a=0.0, b=0.0)[source]

The \(n\)-point Lobatto-Gauss-Jacobi quadrature points and weights for weight function \((1+x)^a (1-x)^b\) for the interval [-1,1], which includes the endpoints \(-1\) and \(1\) and exactly integrates polynomials with degree up to \(2n-3\).

Parameters
  • n (int) – The number of points.

  • a (float, optional) – the left exponent of the weight function.

  • b (float, optional) – the right exponent of the weight function.

Returns

Each of shape (\(n\),), the points (in ascending order) and weights of the quadrature rule.

Return type

(ndarray, ndarray)

Reference:

[Gol73]

recursivenodes.quadrature.simplexgausslegendre(d, n)[source]

An \(n^d\)-point Gaussian quadrature rule for the biunit simplex that exactly integrates polynomials with degree up to \(2n-1\).

Parameters
  • d (int) – The spatial dimension.

  • n (int) – The points per coordinate direction

Returns

The points (shape (\(n, \dots, n, d\))) and weights (shape (\(n, \dots, n,\))) of the quadrature rule.

Return type

(ndarray, ndarray)