Skip to content

Support differing spatial dimensionality in ArrayDiscretization - #663

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
utkuyilmaz1903:feature/array-differing-dimensionality
Aug 29, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
utkuyilmaz1903:feature/array-differing-dimensionality

Conversation

@utkuyilmaz1903

@utkuyilmaz1903 utkuyilmaz1903 commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

Closes the remaining variables of differing dimensionality item of #623.

A lower-dimensional field (v(t, x) or S(t) in a u(t, x, y) equation) used to trip the array-form gate because every depvar had to share the equation axes. The pointwise path already samples via Idx; the slice form is the same projection — slice on the field's own axes, then permute/reshape with singleton dims so Julia can broadcast against the core. Prefix axes already broadcast and are left alone. The gate now looks at occurrences in the equation, not every variable in the system.

Base reshape / permutedims scalarize a symbolic MOL slice, so the aligned view is an O(1) AxisReshape / AxisPermutedims term (shape lives in the type; promote_shape returns ShapeVecT).

Case Interior array eqs Check
1D + v(t) 1 successful_retcode
Dt(u) ~ v(t) 1 scalar rhs lifted with broadcast
2D + v(t) 1 successful_retcode
prefix v(t, x) in u(t, x, y) 2 successful_retcode
non-prefix v(t, y) + Dy(v) 2 AxisReshape; successful_retcode
same IVs, swapped order v(t, y, x) 2 AxisPermutedims
mixed dims in the system, unused in one eq 2 successful_retcode
face BC u(t, 0, y) ~ v(t, y) 2 successful_retcode; face also array-valued
non-prefix, two resolutions 2 / 2 treesize equal
u periodic in y only, + v(t, x) 4 3 boxes for u, 1 for v; successful_retcode
free extra axis u(t, x, y) in a v(t, x) eq — ArrayFormFallback at the gate

Still falls back for a higher-dimensional field whose extra axes are free, derivatives of boundary values, and two-domain interfaces (#659).

@utkuyilmaz1903
utkuyilmaz1903 force-pushed the feature/array-differing-dimensionality branch 2 times, most recently from dd6b916 to e755226 Compare August 28, 2026 11:42
@utkuyilmaz1903
utkuyilmaz1903 marked this pull request as ready for review August 28, 2026 15:47
@utkuyilmaz1903
utkuyilmaz1903 force-pushed the feature/array-differing-dimensionality branch from 52aba0e to 4198183 Compare August 29, 2026 08:45
@ChrisRackauckas
ChrisRackauckas merged commit 565234a into SciML:master Aug 29, 2026
69 checks passed
ChrisRackauckas referenced this pull request Aug 30, 2026
ArrayDiscretization interface-boundary and dimensionality support

Release the accumulated source changes.



Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude <[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