archimedes.quadrature.compositeΒΆ

archimedes.quadrature.composite(
base: QuadratureRule,
breakpoints: ndarray,
) QuadratureRuleΒΆ

Tile base across elements of its reference domain.

Partitions base.measure.support at breakpoints and applies base, affinely rescaled, to each element, concatenating the resulting nodes and weights. The result is itself a QuadratureRule on the same reference domain – its nodes are just clustered at the element boundaries rather than spread uniformly – so it can be mapped onto a target domain/measure via scaled_points/scaled_weights/integrate exactly like any other rule of base.measure. This works because measure.affine_params maps affinely, and affine maps commute with subdivision: rescaling the whole composite pattern onto [a, b] is the same as building the elements directly on the rescaled sub-intervals of [a, b].

Only defined for families whose reference weight is uniform (see Measure.uniform_weight) – otherwise each interior element boundary would pick up a spurious copy of the weight’s shape, which is only meaningful at the true endpoints of the reference domain.

Parameters:
  • base (QuadratureRule) – Rule to tile across elements. base.measure.uniform_weight must be True.

  • breakpoints (array_like) – Element boundaries, shape (k + 1,) for k elements. Must be strictly increasing and span base.measure.support exactly (first/last entries equal to its endpoints).

Returns:

rule – Composite rule with k * len(base) nodes on the same reference domain as base.

Return type:

QuadratureRule

Raises:

ValueError – If base.measure.uniform_weight is False, if breakpoints has fewer than 2 entries or is not strictly increasing, or if it does not span base.measure.support exactly.