Fuse quadrule and momintegrals! into integrate! to avoid dynamic dispatch - #210
Merged
Merged
Conversation
djukic14
force-pushed
the
perf/quadrule-integrate-fusion
branch
from
August 8, 2026 07:09
836858d to
a6e0d86
Compare
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.
momintegrals! is renamed to integrate!. The quadrule methods used by
IntegralOperator assembly (dispatching on AbstractQuadStrat) now build
their quadrature rule and call integrate! on it directly, from within
the same method/branch, instead of returning it to assemblechunk_body!
for a separate call.
Which behavior results is controlled by a new
actionkeyword:quadinfo (which now returns the rule instead of
nothing)NonConformingOverlapQRule/NonConformingTouchQRule, whose integrate!
methods only have local refspaces in scope, not a full Space
quadrule methods outside this family (LocalOperator, excitations,
farfield/nearfield postprocessing) are untouched and keep their name.
Adds test/test_quadrule_integrate_dispatch.jl, an allocation-based
regression test proving the fusion avoids the union-boxing that the
old two-step call pattern incurred.
Updates CHANGELOG.md and the quadrule/quadstrat/assemble docs to
match, including docstrings for the new action types and integrate!/
quadrule/quadinfo.
I’m happy to discuss the naming and adjust it as needed.
The solution for NonConformingOverlapQRule / NonConformingTouchQRule isn’t quite as elegant, but it’s the best approach I came up with.