-
-
Notifications
You must be signed in to change notification settings - Fork 61
Fix SCCNonlinearProblem not having u0 field (issue #758) #759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SCCNonlinearProblem not having u0 field (issue #758) #759
Conversation
SCCNonlinearProblem does not have a u0 field - each subproblem has its own u0. The solve function was incorrectly trying to access prob.u0 when u0 was not provided, causing a FieldError. Changes: - Remove the u0 = prob.u0 fallback since SCCNonlinearProblem has no u0 field - Add regression test to prevent this from happening again Closes SciML#758 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The test item needs to explicitly use SciMLBase to access NonlinearProblem and other types from the module. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Use `import SCCNonlinearSolve: ...` instead of `using SCCNonlinearSolve` to avoid implicit import of the module name, which causes ExplicitImports tests to fail on macOS CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Additional Fix: ExplicitImports error on macOS CIThe macOS CI was failing due to an ExplicitImports check error: This was a pre-existing issue in the ChainRulesCore extension that became visible during CI. Fixed by changing: using SCCNonlinearSolve
using SCCNonlinearSolve: SCCAlg, scc_solve_upto: import SCCNonlinearSolve: SCCAlg, scc_solve_upThis avoids the implicit import of the module name itself and satisfies the ExplicitImports check. All tests now pass locally (26/26). |
Apply SciML formatting style (spaces around operators and assignments) to the test file to pass CI code-style checks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fix: Code formattingFixed code formatting in test file to pass CI code-style checks:
All 26 SCCNonlinearSolve tests pass locally. |
Align continuation indent for multi-line import statement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Restore spaces around ≈ operator that were accidentally removed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
CI Status SummaryCore tests passing:
Pre-existing CI issues (also failed on merged PR #757):
All code changes have been tested locally and pass. The PR is ready for review. |
Summary
Changes
u0 = u0 !== nothing ? u0 : prob.u0fallback since SCCNonlinearProblem has no u0 fieldTest plan
u0in SCCNonlinearSolve 1.7 #758u0in SCCNonlinearSolve 1.7 #758Closes #758
🤖 Generated with Claude Code