Commit 01a7e79
Restore rule-based flattening of array dependent variables (#101)
#98 rewrote `chain_flatten_array_variables` to avoid a QA ignore for
`Chain` and `Prewalk`. The rewrite keyed its replacement map on the array
operation alone, so every `u[i]` overwrote the previous entry and all
indices collapsed onto the last one, and it built replacements with
`Symbolics.variable(...; T = symtype(name))`, which yields an array-valued
variable rather than a callable. The resulting `Arr` reached `get_ops`, so
discretizing any `PDESystem` written against `@variables (u(..))[1:N]`
failed with `MethodError: operation(::Symbolics.Arr{Num, 1})`.
The ignore was avoidable without touching this code: `Chain` and `Prewalk`
are public in `SymbolicUtils.Rewriters`, which owns them, and were only
non-public via the parent `SymbolicUtils`. Import them from the owner and
restore the previous implementation, which shipped in 0.1.30.
Fixes #100
Claude-Session: https://claude.ai/code/session_0117aJvytDT3y2jMi5Ng6Q5m
Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 97c9de5 commit 01a7e79
3 files changed
Lines changed: 36 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 29 | | |
48 | | - | |
| 30 | + | |
49 | 31 | | |
50 | 32 | | |
51 | 33 | | |
52 | 34 | | |
53 | 35 | | |
54 | 36 | | |
55 | | - | |
| 37 | + | |
| 38 | + | |
56 | 39 | | |
57 | 40 | | |
58 | | - | |
| 41 | + | |
59 | 42 | | |
60 | 43 | | |
61 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments