Skip to content

Add two-type tableau support and Explicit/Implicit Tableaus sublibraries#3283

Merged
ChrisRackauckas merged 8 commits intoSciML:v7from
ChrisRackauckas-Claude:v7-tableaus-v3
Apr 7, 2026
Merged

Add two-type tableau support and Explicit/Implicit Tableaus sublibraries#3283
ChrisRackauckas merged 8 commits intoSciML:v7from
ChrisRackauckas-Claude:v7-tableaus-v3

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Summary

Based on top of #3282 (DiffEqDevTools migration). Three commits:

1. Two-type ExplicitRKTableau

  • ExplicitRKTableau struct gets separate CType for time-related c coefficients
  • constructDormandPrince(::Type{T}, ::Type{T_time}) and constructTsit5ExplicitRK accept second type parameter
  • ExplicitRKConstantCache converts c to typeof(dt) as safety net for external tableaux

2. OrdinaryDiffEqExplicitTableaus sublibrary

  • 87 explicit RK tableau constructors moved from DiffEqDevTools
  • All accept (::Type{T}, ::Type{T_time}) two-type signatures
  • Co-located only — not a dependency of the solver

3. OrdinaryDiffEqImplicitTableaus sublibrary

  • 18 implicit RK tableau constructors moved from DiffEqDevTools
  • ImplicitRKTableau struct gets separate CType
  • Same two-type signature pattern

Prepares for AutoSpecialize as default ODEFunction constructor (SciMLBase v3).

Test plan

  • Local tests pass with forced AutoSpecialize
  • Sublibrary unit tests pass
  • CI

Supersedes #3281.

🤖 Generated with Claude Code

@ChrisRackauckas-Claude ChrisRackauckas-Claude changed the base branch from master to v7 April 7, 2026 01:40
@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor Author

New commit: Convert remaining single-type tableaus to two-type form

Added commit that converts the last 3 single-type tableaus to {T, T2}:

  • SDIRK22Tableau{T}{T, T2}a (gamma diagonal) is now T2 (time-type), α/β remain T (state-type)
  • Rosenbrock23Tableau{T}{T, T2}d (gamma) is now T2, c₃₂ remains T
  • Rosenbrock32Tableau{T}{T, T2} — same as Rosenbrock23
  • Updated Rosenbrock23ConstantCache and Rosenbrock32ConstantCache struct definitions to {T, T2, ...}
  • Updated all alg_cache call sites to pass constvalue(tTypeNoUnits) as second argument

Also added BREAKING.md documenting all two-type tableau changes for v7.

All other existing {T, T2} tableaus (SDIRK, Rosenbrock/Rodas, FIRK, Verner, PDIRK, QPRK) already had two type parameters in their struct definitions — no changes needed for those.

ChrisRackauckas and others added 5 commits April 7, 2026 06:05
ExplicitRKTableau now has a separate CType parameter for time-related
coefficients (c) vs VType for state-related coefficients (α, αEEst).

constructDormandPrince and constructTsit5ExplicitRK accept a second
type parameter T_time for the time coefficient type (defaults to T).
This allows e.g. constructVernerEfficient6(BigFloat, Float64) to use
BigFloat precision for state coefficients but Float64 for c.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move explicit RK tableau constructors from DiffEqDevTools into a new
co-located sublibrary. All 87 construct* functions accept a second type
parameter T_time for the time coefficient type (c), defaulting to T.

The sublibrary is NOT a dependency of OrdinaryDiffEqExplicitRK — it's
too large to pull in by default. DP5 and Tsit5 constructors remain in
OrdinaryDiffEqExplicitRK since they're needed for defaults.

- New sublibrary: lib/OrdinaryDiffEqExplicitTableaus (co-located, not depended on)
- constructDormandPrince, constructTsit5ExplicitRK stay in ExplicitRK
- All construct* signatures use ::Type{T}, ::Type{T_time} with where

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move 18 implicit RK tableau constructors from DiffEqDevTools into a new
co-located sublibrary. All constructors accept a second type parameter
T_time for the time coefficient type (c), defaulting to T.

Includes: GL2/4/6, LobattoIIIA/B/C/CStar/D, RadauIA/IIA,
ImplicitEuler, MidpointRule, TrapezoidalRule.

Co-located only — not a dependency of any solver package.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove all 105 construct* tableau functions from DiffEqDevTools
  (already migrated to OrdinaryDiffEqExplicitTableaus and
  OrdinaryDiffEqImplicitTableaus)
- Keep deduce_Butcher_tableau in DiffEqDevTools (utility function)
- Move tableau convergence tests (check_tableau, high-order convergence,
  deduce_Butcher, stability regions) to the new tableau packages
- Update DiffEqDevTools stability_region_test to use algorithm-based API
- Add LICENSE.md to both new tableau packages
- Switch OrdinaryDiffEqRKIP from DiffEqDevTools to
  OrdinaryDiffEqExplicitTableaus for constructVerner6

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rename all tableau functions in OrdinaryDiffEqExplicitTableaus and
OrdinaryDiffEqImplicitTableaus to drop the 'construct' prefix
(e.g., constructDormandPrince -> DormandPrince). Functions are no
longer exported — access via qualified names
(e.g., OrdinaryDiffEqExplicitTableaus.DormandPrince()).

Update OrdinaryDiffEqRKIP to use Verner6 instead of constructVerner6.
Update all tests to use qualified access.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ChrisRackauckas and others added 3 commits April 7, 2026 06:09
Split the 10k-line ode_tableaus.jl into 7 files organized by method order:
- tableaus_low_order.jl: Orders 1-4 (12 methods)
- tableaus_order5.jl: Order 5 (15 methods)
- tableaus_order6.jl: Order 6 (25 methods)
- tableaus_order7.jl: Order 7 (10 methods)
- tableaus_order8_9.jl: Orders 8-9 (8 methods)
- tableaus_high_order.jl: Orders 10-14 (8 methods)
- tableaus_classic.jl: Classic wrappers (9 methods)

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These tests were already moved to OrdinaryDiffEqExplicitTableaus and
OrdinaryDiffEqImplicitTableaus and are no longer included by
DiffEqDevTools runtests.jl.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Revive the comprehensive convergence test from the original
DiffEqDevTools.jl (758dee9) that numerically verifies convergence
order for every explicit tableau from order 2 through 14 using
test_convergence with ExplicitRK solver.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas merged commit c040ab1 into SciML:v7 Apr 7, 2026
3 of 16 checks passed
@ChrisRackauckas ChrisRackauckas mentioned this pull request Apr 7, 2026
15 tasks
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