Skip to content

Deprecate DAEProblem(pdesys, disc) in favour of discretize - #90

Merged
xtalax merged 5 commits into
masterfrom
forge/deprec-daeproblem
Nov 10, 2026
Merged

xtalax merged 5 commits into
masterfrom
forge/deprec-daeproblem

Conversation

@xtalax-droid

@xtalax-droid xtalax-droid commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Problem. The Navier-Stokes example, its docs page and the README built their problem with DAEProblem(dfg, disc), although discretize(pdesys, disc) is the documented entry point. The DAEProblem method was a thin forwarding alias, and NonlinearProblem(pdesys, disc) for steady systems is the same pattern.

Fix.

  • SciMLBase.DAEProblem(pdesys::PDESystem, disc::FEMDiscretization; kwargs...) now emits a deprecation warning pointing at discretize and returns the same problem as before. The steady-system ArgumentError is unchanged.
  • SciMLBase.NonlinearProblem(pdesys::PDESystem, disc::FEMDiscretization; kwargs...) is deprecated the same way, with a private _nonlinearproblem holding the old body (including its transient-system ArgumentError).
  • The DFG cylinder and axisymmetric swirl examples, the Navier-Stokes docs page and the README now call discretize(pdesys, disc).
  • docs/src/extension_contract.md and the abstol docstring no longer present DAEProblem(pdesys, disc) or NonlinearProblem(pdesys, disc) as an equivalent entry point.
  • Three recorded source hashes are updated because their sources changed (the NonlinearProblem change touches no hashed source): ns_showcase.fnv1a (README block), axisym_swirl.fnv1a and axisym_swirl_animation.fnv1a (axisym_swirl.jl). The problems are identical, so the images are not regenerated.

Tests.

  • Two new testsets (one per deprecated form) in test/shared/frontend_tests/end_to_end.jl asserts the deprecation warning, that the problem matches discretize's result, and that the old rejection (steady disc for DAEProblem, time-dependent disc for NonlinearProblem) still raises.
  • All other tests that called either form now use discretize.
  • The affected Frontend test files pass locally with --depwarn=yes.
  • Codex review: approve, 0 findings.

🤖 Posted by an AI agent · harness: Claude Code 2.1.321 · model: claude-sonnet-5-5
Review: unreviewed
Session: 43e03fde-3384-4386-bae9-03e81f19ba7c

t and others added 2 commits November 9, 2026 19:35
discretize is the documented entry point; the DAEProblem method now warns and returns the same problem. Tests use discretize, with one test for the deprecation and the steady-system rejection.

Agent-Harness: Claude Code 2.1.319
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Switches the Navier-Stokes and swirl examples, README and docs to discretize(pdesys, disc). The README Navier-Stokes block changed, so its recorded hash is updated; the problem and the showcase images are unchanged.

Agent-Harness: Claude Code 2.1.319
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master 9cd1041... master / 9cd1041...
construction/heat P1 10x10 7.72 ± 0.47 ms 7.8 ± 0.43 ms 0.99 ± 0.081
construction/heat P1 20x20 10.4 ± 0.39 ms 10.5 ± 0.38 ms 0.997 ± 0.052
time_to_load 5.51 ± 0.039 s 5.54 ± 0.11 s 0.994 ± 0.021
Memory benchmarks
master 9cd1041... master / 9cd1041...
construction/heat P1 10x10 0.0397 M allocs: 2.13 MB 0.0397 M allocs: 2.13 MB 1
construction/heat P1 20x20 0.0706 M allocs: 4.75 MB 0.0706 M allocs: 4.75 MB 1
time_to_load 0.2 k allocs: 11.8 kB 0.2 k allocs: 11.8 kB 1

t and others added 3 commits November 9, 2026 20:49
Agent-Harness: Claude Code 2.1.319
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
examples/axisym_swirl/axisym_swirl.jl now calls discretize, which changes the recorded source hashes of the figures and the animation. The problem is identical, so the images are not regenerated.

Agent-Harness: Claude Code 2.1.319
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Same treatment as DAEProblem: the method warns and forwards to a private helper with the old body. Tests use discretize, with one test for the deprecation and the transient-system rejection.

Agent-Harness: Claude Code 2.1.321
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax
xtalax merged commit b84d3c8 into master Nov 10, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants