Skip to content

Quadrature options using type dispatch#8

Merged
mrhardman merged 3 commits into
mainfrom
quadrature-option-limited-support
Jun 17, 2026
Merged

Quadrature options using type dispatch#8
mrhardman merged 3 commits into
mainfrom
quadrature-option-limited-support

Conversation

@mrhardman

Copy link
Copy Markdown
Collaborator

Options for 1D quadrature using type dispatch. We introduce and abstract type

Abstract1DQuadrature

and the structs Default1DQuadrature <: Abstract1DQuadrature and GLSpecifiedLimits <: Abstract1DQuadrature.

The default options

quadrature_option=Default1DQuadrature()
quadrature_option_x1=Default1DQuadrature()
quadrature_option_x2=Default1DQuadrature()

correspond to a Gauss-Legendre quadrature between the element boundaries.

The options

quadrature_option=GLSpecifiedLimits(v_min,v_max)
quadrature_option_x1=GLSpecifiedLimits(v_min,v_max)
quadrature_option_x2=GLSpecifiedLimits(v_min,v_max)

correspond to a Gauss-Legendre quadrature in the ranges [max(v_l,v_min), min(v_u,v_max)] where v_l and v_u are the lower and upper element boundaries for the element in question, respectively.

The GLSpecifiedLimits() quadrature option is useful when the kernel function is nonzero or supported only over a range [v_min,v_max] which does not perfectly overlap with [v_l,v_u].

mrhardman added 3 commits May 22, 2026 14:03
…` to create quadrature options chosen by type dispatch.
…` where the integration range on the element is permitted to be different from the normal `[-1,1]` (reference coords) `[c - s, c + s]` (physical coordinates). We supply the minimum and maximum limits to be used through `GLSpecifiedLimits(v_min,v_max)` in the physical coordinate `v = s x + c` with `x` the reference coordinate and `s` and `c` the scale and shift factors, respectively. Test this feature by computing the mass matrix for 1D linear and nonlinear operators, and 2D linear operators, using the default method, and by adding together results of the integration over subdomains.
@mrhardman mrhardman merged commit 7c94d6d into main Jun 17, 2026
2 checks passed
@mrhardman mrhardman deleted the quadrature-option-limited-support branch June 17, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant