Skip to content

perf: vectorize MGE potential over components#461

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/mge-potential-optimize
May 27, 2026
Merged

perf: vectorize MGE potential over components#461
Jammy2211 merged 1 commit into
mainfrom
feature/mge-potential-optimize

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Vectorize the inner component loop in potential_2d_via_mge_from — one zeta_from call per quadrature point instead of n_components calls. Cleaner code, same accuracy. Point-wise validation: potential converges to 1e-9 at n_quad=20; the ~1e-4 errors in the test suite are purely finite-difference verification noise.

Replace the inner loop over MGE components with a single vectorized
zeta_from call per quadrature point. Point-wise validation confirms
the potential converges to 10 significant digits at n_quad=20.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label May 27, 2026
@Jammy2211 Jammy2211 merged commit 409ada9 into main May 27, 2026
6 checks passed
@Jammy2211 Jammy2211 deleted the feature/mge-potential-optimize branch May 27, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant