Update Van der Pol test implementations for DiffEqProblemLibrary.jl PR #153#2807
Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom Aug 3, 2025
Conversation
…SciML#153 DiffEqProblemLibrary.jl PR SciML#153 removes ModelingToolkit dependency by converting symbolic ODE problems to direct function implementations. This breaks two test files that relied on accessing the ModelingToolkit system via prob_ode_vanderpol.f.sys. Changes made: - test/interface/stiffness_detection_test.jl: Replace ModelingToolkit system access with explicit Van der Pol function implementations using correct variable ordering - lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl: Replace sys access with explicit Van der Pol function using same ordering as new ODEProblemLibrary implementation Variable ordering maintained: u[1] = x, u[2] = y, p[1] = μ Equations preserved: dx/dt = y, dy/dt = μ((1-x²)y-x) Initial conditions preserved: - Stiffness test: [x, y] = [2.0, 0.0] (was [sys.x => 2.0, sys.y => 0]) - FIRK test: [x, y] = [sqrt(3), 0.0] (was [sys.x => sqrt(3), sys.y => 0]) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
This PR updates two test files that are broken by DiffEqProblemLibrary.jl PR #153, which removes ModelingToolkit dependency by converting symbolic ODE problems to direct function implementations.
Problem
DiffEqProblemLibrary.jl PR #153 breaks tests that access
prob_ode_vanderpol.f.sysbecause the new implementation uses direct ODE functions instead of ModelingToolkit symbolic systems.Broken files:
/test/interface/stiffness_detection_test.jl(lines 5-6)/lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl(line 47)Solution
Replace ModelingToolkit system access with explicit Van der Pol function implementations using the same variable ordering as the new ODEProblemLibrary implementation.
Variable Ordering Analysis
The new ODEProblemLibrary implementation uses:
Changes Made
1.
test/interface/stiffness_detection_test.jlsys = prob_ode_vanderpol.f.sys; prob1 = ODEProblem(sys, [sys.y => 0, sys.x => 2.0, sys.μ => inv(0.003)], (0.0, 6))[x, y] = [2.0, 0.0]ordering2.
lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jlsys = prob_ode_vanderpol.f.sys; vanstiff = ODEProblem{iip}(sys, [sys.y => 0, sys.x => sqrt(3), sys.μ => 1e6], (0.0, 1.0))[x, y] = [sqrt(3), 0.0]orderingVerification
✅ Mathematical consistency: All implementations produce identical results
✅ Variable ordering: Matches new ODEProblemLibrary exactly (
u[1] = x, u[2] = y, p[1] = μ)✅ Initial conditions preserved:
[x, y] = [2.0, 0.0](was[sys.x => 2.0, sys.y => 0])[x, y] = [sqrt(3), 0.0](was[sys.x => sqrt(3), sys.y => 0])✅ Parameters preserved: Same μ values used
✅ Equations preserved:
dx/dt = y, dy/dt = μ((1-x²)y-x)Test Plan
Impact
This change ensures OrdinaryDiffEq.jl tests continue working when DiffEqProblemLibrary.jl PR #153 is merged, maintaining test coverage while removing the ModelingToolkit dependency as intended.
🤖 Generated with Claude Code