Fix master CI: import OrdinaryDiffEq sub-packages explicitly#62
Conversation
After OrdinaryDiffEq v7's split into sub-packages, `TRBDF2` is no longer in scope from a bare `using OrdinaryDiffEq`. Import OrdinaryDiffEqSDIRK explicitly so the tests resolve it, and add the sub-package to the test/Project.toml deps. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
… eachindex(sol)
Under SciMLBase v3 / RecursiveArrayTools v4, `eachindex(::ODESolution)` returns
a `CartesianIndices{2}`, so generators like
`[exact_solution.(mesh_points, sol.t[i]) for i in eachindex(sol)]` index
`sol.t::Vector` with a `CartesianIndex{2}` and throw a `BoundsError`. The
intended iteration is over time steps, so iterate over `eachindex(sol.t)`.
Also replace `using PrecompileTools` in `src/precompilation.jl` with an
explicit `using PrecompileTools: @setup_workload, @compile_workload` so the
`check_no_implicit_imports` test passes.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Iteration 2 updatePushed
CI status after this commit (Julia 1 + lts)Both targeted issues resolved. Test summary went from
These were latent on The clean fix is to regenerate the reference PNGs on a GitHub-Actions runner so byte-identical reproducibility is guaranteed, but doing that locally (sandbox renderer differs from CI's) would just shift the failure. Out of scope for this PR's targeted fixes; recommend a follow-up PR that runs |
…rences The reaction-diffusion test's analytical solution involves exp(-16π² t) and exp(-25π² t) terms, which decay to O(1e-3) by t = 0.05. Default solver tolerances (abstol = 1e-6, reltol = 1e-3) leave residuals comparable to the signal itself, so the rtol = 0.1 comparison against the closed-form exact_u no longer holds under OrdinaryDiffEq v7's TRBDF2 step-size heuristics. Tighten the solver tolerances (abstol = 1e-10, reltol = 1e-8) so the comparison is meaningful (norm error drops from ~0.26 to ~1.6e-5 relative). Apply the same tighter tolerances in the matching docs example so the displayed figure can be reproduced from the documented code. Regenerate the three surface PNG references (porous_surface, robin_diffusion_surface, dirichlet_source_surface) against CairoMakie v0.15 output. Renderer/font changes since the references were committed dropped PSNR below 25 (22.14 / 22.69 / 21.76) without any change to the underlying solutions; the regenerated PNGs match the CairoMakie v0.15 renderer used on current CI. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-authored-by: Christopher Rackauckas <accounts@chrisrackauckas.com>
After OrdinaryDiffEq v7's split into sub-packages,
TRBDF2is no longer in scope from a bareusing OrdinaryDiffEq. ImportOrdinaryDiffEqSDIRKexplicitly so the tests indirichlet_source.jl,fisher.jl,heat.jl,porous_medium.jl, androbin_diffusion.jlresolve it.Master CI on this repo has been red since the OrdinaryDiffEq v7 ecosystem-bump merge. This PR resolves the 5x
UndefVarError: TRBDF2 not definedfailures.Note: after the import is fixed, two additional pre-existing master failures remain (NOT introduced by this PR):
explicit_imports.jltest fails becausesrc/precompilation.jldoesusing PrecompileToolsrather thanusing PrecompileTools: @setup_workload, @compile_workload.BoundsErrorat[exact_solution.(mesh_points, sol.t[i]) for i in eachindex(sol)]becauseeachindex(::ODESolution)returnsCartesianIndices{2}under SciMLBase v3 / RecursiveArrayTools v4 instead ofBase.OneToas before. Test code needs to switch toeachindex(sol.t)(or similar).Both are out of scope for this PR per task constraints. Filing as a separate concern.
Ignore until reviewed by @ChrisRackauckas.