archimedes.quadrature.Quadrature¶
- class archimedes.quadrature.Quadrature(*args, **kwargs)¶
The interface every quadrature rule provides, whatever its dimension.
Deliberately minimal: this is only what’s needed by
FunctionSpaceto define an inner product.Methods
map_to(*params, **kwparams)A new rule mapped onto the target domain.
sum(values, *[, axis, density])Quadrature applied to values already sampled at the nodes.
Attributes
Element boundaries, for a rule assembled from sub-elements.
Which sub-element each node came from, or
Nonefor a rule with no element structure.The measure integrated against in each dimension, always a tuple of length
ndim.Number of dimensions of the domain integrated over.
Nodes on the currently-mapped target domain (see
map_to), shape(n,)for a one-dimensional rule or(n, ndim)otherwise.Weights including the Jacobian of the currently-mapped target domain (see
map_to), shape(n,).- __init__(*args, **kwargs)¶
- map_to(
- *params: Any,
- **kwparams: Any,
A new rule mapped onto the target domain.
- sum(
- values: ndarray,
- *,
- axis: int = ...,
- density: bool = False,
Quadrature applied to values already sampled at the nodes.
The default
axisis rule-specific; see each rule’ssum.
- property breakpoints: Any¶
Element boundaries, for a rule assembled from sub-elements.
np.ndarray | Nonefor a one-dimensional rule; a per-dimension tuple of those for a multi-dimensional one.
- property elements: Any¶
Which sub-element each node came from, or
Nonefor a rule with no element structure.Shape
(n,)for a one-dimensional rule and(n, ndim)for a multi-dimensional one, mirroringnodes.This is provenance that can’t be determined by coordinates alone. A composite rule places nodes on its element boundaries, so a basis that is discontinuous needs to know which element each copy belongs to.
- property measures: tuple[Measure, ...]¶
The measure integrated against in each dimension, always a tuple of length
ndim.
- property ndim: int¶
Number of dimensions of the domain integrated over.