Repository navigation
Support Complex-typed dependent variables in PDE splitting - #131
Merged
ChrisRackauckas merged 3 commits intoSep 24, 2026
Merged
ChrisRackauckas merged 3 commits into
ChrisRackauckas merged 3 commits into
Conversation
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.156.1 Agent-Model: gpt-6-sol Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/PDEBase.jl/jobs/130-codex/log.txt on amdci2.julia.csail.mit.edu
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.156.1 Agent-Model: gpt-6-sol Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/PDEBase.jl/jobs/130-codex/log.txt on amdci2.julia.csail.mit.edu
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.156.1 Agent-Model: gpt-6-sol Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/PDEBase.jl/jobs/130-codex/log.txt on amdci2.julia.csail.mit.edu
ChrisRackauckas-Claude
force-pushed
the
agent/130-complex-typed
branch
2 times, most recently
from
September 23, 2026 23:10
114ded6 to
3860792
Compare
ChrisRackauckas
marked this pull request as ready for review
September 24, 2026 08:51
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.
Change
Complex-typed Symbolics dependent variables are
Complex{Num}values whose equations and boundary conditions arrive as already split real/imaginary expressions. PDEBase now extracts the underlying dependent-variable call, preserves nested equation vectors, renames typed real/imaginary components directly, and splits complex initial pairs into real fields. The regression coversconj,real,imag,abs2, both cubic forms, and boundary values; the workflow docs now recommend@variables ψ(..)::Complex, and the patch version is 0.1.38.This branch is stacked on the head of #126 as requested. That head contains two follow-up commits after the merged #126 commit, so they also appear in this PR's diff against master.
Verification
Before the fix, with only the new regression test present:
After the fix, with
TMPDIRandJULIA_DEPOT_PATHdirected to this job's scratch directories andOPENBLAS_NUM_THREADS=4:Runic --checkon the changed Julia files,typoson the diff, andgit diff --checkall exited 0. In a scratch environment with this PDEBase checkout and a scratch MethodOfLines clone containing the typed-symbol indexing diff in the job report, the proposed NLS test printed:Review round 1 follow-up
The typed-field regression now runs
handle_complexfollowed bymake_pdesys_compatible, matchingsymbolic_discretize, and also checks the reverse order. A mixedψ::Complexand untypedusystem now raises an explicitArgumentErrorfromhandle_complex; the workflow docs state this limitation.Before this follow-up, the new mixed-field assertion failed with:
After the follow-up, with the same scratch
TMPDIR/depot andOPENBLAS_NUM_THREADS=4:Runic, typos, and
git diff --checkexited 0 on the follow-up diff.Limits and review
The full MethodOfLines test group and documentation build were not run. Its tutorial and test updates, plus the solution indexing change needed for
sol[ψ(t,x)]whenψisComplex{Num}, are recorded as an exact diff in/home/crackauc/sandbox/agent-jobs/PDEBase.jl/jobs/130-codex/REPORT.md; no MethodOfLines PR was opened. GPU and downstream packages beyond this scratch MethodOfLines scenario were not tested. Please review the explicit mixed-field limitation and the stacked follow-up commits from #126.Part of #130. Please ignore this draft until reviewed by @ChrisRackauckas.
🤖 Generated with Codex CLI 0.156.1 (model: gpt-6-sol); session: local transcript at /home/crackauc/sandbox/agent-jobs/PDEBase.jl/jobs/130-codex/log.txt on amdci2.julia.csail.mit.edu
Risk assessment
Risk: low
Blast radius: Only PDE systems whose dependent variables are
Complex{Num}, meaning they were declared@variables ψ(..)::Complex. That input used to hitMethodError: no method matching operation(::Complex{Symbolics.Num})inchain_flatten_array_variables, so no working user code can depend on the old behaviour. Real and untyped systems still go through the same code:_dependent_variable_termfalls back tosafe_unwrap, andtyped_dvsis false when no dependent variable isComplex{Num}. The one general change is thatapply_lhs_rhsnow recurses into nestedAbstractVectorequations, where it used to throw. That only affects inputs that errored before. Downstream, MethodOfLines and PDESystemLibrary would see the change throughsymbolic_discretize, and their downstream CI lanes pass. The users most likely to hit problems are people who follow the new docs advice to declare fields::Complex. End-to-end use in MethodOfLines (sol[ψ(t,x)]) needs a solution-indexing change that exists only as a local diff and has not been opened as a PR. The description says this.Evidence: All 26 checks on head
386079242c561bc5e4c5b4914cfbacb9e3a6e843pass, so there are no failures to compare against master. They include:tests / Coreon Julia 1, 1 x86 and ltstests / QA (julia 1)Documentation / Build and Deploy DocumentationDowngrade / Downgrade TestsRunic,Spell Check with Typos,benchmark (1)andbenchmark (lts)MethodOfLines.jl/*downstream groups andPDESystemLibrary.jl/CoreMaster's latest commit
7853500fcec1443aaecb9b680dfc379c3d153311(from Add get_system_unknowns so discretizers can keep array-valued unknowns #124) passes the same checks.tests / Core (julia pre)passes in 33 s on the PR because the workflow skips it on purpose: Julia 1.13.0 is not a release candidate. The same skip-as-pass happens on master, so the pre lane gave no signal. The branch is 3 commits ahead of master and 0 behind. It is a draft with no reviews and no review or issue comments.Other findings:
maketermandmetadatacome from TermInterface's public API, andiscall,operation,argumentsandunwrapare public.test/complex_splitting.jl), nothing weakened or skipped. The body pastes the test failing before the fix and passing after.handle_complexandmake_pdesys_compatibleare not exported or@public, thoughdocs/src/workflow.mddescribes them. The mixed typed/untypedArgumentErrorreplaces an earlier crash, so it is not a breaking change. The 0.1.37 → 0.1.38 patch bump is fine for a non-breaking addition before 1.0. The body does not mention that this bump would also release the already-merged Add get_system_unknowns so discretizers can keep array-valued unknowns #124 (new publicget_system_unknowns) and Cover complex Dirichlet splitting and clean helper #129.Independent review: Devin CLI / fusion-claude-opus-5-5-high-sidekick-swe-2-medium rated it low risk, high confidence: the new code only runs for
Complex{Num}dependent variables, which used to crash, and every CI lane passes on the head commit.Merge: needs human review. Findings:
::Complexfields, but MethodOfLines can't index those solutions until its unopened change lands.Links:
get_system_unknowns🤖 Risk assessment added by an AI agent — harness: Devin CLI 3000.11.3 · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium (independent review run as
devin -p; posted by the fleet-master session, Devin CLI / Fusion Claude Opus 5.5 Medium + SWE-2 Medium)Conversation: local, non-interactive run; output at ~/sandbox/fleet-master/assess-0924/out-PDEBase.jl-131.md on Chris's Mac (no session URL)