Repository navigation
Fix real-imaginary coupling in complex PDEs - #126
Merged
ChrisRackauckas merged 3 commits intoSep 23, 2026
Merged
ChrisRackauckas merged 3 commits into
ChrisRackauckas merged 3 commits into
Conversation
Test complex coefficients, products between dependent fields, and duplicated real/imaginary boundary equations. The regression fails against the current normalization before the fix. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.156.0 Agent-Model: gpt-6-luna Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/PDEBase.jl/jobs/125-codex/log.txt on amdci2.julia.csail.mit.edu
Retain ModelingToolkit's equation-pair grouping, reconstruct each complex residual, substitute real and imaginary dependent variables, then expand derivatives and complex products before splitting. Generate real-valued component variables and use the same residual split for complex boundary equations. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.156.0 Agent-Model: gpt-6-luna Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/PDEBase.jl/jobs/125-codex/log.txt on amdci2.julia.csail.mit.edu
Split each side of complex equations independently so downstream symbolic consumers retain the equation form they expect. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.156.0 Agent-Model: gpt-6-luna Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/PDEBase.jl/jobs/125-codex/log.txt on amdci2.julia.csail.mit.edu
This was referenced Sep 23, 2026
Closed
ChrisRackauckas
marked this pull request as ready for review
September 23, 2026 05:46
ChrisRackauckas
added a commit
that referenced
this pull request
Sep 23, 2026
Ships #126: complex equation normalization preserves the real/imaginary coupling in already-split equation pairs, distributes complex arithmetic across dependent fields, and declares the generated component fields real. Patch — a correctness fix, no API change. (#120's symbolic_discretize driver was already released in 0.1.36; that commit carried the bump.) Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude <[email protected]> Agent-Harness: Claude Code 2.1.273 Agent-Model: claude-opus-5[1m] Agent-Session: 6a01e420-3436-4518-83cc-6cd853283cfb (local transcript; this harness publishes no conversation URL)
Merged
ChrisRackauckas
added a commit
that referenced
this pull request
Sep 23, 2026
Ships #126: complex equation normalization preserves the real/imaginary coupling in already-split equation pairs, distributes complex arithmetic across dependent fields, and declares the generated component fields real. Patch — a correctness fix, no API change. (#120's symbolic_discretize driver was already released in 0.1.36; that commit carried the bump.) Agent-Harness: Claude Code 2.1.273 Agent-Model: claude-opus-5[1m] Agent-Session: 6a01e420-3436-4518-83cc-6cd853283cfb (local transcript; this harness publishes no conversation URL) Co-authored-by: Claude <[email protected]>
This was referenced Sep 23, 2026
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.
Complex equation normalization now preserves the real/imaginary coupling in already split equation pairs, distributes complex arithmetic across dependent fields, and declares the generated component fields real. A two-field PDEBase regression covers complex coefficients, field products, and boundary conditions; a scratch MethodOfLines phase test confirms the resulting Schrödinger evolution.
Verification
GROUP=Core /home/crackauc/.juliaup/bin/julia +1.11 --project=. -e 'using Pkg; Pkg.test()'failed:Core/complex_splitting.jl | 1 pass 2 fail 3 total(exit 1).Core/complex_splitting.jl | 3 3 12.3sandTesting PDEBase tests passed.GROUP=QA /home/crackauc/.juliaup/bin/julia +1.11 --project=. -e 'using Pkg; Pkg.test()':QA/qa.jl | 20 20 1m25.4s;Testing PDEBase tests passed.Schroedinger phase and amplitude | 1 pass 1 fail 2 total(exit 1). With this branch:Schroedinger phase and amplitude | 2 2 1m43.7s.GROUP=Complex ... Pkg.test()with this branch:Complex | 47 pass 57 fail 104; the phase test passed2/2and complex-BC test passed1/1, but the older Schrödinger magnitude test failed in 57 saved slices. The same group against PDEBase master had 103 pass and only the newly added phase assertion failed. Round 1 review confirmed that the old fixture’s loose default solver tolerance causes these failures; the recommended phase-sensitive fixture update belongs in MethodOfLines and is out of scope here.--check,typos src/make_pdesys_compatible.jl test/complex_splitting.jl, andgit diff --checkpassed.Not verified
The PDEBase
Everythinggroup and a local docs build were not run. The GitHub docs build passed; docs were not changed. I did not modify or open a PR in MethodOfLines; its proposed test diff is in the job report.Reviewer pushback
Round 1 review confirmed the 57 MethodOfLines legacy magnitude failures are caused by the fixture’s loose default solver tolerance. The separate MethodOfLines fixture update was not made in this PR. No test was weakened.
Round 1 N5/N6 follow-up: #129
Closes #125
Please ignore this draft until reviewed by @ChrisRackauckas.
🤖 Generated with Codex CLI 0.156.0 (model: gpt-6-luna); transcript: /home/crackauc/sandbox/agent-jobs/PDEBase.jl/jobs/125-codex/log.txt on amdci2.julia.csail.mit.edu