Repository navigation
Fix hash-order-dependent IV indexing in nonlinear Laplacian discretization - #647
Merged
ChrisRackauckas merged 1 commit intoAug 20, 2026
Merged
Conversation
ChrisRackauckas
marked this pull request as ready for review
August 20, 2026 09:16
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.
Summary
2D_DiffusionTest 01 (Dt(u) ~ Dx(a Dx(u)) + Dy(a Dy(u))) errors duringdiscretizeonmasterand on unrelated PRs, including bothTests / 2D_Diffusion (julia lts)andDowngrade / Downgrade Tests. The two CI jobs share the same failure.The crash is a
BoundsErroron the 11-pointygrid at index12. That index is an interiorxindex (dx = 0.1→ 21 points) applied toy(dy = 0.2→ 11 points).Root cause
cartesian_nonlinear_laplacianinterpolated the transverse coordinates withIIandj = x2i(s, u, x)are argument-ordered (u(t, x, y)→[x, y]).s.x̄is not: PDEBaseVariableMapbuilds it from aSetunion whose iteration order depends on SymbolicUtils hashing. Under SymbolicUtils v4 this can bex̄ = [y, x]. They-direction rule then readss.grid[y][i_x], which throws wheni_x > length(y).When
dx == dythe same mix-up does not throw; it silently substitutes the wrong coordinate.Fix
ivs(u, s)andx2i(s, u, x_), nevers.x̄position.I[s.x2i[x]]/(s.x2i[r], r)weres.x̄-ordered).map_symbolic_to_discrete(s.grid[j]with anIntkey).A PDEBase change to make
VariableMap.x̄deterministic is left for a follow-up. This PR is sufficient to make MOL correct regardless ofx̄permutation.Tests
test/Components/nonlinear_laplacian_ivs.jlchecks the mapping for:dx == dy), where the old code would silently swap coordinatesdx ≠ dy), the CIBoundsErrors.x̄, so the test does not depend on Set iteration order