diff --git a/docs/src/api/ordinarydiffeqcore.md b/docs/src/api/ordinarydiffeqcore.md index 12b9a65e3b..2d607e30e2 100644 --- a/docs/src/api/ordinarydiffeqcore.md +++ b/docs/src/api/ordinarydiffeqcore.md @@ -7,6 +7,7 @@ own page, and solver-author hooks are documented separately in the ## Integrator objects ```@docs +OrdinaryDiffEqCore.DEOptions OrdinaryDiffEqCore.ODEIntegrator ``` diff --git a/lib/OrdinaryDiffEqCore/src/integrators/type.jl b/lib/OrdinaryDiffEqCore/src/integrators/type.jl index 2c3c223e4f..2a1d3dc0a0 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/type.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/type.jl @@ -104,6 +104,44 @@ function DEOptions{ ) end +function DEOptions{ + absType, relType, QT, tType, F1, F2, F3, F4, F5, F6, + F7, tstopsType, discType, ECType, SType, MI, tcache, savecache, + disccache, verbType, DType, + }( + maxiters, save_everystep, adaptive, abstol, reltol, + failfactor, dtmax, dtmin, internalnorm, internalopnorm, + save_idxs, tstops, saveat, d_discontinuities, + tstops_cache, saveat_cache, d_discontinuities_cache, userdata, + progress, progress_steps, progress_name, progress_message, progress_id, + timeseries_errors, dense_errors, delta, + dense, save_on, save_start, save_end, save_noise, save_discretes, + save_end_user, callback, isoutofdomain, unstable_check, + verbose, calck, force_dtmin, advance_to_tstop, stop_at_next_tstop, + ) where { + absType, relType, QT, tType, F1, F2, F3, F4, F5, F6, + F7, tstopsType, discType, ECType, SType, MI, tcache, savecache, + disccache, verbType, DType, + } + return DEOptions{ + absType, relType, QT, tType, F1, F2, F3, F4, F5, F6, + F7, tstopsType, discType, ECType, SType, MI, tcache, savecache, + disccache, verbType, DType, typeof(trivial_limiter!), + typeof(trivial_limiter!), + }( + maxiters, save_everystep, adaptive, abstol, reltol, + failfactor, dtmax, dtmin, internalnorm, internalopnorm, + save_idxs, tstops, saveat, d_discontinuities, + tstops_cache, saveat_cache, d_discontinuities_cache, userdata, + progress, progress_steps, progress_name, progress_message, progress_id, + timeseries_errors, dense_errors, delta, + trivial_limiter!, trivial_limiter!, dense, save_on, save_start, save_end, + save_noise, save_discretes, save_end_user, callback, isoutofdomain, + unstable_check, verbose, calck, force_dtmin, advance_to_tstop, + stop_at_next_tstop, + ) +end + """ ODEIntegrator diff --git a/test/Downstream/Project.toml b/test/Downstream/Project.toml index 071a968790..7b3ae320e5 100644 --- a/test/Downstream/Project.toml +++ b/test/Downstream/Project.toml @@ -1,6 +1,7 @@ [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" +DelayDiffEq = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb" DynamicQuantities = "06fc5a27-2a28-4c7c-a15d-362465fb6821" Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" @@ -14,6 +15,7 @@ OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce" OrdinaryDiffEqSDIRK = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" OrdinaryDiffEqSSPRK = "669c94d9-1f4b-4b64-b377-1aa079aa2388" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" @@ -22,6 +24,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] ADTypes = "1.16" DifferentiationInterface = "0.6.54, 0.7" +DelayDiffEq = "=6.1.0" DynamicQuantities = "1.8" Enzyme = "0.13.180" FiniteDiff = "2.27" @@ -35,6 +38,7 @@ OrdinaryDiffEqRosenbrock = "2" OrdinaryDiffEqSDIRK = "2" OrdinaryDiffEqSSPRK = "2" SafeTestsets = "0.1, 1" +SciMLBase = "3.39" SciMLTesting = "2.1" StaticArrays = "1" StochasticDiffEq = "7" diff --git a/test/Downstream/delaydiffeq_compatibility.jl b/test/Downstream/delaydiffeq_compatibility.jl new file mode 100644 index 0000000000..e8a266f762 --- /dev/null +++ b/test/Downstream/delaydiffeq_compatibility.jl @@ -0,0 +1,15 @@ +using DelayDiffEq +using SciMLBase: DDEProblem, init, solve!, successful_retcode +using Test + +@testset "DelayDiffEq 6.1.0 DEOptions layout" begin + f(du, u, h, p, t) = (du[1] = p * u[1] * (1 - h(p, t - 1; idxs = 1))) + h(p, t; idxs = nothing) = 0.1 + prob = DDEProblem(f, [0.1], h, (0.0, 2.0), 0.3; constant_lags = [1]) + + @test Base.pkgversion(DelayDiffEq) == v"6.1.0" + integrator = init(prob) + @test hasproperty(integrator.opts, :stage_limiter!) + @test hasproperty(integrator.opts, :step_limiter!) + @test successful_retcode(solve!(integrator)) +end diff --git a/test/runtests.jl b/test/runtests.jl index 00fbfd92ca..a4d15cc97f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -167,6 +167,7 @@ end function downstream_group() is_APPVEYOR && return activate_downstream_env() + @time @safetestset "DelayDiffEq Compatibility" include("Downstream/delaydiffeq_compatibility.jl") @time @safetestset "Measurements Tests" include("Downstream/measurements.jl") @time @safetestset "Time derivative Tests" include("Downstream/time_derivative_test.jl") return @time @safetestset "DynamicQuantities + Measurements Tests" include("Downstream/dynamicquantities_measurements.jl")