Repository navigation
Conversation
A nodal basis interpolating at the points of a quadrature rule is collocated with it, so the mass matrix that rule assembles is diagonal. That holds exactly only if the basis and the rule carry bit-identical points, so both should read them from the same table. QGaussLobatto::points_and_weights_1D fills the one-dimensional rule keyed by its number of points n. A rule of n points is exact through degree 2n-3, so the orders 2n-4 and 2n-3 share it, which n_points_1D inverts. init_1D now reads its rule the same way. The table's values are unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
lindsayad
force-pushed
the
gll-quadrature-points
branch
from
September 30, 2026 23:37
e663f42 to
7412d67
Compare
lindsayad
marked this pull request as ready for review
September 30, 2026 23:37
This was referenced Oct 1, 2026
Member
Author
Member
|
What's the advantage of this over just constructing and using a I've noticed that multiple coding agents have a tendency to rewrite rather than reuse existing APIs, and that sure feels like what's happening here. |
Member
Author
Member
|
"That's on me" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Exposes the 1D Gauss-Lobatto points and weights as
QGaussLobatto::points_1D()andweights_1D(), keyed by number of points.n_points_1D()maps a rule order to that key. This lets a nodal basis collocated on the GLL points read exactly the same values as the rule, so a mass matrix assembled with that rule is exactly diagonal instead of diagonal to round-off. The basis is in #4583 (L2_LAGRANGE_GLL) and #4552 (LAGRANGE_GLL).The diff to
quadrature_gauss_lobatto_1D.Cis large, but the point and weight values are unchanged. The table is restructured soinit_1Dcopies from it, and each rule is built once on first use so that reading one needs no lock.🤖 Generated with Claude Code