Skip to content

Order VariableMap x̄ by the dependent variables, not by Set iteration - #160

Merged
xtalax merged 1 commit into
SciML:masterfrom
xtalax-droid:forge/xbar-master
Oct 28, 2026
Merged

xtalax merged 1 commit into
SciML:masterfrom
xtalax-droid:forge/xbar-master

Conversation

@xtalax-droid

Copy link
Copy Markdown
Contributor

Problem

VariableMap(pdesys, disc) builds the independent-variable list x̄ from get_all_depvars, which returns a collect of a Set union. The order of x̄ (and so of indvars(v)) therefore depends on the Julia version. A boundary call such as u(t, 0, y) can come out ahead of the full call u(t, x, y), which turns x̄ from [x, y] into [y, x] on Julia lts (1.10) but not on 1.x.

Change

In src/variable_map.jl, sort the dependent-variable calls before taking the union of their arguments:

  1. by the position of the variable in pdesys.dvs,
  2. then calls with all-symbolic arguments before boundary calls with numeric arguments,
  3. then by the printed arguments.

x̄ and indvars now follow the documented order and no longer depend on Set iteration. Single-variable box systems keep their previous order.

Tests

New test/variable_map_order.jl builds the same system with its equations and boundary conditions in several permutations (including u(t, 0, y) before u(t, x, y)), and declares the dependent variables q(t, y) and u(t, x, y) in both orders. It asserts that x̄ and indvars are identical across permutations and equal [x, y] for [u, q] and [y, x] for [q, u]. It fails on master without the change (2 failures on 1.12) and passes on Julia lts (1.10.12) and 1.12.1, as do d_orders, system_unknowns and array_variables; GROUP=Core and GROUP=QA pass on 1.12.1 (not run on lts). The permutation set is sampled, not exhaustive. Codex: approve, 0 findings.

Context

This is the fix for the CI failures on the lts job of the StrongForm series (for example test/strongform_boundary.jl:121 on #150: ctx.sivs was [y, x] where [x, y] was expected). The M0 boundary line (#145) already carries the same hunk (commit d3f176a), so merging either first is expected to be conflict-free. MethodOfLines-visible behaviour changes only where master's order was nondeterministic (several dependent variables whose argument orders differ, or boundary calls listed before the full call).


🤖 Posted by an AI agent · harness: Claude Code 2.1.312 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

VariableMap built allivs from get_all_depvars, whose Set order differs between Julia versions, so a boundary call such as u(t, 0, y) listed before u(t, x, y) turned x̄ from [x, y] into [y, x] on lts. Sort the dependent-variable calls by position of the variable in pdesys.dvs, full calls before boundary calls, then printed arguments. Adds test/variable_map_order.jl, which checks x̄ across permutations of the equations and boundary conditions and both declaration orders of two dependent variables.

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/strongform-2-divergence

Integration only.

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/strongform-3-boundary

Integration only.

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/strongform-4-library

Integration only.

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/boundary-3-meshdomain

Integration only; the variable_map.jl hunk is identical on both sides (conflict resolved with ours).

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/boundary-4-classifier

Integration only; the variable_map.jl hunk is identical on both sides (conflict resolved with ours).

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/boundary-5-parse-bcs

Integration only; the variable_map.jl hunk is identical on both sides (conflict resolved with ours).

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/boundary-6-to-box-bcs

Integration only; the variable_map.jl hunk is identical on both sides (conflict resolved with ours).

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/strongform-5-pieces

Integration only; the variable_map.jl hunk is identical on both sides (conflict resolved with ours).

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/boundarymap-accessor

Integration only; the variable_map.jl hunk is identical on both sides (conflict resolved with ours).

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/parse-bcs-public

Integration only; the variable_map.jl hunk is identical on both sides (conflict resolved with ours).

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/essential-order

Integration only; the variable_map.jl hunk is identical on both sides (conflict resolved with ours).

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/mesh-axis-order

Integration only; the variable_map.jl hunk is identical on both sides (conflict resolved with ours).

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
…e/m0-all

Integration only; the variable_map.jl hunk is identical on both sides (conflict resolved with ours).

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
@xtalax
xtalax merged commit be9ac32 into SciML:master Oct 28, 2026
27 checks passed
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
Integration only: master now contains SciML#141 and SciML#160.

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
Integration only: master now contains SciML#141 and SciML#160.

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
Integration only: master now contains SciML#141 and SciML#160.

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
Integration only: master now contains SciML#141 and SciML#160.

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
xtalax-droid pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Oct 28, 2026
Integration only: master now contains SciML#141, SciML#142, SciML#143, SciML#144 and SciML#160.

Agent-Harness: Claude Code 2.1.312
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <[email protected]>
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.

2 participants