Skip to content

Let Trapezoid keep non-diagonal mass matrices - #4631

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:trapezoid-general-mass-matrix
Sep 26, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:trapezoid-general-mass-matrix

Conversation

@singhharsh1708

Copy link
Copy Markdown
Member

Trapezoid takes non-diagonal mass matrices again. OrdinaryDiffEqNonlinearSolve's mass-matrix exactness tests have errored with "Trapezoid only works with diagonal mass matrices" since #4560, which keeps its Core lane red; locally that file now passes in full.
#4560 restricts explicit-first-stage methods to diagonal M because the generic ESDIRK step recovers z₁ from the FSAL elementwise. Trapezoid never runs that step: its :trap_dd3 body builds the stage equation from M * uprev and the FSAL, which is exact for any M.
On M u' = f(u, t) with a non-diagonal M and a general f, Trapezoid matches u' = M \ f to 4.5e-15 at order 2, as it did before #4560. TRBDF2 and Kvaerno3 are first order on the same problem, so they keep the restriction.
For the mass matrices master already accepts, solutions are bit-identical, and fixed-step Trapezoid stops re-evaluating its FSAL every step (19 fewer f calls per 20 steps), since that FSAL is already an explicit f(u).
Trapezoid joins the implicit-first-stage SDIRKs in the non-diagonal test (order 2.0; both of its assertions fail on master), and the consistency test expects the trait only on tableaus that take the generic step.
AI Disclosure: Claude assisted with this change.

@ChrisRackauckas
ChrisRackauckas merged commit f50f149 into SciML:master Sep 26, 2026
140 of 144 checks passed
@singhharsh1708
singhharsh1708 deleted the trapezoid-general-mass-matrix branch September 26, 2026 13:02
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/OrdinaryDiffEq.jl that referenced this pull request Sep 26, 2026
Bring in Trapezoid non-diagonal mass-matrix support (SciML#4631), BDF JET
FullSpecialize (SciML#4627), and other master fixes needed for Sublibrary CI.
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/OrdinaryDiffEq.jl that referenced this pull request Sep 27, 2026
The broader sibling [sources] block made the downgrade job resolve local
Core/BDF/FIRK/Rosenbrock/Differentiation/DevTools/DiffEqBase (PR head code)
against downgraded registry deps, and nsa_stats_tests.jl:91 failed under
Julia 1.11 (1.28235 <= 1.26195). Master's NonlinearSolve Project.toml has no
[sources] and that downgrade stays green. Path-source only SDIRK, which the
Trapezoid DAE tests need for in-tree SciML#4631 before that release is in
General; nsa_stats passes 39/39 locally with this package selection.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: opencode <[email protected]>
Agent-Harness: opencode 1.18.31
Agent-Model: opencode/longcat-2.5-preview-free
Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/OrdinaryDiffEq.jl/jobs/4436-opencode/log.txt on amdci2.julia.csail.mit.edu
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/OrdinaryDiffEq.jl that referenced this pull request Sep 27, 2026
Master's NonlinearSolve Project.toml has no [sources] block; the block added
in 080d4c1 makes the downgrade job resolve local siblings against
downgraded deps and fails nsa_stats_tests.jl:91 under Julia 1.11, and
narrowing it to SDIRK makes the downgrade job unresolvable (local SDIRK
2.9.7 vs downgrade-pinned BDF 2.0.0). With no [sources] the downgrade job
resolves registry packages as on master. The regular NonlinearSolve Core
job then uses registry SDIRK 2.9.6, which lacks SciML#4631; the Trapezoid
mass-matrix and nsa_noinit failures that produces are master-latent (see
CI triage in the PR body).

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: opencode <[email protected]>
Agent-Harness: opencode 1.18.31
Agent-Model: opencode/longcat-2.5-preview-free
Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/OrdinaryDiffEq.jl/jobs/4436-opencode/log.txt on amdci2.julia.csail.mit.edu
ChrisRackauckas referenced this pull request Sep 29, 2026
* Bump DiffEqBase to 7.21.3

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Agent-Harness: Devin CLI 3000.11.3 (Mac)
Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium)
Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json

* Bump OrdinaryDiffEqBDF to 2.4.12

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Agent-Harness: Devin CLI 3000.11.3 (Mac)
Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium)
Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json

* Bump OrdinaryDiffEqSDIRK to 2.9.7

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Agent-Harness: Devin CLI 3000.11.3 (Mac)
Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium)
Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json

* Bump OrdinaryDiffEqRosenbrock to 2.7.5

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Agent-Harness: Devin CLI 3000.11.3 (Mac)
Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium)
Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json

* Bump OrdinaryDiffEqLowOrderRK to 2.2.6

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Agent-Harness: Devin CLI 3000.11.3 (Mac)
Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium)
Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json

* Bump OrdinaryDiffEqTsit5 to 2.1.5

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Agent-Harness: Devin CLI 3000.11.3 (Mac)
Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium)
Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json

* Bump OrdinaryDiffEqVerner to 2.4.2

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Agent-Harness: Devin CLI 3000.11.3 (Mac)
Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium)
Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json

* Bump OrdinaryDiffEqSymplecticRK to 2.2.3

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Agent-Harness: Devin CLI 3000.11.3 (Mac)
Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium)
Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json

---------

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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