diff --git a/Project.toml b/Project.toml index 1ca32cd475..3f8d0a355a 100644 --- a/Project.toml +++ b/Project.toml @@ -124,6 +124,7 @@ FiniteDiff = "2.27" ForwardDiff = "0.10.38, 1" FunctionWrappersWrappers = "0.1.3" InteractiveUtils = "1.9" +JET = "0.9.18, 0.10.4, 0.11.0" JLArrays = "0.2" LineSearches = "7.4" LinearAlgebra = "1.9" @@ -134,7 +135,7 @@ MuladdMacro = "0.2.4" NonlinearSolve = "4.10" OrdinaryDiffEqAdamsBashforthMoulton = "1.4.0" OrdinaryDiffEqBDF = "1.9.0" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" OrdinaryDiffEqDefault = "1.7.0" OrdinaryDiffEqDifferentiation = "1.12.0" OrdinaryDiffEqExplicitRK = "1.3.0" @@ -189,6 +190,7 @@ DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" ElasticArrays = "fdbdab4c-e67f-52f5-8c3f-e7b388dad3d4" ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" @@ -206,4 +208,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [targets] -test = ["ComponentArrays", "AlgebraicMultigrid", "IncompleteLU", "DiffEqCallbacks", "DifferentiationInterface", "DiffEqDevTools", "ExplicitImports", "ODEProblemLibrary", "ElasticArrays", "JLArrays", "Random", "SafeTestsets", "StructArrays", "Test", "Unitful", "Pkg", "NLsolve", "RecursiveFactorization", "SparseConnectivityTracer", "SparseMatrixColorings", "Statistics"] +test = ["ComponentArrays", "AlgebraicMultigrid", "IncompleteLU", "DiffEqCallbacks", "DifferentiationInterface", "DiffEqDevTools", "ExplicitImports", "ODEProblemLibrary", "ElasticArrays", "JET", "JLArrays", "Random", "SafeTestsets", "StructArrays", "Test", "Unitful", "Pkg", "NLsolve", "RecursiveFactorization", "SparseConnectivityTracer", "SparseMatrixColorings", "Statistics"] diff --git a/docs/src/verbosity.md b/docs/src/verbosity.md new file mode 100644 index 0000000000..e373e72a51 --- /dev/null +++ b/docs/src/verbosity.md @@ -0,0 +1,9 @@ +# Controlling Solver Verbosity + +OrdinaryDiffEq.jl provides fine-grained control over diagnostic messages, warnings, and errors +through the `verbose` keyword argument for `solve`. The verbosity system allows you to control what +information is displayed during the solve process. See [SciMLLogging.jl](https://docs.sciml.ai/SciMLLogging/dev/) for more details. + +```@docs +ODEVerbosity +``` \ No newline at end of file diff --git a/lib/ImplicitDiscreteSolve/Project.toml b/lib/ImplicitDiscreteSolve/Project.toml index d25e9f75d1..8060c6e131 100644 --- a/lib/ImplicitDiscreteSolve/Project.toml +++ b/lib/ImplicitDiscreteSolve/Project.toml @@ -1,7 +1,7 @@ name = "ImplicitDiscreteSolve" uuid = "3263718b-31ed-49cf-8a0f-35a466e8af96" authors = ["vyudu "] -version = "1.2.0" +version = "1.3.0" [deps] SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7" @@ -24,7 +24,7 @@ Test = "1.10.0" OrdinaryDiffEqSDIRK = "1.6.0" SciMLBase = "2.99" SimpleNonlinearSolve = "2.7" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" SymbolicIndexingInterface = "0.3.38" julia = "1.10" @@ -39,3 +39,6 @@ test = ["OrdinaryDiffEqSDIRK", "Test", "JET", "Aqua", "AllocCheck"] [sources.OrdinaryDiffEqCore] path = "../OrdinaryDiffEqCore" + +[sources.OrdinaryDiffEqSDIRK] +path = "../OrdinaryDiffEqSDIRK" diff --git a/lib/ImplicitDiscreteSolve/src/cache.jl b/lib/ImplicitDiscreteSolve/src/cache.jl index f9c7835d82..765fec12fd 100644 --- a/lib/ImplicitDiscreteSolve/src/cache.jl +++ b/lib/ImplicitDiscreteSolve/src/cache.jl @@ -14,7 +14,7 @@ end function alg_cache(alg::IDSolve, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} state = ImplicitDiscreteState(isnothing(u) ? nothing : zero(u), p, t) IDSolveCache(u, uprev, state, nothing) end @@ -28,7 +28,7 @@ end function alg_cache(alg::IDSolve, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} state = ImplicitDiscreteState(isnothing(u) ? nothing : zero(u), p, t) IDSolveCache(u, uprev, state, nothing) end diff --git a/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml b/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml index 4971a132c4..5bd93e2c59 100644 --- a/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml +++ b/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqAdamsBashforthMoulton" uuid = "89bda076-bce5-4f1c-845f-551c83cdda9a" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" @@ -33,7 +33,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" OrdinaryDiffEqLowOrderRK = "1.5.0" Aqua = "0.8.11" diff --git a/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/OrdinaryDiffEqAdamsBashforthMoulton.jl b/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/OrdinaryDiffEqAdamsBashforthMoulton.jl index fda67f03d6..448af25852 100644 --- a/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/OrdinaryDiffEqAdamsBashforthMoulton.jl +++ b/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/OrdinaryDiffEqAdamsBashforthMoulton.jl @@ -10,7 +10,7 @@ import OrdinaryDiffEqCore: OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCac trivial_limiter!, get_fsalfirstlast, generic_solver_docstring, full_cache, - _bool_to_ADType + _bool_to_ADType, @SciMLMessage import OrdinaryDiffEqLowOrderRK: BS3ConstantCache, BS3Cache, RK4ConstantCache, RK4Cache import RecursiveArrayTools: recursivefill! using MuladdMacro, FastBroadcast diff --git a/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/adams_bashforth_moulton_caches.jl b/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/adams_bashforth_moulton_caches.jl index 283b4b6b18..44b567a791 100644 --- a/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/adams_bashforth_moulton_caches.jl +++ b/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/adams_bashforth_moulton_caches.jl @@ -26,7 +26,7 @@ end function alg_cache(alg::AB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -39,7 +39,7 @@ end function alg_cache(alg::AB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype AB3ConstantCache(k2, k3, 1) @@ -67,7 +67,7 @@ end function alg_cache(alg::ABM32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -80,7 +80,7 @@ end function alg_cache(alg::ABM32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype ABM32ConstantCache(k2, k3, 1) @@ -113,7 +113,7 @@ end function alg_cache(alg::AB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -130,7 +130,7 @@ end function alg_cache(alg::AB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -167,7 +167,7 @@ end function alg_cache(alg::ABM43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -188,7 +188,7 @@ end function alg_cache(alg::ABM43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -223,7 +223,7 @@ end function alg_cache(alg::AB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -240,7 +240,7 @@ end function alg_cache(alg::AB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -280,7 +280,7 @@ end function alg_cache(alg::ABM54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -302,7 +302,7 @@ end function alg_cache(alg::ABM54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -351,7 +351,7 @@ end function alg_cache(alg::VCAB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) c = fill(zero(t), 3, 3) g = fill(zero(t), 3) @@ -372,7 +372,7 @@ end function alg_cache(alg::VCAB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) bk1 = zero(rate_prototype) bk2 = zero(rate_prototype) @@ -447,7 +447,7 @@ end function alg_cache(alg::VCAB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 4) c = fill(zero(t), 4, 4) g = fill(zero(t), 4) @@ -468,7 +468,7 @@ end function alg_cache(alg::VCAB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -544,7 +544,7 @@ end function alg_cache(alg::VCAB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 5) c = fill(zero(t), 5, 5) g = fill(zero(t), 5) @@ -565,7 +565,7 @@ end function alg_cache(alg::VCAB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -645,7 +645,7 @@ end function alg_cache(alg::VCABM3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) c = fill(zero(t), 4, 4) g = fill(zero(t), 4) @@ -667,7 +667,7 @@ end function alg_cache(alg::VCABM3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) bk1 = zero(rate_prototype) bk2 = zero(rate_prototype) @@ -751,7 +751,7 @@ end function alg_cache(alg::VCABM4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 4) c = fill(zero(t), 5, 5) g = fill(zero(t), 5) @@ -774,7 +774,7 @@ end function alg_cache(alg::VCABM4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -857,7 +857,7 @@ end function alg_cache(alg::VCABM5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(t), 5) c = fill(zero(t), 6, 6) g = fill(zero(t), 6) @@ -880,7 +880,7 @@ end function alg_cache(alg::VCABM5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -972,7 +972,7 @@ end function alg_cache(alg::VCABM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 13) c = fill(zero(t), 13, 13) g = fill(zero(t), 13) @@ -997,7 +997,7 @@ end function alg_cache(alg::VCABM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k4 = zero(rate_prototype) dts = fill(zero(dt), 13) diff --git a/lib/OrdinaryDiffEqBDF/Project.toml b/lib/OrdinaryDiffEqBDF/Project.toml index b7f57e4e9e..9ebb29e564 100644 --- a/lib/OrdinaryDiffEqBDF/Project.toml +++ b/lib/OrdinaryDiffEqBDF/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqBDF" uuid = "6ad6398a-0878-4a85-9266-38940aa047c8" authors = ["ParamThakkar123 "] -version = "1.10.0" +version = "1.11.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -45,14 +45,14 @@ FastBroadcast = "0.3" Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" -LinearSolve = "3.26" +LinearSolve = "3.46" PrecompileTools = "1.2" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" OrdinaryDiffEqSDIRK = "1.6.0" TruncatedStacktraces = "1.4" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" ArrayInterface = "7.19" Enzyme = "0.13" diff --git a/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl b/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl index 9917964992..a0e6066f28 100644 --- a/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl +++ b/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl @@ -14,10 +14,10 @@ end function alg_cache(alg::ABDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(2) // 3, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) eulercache = ImplicitEulerConstantCache(nlsolver) dtₙ₋₁ = one(dt) @@ -44,10 +44,10 @@ end function alg_cache(alg::ABDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(2) // 3, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true),verbose) fsalfirst = zero(rate_prototype) fsalfirstprev = zero(rate_prototype) @@ -103,10 +103,10 @@ end function alg_cache(alg::SBDF, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1) // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) k2 = rate_prototype k₁ = rate_prototype @@ -126,10 +126,10 @@ end function alg_cache(alg::SBDF, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1) // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) order = alg.order @@ -186,10 +186,10 @@ end function alg_cache(alg::QNDF1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) uprev2 = u dtₙ₋₁ = zero(t) @@ -207,10 +207,10 @@ end function alg_cache(alg::QNDF1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) D = Array{typeof(u)}(undef, 1, 1) @@ -276,10 +276,10 @@ end function alg_cache(alg::QNDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) uprev2 = u uprev3 = u @@ -299,10 +299,10 @@ end function alg_cache(alg::QNDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) D = Array{typeof(u)}(undef, 1, 2) @@ -357,12 +357,12 @@ end function alg_cache(alg::QNDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits } where {MO} max_order = MO γ, c = Int64(1)//1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) dtprev = one(dt) D = Matrix{uEltypeNoUnits}(undef, length(u), max_order + 2) recursivefill!(D, zero(uEltypeNoUnits)) @@ -423,12 +423,12 @@ end function alg_cache(alg::QNDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits } where {MO} max_order = MO γ, c = Int64(1)//1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) dd = zero(u) utilde = zero(u) @@ -482,10 +482,10 @@ end function alg_cache(alg::MEBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -505,10 +505,10 @@ end function alg_cache(alg::MEBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) MEBDF2ConstantCache(nlsolver) end @@ -539,12 +539,12 @@ end function alg_cache(alg::FBDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits } where {MO} γ, c = Int64(1)//1, 1 max_order = MO nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) bdf_coeffs = SA[1 -1 0 0 0 0; Int64(3)//2 -2 Int64(1)//2 0 0 0; Int64(11)//6 -3 Int64(3)//2 -Int64(1)//3 0 0; @@ -614,13 +614,13 @@ end function alg_cache(alg::FBDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {MO, uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{true}, verbose) where {MO, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1)//1, 1 fsalfirst = zero(rate_prototype) max_order = MO nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) bdf_coeffs = SA[1 -1 0 0 0 0; Int64(3)//2 -2 Int64(1)//2 0 0 0; Int64(11)//6 -3 Int64(3)//2 -Int64(1)//3 0 0; diff --git a/lib/OrdinaryDiffEqBDF/src/dae_caches.jl b/lib/OrdinaryDiffEqBDF/src/dae_caches.jl index 1c7383dc08..e0e6e8242f 100644 --- a/lib/OrdinaryDiffEqBDF/src/dae_caches.jl +++ b/lib/OrdinaryDiffEqBDF/src/dae_caches.jl @@ -24,11 +24,11 @@ end function alg_cache(alg::DImplicitEuler, du, u, res_prototype, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 α = 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(false), verbose) DImplicitEulerConstantCache(nlsolver) end @@ -36,13 +36,13 @@ end function alg_cache(alg::DImplicitEuler, du, u, res_prototype, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 α = 1 k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(true), verbose) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -62,11 +62,11 @@ function alg_cache(alg::DABDF2, du, u, res_prototype, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1) // 1, 1 α = Int64(1) // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(false), verbose) eulercache = DImplicitEulerConstantCache(nlsolver) dtₙ₋₁ = one(dt) @@ -91,11 +91,11 @@ end function alg_cache(alg::DABDF2, du, u, res_prototype, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1) // 1, 1 α = Int64(1) // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(true), verbose) fsalfirst = zero(rate_prototype) fsalfirstprev = zero(rate_prototype) @@ -140,11 +140,11 @@ end function alg_cache(alg::DFBDF{MO}, du, u, res_prototype, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, - uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{false}) where {MO} + uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{false}, verbose) where {MO} γ, c = 1.0, 1.0 max_order = MO nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) bdf_coeffs = SA[1 -1 0 0 0 0; Int64(2)//3 -Int64(4)//3 Int64(1)//3 0 0 0; Int64(6)//11 -Int64(18)//11 Int64(9)//11 -Int64(2)//11 0 0; @@ -211,12 +211,12 @@ end function alg_cache(alg::DFBDF{MO}, du, u, res_prototype, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {MO} + ::Val{true}, verbose) where {MO} γ, c = 1.0, 1.0 fsalfirst = zero(rate_prototype) max_order = MO nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) #=bdf_coeffs = SA[1 -1 0 0 0 0 ; 3//2 -2 1//2 0 0 0 ; 11//6 -3 3//2 -1//3 0 0 ; diff --git a/lib/OrdinaryDiffEqBDF/test/dae_ad_tests.jl b/lib/OrdinaryDiffEqBDF/test/dae_ad_tests.jl index cdb037f45e..ddf39d655b 100644 --- a/lib/OrdinaryDiffEqBDF/test/dae_ad_tests.jl +++ b/lib/OrdinaryDiffEqBDF/test/dae_ad_tests.jl @@ -36,11 +36,11 @@ f_mm = ODEFunction{true}(f_ode, mass_matrix = M) prob_mm = ODEProblem(f_mm, u₀, tspan, p) f_mm_oop = ODEFunction{false}(f_ode, mass_matrix = M) prob_mm_oop = ODEProblem(f_mm_oop, u₀, tspan, p) -@test_broken sol1 = @inferred solve( +sol1 = @inferred solve( prob, DFBDF(autodiff = afd_cs3), dt = 1e-5, abstol = 1e-8, reltol = 1e-8) -@test_broken sol2 = @inferred solve( +sol2 = @inferred solve( prob_oop, DFBDF(autodiff = afd_cs3), dt = 1e-5, abstol = 1e-8, reltol = 1e-8) -@test_broken sol3 = @inferred solve( +sol3 = @inferred solve( prob_mm, FBDF(autodiff = afd_cs3), dt = 1e-5, abstol = 1e-8, reltol = 1e-8) # These tests flex differentiation of the solver and through the initialization diff --git a/lib/OrdinaryDiffEqBDF/test/inference_tests.jl b/lib/OrdinaryDiffEqBDF/test/inference_tests.jl index 58ac2bba75..8f103982fd 100644 --- a/lib/OrdinaryDiffEqBDF/test/inference_tests.jl +++ b/lib/OrdinaryDiffEqBDF/test/inference_tests.jl @@ -1,5 +1,6 @@ using OrdinaryDiffEqBDF, ADTypes, Test using NonlinearSolve: TrustRegion +using SciMLLogging: Standard prob = ODEProblem((du, u, p, t) -> du .= u, zeros(1), (0.0, 1.0)) nlalg = FBDF(autodiff = false, @@ -9,10 +10,10 @@ basicalgad = FBDF() nlsolver = @inferred OrdinaryDiffEqBDF.build_nlsolver( basicalg, prob.u0, prob.u0, prob.p, 0.0, 0.0, prob.f, prob.u0, Float64, - Float64, Float64, 0.0, 0.0, Val(true)) + Float64, Float64, 0.0, 0.0, Val(true), Standard()) nlsolver = @inferred OrdinaryDiffEqBDF.build_nlsolver( nlalg, prob.u0, prob.u0, prob.p, 0.0, 0.0, prob.f, prob.u0, Float64, - Float64, Float64, 0.0, 0.0, Val(true)) + Float64, Float64, 0.0, 0.0, Val(true), Standard()) nlsolver = @test_throws Any @inferred OrdinaryDiffEqBDF.build_nlsolver( basicalgad, prob.u0, prob.u0, prob.p, 0.0, 0.0, prob.f, prob.u0, Float64, - Float64, Float64, 0.0, 0.0, Val(true)) + Float64, Float64, 0.0, 0.0, Val(true), Standard()) diff --git a/lib/OrdinaryDiffEqCore/Project.toml b/lib/OrdinaryDiffEqCore/Project.toml index 4cf4f09a5e..28483ecbe0 100644 --- a/lib/OrdinaryDiffEqCore/Project.toml +++ b/lib/OrdinaryDiffEqCore/Project.toml @@ -1,12 +1,13 @@ name = "OrdinaryDiffEqCore" uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" authors = ["ParamThakkar123 "] -version = "1.36.0" +version = "1.37.0" [deps] SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" Reexport = "189a3867-3050-52da-a836-e630ba90ab69" Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" FunctionWrappersWrappers = "77dc65aa-8811-40c2-897b-53d922fa7daf" FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -25,6 +26,7 @@ Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" Preferences = "21216c6a-2e73-6563-6e65-726566657250" +SciMLLogging = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" @@ -50,6 +52,7 @@ SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" SafeTestsets = "0.1.0" SciMLOperators = "1.4" Accessors = "0.1.36" +ConcreteStructs = "0.2" StaticArraysCore = "1.4.3" SciMLStructures = "1.7" FunctionWrappersWrappers = "0.1" @@ -67,6 +70,7 @@ LinearAlgebra = "1.10" TruncatedStacktraces = "1.4" SimpleUnPack = "1.1" SciMLBase = "2.115" +SciMLLogging = "1.3.1" FastClosures = "0.3" DataStructures = "0.18.22, 0.19" Static = "1.2" diff --git a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl index 53e3383b49..4b16d13267 100644 --- a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl +++ b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl @@ -90,8 +90,14 @@ import Accessors: @reset # SciMLStructures symbols imported but not directly used in OrdinaryDiffEqCore # using SciMLStructures: canonicalize, Tunable, isscimlstructure +using SciMLLogging: SciMLLogging, @SciMLMessage, AbstractVerbositySpecifier, AbstractVerbosityPreset, + None, Minimal, Standard, Detailed, All, Silent, InfoLevel, WarnLevel, ErrorLevel, + CustomLevel, AbstractMessageLevel + using SymbolicIndexingInterface: state_values, parameter_values +using ConcreteStructs: @concrete + const CompiledFloats = Union{Float32, Float64} import Preferences @@ -136,6 +142,7 @@ end include("doc_utils.jl") include("misc_utils.jl") +include("verbosity.jl") include("algorithms.jl") include("composite_algs.jl") @@ -143,6 +150,7 @@ include("composite_algs.jl") include("alg_utils.jl") include("caches/basic_caches.jl") +include("deprecated.jl") include("integrators/type.jl") include("integrators/controllers.jl") diff --git a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl index 5b97865624..d6c2b16116 100644 --- a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl +++ b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl @@ -59,20 +59,20 @@ end function alg_cache(alg::CompositeAlgorithm, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{V}) where {V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{V}, verbose) where {V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} caches = __alg_cache(alg.algs, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(V)) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(V), verbose) CompositeCache(caches, alg.choice_function, 1) end function alg_cache(alg::CompositeAlgorithm{CS, Tuple{A1, A2, A3, A4, A5, A6}}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{V}) where { + ::Val{V}, verbose) where { CS, V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, A1, A2, A3, A4, A5, A6} args = (u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, - reltol, p, calck, Val(V)) + reltol, p, calck, Val(V), verbose) # Core.Typeof to turn uEltypeNoUnits into Type{uEltypeNoUnits} rather than DataType argT = map(Core.Typeof, args) T1 = Base.promote_op(alg_cache, A1, argT...) @@ -110,13 +110,13 @@ end @generated function __alg_cache(algs::T, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{V}) where {T <: Tuple, V, uEltypeNoUnits, + ::Val{V}, verbose) where {T <: Tuple, V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Expr(:tuple, map(1:length(T.types)) do i :(alg_cache(algs[$i], u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, - reltol, p, calck, Val($V))) + reltol, p, calck, Val($V), verbose)) end...) end diff --git a/lib/OrdinaryDiffEqCore/src/composite_algs.jl b/lib/OrdinaryDiffEqCore/src/composite_algs.jl index 6beec535d5..598412dc0c 100644 --- a/lib/OrdinaryDiffEqCore/src/composite_algs.jl +++ b/lib/OrdinaryDiffEqCore/src/composite_algs.jl @@ -17,6 +17,11 @@ function is_stiff(integrator, alg, ntol, stol, is_stiffalg) os = oneunit(stiffness) bool = !(stiffness <= os * tol) + if bool + @SciMLMessage(lazy"Stiffness detected at t = $(integrator.t)", + integrator.opts.verbose, :stiff_detection) + end + if !bool integrator.alg.choice_function.successive_switches += 1 else @@ -50,9 +55,13 @@ function (AS::AutoSwitchCache)(integrator) AS.count < 0 ? 1 : AS.count + 1 : AS.count > 0 ? -1 : AS.count - 1 if (!AS.is_stiffalg && AS.count > AS.maxstiffstep) + @SciMLMessage(lazy"Switching from $(nameof(typeof(AS.nonstiffalg))) to $(nameof(typeof(AS.stiffalg))) at t = $(integrator.t)", + integrator.opts.verbose, :alg_switch) integrator.dt = dt * AS.dtfac AS.is_stiffalg = true elseif (AS.is_stiffalg && AS.count < -AS.maxnonstiffstep) + @SciMLMessage(lazy"Switching from $(nameof(typeof(AS.stiffalg))) to $(nameof(typeof(AS.nonstiffalg))) at t = $(integrator.t)", + integrator.opts.verbose, :alg_switch) integrator.dt = dt / AS.dtfac AS.is_stiffalg = false end diff --git a/lib/OrdinaryDiffEqCore/src/deprecated.jl b/lib/OrdinaryDiffEqCore/src/deprecated.jl new file mode 100644 index 0000000000..e00fe79a4a --- /dev/null +++ b/lib/OrdinaryDiffEqCore/src/deprecated.jl @@ -0,0 +1,16 @@ +#Backwards compat for DelayDiffEq +function alg_cache(alg, u, rate_prototype, ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(true), ODEVerbosity()) +end + +function alg_cache(alg, u, rate_prototype, ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false), ODEVerbosity()) +end \ No newline at end of file diff --git a/lib/OrdinaryDiffEqCore/src/initdt.jl b/lib/OrdinaryDiffEqCore/src/initdt.jl index 991ed87ac9..6455f5b037 100644 --- a/lib/OrdinaryDiffEqCore/src/initdt.jl +++ b/lib/OrdinaryDiffEqCore/src/initdt.jl @@ -12,7 +12,10 @@ smalldt = max(dtmin, convert(_tType, oneunit_tType * 1 // 10^(6))) if integrator.isdae - return tdir * max(smalldt, dtmin) + result_dt = tdir * max(smalldt, dtmin) + @SciMLMessage(lazy"Using default small timestep for DAE: dt = $(result_dt)", + integrator.opts.verbose, :shampine_dt) + return result_dt end if eltype(u0) <: Number && !(integrator.alg isa CompositeAlgorithm) @@ -110,7 +113,10 @@ integrator.alg.linsolve(ftmp, copy(prob.f.mass_matrix), f₀, true) copyto!(f₀, ftmp) catch - return tdir * max(smalldt, dtmin) + result_dt = tdir * max(smalldt, dtmin) + @SciMLMessage(lazy"Mass matrix appears singular, using default small timestep: dt = $(result_dt)", + integrator.opts.verbose, :near_singular) + return result_dt end end @@ -128,10 +134,8 @@ # because it also checks if partials are NaN # https://discourse.julialang.org/t/incorporating-forcing-functions-in-the-ode-model/70133/26 if isnan(d₁) - if integrator.opts.verbose - @warn("First function call produced NaNs. Exiting. Double check that none of the initial conditions, parameters, or timespan values are NaN.") - end - + @SciMLMessage("First function call produced NaNs. Exiting. Double check that none of the initial conditions, parameters, or timespan values are NaN.", + integrator.opts.verbose, :init_NaN) return tdir * dtmin end @@ -150,7 +154,10 @@ if typeof(one(_tType)) <: AbstractFloat && dt₀ < 10eps(_tType) * oneunit(_tType) # This catches Andreas' non-singular example # should act like it's singular - return tdir * max(smalldt, dtmin) + result_dt = tdir * max(smalldt, dtmin) + @SciMLMessage(lazy"Initial timestep too small (near machine epsilon), using default: dt = $(result_dt)", + integrator.opts.verbose, :dt_epsilon) + return result_dt end dt₀_tdir = tdir * dt₀ @@ -249,8 +256,10 @@ end d₀ = internalnorm(u0 ./ sk, t) f₀ = f(u0, p, t) - if integrator.opts.verbose && any(x -> any(isnan, x), f₀) - @warn("First function call produced NaNs. Exiting. Double check that none of the initial conditions, parameters, or timespan values are NaN.") + + if any(x -> any(isnan, x), f₀) + @SciMLMessage("First function call produced NaNs. Exiting. Double check that none of the initial conditions, parameters, or timespan values are NaN.", + integrator.opts.verbose, :init_NaN) end inferredtype = Base.promote_op(/, typeof(u0), typeof(oneunit(t))) diff --git a/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl b/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl index 9c58c48432..1b5c191d4d 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl @@ -297,7 +297,15 @@ end k = min(alg_order(alg), alg_adaptive_order(alg)) + 1 dt_factor = err1^(beta1 / k) * err2^(beta2 / k) * err3^(beta3 / k) if isnan(dt_factor) - @warn "unlimited dt_factor" dt_factor err1 err2 err3 beta1 beta2 beta3 k + @SciMLMessage(lazy"unlimited dt_factor: + err1 = $err1 + err2 = $err2, + err3 = $err3, + beta1 = $beta1, + beta2 = $beta2, + beta3 = $beta3, + k = $k", + integrator.opts.verbose, :unlimited_dt) end dt_factor = controller.limiter(dt_factor) diff --git a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl index c46f5d8c52..c3357442c8 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl @@ -10,12 +10,16 @@ function loopheader!(integrator) if integrator.iter > 0 if (integrator.opts.adaptive && !integrator.accept_step) || integrator.force_stepfail + @SciMLMessage(lazy"Step rejected: t = $(integrator.t), EEst = $(integrator.EEst)", + integrator.opts.verbose, :step_rejected) if integrator.isout integrator.dt = integrator.dt * integrator.opts.qmin elseif !integrator.force_stepfail step_reject_controller!(integrator, integrator.alg) end else + @SciMLMessage(lazy"Step accepted: t = $(integrator.t), dt = $(integrator.dt), EEst = $(integrator.EEst)", + integrator.opts.verbose, :step_accepted) integrator.success_iter += 1 apply_step!(integrator) end diff --git a/lib/OrdinaryDiffEqCore/src/integrators/type.jl b/lib/OrdinaryDiffEqCore/src/integrators/type.jl index 7dc9e1a9c6..1796cce4d3 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/type.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/type.jl @@ -1,6 +1,6 @@ mutable struct DEOptions{absType, relType, QT, tType, Controller, F1, F2, F3, F4, F5, F6, F7, tstopsType, discType, ECType, SType, MI, tcache, savecache, - disccache} + disccache, verbType} maxiters::MI save_everystep::Bool adaptive::Bool @@ -42,7 +42,7 @@ mutable struct DEOptions{absType, relType, QT, tType, Controller, F1, F2, F3, F4 callback::F4 isoutofdomain::F5 unstable_check::F7 - verbose::Bool + verbose::verbType calck::Bool force_dtmin::Bool advance_to_tstop::Bool diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 6ddd866f87..9982055418 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -54,7 +54,7 @@ function SciMLBase.__init( internalopnorm = opnorm, isoutofdomain = ODE_DEFAULT_ISOUTOFDOMAIN, unstable_check = ODE_DEFAULT_UNSTABLE_CHECK, - verbose = true, + verbose = ODEVerbosity(), timeseries_errors = true, dense_errors = false, advance_to_tstop = false, @@ -96,14 +96,17 @@ function SciMLBase.__init( error("This solver is not able to use mass matrices. For compatible solvers see https://docs.sciml.ai/DiffEqDocs/stable/solvers/dae_solve/") end + verbose_spec = _process_verbose_param(verbose) + if alg isa OrdinaryDiffEqRosenbrockAdaptiveAlgorithm && # https://github.com/SciML/OrdinaryDiffEq.jl/pull/2079 fixes this for Rosenbrock23 and 32 !only_diagonal_mass_matrix(alg) && prob.f.mass_matrix isa AbstractMatrix && all(isequal(0), prob.f.mass_matrix) # technically this should also warn for zero operators but those are hard to check for - if (dense || !isempty(saveat)) && verbose - @warn("Rosenbrock methods on equations without differential states do not bound the error on interpolations.") + if (dense || !isempty(saveat)) + @SciMLMessage("Rosenbrock methods on equations without differential states do not bound the error on interpolations.", + verbose_spec, :rosenbrock_no_differential_states) end end @@ -114,7 +117,8 @@ function SciMLBase.__init( end if !isempty(saveat) && dense - @warn("Dense output is incompatible with saveat. Please use the SavingCallback from the Callback Library to mix the two behaviors.") + @SciMLMessage("Dense output is incompatible with saveat. Please use the SavingCallback from the Callback Library to mix the two behaviors.", + verbose_spec, :dense_output_saveat) end progress && @logmsg(LogLevel(-1), progress_name, _id=progress_id, progress=0) @@ -405,11 +409,11 @@ function SciMLBase.__init( if prob isa DAEProblem cache = alg_cache(_alg, du, u, res_prototype, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, - reltol_internal, p, calck, Val(isinplace(prob))) + reltol_internal, p, calck, Val(isinplace(prob)), verbose_spec) else cache = alg_cache(_alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol_internal, p, calck, - Val(isinplace(prob))) + Val(isinplace(prob)), verbose_spec) end # Setting up the step size controller @@ -443,7 +447,7 @@ function SciMLBase.__init( typeof(d_discontinuities_internal), typeof(userdata), typeof(save_idxs), typeof(maxiters), typeof(tstops), - typeof(saveat), typeof(d_discontinuities)}(maxiters, save_everystep, + typeof(saveat), typeof(d_discontinuities), typeof(verbose_spec)}(maxiters, save_everystep, adaptive, abstol_internal, reltol_internal, QT(gamma), QT(qmax), @@ -473,7 +477,7 @@ function SciMLBase.__init( callbacks_internal, isoutofdomain, unstable_check, - verbose, calck, force_dtmin, + verbose_spec, calck, force_dtmin, advance_to_tstop, stop_at_next_tstop) @@ -641,9 +645,8 @@ function handle_dt!(integrator) error("Automatic dt setting has the wrong sign. Exiting. Please report this error.") end if isnan(integrator.dt) - if integrator.opts.verbose - @warn("Automatic dt set the starting dt as NaN, causing instability. Exiting.") - end + @SciMLMessage("Automatic dt set the starting dt as NaN, causing instability. Exiting.", + integrator.opts.verbose, :dt_NaN) end elseif integrator.opts.adaptive && integrator.dt > zero(integrator.dt) && integrator.tdir < 0 diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl new file mode 100644 index 0000000000..a9531b2381 --- /dev/null +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -0,0 +1,456 @@ +""" + ODEVerbosity <: AbstractVerbositySpecifier + +Verbosity configuration for OrdinaryDiffEq.jl solvers, providing fine-grained control over +diagnostic messages, warnings, and errors during ODE solution. + +# Fields + +## Error Control Group +- `dt_NaN`: Messages when time step becomes NaN +- `init_NaN`: Messages when initial conditions contain NaN +- `dense_output_saveat`: Messages about dense output with saveat +- `max_iters`: Messages when maximum iterations are reached +- `dt_min_unstable`: Messages when time step becomes too small/unstable +- `instability`: Messages when numerical instability is detected +- `newton_convergence`: Messages when Newton iteration fails to converge +- `step_rejected`: Messages when adaptive steps are rejected +- `step_accepted`: Messages when adaptive steps are accepted +- `convergence_limit`: Messages when convergence at floating point precision limit + +## Performance Group +- `alg_switch`: Messages when algorithm switching occurs +- `stiff_detection`: Messages when stiffness is detected +- `mismatched_input_output_type`: Messages when input/output types don't match +- `jacobian_update`: Messages when Jacobian matrix is computed/updated +- `w_factorization`: Messages when W matrix is factorized +- `newton_iterations`: Messages about Newton iteration progress + +## Numerical Group +- `rosenbrock_no_differential_states`: Messages when Rosenbrock has no differential states +- `shampine_dt`: Messages about Shampine time step selection +- `unlimited_dt`: Messages when time step is unlimited +- `dt_epsilon`: Messages when timestep goes below floating point epsilon +- `stability_check`: Messages about stability checks in extrapolation methods +- `near_singular`: Messages when Jacobian/mass matrix appears near-singular + +## Solver Verbosity Groups +- `linear_verbosity`: Verbosity configuration for linear solvers +- `nonlinear_verbosity`: Verbosity configuration for nonlinear solvers + +# Constructors + + ODEVerbosity(preset::AbstractVerbosityPreset) + +Create an `ODEVerbosity` using a preset configuration: +- `SciMLLogging.None()`: All messages disabled +- `SciMLLogging.Minimal()`: Only critical errors and fatal issues +- `SciMLLogging.Standard()`: Balanced verbosity (default) +- `SciMLLogging.Detailed()`: Comprehensive debugging information +- `SciMLLogging.All()`: Maximum verbosity + + ODEVerbosity(; error_control=nothing, performance=nothing, numerical=nothing, linear_verbosity=nothing, nonlinear_verbosity=nothing, kwargs...) + +Create an `ODEVerbosity` with group-level or individual field control. + +# Examples + +```julia +# Use a preset +verbose = ODEVerbosity(SciMLLogging.Standard()) + +# Set entire groups +verbose = ODEVerbosity( + error_control = SciMLLogging.WarnLevel(), + numerical = SciMLLogging.InfoLevel() +) + +# Set individual fields +verbose = ODEVerbosity( + dt_NaN = SciMLLogging.ErrorLevel(), + alg_switch = SciMLLogging.InfoLevel() +) + +# Mix group and individual settings +verbose = ODEVerbosity( + numerical = SciMLLogging.InfoLevel(), # Set all numerical to InfoLevel + unlimited_dt = SciMLLogging.ErrorLevel() # Override specific field +) +``` +""" +@concrete struct ODEVerbosity <: AbstractVerbositySpecifier + # Solver verbosity + linear_verbosity + nonlinear_verbosity + # Error control + dt_NaN + init_NaN + dense_output_saveat + max_iters + dt_min_unstable + instability + newton_convergence + step_rejected + step_accepted + convergence_limit + # Performance + alg_switch + stiff_detection + mismatched_input_output_type + jacobian_update + w_factorization + newton_iterations + # Numerical + rosenbrock_no_differential_states + shampine_dt + unlimited_dt + dt_epsilon + stability_check + near_singular +end + +# Group classifications +const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable, :instability, :newton_convergence, :step_rejected, :step_accepted, :convergence_limit) +const performance_options = (:alg_switch, :stiff_detection, :mismatched_input_output_type, :jacobian_update, :w_factorization, :newton_iterations) +const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt, :dt_epsilon, :stability_check, :near_singular) + +# Runtime helper for complex verbosity construction path +function _build_ode_verbosity_runtime( + error_control, performance, numerical, + linear_verbosity, nonlinear_verbosity, kwargs +) + # Validate group arguments + if error_control !== nothing && !(error_control isa AbstractMessageLevel) + throw(ArgumentError("error_control must be a SciMLLogging.AbstractMessageLevel, got $(typeof(error_control))")) + end + if performance !== nothing && !(performance isa AbstractMessageLevel) + throw(ArgumentError("performance must be a SciMLLogging.AbstractMessageLevel, got $(typeof(performance))")) + end + if numerical !== nothing && !(numerical isa AbstractMessageLevel) + throw(ArgumentError("numerical must be a SciMLLogging.AbstractMessageLevel, got $(typeof(numerical))")) + end + + # Validate individual kwargs + for (key, value) in pairs(kwargs) + if !(key in error_control_options || key in performance_options || + key in numerical_options) + throw(ArgumentError("Unknown verbosity option: $key. Valid options are: $(tuple(error_control_options..., performance_options..., numerical_options...))")) + end + if !(value isa AbstractMessageLevel) + throw(ArgumentError("$key must be a SciMLLogging.AbstractMessageLevel, got $(typeof(value))")) + end + end + + # Build arguments using NamedTuple for type stability + default_args = ( + linear_verbosity = linear_verbosity === nothing ? Minimal() : linear_verbosity, + nonlinear_verbosity = nonlinear_verbosity === nothing ? Minimal() : nonlinear_verbosity, + dt_NaN = WarnLevel(), + init_NaN = WarnLevel(), + dense_output_saveat = WarnLevel(), + max_iters = WarnLevel(), + dt_min_unstable = WarnLevel(), + instability = WarnLevel(), + newton_convergence = Silent(), + step_rejected = Silent(), + step_accepted = Silent(), + convergence_limit = Silent(), + alg_switch = Silent(), + stiff_detection = Silent(), + mismatched_input_output_type = WarnLevel(), + jacobian_update = Silent(), + w_factorization = Silent(), + newton_iterations = Silent(), + rosenbrock_no_differential_states = WarnLevel(), + shampine_dt = Silent(), + unlimited_dt = WarnLevel(), + dt_epsilon = Silent(), + stability_check = Silent(), + near_singular = Silent() + ) + + # Apply group-level settings - done explicitly for type stability + final_args = if error_control !== nothing || performance !== nothing || + numerical !== nothing + ( + linear_verbosity = default_args.linear_verbosity, + nonlinear_verbosity = default_args.nonlinear_verbosity, + # Error control group + dt_NaN = error_control !== nothing ? error_control : default_args.dt_NaN, + init_NaN = error_control !== nothing ? error_control : default_args.init_NaN, + dense_output_saveat = error_control !== nothing ? error_control : default_args.dense_output_saveat, + max_iters = error_control !== nothing ? error_control : default_args.max_iters, + dt_min_unstable = error_control !== nothing ? error_control : default_args.dt_min_unstable, + instability = error_control !== nothing ? error_control : default_args.instability, + newton_convergence = error_control !== nothing ? error_control : default_args.newton_convergence, + step_rejected = error_control !== nothing ? error_control : default_args.step_rejected, + step_accepted = error_control !== nothing ? error_control : default_args.step_accepted, + convergence_limit = error_control !== nothing ? error_control : default_args.convergence_limit, + # Performance group + alg_switch = performance !== nothing ? performance : default_args.alg_switch, + stiff_detection = performance !== nothing ? performance : default_args.stiff_detection, + mismatched_input_output_type = performance !== nothing ? performance : default_args.mismatched_input_output_type, + jacobian_update = performance !== nothing ? performance : default_args.jacobian_update, + w_factorization = performance !== nothing ? performance : default_args.w_factorization, + newton_iterations = performance !== nothing ? performance : default_args.newton_iterations, + # Numerical group + rosenbrock_no_differential_states = numerical !== nothing ? numerical : default_args.rosenbrock_no_differential_states, + shampine_dt = numerical !== nothing ? numerical : default_args.shampine_dt, + unlimited_dt = numerical !== nothing ? numerical : default_args.unlimited_dt, + dt_epsilon = numerical !== nothing ? numerical : default_args.dt_epsilon, + stability_check = numerical !== nothing ? numerical : default_args.stability_check, + near_singular = numerical !== nothing ? numerical : default_args.near_singular + ) + else + default_args + end + + # Apply individual overrides + if !isempty(kwargs) + final_args = merge(final_args, NamedTuple(kwargs)) + end + + ODEVerbosity(values(final_args)...) +end + +# Optionally-generated function for ODEVerbosity construction +# Uses compile-time type information to optimize the common default case +function _build_ode_verbosity( + error_control, + performance, + numerical, + linear_verbosity, + nonlinear_verbosity, + kwargs +) + if @generated + # Generated path: In this block, we're at compile time + # error_control, performance, numerical, etc. are the actual type values + # Check if all group params are Nothing and kwargs is empty (fast default path) + if error_control === Nothing && performance === Nothing && numerical === Nothing && + linear_verbosity === Nothing && nonlinear_verbosity === Nothing && + kwargs <: NamedTuple{()} + # Return an expression that constructs the default directly + return quote + ODEVerbosity( + Minimal(), # linear_verbosity + Minimal(), # nonlinear_verbosity + WarnLevel(), # dt_NaN + WarnLevel(), # init_NaN + WarnLevel(), # dense_output_saveat + WarnLevel(), # max_iters + WarnLevel(), # dt_min_unstable + WarnLevel(), # instability + Silent(), # newton_convergence + Silent(), # step_rejected + Silent(), # step_accepted + Silent(), # convergence_limit + Silent(), # alg_switch + Silent(), # stiff_detection + WarnLevel(), # mismatched_input_output_type + Silent(), # jacobian_update + Silent(), # w_factorization + Silent(), # newton_iterations + WarnLevel(), # rosenbrock_no_differential_states + Silent(), # shampine_dt + WarnLevel(), # unlimited_dt + Silent(), # dt_epsilon + Silent(), # stability_check + Silent() # near_singular + ) + end + else + # For non-default cases, delegate to runtime logic + return quote + _build_ode_verbosity_runtime( + error_control, performance, numerical, + linear_verbosity, nonlinear_verbosity, kwargs + ) + end + end + else + # Runtime fallback: error_control, performance, etc. are VALUES + if error_control === nothing && performance === nothing && numerical === nothing && + linear_verbosity === nothing && nonlinear_verbosity === nothing && + isempty(kwargs) + # Fast default path at runtime + ODEVerbosity( + Minimal(), # linear_verbosity + Minimal(), # nonlinear_verbosity + WarnLevel(), # dt_NaN + WarnLevel(), # init_NaN + WarnLevel(), # dense_output_saveat + WarnLevel(), # max_iters + WarnLevel(), # dt_min_unstable + WarnLevel(), # instability + Silent(), # newton_convergence + Silent(), # step_rejected + Silent(), # step_accepted + Silent(), # convergence_limit + Silent(), # alg_switch + Silent(), # stiff_detection + WarnLevel(), # mismatched_input_output_type + Silent(), # jacobian_update + Silent(), # w_factorization + Silent(), # newton_iterations + WarnLevel(), # rosenbrock_no_differential_states + Silent(), # shampine_dt + WarnLevel(), # unlimited_dt + Silent(), # dt_epsilon + Silent(), # stability_check + Silent() # near_singular + ) + else + # Complex path + _build_ode_verbosity_runtime( + error_control, performance, numerical, + linear_verbosity, nonlinear_verbosity, kwargs + ) + end + end +end + +function ODEVerbosity(; + error_control = nothing, performance = nothing, numerical = nothing, + linear_verbosity = nothing, nonlinear_verbosity = nothing, kwargs...) + _build_ode_verbosity( + error_control, performance, numerical, + linear_verbosity, nonlinear_verbosity, + NamedTuple(kwargs) + ) +end + +# Constructor for verbosity presets following the hierarchical levels: +# None < Minimal < Standard < Detailed < All +# Each level includes all messages from levels below it plus additional ones +function ODEVerbosity(verbose::AbstractVerbosityPreset) + if verbose isa Minimal + # Minimal: Only fatal errors and critical warnings + return ODEVerbosity( + linear_verbosity = Minimal(), + nonlinear_verbosity = Minimal(), + dt_NaN = WarnLevel(), + init_NaN = WarnLevel(), + dense_output_saveat = Silent(), + max_iters = WarnLevel(), + dt_min_unstable = WarnLevel(), + instability = WarnLevel(), + newton_convergence = WarnLevel(), + step_rejected = Silent(), + step_accepted = Silent(), + convergence_limit = Silent(), + alg_switch = Silent(), + stiff_detection = Silent(), + mismatched_input_output_type = Silent(), + jacobian_update = Silent(), + w_factorization = Silent(), + newton_iterations = Silent(), + rosenbrock_no_differential_states = WarnLevel(), + shampine_dt = Silent(), + unlimited_dt = WarnLevel(), + dt_epsilon = Silent(), + stability_check = Silent(), + near_singular = WarnLevel() + ) + elseif verbose isa Standard + # Standard: Everything from Minimal + non-fatal warnings + return ODEVerbosity() + elseif verbose isa Detailed + # Detailed: Everything from Standard + debugging/solver behavior + return ODEVerbosity( + linear_verbosity = Detailed(), + nonlinear_verbosity = Detailed(), + dt_NaN = WarnLevel(), + init_NaN = WarnLevel(), + dense_output_saveat = InfoLevel(), + max_iters = WarnLevel(), + dt_min_unstable = WarnLevel(), + instability = WarnLevel(), + newton_convergence = WarnLevel(), + step_rejected = Silent(), + step_accepted = Silent(), + convergence_limit = InfoLevel(), + alg_switch = InfoLevel(), + stiff_detection = Silent(), + mismatched_input_output_type = WarnLevel(), + jacobian_update = InfoLevel(), + w_factorization = InfoLevel(), + newton_iterations = InfoLevel(), + rosenbrock_no_differential_states = WarnLevel(), + shampine_dt = InfoLevel(), + unlimited_dt = WarnLevel(), + dt_epsilon = InfoLevel(), + stability_check = InfoLevel(), + near_singular = WarnLevel() + ) + elseif verbose isa All + # All: Maximum verbosity - every possible logging message at InfoLevel + return ODEVerbosity( + linear_verbosity = All(), + nonlinear_verbosity = All(), + dt_NaN = WarnLevel(), + init_NaN = WarnLevel(), + dense_output_saveat = InfoLevel(), + max_iters = WarnLevel(), + dt_min_unstable = WarnLevel(), + instability = WarnLevel(), + newton_convergence = WarnLevel(), + step_rejected = InfoLevel(), + step_accepted = InfoLevel(), + convergence_limit = InfoLevel(), + alg_switch = InfoLevel(), + stiff_detection = InfoLevel(), + mismatched_input_output_type = InfoLevel(), + jacobian_update = InfoLevel(), + w_factorization = InfoLevel(), + newton_iterations = InfoLevel(), + rosenbrock_no_differential_states = WarnLevel(), + shampine_dt = InfoLevel(), + unlimited_dt = WarnLevel(), + dt_epsilon = InfoLevel(), + stability_check = InfoLevel(), + near_singular = WarnLevel() + ) + end +end + +@inline function ODEVerbosity(verbose::None) + ODEVerbosity( + None(), + None(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent() + ) +end + +const DEFAULT_VERBOSE = ODEVerbosity() + +@inline function _process_verbose_param(verbose::SciMLLogging.AbstractVerbosityPreset) + ODEVerbosity(verbose) +end + +@inline function _process_verbose_param(verbose::Bool) + verbose ? DEFAULT_VERBOSE : ODEVerbosity(SciMLLogging.None()) +end + +@inline _process_verbose_param(verbose::ODEVerbosity) = verbose \ No newline at end of file diff --git a/lib/OrdinaryDiffEqDefault/Project.toml b/lib/OrdinaryDiffEqDefault/Project.toml index 64c6b513dc..a25e7ab833 100644 --- a/lib/OrdinaryDiffEqDefault/Project.toml +++ b/lib/OrdinaryDiffEqDefault/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqDefault" uuid = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" authors = ["ParamThakkar123 "] -version = "1.8.0" +version = "1.9.0" [deps] OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" @@ -37,12 +37,12 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" OrdinaryDiffEqBDF = "1.9.0" OrdinaryDiffEqVerner = "1.5.0" -LinearSolve = "3.26" +LinearSolve = "3.46" PrecompileTools = "1.2" EnumX = "1.0" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" SparseArrays = "1.10" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqDifferentiation/Project.toml b/lib/OrdinaryDiffEqDifferentiation/Project.toml index 32a601b7f5..6ae8c6dcf4 100644 --- a/lib/OrdinaryDiffEqDifferentiation/Project.toml +++ b/lib/OrdinaryDiffEqDifferentiation/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqDifferentiation" uuid = "4302a76b-040a-498a-8c04-15b101fed76b" authors = ["Chris Rackauckas ", "Yingbo Ma "] -version = "1.16.1" +version = "1.17.0" [deps] ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" @@ -49,11 +49,11 @@ Test = "<0.0.1, 1" FiniteDiff = "2.27" StaticArrayInterface = "1.8" DifferentiationInterface = "0.6.54, 0.7" -LinearSolve = "3.26" +LinearSolve = "3.46" ConstructionBase = "1.5.8" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" ConcreteStructs = "0.2" SparseArrays = "1.10" Aqua = "0.8.11" diff --git a/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl b/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl index 677b81e880..607e7ad268 100644 --- a/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl +++ b/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl @@ -6,7 +6,7 @@ import ADTypes: AutoFiniteDiff, AutoForwardDiff, AbstractADType, AutoSparse import ForwardDiff, FiniteDiff import ForwardDiff.Dual import LinearSolve -import LinearSolve: OperatorAssumptions +import LinearSolve: OperatorAssumptions, LinearVerbosity import FunctionWrappersWrappers import DiffEqBase @@ -44,7 +44,7 @@ using OrdinaryDiffEqCore: OrdinaryDiffEqAlgorithm, OrdinaryDiffEqAdaptiveImplici get_new_W_γdt_cutoff, TryAgain, DIRK, COEFFICIENT_MULTISTEP, NORDSIECK_MULTISTEP, GLM, FastConvergence, Convergence, SlowConvergence, - VerySlowConvergence, Divergence, NLStatus, MethodType, constvalue + VerySlowConvergence, Divergence, NLStatus, MethodType, constvalue, @SciMLMessage import OrdinaryDiffEqCore: get_chunksize, resize_J_W!, resize_nlsolver!, alg_autodiff, _get_fwd_tag diff --git a/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl b/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl index 553e128857..7c81dad2e8 100644 --- a/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl +++ b/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl @@ -122,6 +122,19 @@ function calc_J(integrator, cache, next_step::Bool = false) uprev = integrator.u end + method = if SciMLBase.has_jac(f) + "user-provided" + else + if hasproperty(cache, :jac_config) && cache.jac_config !== nothing + "autodiff" + else + "finite-diff" + end + end + + @SciMLMessage(lazy"Computing Jacobian at t = $(t) using $(method)", + integrator.opts.verbose, :jacobian_update) + if alg isa DAEAlgorithm if SciMLBase.has_jac(f) duprev = integrator.duprev @@ -726,8 +739,12 @@ function update_W!(nlsolver::AbstractNLSolver, integrator::SciMLBase.DEIntegrator{<:Any, true}, cache, dtgamma, repeat_step::Bool, newJW = nothing) if isnewton(nlsolver) - calc_W!(get_W(nlsolver), integrator, nlsolver, cache, dtgamma, repeat_step, + new_jac, new_W = calc_W!(get_W(nlsolver), integrator, nlsolver, cache, dtgamma, repeat_step, newJW) + if new_W + @SciMLMessage(lazy"W matrix factorized: dtgamma = $(dtgamma), new_jac = $(new_jac)", + integrator.opts.verbose, :w_factorization) + end end nothing end @@ -754,6 +771,10 @@ function update_W!(nlsolver::AbstractNLSolver, elseif new_W && !isdae set_W_γdt!(nlsolver, dtgamma) end + if new_W + @SciMLMessage(lazy"W matrix factorized: dtgamma = $(dtgamma), new_jac = $(new_jac)", + integrator.opts.verbose, :w_factorization) + end end nothing end @@ -866,10 +887,10 @@ build_uf(alg, nf, t, p, ::Val{false}) = UDerivativeWrapper(nf, t, p) function LinearSolve.init_cacheval( alg::LinearSolve.DefaultLinearSolver, A::WOperator, b, u, Pl, Pr, - maxiters::Int, abstol, reltol, verbose::Bool, + maxiters::Int, abstol, reltol, verbose::LinearVerbosity, assumptions::OperatorAssumptions) LinearSolve.init_cacheval(alg, A.J, b, u, Pl, Pr, - maxiters::Int, abstol, reltol, verbose::Bool, + maxiters::Int, abstol, reltol, verbose::LinearVerbosity, assumptions::OperatorAssumptions) end @@ -897,10 +918,10 @@ for alg in [LinearSolve.AppleAccelerateLUFactorization, LinearSolve.SparspakFactorization, LinearSolve.UMFPACKFactorization] @eval function LinearSolve.init_cacheval(alg::$alg, A::WOperator, b, u, Pl, Pr, - maxiters::Int, abstol, reltol, verbose::Bool, + maxiters::Int, abstol, reltol, verbose::LinearVerbosity, assumptions::OperatorAssumptions) LinearSolve.init_cacheval(alg, A.J, b, u, Pl, Pr, - maxiters::Int, abstol, reltol, verbose::Bool, + maxiters::Int, abstol, reltol, verbose::LinearVerbosity, assumptions::OperatorAssumptions) end end diff --git a/lib/OrdinaryDiffEqExplicitRK/Project.toml b/lib/OrdinaryDiffEqExplicitRK/Project.toml index e0d6678dd9..7622b1f3a8 100644 --- a/lib/OrdinaryDiffEqExplicitRK/Project.toml +++ b/lib/OrdinaryDiffEqExplicitRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqExplicitRK" uuid = "9286f039-9fbf-40e8-bf65-aa933bdc4db0" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" @@ -32,7 +32,7 @@ MuladdMacro = "0.2" LinearAlgebra = "1.10" TruncatedStacktraces = "1.4" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqExplicitRK/src/explicit_rk_caches.jl b/lib/OrdinaryDiffEqExplicitRK/src/explicit_rk_caches.jl index 943bbb4d64..fef7c657b5 100644 --- a/lib/OrdinaryDiffEqExplicitRK/src/explicit_rk_caches.jl +++ b/lib/OrdinaryDiffEqExplicitRK/src/explicit_rk_caches.jl @@ -16,7 +16,7 @@ get_fsalfirstlast(cache::ExplicitRKCache, u) = (cache.kk[1], cache.fsallast) function alg_cache(alg::ExplicitRK, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} kk = Vector{typeof(rate_prototype)}(undef, 0) for i in 1:(alg.tableau.stages) push!(kk, zero(rate_prototype)) @@ -55,6 +55,6 @@ end function alg_cache(alg::ExplicitRK, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ExplicitRKConstantCache(alg.tableau, rate_prototype) end diff --git a/lib/OrdinaryDiffEqExponentialRK/Project.toml b/lib/OrdinaryDiffEqExponentialRK/Project.toml index f0b4519f9f..11151cba98 100644 --- a/lib/OrdinaryDiffEqExponentialRK/Project.toml +++ b/lib/OrdinaryDiffEqExponentialRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqExponentialRK" uuid = "e0540318-69ee-4070-8777-9e2de6de23de" authors = ["ParamThakkar123 "] -version = "1.8.0" +version = "1.9.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -38,13 +38,13 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" OrdinaryDiffEqVerner = "1.5.0" -LinearSolve = "3.26" +LinearSolve = "3.46" ExponentialUtilities = "1.27" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" OrdinaryDiffEqSDIRK = "1.6.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" SparseArrays = "1.10" Aqua = "0.8.11" julia = "1.10" @@ -70,3 +70,6 @@ path = "../OrdinaryDiffEqCore" [sources.OrdinaryDiffEqVerner] path = "../OrdinaryDiffEqVerner" + +[sources.OrdinaryDiffEqTsit5] +path = "../OrdinaryDiffEqTsit5" diff --git a/lib/OrdinaryDiffEqExponentialRK/src/exponential_rk_caches.jl b/lib/OrdinaryDiffEqExponentialRK/src/exponential_rk_caches.jl index bf1891e40a..b3c6039b17 100644 --- a/lib/OrdinaryDiffEqExponentialRK/src/exponential_rk_caches.jl +++ b/lib/OrdinaryDiffEqExponentialRK/src/exponential_rk_caches.jl @@ -76,7 +76,7 @@ for (Alg, Cache) in [(:LawsonEuler, :LawsonEulerConstantCache), @eval function alg_cache(alg::$Alg, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if alg.krylov ops = nothing # no caching @@ -161,7 +161,7 @@ end function alg_cache(alg::LawsonEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, G, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # other caches @@ -218,7 +218,7 @@ end function alg_cache(alg::NorsettEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, G, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches plist = (1,) @@ -250,7 +250,7 @@ end function alg_cache(alg::ETDRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, F2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches plist = (2, 2) @@ -283,7 +283,7 @@ end function alg_cache(alg::ETDRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, Au, F2, F3, du1 = (zero(rate_prototype) for i in 1:5) # rateType caches plist = (1, 3, 3, 3) @@ -317,7 +317,7 @@ end function alg_cache(alg::ETDRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, Au, F2, F3, F4, du1 = (zero(rate_prototype) for i in 1:6) # rateType caches plist = (1, 1, 3, 3, 3, 3) @@ -354,7 +354,7 @@ end function alg_cache(alg::HochOst4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, Au, F2, F3, F4, F5, du1 = (zero(rate_prototype) for i in 1:8) # rateType caches plist = (3, 3, 3, 3, 3, 3, 3, 3, 3) @@ -394,7 +394,7 @@ for (Alg, Cache) in [(:Exp4, :Exp4ConstantCache), @eval function alg_cache(alg::$Alg, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if SciMLBase.has_jac(f) uf = nothing @@ -424,7 +424,7 @@ end function alg_cache(alg::Exp4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -471,7 +471,7 @@ end function alg_cache(alg::EPIRK4s3A, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -517,7 +517,7 @@ end function alg_cache(alg::EPIRK4s3B, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -563,7 +563,7 @@ end function alg_cache(alg::EPIRK5s3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz, k = (zero(u) for i in 1:3) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -608,7 +608,7 @@ end function alg_cache(alg::EXPRB53s3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -654,7 +654,7 @@ end function alg_cache(alg::EPIRK5P1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -701,7 +701,7 @@ end function alg_cache(alg::EPIRK5P2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, dR, du1 = (zero(rate_prototype) for i in 1:4) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -740,7 +740,7 @@ for (Alg, Cache) in [(:Exprb32, :Exprb32ConstantCache), @eval function alg_cache(alg::$Alg, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if SciMLBase.has_jac(f) uf = nothing @@ -808,7 +808,7 @@ end function alg_cache(alg::Exprb32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} utilde, tmp, dz = (zero(u) for i in 1:3) # uType caches rtmp, F2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches plist = (3, 3) @@ -838,7 +838,7 @@ end function alg_cache(alg::Exprb43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} utilde, tmp, dz = (zero(u) for i in 1:3) # uType caches rtmp, Au, F2, F3, du1 = (zero(rate_prototype) for i in 1:5) # rateType caches plist = (1, 4, 4, 4) @@ -896,7 +896,7 @@ get_fsalfirstlast(cache::ETD2ConstantCache, u) = (ETD2Fsal(u), ETD2Fsal(u)) function alg_cache(alg::ETD2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} A = size(f.f1.f) == () ? convert(Number, f.f1.f) : convert(AbstractMatrix, f.f1.f) Phi = phi(dt * A, 2) ETD2ConstantCache(Phi[1], Phi[2], Phi[2] + Phi[3], -Phi[3]) @@ -918,7 +918,7 @@ get_fsalfirstlast(cache::ETD2Cache, u) = (ETD2Fsal(cache.rtmp1), ETD2Fsal(cache. function alg_cache(alg::ETD2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} A = size(f.f1.f) == () ? convert(Number, f.f1.f) : convert(AbstractMatrix, f.f1.f) Phi = phi(dt * A, 2) ETD2Cache( diff --git a/lib/OrdinaryDiffEqExtrapolation/Project.toml b/lib/OrdinaryDiffEqExtrapolation/Project.toml index 3c53dfe14f..99c0912ec1 100644 --- a/lib/OrdinaryDiffEqExtrapolation/Project.toml +++ b/lib/OrdinaryDiffEqExtrapolation/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqExtrapolation" uuid = "becaefa8-8ca2-5cf9-886d-c06f3d2bd2c4" authors = ["Chris Rackauckas ", "Yingbo Ma "] -version = "1.9.0" +version = "1.10.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -32,11 +32,11 @@ FastBroadcast = "0.3" Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" -LinearSolve = "3.26" +LinearSolve = "3.46" Polyester = "0.7" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl b/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl index 194b30e166..1affe2d063 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl @@ -18,7 +18,7 @@ import OrdinaryDiffEqCore: alg_order, alg_maximum_order, get_current_adaptive_or _digest_beta1_beta2, timedepentdtmin, _unwrap_val, _reshape, _vec, get_fsalfirstlast, generic_solver_docstring, differentiation_rk_docstring, _bool_to_ADType, - _process_AD_choice, LinearAliasSpecifier + _process_AD_choice, LinearAliasSpecifier, @SciMLMessage, Minimal using FastBroadcast, Polyester, MuladdMacro, RecursiveArrayTools, LinearSolve import OrdinaryDiffEqCore import FastPower diff --git a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl index 418ef01b5a..b6dde5e0ce 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl @@ -44,7 +44,7 @@ end function alg_cache(alg::AitkenNeville, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) utilde = zero(u) k = zero(rate_prototype) @@ -80,7 +80,7 @@ end function alg_cache(alg::AitkenNeville, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dtpropose = zero(dt) cur_order = max(alg.init_order, alg.min_order) T = Array{typeof(u), 2}(undef, alg.max_order, alg.max_order) @@ -162,7 +162,7 @@ end function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dtpropose = zero(dt) #cur_order = max(alg.init_order, alg.min_order) QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -200,7 +200,7 @@ end function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_tmp = zero(u) u_tmps = Array{typeof(u_tmp), 1}(undef, get_thread_count(alg)) @@ -271,7 +271,7 @@ function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -280,7 +280,7 @@ function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -290,7 +290,7 @@ function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, jac_config = build_jac_config(alg, f, uf, du1, uprev, u, du1, du2) sequence = generate_sequence(constvalue(uBottomEltypeNoUnits), alg) cc = alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false)) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false), verbose) diff1 = Array{typeof(u), 1}(undef, get_thread_count(alg)) diff2 = Array{typeof(u), 1}(undef, get_thread_count(alg)) for i in 1:get_thread_count(alg) @@ -907,7 +907,7 @@ end function alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -959,7 +959,7 @@ end function alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) @@ -988,7 +988,7 @@ function alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, cc = alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, - calck, Val(false)) + calck, Val(false), verbose) # Initialize cache ExtrapolationMidpointDeuflhardCache(utilde, u_temp1, u_temp2, u_temp3, u_temp4, tmp, T, res, fsalfirst, k, k_tmps, cc.Q, cc.n_curr, @@ -1057,7 +1057,7 @@ end function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -1099,7 +1099,7 @@ end function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} utilde = zero(u) u_temp1 = zero(u) u_temp2 = zero(u) @@ -1127,7 +1127,7 @@ function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, cc = alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, - calck, Val(false)) + calck, Val(false), verbose) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -1160,7 +1160,7 @@ function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1169,7 +1169,7 @@ function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -1212,7 +1212,7 @@ end function alg_cache(alg::ExtrapolationMidpointHairerWanner, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -1273,7 +1273,7 @@ end function alg_cache(alg::ExtrapolationMidpointHairerWanner, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) @@ -1299,7 +1299,7 @@ function alg_cache(alg::ExtrapolationMidpointHairerWanner, u, rate_prototype, end cc = alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false)) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false), verbose) # Initialize the cache ExtrapolationMidpointHairerWannerCache(utilde, u_temp1, u_temp2, u_temp3, u_temp4, tmp, @@ -1333,7 +1333,7 @@ end function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -1430,7 +1430,7 @@ end function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) @@ -1456,7 +1456,7 @@ function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, end cc = alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false)) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false), verbose) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -1490,7 +1490,7 @@ function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1499,7 +1499,7 @@ function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -1548,7 +1548,7 @@ end function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -1628,7 +1628,7 @@ end function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) @@ -1654,7 +1654,7 @@ function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype end cc = alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false)) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false), verbose) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -1688,7 +1688,7 @@ function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1697,7 +1697,7 @@ function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end diff --git a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl index f4858d5fc2..09e5ea9815 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl @@ -316,9 +316,12 @@ function perform_step!(integrator, cache::ImplicitEulerExtrapolationCache, # Deuflhard Stability check for initial two sequences @.. broadcast=false diff2[1]=u_tmps[1]-u_tmps2[1] @.. broadcast=false diff2[1]=0.5*(diff2[1]-diff1[1]) - if integrator.opts.internalnorm(diff1[1], t) < - integrator.opts.internalnorm(diff2[1], t) + norm_diff1 = integrator.opts.internalnorm(diff1[1], t) + norm_diff2 = integrator.opts.internalnorm(diff2[1], t) + if norm_diff1 < norm_diff2 # Divergence of iteration, overflow is possible. Force fail and start with smaller step + @SciMLMessage(lazy"Deuflhard stability check failed: ||diff1|| = $(norm_diff1) < ||diff2|| = $(norm_diff2), divergence detected", + integrator.opts.verbose, :stability_check) integrator.force_stepfail = true return end diff --git a/lib/OrdinaryDiffEqFIRK/Project.toml b/lib/OrdinaryDiffEqFIRK/Project.toml index 64249c963d..02a115da00 100644 --- a/lib/OrdinaryDiffEqFIRK/Project.toml +++ b/lib/OrdinaryDiffEqFIRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqFIRK" uuid = "5960d6e9-dd7a-4743-88e7-cf307b64f125" authors = ["ParamThakkar123 "] -version = "1.16.0" +version = "1.17.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -39,12 +39,12 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" FastGaussQuadrature = "1.0.2" MuladdMacro = "0.2" -LinearSolve = "3.26" +LinearSolve = "3.46" Polyester = "0.7" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" GenericSchur = "0.5" julia = "1.10" diff --git a/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl b/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl index 6f99a62cf3..56684a0b2c 100644 --- a/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl +++ b/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl @@ -19,7 +19,7 @@ end function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA3Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -69,7 +69,7 @@ end function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA3Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -105,7 +105,7 @@ function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W1, _vec(cubuff); u0 = _vec(dw12)) linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -141,7 +141,7 @@ end function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA5Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -200,7 +200,7 @@ end function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA5Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -245,13 +245,13 @@ function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W1, _vec(ubuff); u0 = _vec(dw1)) linsolve1 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) linprob = LinearProblem(W2, _vec(cubuff); u0 = _vec(dw23)) linsolve2 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -289,7 +289,7 @@ end function alg_cache(alg::RadauIIA9, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA9Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -369,7 +369,7 @@ end function alg_cache(alg::RadauIIA9, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA9Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -437,19 +437,19 @@ function alg_cache(alg::RadauIIA9, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W1, _vec(ubuff); u0 = _vec(dw1)) linsolve1 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) linprob = LinearProblem(W2, _vec(cubuff1); u0 = _vec(dw23)) linsolve2 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) linprob = LinearProblem(W3, _vec(cubuff2); u0 = _vec(dw45)) linsolve3 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -488,7 +488,7 @@ end function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) @@ -568,7 +568,7 @@ end function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) @@ -644,12 +644,12 @@ function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits} linprob = LinearProblem(W1, _vec(ubuff); u0 = _vec(dw1)) linsolve1 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) linsolve2 = [init(LinearProblem(W2[i], _vec(cubuff[i]); u0 = _vec(dw2[i])), alg.linsolve, alias = LinearAliasSpecifier( alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) for i in 1:((max_stages - 1) ÷ 2)] rtol = reltol isa Number ? reltol : zero(reltol) diff --git a/lib/OrdinaryDiffEqFeagin/Project.toml b/lib/OrdinaryDiffEqFeagin/Project.toml index bbd905e512..839849bda0 100644 --- a/lib/OrdinaryDiffEqFeagin/Project.toml +++ b/lib/OrdinaryDiffEqFeagin/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqFeagin" uuid = "101fe9f7-ebb6-4678-b671-3a81e7194747" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" @@ -32,7 +32,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqFeagin/src/feagin_caches.jl b/lib/OrdinaryDiffEqFeagin/src/feagin_caches.jl index e350b35725..ae02777304 100644 --- a/lib/OrdinaryDiffEqFeagin/src/feagin_caches.jl +++ b/lib/OrdinaryDiffEqFeagin/src/feagin_caches.jl @@ -32,7 +32,7 @@ end function alg_cache(alg::Feagin10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin10ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -63,7 +63,7 @@ end function alg_cache(alg::Feagin10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Feagin10ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -106,7 +106,7 @@ end function alg_cache(alg::Feagin12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -146,7 +146,7 @@ end function alg_cache(alg::Feagin12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Feagin12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -199,7 +199,7 @@ end function alg_cache(alg::Feagin14, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin14ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -250,6 +250,6 @@ end function alg_cache(alg::Feagin14, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Feagin14ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqFunctionMap/Project.toml b/lib/OrdinaryDiffEqFunctionMap/Project.toml index eea9aade8f..186eebf463 100644 --- a/lib/OrdinaryDiffEqFunctionMap/Project.toml +++ b/lib/OrdinaryDiffEqFunctionMap/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqFunctionMap" uuid = "d3585ca7-f5d3-4ba6-8057-292ed1abd90f" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" @@ -29,7 +29,7 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqFunctionMap/src/functionmap_caches.jl b/lib/OrdinaryDiffEqFunctionMap/src/functionmap_caches.jl index a2b03c0818..276691e6f5 100644 --- a/lib/OrdinaryDiffEqFunctionMap/src/functionmap_caches.jl +++ b/lib/OrdinaryDiffEqFunctionMap/src/functionmap_caches.jl @@ -8,7 +8,7 @@ get_fsalfirstlast(cache::FunctionMapCache, u) = (nothing, nothing) function alg_cache(alg::FunctionMap, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FunctionMapCache(u, uprev, FunctionMap_scale_by_time(alg) ? rate_prototype : (eltype(u) <: Enum ? copy(u) : zero(u))) @@ -19,7 +19,7 @@ struct FunctionMapConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::FunctionMap, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FunctionMapConstantCache() end diff --git a/lib/OrdinaryDiffEqHighOrderRK/Project.toml b/lib/OrdinaryDiffEqHighOrderRK/Project.toml index 06f7e70337..a196ae88ca 100644 --- a/lib/OrdinaryDiffEqHighOrderRK/Project.toml +++ b/lib/OrdinaryDiffEqHighOrderRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqHighOrderRK" uuid = "d28bc4f8-55e1-4f49-af69-84c1a99f0f58" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" @@ -30,7 +30,7 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqHighOrderRK/src/high_order_rk_caches.jl b/lib/OrdinaryDiffEqHighOrderRK/src/high_order_rk_caches.jl index 3aed829fb2..7285d3888d 100644 --- a/lib/OrdinaryDiffEqHighOrderRK/src/high_order_rk_caches.jl +++ b/lib/OrdinaryDiffEqHighOrderRK/src/high_order_rk_caches.jl @@ -28,7 +28,7 @@ end function alg_cache(alg::TanYam7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TanYam7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -52,7 +52,7 @@ end function alg_cache(alg::TanYam7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TanYam7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -97,7 +97,7 @@ get_fsalfirstlast(cache::DP8Cache, u) = (cache.k1, cache.k13) function alg_cache(alg::DP8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -138,7 +138,7 @@ end function alg_cache(alg::DP8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DP8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -173,7 +173,7 @@ end function alg_cache(alg::TsitPap8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TsitPap8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -200,7 +200,7 @@ end function alg_cache(alg::TsitPap8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TsitPap8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -236,7 +236,7 @@ end function alg_cache(alg::PFRK87, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = PFRK87ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -263,6 +263,6 @@ end function alg_cache(alg::PFRK87, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} PFRK87ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqIMEXMultistep/Project.toml b/lib/OrdinaryDiffEqIMEXMultistep/Project.toml index f53e6032c0..8bbf1fd0d4 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/Project.toml +++ b/lib/OrdinaryDiffEqIMEXMultistep/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqIMEXMultistep" uuid = "9f002381-b378-40b7-97a6-27a27c83f129" authors = ["ParamThakkar123 "] -version = "1.7.0" +version = "1.8.0" [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" @@ -29,7 +29,7 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl b/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl index 09ce3c180a..22cee71022 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl +++ b/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl @@ -4,7 +4,7 @@ import OrdinaryDiffEqCore: alg_order, issplit, OrdinaryDiffEqNewtonAlgorithm, _u DEFAULT_PRECS, OrdinaryDiffEqConstantCache, OrdinaryDiffEqMutableCache, @cache, alg_cache, initialize!, perform_step!, @unpack, - full_cache, get_fsalfirstlast, + full_cache, get_fsalfirstlast, generic_solver_docstring, _bool_to_ADType, _process_AD_choice using FastBroadcast diff --git a/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl b/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl index d30425975a..dcb5e9aa34 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl +++ b/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl @@ -30,10 +30,10 @@ end function alg_cache(alg::CNAB2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) k2 = rate_prototype uprev3 = u @@ -45,10 +45,10 @@ end function alg_cache(alg::CNAB2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) k1 = zero(rate_prototype) @@ -87,10 +87,10 @@ end function alg_cache(alg::CNLF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) k2 = rate_prototype uprev2 = u @@ -103,10 +103,10 @@ end function alg_cache(alg::CNLF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) k1 = zero(rate_prototype) diff --git a/lib/OrdinaryDiffEqLinear/Project.toml b/lib/OrdinaryDiffEqLinear/Project.toml index cdf74b27dd..387d52d7e8 100644 --- a/lib/OrdinaryDiffEqLinear/Project.toml +++ b/lib/OrdinaryDiffEqLinear/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqLinear" uuid = "521117fe-8c41-49f8-b3b6-30780b3f0fb5" authors = ["ParamThakkar123 "] -version = "1.6.0" +version = "1.7.0" [deps] SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" @@ -35,7 +35,7 @@ OrdinaryDiffEqVerner = "1.5.0" ExponentialUtilities = "1.27" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" @@ -57,3 +57,6 @@ path = "../OrdinaryDiffEqCore" [sources.OrdinaryDiffEqVerner] path = "../OrdinaryDiffEqVerner" + +[sources.OrdinaryDiffEqRosenbrock] +path = "../OrdinaryDiffEqRosenbrock" diff --git a/lib/OrdinaryDiffEqLinear/src/linear_caches.jl b/lib/OrdinaryDiffEqLinear/src/linear_caches.jl index c2867776d1..34db88766d 100644 --- a/lib/OrdinaryDiffEqLinear/src/linear_caches.jl +++ b/lib/OrdinaryDiffEqLinear/src/linear_caches.jl @@ -16,7 +16,7 @@ end function alg_cache(alg::MagnusMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -30,7 +30,7 @@ end function alg_cache(alg::MagnusMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusMidpointConstantCache() end @@ -48,7 +48,7 @@ end function alg_cache(alg::RKMK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -62,7 +62,7 @@ end function alg_cache(alg::RKMK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKMK2ConstantCache() end @@ -80,7 +80,7 @@ end function alg_cache(alg::LieRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -94,7 +94,7 @@ end function alg_cache(alg::LieRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LieRK4ConstantCache() end @@ -112,7 +112,7 @@ end function alg_cache(alg::CG3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -126,7 +126,7 @@ end function alg_cache(alg::CG3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CG3ConstantCache() end @@ -144,7 +144,7 @@ end function alg_cache(alg::CG2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -158,7 +158,7 @@ end function alg_cache(alg::CG2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CG2ConstantCache() end @@ -174,7 +174,7 @@ end end function alg_cache(alg::CG4a, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{true}) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{true}, verbose) W = false .* vec(rate_prototype) .* vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -185,8 +185,8 @@ end struct CG4aConstantCache <: OrdinaryDiffEqConstantCache end -function alg_cache(alg::CG4a, u, rate_prototype, uEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{false}) +function alg_cache(alg::CG4a, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{false}, verbose) CG4aConstantCache() end @@ -204,7 +204,7 @@ end function alg_cache(alg::RKMK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -218,7 +218,7 @@ end function alg_cache(alg::RKMK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKMK4ConstantCache() end @@ -239,7 +239,7 @@ end function alg_cache(alg::MagnusAdapt4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -257,7 +257,7 @@ end function alg_cache(alg::MagnusAdapt4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusAdapt4ConstantCache() end @@ -275,7 +275,7 @@ end function alg_cache(alg::MagnusNC8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -289,7 +289,7 @@ end function alg_cache(alg::MagnusNC8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusNC8ConstantCache() end @@ -307,7 +307,7 @@ end function alg_cache(alg::MagnusGL4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -321,7 +321,7 @@ end function alg_cache(alg::MagnusGL4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL4ConstantCache() end @@ -339,7 +339,7 @@ end function alg_cache(alg::MagnusGL8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -353,7 +353,7 @@ end function alg_cache(alg::MagnusGL8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL8ConstantCache() end @@ -371,7 +371,7 @@ end function alg_cache(alg::MagnusNC6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -385,7 +385,7 @@ end function alg_cache(alg::MagnusNC6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusNC6ConstantCache() end @@ -403,7 +403,7 @@ end function alg_cache(alg::MagnusGL6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -417,7 +417,7 @@ end function alg_cache(alg::MagnusGL6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL6ConstantCache() end @cache struct MagnusGauss4Cache{uType, rateType, WType, expType} <: @@ -435,7 +435,7 @@ end function alg_cache(alg::MagnusGauss4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -449,7 +449,7 @@ end function alg_cache(alg::MagnusGauss4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGauss4ConstantCache() end @@ -467,7 +467,7 @@ end function alg_cache(alg::LieEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -481,7 +481,7 @@ end function alg_cache(alg::LieEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LieEulerConstantCache() end @@ -497,7 +497,7 @@ end function alg_cache(alg::CayleyEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) fsalfirst = zero(rate_prototype) CayleyEulerCache(u, uprev, zero(u), zero(u), fsalfirst, k) @@ -509,7 +509,7 @@ end function alg_cache(alg::CayleyEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CayleyEulerConstantCache() end @@ -528,7 +528,7 @@ end function alg_cache(alg::MagnusLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -542,7 +542,7 @@ end function alg_cache(alg::MagnusLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusLeapfrogConstantCache() end @@ -551,7 +551,7 @@ struct LinearExponentialConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::LinearExponential, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LinearExponentialConstantCache() end @@ -582,7 +582,7 @@ end function alg_cache(alg::LinearExponential, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) rtmp = zero(rate_prototype) n = length(u) diff --git a/lib/OrdinaryDiffEqLowOrderRK/Project.toml b/lib/OrdinaryDiffEqLowOrderRK/Project.toml index 6d0c460560..dc8d9bfb68 100644 --- a/lib/OrdinaryDiffEqLowOrderRK/Project.toml +++ b/lib/OrdinaryDiffEqLowOrderRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqLowOrderRK" uuid = "1344f307-1e59-4825-a18e-ace9aa3fa4c6" authors = ["ParamThakkar123 "] -version = "1.6.0" +version = "1.7.0" [deps] DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" @@ -32,7 +32,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqLowOrderRK/src/low_order_rk_caches.jl b/lib/OrdinaryDiffEqLowOrderRK/src/low_order_rk_caches.jl index 95c7f369fe..254215c2a6 100644 --- a/lib/OrdinaryDiffEqLowOrderRK/src/low_order_rk_caches.jl +++ b/lib/OrdinaryDiffEqLowOrderRK/src/low_order_rk_caches.jl @@ -17,7 +17,7 @@ end function alg_cache(alg::SplitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SplitEulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end @@ -26,14 +26,14 @@ struct SplitEulerConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SplitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SplitEulerConstantCache() end function alg_cache(alg::Euler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} EulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end @@ -42,7 +42,7 @@ struct EulerConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Euler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} EulerConstantCache() end @@ -81,7 +81,7 @@ end function alg_cache(alg::Heun, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) HeunCache(u, uprev, zero(u), atmp, zero(rate_prototype), @@ -91,7 +91,7 @@ end function alg_cache(alg::Ralston, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) RalstonCache(u, uprev, zero(u), atmp, zero(rate_prototype), @@ -103,7 +103,7 @@ struct HeunConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Heun, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} HeunConstantCache() end @@ -112,7 +112,7 @@ struct RalstonConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Ralston, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RalstonConstantCache() end @@ -140,7 +140,7 @@ struct MidpointConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Midpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -153,7 +153,7 @@ end function alg_cache(alg::Midpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MidpointConstantCache() end @@ -178,7 +178,7 @@ struct RK4ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::RK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -194,7 +194,7 @@ end function alg_cache(alg::RK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RK4ConstantCache() end @@ -218,7 +218,7 @@ end function alg_cache(alg::BS3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -235,7 +235,7 @@ end function alg_cache(alg::BS3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -260,7 +260,7 @@ end function alg_cache(alg::OwrenZen3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -277,7 +277,7 @@ end function alg_cache(alg::OwrenZen3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -304,7 +304,7 @@ end function alg_cache(alg::OwrenZen4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -323,7 +323,7 @@ end function alg_cache(alg::OwrenZen4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -352,7 +352,7 @@ end function alg_cache(alg::OwrenZen5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -373,7 +373,7 @@ end function alg_cache(alg::OwrenZen5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -401,7 +401,7 @@ end function alg_cache(alg::BS5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -422,7 +422,7 @@ end function alg_cache(alg::BS5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} BS5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -452,7 +452,7 @@ end function alg_cache(alg::DP5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -485,7 +485,7 @@ end function alg_cache(alg::DP5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DP5ConstantCache() end @@ -520,7 +520,7 @@ end function alg_cache(alg::Anas5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Anas5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -554,7 +554,7 @@ end function alg_cache(alg::Anas5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Anas5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -654,14 +654,14 @@ end function alg_cache(alg::RKO65, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKO65ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) # why not real(tTypeNoUnits)? end function alg_cache(alg::RKO65, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -917,14 +917,14 @@ end function alg_cache(alg::FRK65, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FRK65ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::FRK65, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = FRK65ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -1019,14 +1019,14 @@ end function alg_cache(alg::RKM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::RKM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = RKMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k = zero(rate_prototype) k1 = zero(rate_prototype) @@ -1066,14 +1066,14 @@ end function alg_cache(alg::MSRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return MSRK5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::MSRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1116,14 +1116,14 @@ end function alg_cache(alg::MSRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return MSRK6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::MSRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1161,7 +1161,7 @@ end function alg_cache(alg::PSRK4p7q6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return PSRK4p7q6ConstantCache( constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1169,7 +1169,7 @@ end function alg_cache(alg::PSRK4p7q6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1201,7 +1201,7 @@ end function alg_cache(alg::PSRK3p6q5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return PSRK3p6q5ConstantCache( constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1209,7 +1209,7 @@ end function alg_cache(alg::PSRK3p6q5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1239,7 +1239,7 @@ end function alg_cache(alg::PSRK3p5q4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return PSRK3p5q4ConstantCache( constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1247,7 +1247,7 @@ end function alg_cache(alg::PSRK3p5q4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1281,7 +1281,7 @@ end function alg_cache(alg::Stepanov5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Stepanov5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1289,7 +1289,7 @@ end function alg_cache(alg::Stepanov5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1343,14 +1343,14 @@ end function alg_cache(alg::SIR54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return SIR54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::SIR54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1386,14 +1386,14 @@ end function alg_cache(alg::Alshina2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Alshina2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::Alshina2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) utilde = zero(u) @@ -1424,14 +1424,14 @@ end function alg_cache(alg::Alshina3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Alshina3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::Alshina3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1465,14 +1465,14 @@ end function alg_cache(alg::Alshina6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Alshina6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::Alshina6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) diff --git a/lib/OrdinaryDiffEqLowStorageRK/Project.toml b/lib/OrdinaryDiffEqLowStorageRK/Project.toml index d88c73a70c..e80da0189e 100644 --- a/lib/OrdinaryDiffEqLowStorageRK/Project.toml +++ b/lib/OrdinaryDiffEqLowStorageRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqLowStorageRK" uuid = "b0944070-b475-4768-8dec-fb6eb410534d" authors = ["ParamThakkar123 "] -version = "1.7.0" +version = "1.8.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -39,7 +39,7 @@ MuladdMacro = "0.2" PrecompileTools = "1.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqLowStorageRK/src/low_storage_rk_caches.jl b/lib/OrdinaryDiffEqLowStorageRK/src/low_storage_rk_caches.jl index 41a85c5726..269df041d8 100644 --- a/lib/OrdinaryDiffEqLowStorageRK/src/low_storage_rk_caches.jl +++ b/lib/OrdinaryDiffEqLowStorageRK/src/low_storage_rk_caches.jl @@ -48,7 +48,7 @@ end function alg_cache(alg::ORK256, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ORK256ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) williamson_condition = alg.williamson_condition @@ -69,14 +69,14 @@ end function alg_cache(alg::ORK256, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ORK256ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::RK46NL, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RK46NLConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -122,7 +122,7 @@ end function alg_cache(alg::RK46NL, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -256,14 +256,14 @@ end function alg_cache(alg::SHLDDRK_2N, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SHLDDRK_2NConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::SHLDDRK_2N, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -322,14 +322,14 @@ end function alg_cache(alg::SHLDDRK52, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SHLDDRK52ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::SHLDDRK52, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -341,7 +341,7 @@ end function alg_cache(alg::CarpenterKennedy2N54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = CarpenterKennedy2N54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -363,7 +363,7 @@ end function alg_cache(alg::CarpenterKennedy2N54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CarpenterKennedy2N54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -398,7 +398,7 @@ end function alg_cache(alg::SHLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SHLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) williamson_condition = alg.williamson_condition @@ -419,7 +419,7 @@ end function alg_cache(alg::SHLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SHLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -455,7 +455,7 @@ end function alg_cache(alg::DGLDDRK73_C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK73_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -477,7 +477,7 @@ end function alg_cache(alg::DGLDDRK73_C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK73_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -516,7 +516,7 @@ end function alg_cache(alg::DGLDDRK84_C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK84_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -538,7 +538,7 @@ end function alg_cache(alg::DGLDDRK84_C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK84_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -577,7 +577,7 @@ end function alg_cache(alg::DGLDDRK84_F, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK84_FConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -599,7 +599,7 @@ end function alg_cache(alg::DGLDDRK84_F, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK84_FConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -650,7 +650,7 @@ end function alg_cache(alg::NDBLSRK124, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK124ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -672,7 +672,7 @@ end function alg_cache(alg::NDBLSRK124, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK124ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -726,7 +726,7 @@ end function alg_cache(alg::NDBLSRK134, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK134ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -748,7 +748,7 @@ end function alg_cache(alg::NDBLSRK134, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK134ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -805,7 +805,7 @@ end function alg_cache(alg::NDBLSRK144, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK144ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -827,7 +827,7 @@ end function alg_cache(alg::NDBLSRK144, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK144ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -881,7 +881,7 @@ end function alg_cache(alg::CFRLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -898,7 +898,7 @@ end function alg_cache(alg::CFRLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CFRLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -934,7 +934,7 @@ end function alg_cache(alg::TSLDDRK74, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -950,7 +950,7 @@ end function alg_cache(alg::TSLDDRK74, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TSLDDRK74ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1011,7 +1011,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1028,7 +1028,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S32ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1095,7 +1095,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S82, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1112,7 +1112,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S82, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S82ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1161,7 +1161,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1178,7 +1178,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S53ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1308,7 +1308,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S173, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1325,7 +1325,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S173, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S173ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1398,7 +1398,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S94, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1415,7 +1415,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S94, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S94ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1551,7 +1551,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S184, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1568,7 +1568,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S184, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S184ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1647,7 +1647,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S105, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1664,7 +1664,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S105, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S105ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1812,7 +1812,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S205, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1829,7 +1829,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S205, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S205ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1930,7 +1930,7 @@ end function alg_cache(alg::RDPK3Sp35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -1954,7 +1954,7 @@ end function alg_cache(alg::RDPK3Sp35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp35ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2060,7 +2060,7 @@ end function alg_cache(alg::RDPK3Sp49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2084,7 +2084,7 @@ end function alg_cache(alg::RDPK3Sp49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp49ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2200,7 +2200,7 @@ end function alg_cache(alg::RDPK3Sp510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2225,7 +2225,7 @@ end function alg_cache(alg::RDPK3Sp510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp510ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2328,7 +2328,7 @@ end function alg_cache(alg::RDPK3SpFSAL35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2352,7 +2352,7 @@ end function alg_cache(alg::RDPK3SpFSAL35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL35ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2459,7 +2459,7 @@ end function alg_cache(alg::RDPK3SpFSAL49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2483,7 +2483,7 @@ end function alg_cache(alg::RDPK3SpFSAL49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL49ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2600,7 +2600,7 @@ end function alg_cache(alg::RDPK3SpFSAL510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2624,7 +2624,7 @@ end function alg_cache(alg::RDPK3SpFSAL510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL510ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2686,7 +2686,7 @@ end function alg_cache(alg::CKLLSRK43_2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2706,7 +2706,7 @@ end function alg_cache(alg::CKLLSRK43_2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK43_2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2749,7 +2749,7 @@ end function alg_cache(alg::CKLLSRK54_3C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2769,7 +2769,7 @@ end function alg_cache(alg::CKLLSRK54_3C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2836,7 +2836,7 @@ end function alg_cache(alg::CKLLSRK95_4S, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2856,7 +2856,7 @@ end function alg_cache(alg::CKLLSRK95_4S, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4SConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2923,7 +2923,7 @@ end function alg_cache(alg::CKLLSRK95_4C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2943,7 +2943,7 @@ end function alg_cache(alg::CKLLSRK95_4C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3010,7 +3010,7 @@ end function alg_cache(alg::CKLLSRK95_4M, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3030,7 +3030,7 @@ end function alg_cache(alg::CKLLSRK95_4M, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4MConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3109,7 +3109,7 @@ end function alg_cache(alg::CKLLSRK54_3C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3132,7 +3132,7 @@ end function alg_cache(alg::CKLLSRK54_3C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3C_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3180,7 +3180,7 @@ end function alg_cache(alg::CKLLSRK54_3M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3203,7 +3203,7 @@ end function alg_cache(alg::CKLLSRK54_3M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3M_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3252,7 +3252,7 @@ end function alg_cache(alg::CKLLSRK54_3N_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3275,7 +3275,7 @@ end function alg_cache(alg::CKLLSRK54_3N_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3N_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3345,7 +3345,7 @@ end function alg_cache(alg::CKLLSRK85_4C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3368,7 +3368,7 @@ end function alg_cache(alg::CKLLSRK85_4C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4C_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3438,7 +3438,7 @@ end function alg_cache(alg::CKLLSRK85_4M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3461,7 +3461,7 @@ end function alg_cache(alg::CKLLSRK85_4M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4M_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3531,7 +3531,7 @@ end function alg_cache(alg::CKLLSRK85_4P_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3554,7 +3554,7 @@ end function alg_cache(alg::CKLLSRK85_4P_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4P_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3642,7 +3642,7 @@ end function alg_cache(alg::CKLLSRK54_3N_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3667,7 +3667,7 @@ end function alg_cache(alg::CKLLSRK54_3N_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3N_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3717,7 +3717,7 @@ end function alg_cache(alg::CKLLSRK54_3M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3742,7 +3742,7 @@ end function alg_cache(alg::CKLLSRK54_3M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3M_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3805,7 +3805,7 @@ end function alg_cache(alg::CKLLSRK65_4M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3830,7 +3830,7 @@ end function alg_cache(alg::CKLLSRK65_4M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK65_4M_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3909,7 +3909,7 @@ end function alg_cache(alg::CKLLSRK85_4FM_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3934,7 +3934,7 @@ end function alg_cache(alg::CKLLSRK85_4FM_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4FM_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -4050,7 +4050,7 @@ end function alg_cache(alg::CKLLSRK75_4M_5R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -4078,6 +4078,6 @@ end function alg_cache(alg::CKLLSRK75_4M_5R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK75_4M_5RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml index 4bf05c1229..449a72778d 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml +++ b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqNonlinearSolve" uuid = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" authors = ["Chris Rackauckas ", "Yingbo Ma "] -version = "1.15.0" +version = "1.16.0" [deps] NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" @@ -44,13 +44,13 @@ FastBroadcast = "0.3" Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" -LinearSolve = "3.26" +LinearSolve = "3.46" LineSearches = "7.4" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" OrdinaryDiffEqSDIRK = "1.6.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" SimpleNonlinearSolve = "2.7" FastClosures = "0.3" Aqua = "0.8.11" @@ -76,3 +76,6 @@ path = "../OrdinaryDiffEqDifferentiation" [sources.OrdinaryDiffEqCore] path = "../OrdinaryDiffEqCore" + +[sources.OrdinaryDiffEqSDIRK] +path = "../OrdinaryDiffEqSDIRK" diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl index 4e58484ffb..b47a2291c0 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl @@ -12,7 +12,7 @@ import DiffEqBase import PreallocationTools: dualcache, get_tmp using SimpleNonlinearSolve: SimpleTrustRegion, SimpleGaussNewton using NonlinearSolve: FastShortcutNonlinearPolyalg, FastShortcutNLLSPolyalg, NewtonRaphson, - step! + step!, NonlinearVerbosity using MuladdMacro: @muladd using FastBroadcast: @.. import FastClosures: @closure @@ -50,7 +50,7 @@ using OrdinaryDiffEqCore: resize_nlsolver!, _initialize_dae!, import OrdinaryDiffEqCore: _initialize_dae!, isnewton, get_W, isfirstcall, isfirststage, isJcurrent, get_new_W_γdt_cutoff, resize_nlsolver!, apply_step!, - postamble! + postamble!, @SciMLMessage import OrdinaryDiffEqDifferentiation: update_W!, is_always_new, build_uf, build_J_W, WOperator, StaticWOperator, wrapprecs, @@ -62,6 +62,7 @@ import StaticArrays: SArray, MVector, SVector, @SVector, StaticArray, MMatrix, S include("type.jl") include("utils.jl") +include("deprecated.jl") include("nlsolve.jl") include("functional.jl") include("newton.jl") diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/deprecated.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/deprecated.jl new file mode 100644 index 0000000000..ff12942f17 --- /dev/null +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/deprecated.jl @@ -0,0 +1,10 @@ +#Backwards compat for StochasticDiffEq +function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, + ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, γ, c, + iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, + uBottomEltypeNoUnits, + tTypeNoUnits, γ, c, 1, iip, NonlinearVerbosity()) +end diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl index e87963f362..26de1c722c 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl @@ -152,7 +152,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlprob = NonlinearProblem(nlfunc, integrator.u, p) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u0, nlprob, isAD) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol) + reltol = integrator.opts.reltol, verbose = integrator.opts.verbose.nonlinear_verbosity) integrator.u .= nlsol.u failed = nlsol.retcode != ReturnCode.Success end @@ -162,7 +162,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD end if failed - @warn "ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`." + @SciMLMessage(lazy"ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end @@ -230,7 +231,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlsolve = default_nlsolve(alg.nlsolve, isinplace, nlprob, u0) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol) + reltol = integrator.opts.reltol, integrator.opts.verbose.nonlinear_verbosity) integrator.u = nlsol.u failed = nlsol.retcode != ReturnCode.Success end @@ -241,7 +242,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD end if failed - @warn "ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`." + @SciMLMessage(lazy"ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end @@ -310,7 +312,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA nlprob = NonlinearProblem(nlfunc, u0, p) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u0, nlprob, isAD) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol) + reltol = integrator.opts.reltol, verbose = integrator.opts.verbose.nonlinear_verbosity) integrator.u = nlsol.u recursivecopy!(integrator.uprev, integrator.u) @@ -318,7 +320,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA recursivecopy!(integrator.uprev2, integrator.uprev) end if nlsol.retcode != ReturnCode.Success - @warn "ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`." + @SciMLMessage(lazy"ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end @@ -357,7 +360,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA nlfunc = NonlinearFunction(nlequation; jac_prototype = f.jac_prototype) nlprob = NonlinearProblem(nlfunc, u0) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol) + reltol = integrator.opts.reltol, verbose = integrator.opts.verbose.nonlinear_verbosity) integrator.u = nlsol.u @@ -366,7 +369,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA integrator.uprev2 = copy(integrator.uprev) end if nlsol.retcode != ReturnCode.Success - @warn "ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`." + @SciMLMessage(lazy"ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end @@ -455,7 +459,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlprob = NonlinearProblem(nlfunc, alg_u, p) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u, nlprob, isAD) - nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol) + nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol, + verbose = integrator.opts.verbose.nonlinear_verbosity) alg_u .= nlsol recursivecopy!(integrator.uprev, integrator.u) @@ -515,7 +520,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlprob = NonlinearProblem(nlfunc, u0[algebraic_vars]) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u0, nlprob, isAD) - nlsol = solve(nlprob, nlsolve) + nlsol = solve(nlprob, nlsolve, verbose = integrator.opts.verbose.nonlinear_verbosity) u[algebraic_vars] .= nlsol.u @@ -603,7 +608,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA nlfunc = NonlinearFunction(nlequation!; jac_prototype = f.jac_prototype) nlprob = NonlinearProblem(nlfunc, ifelse.(differential_vars, du, u), p) - nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol) + nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol, + verbose = integrator.opts.verbose.nonlinear_verbosity) @. du = ifelse(differential_vars, nlsol.u, du) @. u = ifelse(differential_vars, u, nlsol.u) @@ -654,7 +660,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA @show nlsolve - nlsol = solve(nlprob, nlsolve) + nlsol = solve(nlprob, nlsolve, verbose = integrator.opts.verbose.nonlinear_verbosity) du = ifelse.(differential_vars, nlsol.u, du) u = ifelse.(differential_vars, u, nlsol.u) diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl index 3e389d4270..2ebbf95bfb 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl @@ -54,6 +54,8 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, ndz = compute_step!(nlsolver, integrator) end if !isfinite(ndz) + @SciMLMessage(lazy"Newton iteration diverged: residual norm is not finite (ndz = $(ndz))", + integrator.opts.verbose, :newton_convergence) nlsolver.status = Divergence nlsolver.nfails += 1 break @@ -71,6 +73,8 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, # it convergence/divergence according to `ndz` directly. if abs(θ - one(θ)) <= eps_around_one(θ) if ndz <= one(ndz) + @SciMLMessage(lazy"Newton iteration converged at floating point limit: θ ≈ 1.0, ndz = $(ndz)", + integrator.opts.verbose, :convergence_limit) nlsolver.status = Convergence nlsolver.nfails = 0 break @@ -83,6 +87,8 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, # divergence if check_div′ && θ > 2 + @SciMLMessage(lazy"Newton iteration diverging: θ = $(θ) > 2, ndz = $(ndz), ndzprev = $(ndzprev)", + integrator.opts.verbose, :newton_convergence) nlsolver.status = Divergence nlsolver.nfails += 1 break @@ -108,6 +114,8 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, (isnewton(nlsolver) && isadaptive(integrator.alg))) if (iter == 1 && ndz < 1e-5) || (check_η_convergence && η >= zero(η) && η * ndz < κ) + @SciMLMessage(lazy"Newton iteration converged in $(iter) iterations: η = $(η), ndz = $(ndz)", + integrator.opts.verbose, :newton_iterations) nlsolver.status = Convergence nlsolver.nfails = 0 break @@ -116,6 +124,8 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, if isnewton(nlsolver) && nlsolver.status == Divergence && !isJcurrent(nlsolver, integrator) + @SciMLMessage(lazy"Newton iteration failed with stale Jacobian, retrying with fresh Jacobian", + integrator.opts.verbose, :newton_convergence) nlsolver.status = TryAgain nlsolver.nfails += 1 always_new || @goto REDO diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl index 49a0db411d..dd072ba058 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl @@ -134,23 +134,24 @@ SciMLBase.has_jac(f::DAEResidualDerivativeWrapper) = SciMLBase.has_jac(f.f) SciMLBase.has_Wfact(f::DAEResidualDerivativeWrapper) = SciMLBase.has_Wfact(f.f) SciMLBase.has_Wfact_t(f::DAEResidualDerivativeWrapper) = SciMLBase.has_Wfact_t(f.f) + function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, γ, c, - iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + iip, verbose) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, γ, c, 1, iip) + tTypeNoUnits, γ, c, 1, iip, verbose) end function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, γ, c, α, - iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + iip, verbose) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} build_nlsolver(alg, alg.nlsolve, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, iip) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, iip, verbose) end function daenlf(ztmp, z, p) @@ -170,7 +171,7 @@ function build_nlsolver( f::F, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, γ, c, α, - ::Val{true}) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{true}, verbose) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} #TODO #nlalg = SciMLBase.handle_defaults(alg, nlalg) @@ -219,7 +220,8 @@ function build_nlsolver( linsolve = init(linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = verbose.linear_verbosity) tType = typeof(t) invγdt = inv(oneunit(t) * one(uTolType)) @@ -238,7 +240,7 @@ function build_nlsolver( end NonlinearProblem(NonlinearFunction{true}(nlf), ztmp, nlp_params) end - cache = init(prob, nlalg.alg) + cache = init(prob, nlalg.alg, verbose = verbose.nonlinear_verbosity) nlcache = NonlinearSolveCache(ustep, tstep, k, atmp, invγdt, prob, cache) else nlcache = NLNewtonCache(ustep, tstep, k, atmp, dz, J, W, true, @@ -287,7 +289,7 @@ function build_nlsolver( f::F, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, γ, c, α, - ::Val{false}) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{false}, verbose) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} #TODO #nlalg = SciMLBase.handle_defaults(alg, nlalg) @@ -325,7 +327,7 @@ function build_nlsolver( (tmp, γ, α, tstep, invγdt, DIRK, p, dt, f) end prob = NonlinearProblem(NonlinearFunction{false}(nlf), copy(ztmp), nlp_params) - cache = init(prob, nlalg.alg) + cache = init(prob, nlalg.alg, verbose = verbose.nonlinear_verbosity) nlcache = NonlinearSolveCache( nothing, tstep, nothing, nothing, invγdt, prob, cache) else diff --git a/lib/OrdinaryDiffEqNordsieck/Project.toml b/lib/OrdinaryDiffEqNordsieck/Project.toml index 969270877a..f5c898eac5 100644 --- a/lib/OrdinaryDiffEqNordsieck/Project.toml +++ b/lib/OrdinaryDiffEqNordsieck/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqNordsieck" uuid = "c9986a66-5c92-4813-8696-a7ec84c806c8" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" @@ -36,7 +36,7 @@ MuladdMacro = "0.2" Polyester = "0.7" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqNordsieck/src/nordsieck_caches.jl b/lib/OrdinaryDiffEqNordsieck/src/nordsieck_caches.jl index a9ecb45215..7047cbffd5 100644 --- a/lib/OrdinaryDiffEqNordsieck/src/nordsieck_caches.jl +++ b/lib/OrdinaryDiffEqNordsieck/src/nordsieck_caches.jl @@ -22,7 +22,7 @@ end function alg_cache(alg::AN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} N = 5 z = [zero(rate_prototype) for i in 1:(N + 1)] Δ = u @@ -63,7 +63,7 @@ end function alg_cache(alg::AN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ################################################# # Tsit5 # Cannot alias pointers, since we have to use `k`s to start the Nordsieck vector @@ -142,7 +142,7 @@ end function alg_cache(alg::JVODE, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} N = 12 z = [rate_prototype for i in 1:(N + 1)] Δ = u @@ -214,7 +214,7 @@ end function alg_cache(alg::JVODE, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ################################################# # Tsit5 # Cannot alias pointers, since we have to use `k`s to start the Nordsieck vector diff --git a/lib/OrdinaryDiffEqPDIRK/Project.toml b/lib/OrdinaryDiffEqPDIRK/Project.toml index 0f5d3045af..c0848a2ea3 100644 --- a/lib/OrdinaryDiffEqPDIRK/Project.toml +++ b/lib/OrdinaryDiffEqPDIRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqPDIRK" uuid = "5dd0a6cf-3d4b-4314-aa06-06d4e299bc89" authors = ["ParamThakkar123 "] -version = "1.6.0" +version = "1.7.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -34,7 +34,7 @@ MuladdMacro = "0.2" Polyester = "0.7" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" StaticArrays = "1.9" julia = "1.10" diff --git a/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl b/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl index 2818424697..66fe8b2552 100644 --- a/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl +++ b/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl @@ -51,20 +51,20 @@ end function alg_cache(alg::PDIRK44, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 if alg.threading nlsolver1 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(true)) + Val(true), verbose) nlsolver2 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(true)) + Val(true), verbose) nlsolver = [nlsolver1, nlsolver2] else _nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(true)) + Val(true), verbose) nlsolver = [_nlsolver] end tab = PDIRK44Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -76,20 +76,20 @@ end function alg_cache(alg::PDIRK44, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 if alg.threading nlsolver1 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(false)) + Val(false), verbose) nlsolver2 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(false)) + Val(false), verbose) nlsolver = [nlsolver1, nlsolver2] else _nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(false)) + Val(false), verbose) nlsolver = [_nlsolver] end tab = PDIRK44Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) diff --git a/lib/OrdinaryDiffEqPRK/Project.toml b/lib/OrdinaryDiffEqPRK/Project.toml index ee2acb4078..d53ee0f615 100644 --- a/lib/OrdinaryDiffEqPRK/Project.toml +++ b/lib/OrdinaryDiffEqPRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqPRK" uuid = "5b33eab2-c0f1-4480-b2c3-94bc1e80bda1" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" @@ -29,7 +29,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqPRK/src/prk_caches.jl b/lib/OrdinaryDiffEqPRK/src/prk_caches.jl index 059fffcbaa..60e5330fcc 100644 --- a/lib/OrdinaryDiffEqPRK/src/prk_caches.jl +++ b/lib/OrdinaryDiffEqPRK/src/prk_caches.jl @@ -66,7 +66,7 @@ end function alg_cache(alg::KuttaPRK2p5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) k1 = zero(rate_prototype) @@ -85,6 +85,6 @@ end function alg_cache(alg::KuttaPRK2p5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KuttaPRK2p5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqQPRK/Project.toml b/lib/OrdinaryDiffEqQPRK/Project.toml index 49f9ba3b23..b35713c956 100644 --- a/lib/OrdinaryDiffEqQPRK/Project.toml +++ b/lib/OrdinaryDiffEqQPRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqQPRK" uuid = "04162be5-8125-4266-98ed-640baecc6514" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" @@ -30,7 +30,7 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqQPRK/src/qprk_caches.jl b/lib/OrdinaryDiffEqQPRK/src/qprk_caches.jl index 8ceb2bc451..0ff3da098e 100644 --- a/lib/OrdinaryDiffEqQPRK/src/qprk_caches.jl +++ b/lib/OrdinaryDiffEqQPRK/src/qprk_caches.jl @@ -35,7 +35,7 @@ get_fsalfirstlast(cache::QPRK98Cache, u) = (cache.fsalfirst, cache.k) function alg_cache(alg::QPRK98, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -65,6 +65,6 @@ end function alg_cache(::QPRK98, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} QPRK98ConstantCache() end diff --git a/lib/OrdinaryDiffEqRKN/Project.toml b/lib/OrdinaryDiffEqRKN/Project.toml index 61fdb90bb4..18f04a75dc 100644 --- a/lib/OrdinaryDiffEqRKN/Project.toml +++ b/lib/OrdinaryDiffEqRKN/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqRKN" uuid = "af6ede74-add8-4cfd-b1df-9a4dbb109d7a" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" @@ -32,7 +32,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqRKN/src/rkn_caches.jl b/lib/OrdinaryDiffEqRKN/src/rkn_caches.jl index e259a1e6ed..e243ef97e9 100644 --- a/lib/OrdinaryDiffEqRKN/src/rkn_caches.jl +++ b/lib/OrdinaryDiffEqRKN/src/rkn_caches.jl @@ -17,7 +17,7 @@ end function alg_cache(alg::Nystrom4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) k₂ = zero(reduced_rate_prototype) @@ -33,7 +33,7 @@ struct Nystrom4ConstantCache <: NystromConstantCache end function alg_cache(alg::Nystrom4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom4ConstantCache() end @@ -58,7 +58,7 @@ end function alg_cache(alg::FineRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = FineRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -77,7 +77,7 @@ end function alg_cache(alg::FineRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FineRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -102,7 +102,7 @@ end function alg_cache(alg::FineRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = FineRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -123,7 +123,7 @@ end function alg_cache(alg::FineRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FineRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -141,7 +141,7 @@ end function alg_cache(alg::Nystrom4VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) k₂ = zero(reduced_rate_prototype) @@ -156,7 +156,7 @@ struct Nystrom4VelocityIndependentConstantCache <: NystromConstantCache end function alg_cache(alg::Nystrom4VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom4VelocityIndependentConstantCache() end @@ -176,7 +176,7 @@ end function alg_cache(alg::IRKN3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -191,7 +191,7 @@ end function alg_cache(alg::IRKN3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} IRKN3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -212,7 +212,7 @@ end function alg_cache(alg::IRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -228,7 +228,7 @@ end function alg_cache(alg::IRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} IRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -248,7 +248,7 @@ end function alg_cache(alg::Nystrom5VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) k₂ = zero(reduced_rate_prototype) @@ -264,7 +264,7 @@ end function alg_cache(alg::Nystrom5VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom5VelocityIndependentConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -287,7 +287,7 @@ end function alg_cache(alg::DPRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -305,7 +305,7 @@ end function alg_cache(alg::DPRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -329,7 +329,7 @@ end function alg_cache(alg::DPRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -349,7 +349,7 @@ end function alg_cache(alg::DPRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -373,7 +373,7 @@ end function alg_cache(alg::DPRKN6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -393,7 +393,7 @@ end function alg_cache(alg::DPRKN6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -417,7 +417,7 @@ end function alg_cache(alg::DPRKN6FM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN6FMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -437,7 +437,7 @@ end function alg_cache(alg::DPRKN6FM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN6FMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -464,7 +464,7 @@ end function alg_cache(alg::DPRKN8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -487,7 +487,7 @@ end function alg_cache(alg::DPRKN8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -522,7 +522,7 @@ end function alg_cache(alg::DPRKN12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -555,7 +555,7 @@ end function alg_cache(alg::DPRKN12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -577,7 +577,7 @@ end function alg_cache(alg::ERKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -595,7 +595,7 @@ end function alg_cache(alg::ERKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ERKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -617,7 +617,7 @@ end function alg_cache(alg::ERKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -635,7 +635,7 @@ end function alg_cache(alg::ERKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ERKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -660,7 +660,7 @@ end function alg_cache(alg::ERKN7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -681,7 +681,7 @@ end function alg_cache(alg::ERKN7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ERKN7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -698,7 +698,7 @@ end function alg_cache(alg::RKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) k₂ = zero(reduced_rate_prototype) @@ -713,6 +713,6 @@ struct RKN4ConstantCache <: NystromConstantCache end function alg_cache(alg::RKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKN4ConstantCache() end diff --git a/lib/OrdinaryDiffEqRosenbrock/Project.toml b/lib/OrdinaryDiffEqRosenbrock/Project.toml index 837be508bf..b2f296b437 100644 --- a/lib/OrdinaryDiffEqRosenbrock/Project.toml +++ b/lib/OrdinaryDiffEqRosenbrock/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqRosenbrock" uuid = "43230ef6-c299-4910-a778-202eb28ce4ce" authors = ["ParamThakkar123 "] -version = "1.18.1" +version = "1.19.0" [deps] ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" @@ -45,13 +45,13 @@ DiffEqDevTools = "2.44.4" FiniteDiff = "2.27" MuladdMacro = "0.2" DifferentiationInterface = "0.6.54, 0.7" -LinearSolve = "3.26" +LinearSolve = "3.46" Polyester = "0.7" PrecompileTools = "1.2" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl b/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl index ce714f99c6..47f1e35ed3 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl @@ -224,13 +224,13 @@ function gen_algcache(cacheexpr::Expr,constcachename::Symbol,algname::Symbol,tab end quote - function alg_cache(alg::$algname,u,rate_prototype,uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits,uprev,uprev2,f,t,dt,reltol,p,calck,::Val{false}) + function alg_cache(alg::$algname,u,rate_prototype,uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits,uprev,uprev2,f,t,dt,reltol,p,calck,::Val{false}, verbose) tf = TimeDerivativeWrapper(f,u,p) uf = UDerivativeWrapper(f,t,p) J,W = build_J_W(alg,u,uprev,p,t,dt,f, nothing, uEltypeNoUnits,Val(false)) $constcachename(tf,uf,$tabname(constvalue(uBottomEltypeNoUnits),constvalue(tTypeNoUnits)),J,W,nothing) end - function alg_cache(alg::$algname,u,rate_prototype,uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits,uprev,uprev2,f,t,dt,reltol,p,calck,::Val{true}) + function alg_cache(alg::$algname,u,rate_prototype,uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits,uprev,uprev2,f,t,dt,reltol,p,calck,::Val{true}, verbose) du = zero(rate_prototype) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -254,7 +254,8 @@ function gen_algcache(cacheexpr::Expr,constcachename::Symbol,algname::Symbol,tab linprob = LinearProblem(W,_vec(linsolve_tmp); u0=_vec(tmp)) linsolve = init(linprob,alg.linsolve,alias = LinearAliasSpecifier(alias_A=true,alias_b=true), Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), - Pr = Diagonal(_vec(weight))) + Pr = Diagonal(_vec(weight)), + verbose = verbose.linear_verbosity) $cachename($(valsyms...)) end end diff --git a/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl b/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl index 1764a14430..7e8df53232 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl @@ -131,7 +131,7 @@ end function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -164,7 +164,8 @@ function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = verbose.linear_verbosity) algebraic_vars = f.mass_matrix === I ? nothing : @@ -180,7 +181,7 @@ end function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -215,7 +216,8 @@ function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = verbose.linear_verbosity) algebraic_vars = f.mass_matrix === I ? nothing : [all(iszero, x) for x in eachcol(f.mass_matrix)] @@ -245,7 +247,7 @@ end function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -275,7 +277,7 @@ end function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -335,7 +337,7 @@ end function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} du = zero(rate_prototype) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -367,7 +369,8 @@ function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = verbose.linear_verbosity) Rosenbrock33Cache(u, uprev, du, du1, du2, k1, k2, k3, k4, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, @@ -379,7 +382,7 @@ end function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -424,7 +427,7 @@ end function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} du = zero(rate_prototype) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -458,7 +461,8 @@ function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = verbose.linear_verbosity) Rosenbrock34Cache(u, uprev, du, du1, du2, k1, k2, k3, k4, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, @@ -480,7 +484,7 @@ end function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -618,7 +622,7 @@ end function alg_cache(alg::Rodas23W, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) dense3 = zero(rate_prototype) @@ -656,7 +660,8 @@ function alg_cache(alg::Rodas23W, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = verbose.linear_verbosity) Rodas23WCache(u, uprev, dense1, dense2, dense3, du, du1, du2, k1, k2, k3, k4, k5, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, linsolve_tmp, @@ -667,7 +672,7 @@ end function alg_cache(alg::Rodas3P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) dense3 = zero(rate_prototype) @@ -705,7 +710,8 @@ function alg_cache(alg::Rodas3P, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = verbose.linear_verbosity) Rodas3PCache(u, uprev, dense1, dense2, dense3, du, du1, du2, k1, k2, k3, k4, k5, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, linsolve_tmp, @@ -716,7 +722,7 @@ end function alg_cache(alg::Rodas23W, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -731,7 +737,7 @@ end function alg_cache(alg::Rodas3P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -760,7 +766,7 @@ function alg_cache( u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -777,7 +783,7 @@ function alg_cache( u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = tabtype(alg)(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) # Initialize vectors dense = [zero(rate_prototype) for _ in 1:size(tab.H, 1)] @@ -820,7 +826,8 @@ function alg_cache( linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A=true, alias_b=true), Pl=Pl, Pr=Pr, - assumptions=LinearSolve.OperatorAssumptions(true)) + assumptions=LinearSolve.OperatorAssumptions(true), + verbose = verbose.linear_verbosity) # Return the cache struct with vectors diff --git a/lib/OrdinaryDiffEqSDIRK/Project.toml b/lib/OrdinaryDiffEqSDIRK/Project.toml index 5cce2749fa..fcda163104 100644 --- a/lib/OrdinaryDiffEqSDIRK/Project.toml +++ b/lib/OrdinaryDiffEqSDIRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqSDIRK" uuid = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" authors = ["ParamThakkar123 "] -version = "1.7.0" +version = "1.8.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -37,7 +37,7 @@ LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" TruncatedStacktraces = "1.4" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" MacroTools = "0.5" julia = "1.10" diff --git a/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl b/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl index 4a09a83fed..c884ebc243 100644 --- a/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl +++ b/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl @@ -6,11 +6,11 @@ end function alg_cache(alg::Kvaerno3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, 2tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) Kvaerno3ConstantCache(nlsolver, tab) end @@ -32,11 +32,11 @@ end function alg_cache(alg::Kvaerno3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, 2tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -58,11 +58,11 @@ end function alg_cache(alg::KenCarp3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) KenCarp3ConstantCache(nlsolver, tab) end @@ -90,11 +90,11 @@ end function alg_cache(alg::KenCarp3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) if f isa SplitFunction @@ -129,11 +129,11 @@ end function alg_cache(alg::CFNLIRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = CFNLIRK3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) CFNLIRK3ConstantCache(nlsolver, tab) end @@ -159,11 +159,11 @@ end function alg_cache(alg::CFNLIRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = CFNLIRK3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) k1 = zero(u) @@ -189,11 +189,11 @@ end function alg_cache(alg::Kvaerno4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) Kvaerno4ConstantCache(nlsolver, tab) end @@ -216,11 +216,11 @@ end function alg_cache(alg::Kvaerno4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -243,11 +243,11 @@ end function alg_cache(alg::KenCarp4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) KenCarp4ConstantCache(nlsolver, tab) end @@ -280,11 +280,11 @@ end function alg_cache(alg::KenCarp4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) if f isa SplitFunction @@ -326,11 +326,11 @@ end function alg_cache(alg::Kvaerno5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) Kvaerno5ConstantCache(nlsolver, tab) end @@ -356,11 +356,11 @@ end function alg_cache(alg::Kvaerno5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -385,11 +385,11 @@ end function alg_cache(alg::KenCarp5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) KenCarp5ConstantCache(nlsolver, tab) end @@ -425,11 +425,11 @@ end function alg_cache(alg::KenCarp5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) if f isa SplitFunction @@ -475,11 +475,11 @@ end function alg_cache(alg::KenCarp47, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp47Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) KenCarp47ConstantCache(nlsolver, tab) end @@ -512,11 +512,11 @@ end function alg_cache(alg::KenCarp47, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp47Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) if f isa SplitFunction @@ -559,11 +559,11 @@ end function alg_cache(alg::KenCarp58, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp58Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) KenCarp58ConstantCache(nlsolver, tab) end @@ -599,11 +599,11 @@ end function alg_cache(alg::KenCarp58, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp58Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) if f isa SplitFunction diff --git a/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl b/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl index 75a6453fcf..60dbd97f77 100644 --- a/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl +++ b/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl @@ -20,10 +20,10 @@ end function alg_cache(alg::ImplicitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) atmp = similar(u, uEltypeNoUnits) @@ -43,10 +43,10 @@ end function alg_cache(alg::ImplicitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ImplicitEulerConstantCache(nlsolver) end @@ -57,10 +57,10 @@ end function alg_cache(alg::ImplicitMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 // 2 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ImplicitMidpointConstantCache(nlsolver) end @@ -76,10 +76,10 @@ end function alg_cache(alg::ImplicitMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 // 2 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) ImplicitMidpointCache(u, uprev, fsalfirst, nlsolver, alg.step_limiter!) end @@ -93,10 +93,10 @@ end function alg_cache(alg::Trapezoid, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) uprev3 = u tprev2 = t @@ -121,10 +121,10 @@ end function alg_cache(alg::Trapezoid, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) uprev3 = zero(u) @@ -144,11 +144,11 @@ end function alg_cache(alg::TRBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TRBDF2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.d, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) TRBDF2ConstantCache(nlsolver, tab) end @@ -168,11 +168,11 @@ end function alg_cache(alg::TRBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TRBDF2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.d, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) atmp = similar(u, uEltypeNoUnits) @@ -190,10 +190,10 @@ end function alg_cache(alg::SDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SDIRK2ConstantCache(nlsolver) end @@ -212,10 +212,10 @@ end function alg_cache(alg::SDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -236,14 +236,14 @@ end function alg_cache(alg::SDIRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{tTypeNoUnits}, ::Type{uBottomEltypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SDIRK22Tableau(constvalue(uBottomEltypeNoUnits)) uprev3 = u tprev2 = t γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SDIRK22ConstantCache(uprev3, tprev2, nlsolver) end @@ -266,11 +266,11 @@ end function alg_cache(alg::SDIRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SDIRK22Tableau(constvalue(uBottomEltypeNoUnits)) γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) uprev3 = zero(u) @@ -289,10 +289,10 @@ end function alg_cache(alg::SSPSDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 4, 1 // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SSPSDIRK2ConstantCache(nlsolver) end @@ -308,10 +308,10 @@ end function alg_cache(alg::SSPSDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 4, 1 // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -330,11 +330,11 @@ end function alg_cache(alg::Cash4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Cash4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) Cash4ConstantCache(nlsolver, tab) end @@ -355,11 +355,11 @@ end function alg_cache(alg::Cash4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Cash4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -381,11 +381,11 @@ end function alg_cache(alg::SFSDIRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SFSDIRK4ConstantCache(nlsolver, tab) end @@ -407,11 +407,11 @@ end function alg_cache(alg::SFSDIRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -433,11 +433,11 @@ end function alg_cache(alg::SFSDIRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SFSDIRK5ConstantCache(nlsolver, tab) end @@ -460,11 +460,11 @@ end function alg_cache(alg::SFSDIRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -487,11 +487,11 @@ end function alg_cache(alg::SFSDIRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SFSDIRK6ConstantCache(nlsolver, tab) end @@ -514,11 +514,11 @@ end function alg_cache(alg::SFSDIRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -541,11 +541,11 @@ end function alg_cache(alg::SFSDIRK7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK7Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SFSDIRK7ConstantCache(nlsolver, tab) end @@ -569,11 +569,11 @@ end function alg_cache(alg::SFSDIRK7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK7Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -597,11 +597,11 @@ end function alg_cache(alg::SFSDIRK8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SFSDIRK8ConstantCache(nlsolver, tab) end @@ -626,11 +626,11 @@ end function alg_cache(alg::SFSDIRK8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -656,7 +656,7 @@ function alg_cache( alg::Union{Hairer4, Hairer42}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if alg isa Hairer4 tab = Hairer4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) else @@ -664,7 +664,7 @@ function alg_cache( end γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) Hairer4ConstantCache(nlsolver, tab) end @@ -687,7 +687,7 @@ function alg_cache( alg::Union{Hairer4, Hairer42}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if alg isa Hairer4 tab = Hairer4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) else # Hairer42 @@ -695,7 +695,7 @@ function alg_cache( end γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -730,11 +730,11 @@ end function alg_cache(alg::ESDIRK54I8L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK54I8L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -761,11 +761,11 @@ end function alg_cache(alg::ESDIRK54I8L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK54I8L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ESDIRK54I8L2SAConstantCache(nlsolver, tab) end @@ -788,11 +788,11 @@ end function alg_cache(alg::ESDIRK436L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK436L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -816,11 +816,11 @@ end function alg_cache(alg::ESDIRK436L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK436L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ESDIRK436L2SA2ConstantCache(nlsolver, tab) end @@ -844,11 +844,11 @@ end function alg_cache(alg::ESDIRK437L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK437L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -873,11 +873,11 @@ end function alg_cache(alg::ESDIRK437L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK437L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ESDIRK437L2SAConstantCache(nlsolver, tab) end @@ -901,11 +901,11 @@ end function alg_cache(alg::ESDIRK547L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK547L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -930,11 +930,11 @@ end function alg_cache(alg::ESDIRK547L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK547L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ESDIRK547L2SA2ConstantCache(nlsolver, tab) end @@ -961,11 +961,11 @@ function alg_cache(alg::ESDIRK659L2SA, u, rate_prototype, ::Type{uEltypeNoUnits} ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK659L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -992,11 +992,11 @@ end function alg_cache(alg::ESDIRK659L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK659L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ESDIRK659L2SAConstantCache(nlsolver, tab) end diff --git a/lib/OrdinaryDiffEqSIMDRK/Project.toml b/lib/OrdinaryDiffEqSIMDRK/Project.toml index f3b772286a..babde95ef5 100644 --- a/lib/OrdinaryDiffEqSIMDRK/Project.toml +++ b/lib/OrdinaryDiffEqSIMDRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqSIMDRK" uuid = "dc97f408-7a72-40e4-9b0d-228a53b292f8" authors = ["Yingbo Ma ", "Chris Elrod "] -version = "1.1.0" +version = "1.2.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" @@ -22,7 +22,7 @@ SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "1" DiffEqDevTools = "2.44" MuladdMacro = "0.2" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "0.7, 0.8, 1" SLEEFPirates = "0.6" VectorizationBase = "0.21" diff --git a/lib/OrdinaryDiffEqSIMDRK/src/caches.jl b/lib/OrdinaryDiffEqSIMDRK/src/caches.jl index 82eb59633d..ef47143727 100644 --- a/lib/OrdinaryDiffEqSIMDRK/src/caches.jl +++ b/lib/OrdinaryDiffEqSIMDRK/src/caches.jl @@ -249,7 +249,7 @@ end function alg_cache(alg::MER5v2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MER5v2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -535,7 +535,7 @@ end function alg_cache(alg::MER6v2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MER6v2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1074,6 +1074,6 @@ end function alg_cache(alg::RK6v4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RK6v4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqSSPRK/Project.toml b/lib/OrdinaryDiffEqSSPRK/Project.toml index a216726008..9bd932b2ba 100644 --- a/lib/OrdinaryDiffEqSSPRK/Project.toml +++ b/lib/OrdinaryDiffEqSSPRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqSSPRK" uuid = "669c94d9-1f4b-4b64-b377-1aa079aa2388" authors = ["ParamThakkar123 "] -version = "1.7.0" +version = "1.8.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -39,7 +39,7 @@ MuladdMacro = "0.2" PrecompileTools = "1.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqSSPRK/src/ssprk_caches.jl b/lib/OrdinaryDiffEqSSPRK/src/ssprk_caches.jl index e38f302891..be7b34521b 100644 --- a/lib/OrdinaryDiffEqSSPRK/src/ssprk_caches.jl +++ b/lib/OrdinaryDiffEqSSPRK/src/ssprk_caches.jl @@ -18,7 +18,7 @@ struct SSPRK22ConstantCache <: SSPRKConstantCache end function alg_cache(alg::SSPRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -31,7 +31,7 @@ end function alg_cache(alg::SSPRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK22ConstantCache() end @@ -51,7 +51,7 @@ struct SSPRK33ConstantCache <: SSPRKConstantCache end function alg_cache(alg::SSPRK33, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -64,7 +64,7 @@ end function alg_cache(alg::SSPRK33, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK33ConstantCache() end @@ -128,7 +128,7 @@ end function alg_cache(alg::KYKSSPRK42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -142,7 +142,7 @@ end function alg_cache(alg::KYKSSPRK42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KYKSSPRK42ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -200,7 +200,7 @@ end function alg_cache(alg::SSPRK53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -216,7 +216,7 @@ end function alg_cache(alg::SSPRK53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -271,7 +271,7 @@ end function alg_cache(alg::SSPRK53_2N1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -287,7 +287,7 @@ end function alg_cache(alg::SSPRK53_2N1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_2N1ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -346,7 +346,7 @@ end function alg_cache(alg::SSPRK53_2N2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -362,7 +362,7 @@ end function alg_cache(alg::SSPRK53_2N2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_2N2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -418,7 +418,7 @@ end function alg_cache(alg::SSPRK53_H, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -434,7 +434,7 @@ end function alg_cache(alg::SSPRK53_H, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_HConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -496,7 +496,7 @@ end function alg_cache(alg::SSPRK63, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₂ = zero(u) k = zero(rate_prototype) @@ -513,7 +513,7 @@ end function alg_cache(alg::SSPRK63, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK63ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -584,7 +584,7 @@ end function alg_cache(alg::SSPRK73, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₁ = zero(u) k = zero(rate_prototype) @@ -601,7 +601,7 @@ end function alg_cache(alg::SSPRK73, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK73ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -678,7 +678,7 @@ end function alg_cache(alg::SSPRK83, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₂ = zero(u) u₃ = zero(u) @@ -696,7 +696,7 @@ end function alg_cache(alg::SSPRK83, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK83ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -733,7 +733,7 @@ end function alg_cache(alg::SSPRK43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -751,7 +751,7 @@ end function alg_cache(alg::SSPRK43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK43ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -779,7 +779,7 @@ struct SSPRK432ConstantCache <: SSPRKConstantCache end function alg_cache(alg::SSPRK432, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -796,7 +796,7 @@ end function alg_cache(alg::SSPRK432, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK432ConstantCache() end @@ -833,7 +833,7 @@ end function alg_cache(alg::SSPRKMSVS32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) dts = fill(zero(dt), 3) dtf = fill(zero(dt), 2) @@ -849,7 +849,7 @@ end function alg_cache(alg::SSPRKMSVS32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) dtf = fill(zero(dt), 2) μ = zero(dt) @@ -896,7 +896,7 @@ end function alg_cache(alg::SSPRKMSVS43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) u_3 = zero(u) u_2 = zero(u) @@ -913,7 +913,7 @@ end function alg_cache(alg::SSPRKMSVS43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_3 = u u_2 = u u_1 = u @@ -947,7 +947,7 @@ struct SSPRK932ConstantCache <: SSPRKConstantCache end function alg_cache(alg::SSPRK932, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -964,7 +964,7 @@ end function alg_cache(alg::SSPRK932, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK932ConstantCache() end @@ -1034,7 +1034,7 @@ end function alg_cache(alg::SSPRK54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u₂ = zero(u) u₃ = zero(u) tmp = zero(u) @@ -1053,7 +1053,7 @@ end function alg_cache(alg::SSPRK54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1075,7 +1075,7 @@ struct SSPRK104ConstantCache <: SSPRKConstantCache end function alg_cache(alg::SSPRK104, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1091,7 +1091,7 @@ end function alg_cache(alg::SSPRK104, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK104ConstantCache() end @@ -1151,7 +1151,7 @@ end function alg_cache(alg::KYK2014DGSSPRK_3S2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_1 = zero(u) u_2 = zero(u) kk_1 = zero(rate_prototype) @@ -1167,7 +1167,7 @@ end function alg_cache(alg::KYK2014DGSSPRK_3S2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KYK2014DGSSPRK_3S2_ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqStabilizedIRK/Project.toml b/lib/OrdinaryDiffEqStabilizedIRK/Project.toml index 739352e46a..62cd0a8220 100644 --- a/lib/OrdinaryDiffEqStabilizedIRK/Project.toml +++ b/lib/OrdinaryDiffEqStabilizedIRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqStabilizedIRK" uuid = "e3e12d00-db14-5390-b879-ac3dd2ef6296" authors = ["ParamThakkar123 "] -version = "1.6.0" +version = "1.7.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -36,7 +36,7 @@ MuladdMacro = "0.2" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" OrdinaryDiffEqStabilizedRK = "1.4.0" StaticArrays = "1.9" diff --git a/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl b/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl index 60239258c9..bd6264fa31 100644 --- a/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl +++ b/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl @@ -30,10 +30,10 @@ end function alg_cache(alg::IRKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) zprev = u du₁ = rate_prototype du₂ = rate_prototype @@ -43,10 +43,10 @@ end function alg_cache(alg::IRKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) gprev = zero(u) gprev2 = zero(u) diff --git a/lib/OrdinaryDiffEqStabilizedRK/Project.toml b/lib/OrdinaryDiffEqStabilizedRK/Project.toml index 37c265a3cb..bff5ea1052 100644 --- a/lib/OrdinaryDiffEqStabilizedRK/Project.toml +++ b/lib/OrdinaryDiffEqStabilizedRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqStabilizedRK" uuid = "358294b1-0aab-51c3-aafe-ad5ab194a2ad" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" @@ -32,7 +32,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" StaticArrays = "1.9" julia = "1.10" diff --git a/lib/OrdinaryDiffEqStabilizedRK/src/rkc_caches.jl b/lib/OrdinaryDiffEqStabilizedRK/src/rkc_caches.jl index e598d1243c..5df64ad08d 100644 --- a/lib/OrdinaryDiffEqStabilizedRK/src/rkc_caches.jl +++ b/lib/OrdinaryDiffEqStabilizedRK/src/rkc_caches.jl @@ -29,7 +29,7 @@ end function alg_cache(alg::ROCK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ROCK2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) @@ -46,7 +46,7 @@ end function alg_cache(alg::ROCK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ROCK2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) end @@ -81,7 +81,7 @@ end function alg_cache(alg::ROCK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ROCK4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) @@ -99,7 +99,7 @@ end function alg_cache(alg::ROCK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ROCK4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) end @@ -123,7 +123,7 @@ end function alg_cache(alg::RKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = RKCConstantCache(u) gprev = zero(u) gprev2 = zero(u) @@ -138,7 +138,7 @@ end function alg_cache(alg::RKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKCConstantCache(u) end @@ -171,7 +171,7 @@ end function alg_cache(alg::ESERK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ESERK4ConstantCache(u) uᵢ = zero(u) uᵢ₋₁ = zero(u) @@ -188,7 +188,7 @@ end function alg_cache(alg::ESERK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ESERK4ConstantCache(u) end @@ -221,7 +221,7 @@ end function alg_cache(alg::ESERK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ESERK5ConstantCache(u) uᵢ = zero(u) uᵢ₋₁ = zero(u) @@ -238,7 +238,7 @@ end function alg_cache(alg::ESERK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ESERK5ConstantCache(u) end @@ -268,7 +268,7 @@ end function alg_cache(alg::SERK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = SERK2ConstantCache(u) uᵢ₋₁ = zero(u) uᵢ₋₂ = zero(u) @@ -284,6 +284,6 @@ end function alg_cache(alg::SERK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SERK2ConstantCache(u) end diff --git a/lib/OrdinaryDiffEqSymplecticRK/Project.toml b/lib/OrdinaryDiffEqSymplecticRK/Project.toml index b5ce7d2aea..e38bd05a30 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/Project.toml +++ b/lib/OrdinaryDiffEqSymplecticRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqSymplecticRK" uuid = "fa646aed-7ef9-47eb-84c4-9443fc8cbfa8" authors = ["ParamThakkar123 "] -version = "1.7.0" +version = "1.8.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" @@ -38,7 +38,7 @@ Polyester = "0.7" LinearAlgebra = "1.10" OrdinaryDiffEqRKN = "1.4.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" @@ -53,3 +53,9 @@ test = ["DiffEqDevTools", "Random", "SafeTestsets", "Test", "Statistics", "Linea [sources.OrdinaryDiffEqCore] path = "../OrdinaryDiffEqCore" + +[sources.OrdinaryDiffEqTsit5] +path = "../OrdinaryDiffEqTsit5" + +[sources.OrdinaryDiffEqRKN] +path = "../OrdinaryDiffEqRKN" diff --git a/lib/OrdinaryDiffEqSymplecticRK/src/symplectic_caches.jl b/lib/OrdinaryDiffEqSymplecticRK/src/symplectic_caches.jl index e9b0ca838c..7bbb44c2df 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/src/symplectic_caches.jl +++ b/lib/OrdinaryDiffEqSymplecticRK/src/symplectic_caches.jl @@ -12,7 +12,7 @@ end function alg_cache(alg::SymplecticEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SymplecticEulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end @@ -21,7 +21,7 @@ struct SymplecticEulerConstantCache <: HamiltonConstantCache end function alg_cache(alg::SymplecticEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SymplecticEulerConstantCache() end @@ -42,7 +42,7 @@ end function alg_cache(alg::VelocityVerlet, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(rate_prototype) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -53,7 +53,7 @@ end function alg_cache(alg::VelocityVerlet, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} VelocityVerletConstantCache(uEltypeNoUnits(1 // 2)) end @@ -74,7 +74,7 @@ end function alg_cache(alg::LeapfrogDriftKickDrift, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(rate_prototype) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -85,7 +85,7 @@ end function alg_cache(alg::LeapfrogDriftKickDrift, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LeapfrogDriftKickDriftConstantCache(uEltypeNoUnits(1 // 2)) end @@ -106,7 +106,7 @@ end function alg_cache(alg::VerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -117,7 +117,7 @@ end function alg_cache(alg::VerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} VerletLeapfrogConstantCache(uEltypeNoUnits(1 // 2)) end @@ -133,7 +133,7 @@ end function alg_cache(alg::PseudoVerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -145,7 +145,7 @@ end function alg_cache(alg::PseudoVerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} PseudoVerletLeapfrogConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -153,7 +153,7 @@ end function alg_cache(alg::McAte2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -164,7 +164,7 @@ end function alg_cache(alg::McAte2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -180,7 +180,7 @@ end function alg_cache(alg::Ruth3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -191,14 +191,14 @@ end function alg_cache(alg::Ruth3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Ruth3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::McAte3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -209,7 +209,7 @@ end function alg_cache(alg::McAte3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -225,7 +225,7 @@ end function alg_cache(alg::McAte4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -236,14 +236,14 @@ end function alg_cache(alg::McAte4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::CandyRoz4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -254,7 +254,7 @@ end function alg_cache(alg::CandyRoz4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -270,7 +270,7 @@ end function alg_cache(alg::CalvoSanz4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -282,14 +282,14 @@ end function alg_cache(alg::CalvoSanz4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CalvoSanz4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::McAte42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -300,7 +300,7 @@ end function alg_cache(alg::McAte42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte42ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -316,7 +316,7 @@ end function alg_cache(alg::McAte5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -327,7 +327,7 @@ end function alg_cache(alg::McAte5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -343,7 +343,7 @@ end function alg_cache(alg::Yoshida6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -354,7 +354,7 @@ end function alg_cache(alg::Yoshida6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Yoshida6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -370,7 +370,7 @@ end function alg_cache(alg::KahanLi6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -381,7 +381,7 @@ end function alg_cache(alg::KahanLi6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KahanLi6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -397,7 +397,7 @@ end function alg_cache(alg::McAte8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -408,7 +408,7 @@ end function alg_cache(alg::McAte8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -424,7 +424,7 @@ end function alg_cache(alg::KahanLi8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -435,7 +435,7 @@ end function alg_cache(alg::KahanLi8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KahanLi8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -451,7 +451,7 @@ end function alg_cache(alg::SofSpa10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -462,7 +462,7 @@ end function alg_cache(alg::SofSpa10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SofSpa10ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqTaylorSeries/Project.toml b/lib/OrdinaryDiffEqTaylorSeries/Project.toml index e6a075f5af..72e1956621 100644 --- a/lib/OrdinaryDiffEqTaylorSeries/Project.toml +++ b/lib/OrdinaryDiffEqTaylorSeries/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqTaylorSeries" uuid = "9c7f1690-dd92-42a3-8318-297ee24d8d39" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -41,7 +41,7 @@ Symbolics = "6.48.0" LinearAlgebra = "1.10" TruncatedStacktraces = "1.4" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqTaylorSeries/src/TaylorSeries_caches.jl b/lib/OrdinaryDiffEqTaylorSeries/src/TaylorSeries_caches.jl index b07e9e912d..0c15439e57 100644 --- a/lib/OrdinaryDiffEqTaylorSeries/src/TaylorSeries_caches.jl +++ b/lib/OrdinaryDiffEqTaylorSeries/src/TaylorSeries_caches.jl @@ -17,7 +17,7 @@ end function alg_cache(alg::ExplicitTaylor2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -32,7 +32,7 @@ struct ExplicitTaylor2ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::ExplicitTaylor2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ExplicitTaylor2ConstantCache() end # FSAL currently not used, providing dummy implementation to satisfy the interface @@ -57,7 +57,7 @@ end function alg_cache(alg::ExplicitTaylor{P}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {P, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {P, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} _, jet_iip = build_jet(f, p, Val(P), length(u)) utaylor = TaylorDiff.make_seed(u, zero(u), Val(P)) utilde = zero(u) @@ -75,7 +75,7 @@ end function alg_cache(::ExplicitTaylor{P}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {P, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {P, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if u isa AbstractArray jet, _ = build_jet(f, p, Val(P), length(u)) else diff --git a/lib/OrdinaryDiffEqTsit5/Project.toml b/lib/OrdinaryDiffEqTsit5/Project.toml index 372f4d49e0..f466b9f993 100644 --- a/lib/OrdinaryDiffEqTsit5/Project.toml +++ b/lib/OrdinaryDiffEqTsit5/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqTsit5" uuid = "b1df2697-797e-41e3-8120-5422d3b24e4a" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -36,7 +36,7 @@ PrecompileTools = "1.2" LinearAlgebra = "1.10" TruncatedStacktraces = "1.4" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqTsit5/src/tsit_caches.jl b/lib/OrdinaryDiffEqTsit5/src/tsit_caches.jl index 040f9a9869..5f4dd9d25c 100644 --- a/lib/OrdinaryDiffEqTsit5/src/tsit_caches.jl +++ b/lib/OrdinaryDiffEqTsit5/src/tsit_caches.jl @@ -20,7 +20,7 @@ end function alg_cache(alg::Tsit5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -41,6 +41,6 @@ get_fsalfirstlast(cache::Tsit5Cache, u) = (cache.k1, cache.k7) function alg_cache(alg::Tsit5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Tsit5ConstantCache() end diff --git a/lib/OrdinaryDiffEqVerner/Project.toml b/lib/OrdinaryDiffEqVerner/Project.toml index 2a40a511ef..278698408c 100644 --- a/lib/OrdinaryDiffEqVerner/Project.toml +++ b/lib/OrdinaryDiffEqVerner/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqVerner" uuid = "79d7bb75-1356-48c1-b8c0-6832512096c2" authors = ["ParamThakkar123 "] -version = "1.6.0" +version = "1.7.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -41,7 +41,7 @@ LinearAlgebra = "1.10" TruncatedStacktraces = "1.4" SciMLBase = "2.99" ODEProblemLibrary = "0.1.8" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" OrdinaryDiffEqExplicitRK = "1.4" Static = "1.2" Aqua = "0.8.11" diff --git a/lib/OrdinaryDiffEqVerner/src/verner_caches.jl b/lib/OrdinaryDiffEqVerner/src/verner_caches.jl index 5734464a31..8251949b57 100644 --- a/lib/OrdinaryDiffEqVerner/src/verner_caches.jl +++ b/lib/OrdinaryDiffEqVerner/src/verner_caches.jl @@ -28,7 +28,7 @@ get_fsalfirstlast(cache::Vern6Cache, u) = (cache.k1, cache.k9) function alg_cache(alg::Vern6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -56,7 +56,7 @@ end function alg_cache(alg::Vern6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) Vern6ConstantCache(tab, alg.lazy) end @@ -92,7 +92,7 @@ get_fsalfirstlast(cache::Vern7Cache, u) = (nothing, nothing) function alg_cache(alg::Vern7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = k2 @@ -119,7 +119,7 @@ end function alg_cache(alg::Vern7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Vern7ConstantCache(alg.lazy) end @@ -158,7 +158,7 @@ get_fsalfirstlast(cache::Vern8Cache, u) = (nothing, nothing) function alg_cache(alg::Vern8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -190,7 +190,7 @@ end function alg_cache(alg::Vern8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) Vern8ConstantCache(tab, alg.lazy) end @@ -232,7 +232,7 @@ get_fsalfirstlast(cache::Vern9Cache, u) = (nothing, nothing) function alg_cache(alg::Vern9, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = k2 @@ -266,7 +266,7 @@ end function alg_cache(alg::Vern9, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Vern9ConstantCache(alg.lazy) end @@ -302,7 +302,7 @@ get_fsalfirstlast(cache::RKV76IIaCache, u) = (nothing, nothing) function alg_cache(alg::RKV76IIa, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = RKV76IIaTableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -331,7 +331,7 @@ end function alg_cache(alg::RKV76IIa, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = RKV76IIaTableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) RKV76IIaConstantCache(tab, alg.lazy) end diff --git a/lib/SimpleImplicitDiscreteSolve/Project.toml b/lib/SimpleImplicitDiscreteSolve/Project.toml index ebfe72ba31..071be36ab4 100644 --- a/lib/SimpleImplicitDiscreteSolve/Project.toml +++ b/lib/SimpleImplicitDiscreteSolve/Project.toml @@ -1,7 +1,7 @@ name = "SimpleImplicitDiscreteSolve" uuid = "8b67ef88-54bd-43ff-aca0-8be02588656a" authors = ["vyudu "] -version = "1.2.0" +version = "1.3.0" [deps] DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" diff --git a/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl b/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl index d392ddfa50..3334800fa8 100644 --- a/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl +++ b/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl @@ -3,6 +3,7 @@ module SimpleImplicitDiscreteSolve using SciMLBase using SimpleNonlinearSolve using Reexport + @reexport using SciMLBase """ diff --git a/test/integrators/check_error.jl b/test/integrators/check_error.jl index 61ab159544..89d06c9bdd 100644 --- a/test/integrators/check_error.jl +++ b/test/integrators/check_error.jl @@ -4,7 +4,7 @@ f_ec(u, p, t) = exp(u) u0 = 0.0 # explosion time is 1.0 tspan = (0.0, 10.0) prob = ODEProblem(f_ec, u0, tspan) -options = [:reltol => 1e-8, :abstol => 1e-8, :verbose => false] +options = [:reltol => 1e-8, :abstol => 1e-8] desired_codes = (ReturnCode.MaxIters, ReturnCode.Unstable) # Test that sol.retcode is set to the correct value by various ways to diff --git a/test/interface/verbosity.jl b/test/interface/verbosity.jl new file mode 100644 index 0000000000..213a4dce5c --- /dev/null +++ b/test/interface/verbosity.jl @@ -0,0 +1,427 @@ +using OrdinaryDiffEqCore +using OrdinaryDiffEqCore: ODEVerbosity +using OrdinaryDiffEq +using OrdinaryDiffEqNonlinearSolve: NonlinearSolveAlg +using ODEProblemLibrary: prob_ode_vanderpol_stiff +using Test +import OrdinaryDiffEqCore.SciMLLogging as SciMLLogging +using LinearSolve: LinearVerbosity +using NonlinearSolve: NonlinearVerbosity + +@testset "ODEVerbosity Tests" begin + @testset "Default constructor" begin + v1 = ODEVerbosity() + @test v1 isa ODEVerbosity + + # Test solver verbosity + @test v1.linear_verbosity isa SciMLLogging.Minimal + @test v1.nonlinear_verbosity isa SciMLLogging.Minimal + + # Test error control group (default: WarnLevel except newton_convergence, step_rejected, step_accepted, convergence_limit) + @test v1.dt_NaN isa SciMLLogging.WarnLevel + @test v1.init_NaN isa SciMLLogging.WarnLevel + @test v1.dense_output_saveat isa SciMLLogging.WarnLevel + @test v1.max_iters isa SciMLLogging.WarnLevel + @test v1.dt_min_unstable isa SciMLLogging.WarnLevel + @test v1.instability isa SciMLLogging.WarnLevel + @test v1.newton_convergence isa SciMLLogging.Silent + @test v1.step_rejected isa SciMLLogging.Silent + @test v1.step_accepted isa SciMLLogging.Silent + @test v1.convergence_limit isa SciMLLogging.Silent + + # Test performance group (default: Silent except mismatched_input_output_type) + @test v1.alg_switch isa SciMLLogging.Silent + @test v1.stiff_detection isa SciMLLogging.Silent + @test v1.mismatched_input_output_type isa SciMLLogging.WarnLevel + @test v1.jacobian_update isa SciMLLogging.Silent + @test v1.w_factorization isa SciMLLogging.Silent + @test v1.newton_iterations isa SciMLLogging.Silent + + # Test numerical group (default: WarnLevel except shampine_dt, dt_epsilon, stability_check) + @test v1.rosenbrock_no_differential_states isa SciMLLogging.WarnLevel + @test v1.shampine_dt isa SciMLLogging.Silent + @test v1.unlimited_dt isa SciMLLogging.WarnLevel + @test v1.dt_epsilon isa SciMLLogging.Silent + @test v1.stability_check isa SciMLLogging.Silent + @test v1.near_singular isa SciMLLogging.Silent + end + + @testset "ODEVerbosity preset constructors" begin + v_none = ODEVerbosity(SciMLLogging.None()) + v_minimal = ODEVerbosity(SciMLLogging.Minimal()) + v_standard = ODEVerbosity(SciMLLogging.Standard()) + v_detailed = ODEVerbosity(SciMLLogging.Detailed()) + v_all = ODEVerbosity(SciMLLogging.All()) + + # Test None - everything Silent + @test v_none.linear_verbosity isa SciMLLogging.None + @test v_none.nonlinear_verbosity isa SciMLLogging.None + @test v_none.dt_NaN isa SciMLLogging.Silent + @test v_none.init_NaN isa SciMLLogging.Silent + @test v_none.alg_switch isa SciMLLogging.Silent + @test v_none.rosenbrock_no_differential_states isa SciMLLogging.Silent + + # Test Minimal - only critical errors + @test v_minimal.linear_verbosity isa SciMLLogging.Minimal + @test v_minimal.nonlinear_verbosity isa SciMLLogging.Minimal + @test v_minimal.dt_NaN isa SciMLLogging.WarnLevel + @test v_minimal.init_NaN isa SciMLLogging.WarnLevel + @test v_minimal.max_iters isa SciMLLogging.WarnLevel + @test v_minimal.newton_convergence isa SciMLLogging.WarnLevel + @test v_minimal.near_singular isa SciMLLogging.WarnLevel + @test v_minimal.alg_switch isa SciMLLogging.Silent + @test v_minimal.dense_output_saveat isa SciMLLogging.Silent + @test v_minimal.mismatched_input_output_type isa SciMLLogging.Silent + + # Test Standard - same as default + @test v_standard.dt_NaN isa SciMLLogging.WarnLevel + @test v_standard.init_NaN isa SciMLLogging.WarnLevel + @test v_standard.alg_switch isa SciMLLogging.Silent + @test v_standard.dense_output_saveat isa SciMLLogging.WarnLevel + @test v_standard.mismatched_input_output_type isa SciMLLogging.WarnLevel + + # Test Detailed - includes debugging info + @test v_detailed.linear_verbosity isa SciMLLogging.Detailed + @test v_detailed.nonlinear_verbosity isa SciMLLogging.Detailed + @test v_detailed.alg_switch isa SciMLLogging.InfoLevel + @test v_detailed.dense_output_saveat isa SciMLLogging.InfoLevel + @test v_detailed.shampine_dt isa SciMLLogging.InfoLevel + @test v_detailed.jacobian_update isa SciMLLogging.InfoLevel + @test v_detailed.w_factorization isa SciMLLogging.InfoLevel + @test v_detailed.convergence_limit isa SciMLLogging.InfoLevel + + # Test All - maximum verbosity + @test v_all.linear_verbosity isa SciMLLogging.All + @test v_all.nonlinear_verbosity isa SciMLLogging.All + @test v_all.alg_switch isa SciMLLogging.InfoLevel + @test v_all.shampine_dt isa SciMLLogging.InfoLevel + @test v_all.dense_output_saveat isa SciMLLogging.InfoLevel + @test v_all.step_rejected isa SciMLLogging.InfoLevel + @test v_all.step_accepted isa SciMLLogging.InfoLevel + @test v_all.stiff_detection isa SciMLLogging.InfoLevel + end + + @testset "Group-level keyword constructors" begin + v_error = ODEVerbosity(error_control = SciMLLogging.ErrorLevel()) + # Test all error_control fields + @test v_error.dt_NaN isa SciMLLogging.ErrorLevel + @test v_error.init_NaN isa SciMLLogging.ErrorLevel + @test v_error.dense_output_saveat isa SciMLLogging.ErrorLevel + @test v_error.max_iters isa SciMLLogging.ErrorLevel + @test v_error.dt_min_unstable isa SciMLLogging.ErrorLevel + @test v_error.instability isa SciMLLogging.ErrorLevel + @test v_error.newton_convergence isa SciMLLogging.ErrorLevel + @test v_error.step_rejected isa SciMLLogging.ErrorLevel + @test v_error.step_accepted isa SciMLLogging.ErrorLevel + @test v_error.convergence_limit isa SciMLLogging.ErrorLevel + + v_numerical = ODEVerbosity(numerical = SciMLLogging.Silent()) + # Test all numerical fields + @test v_numerical.rosenbrock_no_differential_states isa SciMLLogging.Silent + @test v_numerical.shampine_dt isa SciMLLogging.Silent + @test v_numerical.unlimited_dt isa SciMLLogging.Silent + @test v_numerical.dt_epsilon isa SciMLLogging.Silent + @test v_numerical.stability_check isa SciMLLogging.Silent + @test v_numerical.near_singular isa SciMLLogging.Silent + + v_performance = ODEVerbosity(performance = SciMLLogging.InfoLevel()) + # Test all performance fields + @test v_performance.alg_switch isa SciMLLogging.InfoLevel + @test v_performance.stiff_detection isa SciMLLogging.InfoLevel + @test v_performance.mismatched_input_output_type isa SciMLLogging.InfoLevel + @test v_performance.jacobian_update isa SciMLLogging.InfoLevel + @test v_performance.w_factorization isa SciMLLogging.InfoLevel + @test v_performance.newton_iterations isa SciMLLogging.InfoLevel + end + + @testset "Mixed group and individual settings" begin + v_mixed = ODEVerbosity( + numerical = SciMLLogging.Silent(), + shampine_dt = SciMLLogging.WarnLevel(), + performance = SciMLLogging.InfoLevel() + ) + # Individual override should take precedence + @test v_mixed.shampine_dt isa SciMLLogging.WarnLevel + # Other numerical options should use group setting + @test v_mixed.rosenbrock_no_differential_states isa SciMLLogging.Silent + @test v_mixed.unlimited_dt isa SciMLLogging.Silent + # Performance group setting should apply + @test v_mixed.alg_switch isa SciMLLogging.InfoLevel + @test v_mixed.mismatched_input_output_type isa SciMLLogging.InfoLevel + end + + @testset "Individual keyword arguments" begin + v_individual = ODEVerbosity( + dt_NaN = SciMLLogging.ErrorLevel(), + alg_switch = SciMLLogging.InfoLevel(), + shampine_dt = SciMLLogging.Silent() + ) + @test v_individual.dt_NaN isa SciMLLogging.ErrorLevel + @test v_individual.alg_switch isa SciMLLogging.InfoLevel + @test v_individual.shampine_dt isa SciMLLogging.Silent + # Unspecified options should use defaults + @test v_individual.init_NaN isa SciMLLogging.WarnLevel + @test v_individual.unlimited_dt isa SciMLLogging.WarnLevel + end + + @testset "Linear and nonlinear verbosity passthrough" begin + v_with_solvers = ODEVerbosity( + linear_verbosity = SciMLLogging.Detailed(), + nonlinear_verbosity = SciMLLogging.Minimal() + ) + @test v_with_solvers.linear_verbosity isa SciMLLogging.Detailed + @test v_with_solvers.nonlinear_verbosity isa SciMLLogging.Minimal + + v_with_solvers2 = ODEVerbosity( + linear_verbosity = SciMLLogging.None(), + nonlinear_verbosity = SciMLLogging.All() + ) + @test v_with_solvers2.linear_verbosity isa SciMLLogging.None + @test v_with_solvers2.nonlinear_verbosity isa SciMLLogging.All + end + + @testset "Validation tests" begin + # Test that invalid group arguments throw errors + @test_throws ArgumentError ODEVerbosity(error_control = "invalid") + @test_throws ArgumentError ODEVerbosity(performance = 123) + @test_throws ArgumentError ODEVerbosity(numerical = :wrong) + + # Test that invalid individual fields throw errors + @test_throws ArgumentError ODEVerbosity(dt_NaN = "invalid") + @test_throws ArgumentError ODEVerbosity(unknown_field = SciMLLogging.InfoLevel()) + end + + @testset "Multiple group settings" begin + v = ODEVerbosity( + error_control = SciMLLogging.ErrorLevel(), + performance = SciMLLogging.InfoLevel(), + numerical = SciMLLogging.Silent() + ) + @test v.dt_NaN isa SciMLLogging.ErrorLevel + @test v.alg_switch isa SciMLLogging.InfoLevel + @test v.shampine_dt isa SciMLLogging.Silent + end + + @testset "Complex mixed settings" begin + v = ODEVerbosity( + error_control = SciMLLogging.WarnLevel(), + performance = SciMLLogging.InfoLevel(), + numerical = SciMLLogging.Silent(), + linear_verbosity = SciMLLogging.Detailed(), + nonlinear_verbosity = SciMLLogging.Minimal(), + dt_NaN = SciMLLogging.ErrorLevel(), # Override specific error_control field + shampine_dt = SciMLLogging.WarnLevel() # Override specific numerical field + ) + # Check overrides took precedence + @test v.dt_NaN isa SciMLLogging.ErrorLevel + @test v.shampine_dt isa SciMLLogging.WarnLevel + # Check other fields follow group settings + @test v.init_NaN isa SciMLLogging.WarnLevel + @test v.alg_switch isa SciMLLogging.InfoLevel + @test v.unlimited_dt isa SciMLLogging.Silent + # Check solver verbosity + @test v.linear_verbosity isa SciMLLogging.Detailed + @test v.nonlinear_verbosity isa SciMLLogging.Minimal + end + + @testset "Stiff Switching Message" begin + verb = ODEVerbosity(alg_switch = SciMLLogging.InfoLevel()) + solve(prob_ode_vanderpol_stiff, AutoTsit5(Rodas5()), verbose = verb) + end + + @testset "Linear Verbosity Passthrough to Caches" begin + # Define a simple stiff test problem + function rober(du, u, p, t) + y₁, y₂, y₃ = u + k₁, k₂, k₃ = p + du[1] = -k₁ * y₁ + k₃ * y₂ * y₃ + du[2] = k₁ * y₁ - k₃ * y₂ * y₃ - k₂ * y₂^2 + du[3] = y₁ + y₂ + y₃ - 1 + nothing + end + u0 = [1.0, 0.0, 0.0] + tspan = (0.0, 1e-1) + p = [0.04, 3e7, 1e4] + prob = ODEProblem(rober, u0, tspan, p) + + @testset "Rosenbrock Solvers" begin + @testset "Rosenbrock23 with Detailed LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, Rosenbrock23(), verbose = verbose, dt = 1e-3) + + # Check that the cache has a linsolve field + @test hasproperty(integrator.cache, :linsolve) + + # Check that the linear solver cache has verbose field + @test hasproperty(integrator.cache.linsolve, :verbose) + + # Verify the verbosity was passed through correctly + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + + @testset "Rosenbrock23 with Minimal LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Minimal()) + integrator = init(prob, Rosenbrock23(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Minimal()) + end + + @testset "Rosenbrock23 with None LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.None()) + integrator = init(prob, Rosenbrock23(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.None()) + end + + @testset "Rosenbrock32 with Detailed LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, Rosenbrock32(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + + @testset "Rodas4 with All LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.All()) + integrator = init(prob, Rodas4(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.All()) + end + end + + @testset "FIRK Solvers (Radau Methods)" begin + @testset "RadauIIA3 with Detailed LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, RadauIIA3(), verbose = verbose, dt = 1e-3) + + # RadauIIA3 has a linsolve field + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + + @testset "RadauIIA3 with Minimal LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Minimal()) + integrator = init(prob, RadauIIA3(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Minimal()) + end + + @testset "RadauIIA5 with Detailed LinearVerbosity (two linear solvers)" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, RadauIIA5(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve1.verbose == LinearVerbosity(SciMLLogging.Detailed()) + @test integrator.cache.linsolve2.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + + @testset "RadauIIA5 with None LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.None()) + integrator = init(prob, RadauIIA5(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve1.verbose == LinearVerbosity(SciMLLogging.None()) + @test integrator.cache.linsolve2.verbose == LinearVerbosity(SciMLLogging.None()) + end + + @testset "RadauIIA9 with All LinearVerbosity (three linear solvers)" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.All()) + integrator = init(prob, RadauIIA9(), verbose = verbose, dt = 1e-3) + + # Check all three linear solvers have the correct verbosity + @test integrator.cache.linsolve1.verbose == LinearVerbosity(SciMLLogging.All()) + @test integrator.cache.linsolve2.verbose == + LinearVerbosity(SciMLLogging.All()) + @test integrator.cache.linsolve3.verbose == + LinearVerbosity(SciMLLogging.All()) + end + end + + @testset "Extrapolation Solvers" begin + @testset "ImplicitEulerExtrapolation with Detailed LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, ImplicitEulerExtrapolation(), verbose = verbose, dt = 1e-3) + + # Check that all linear solvers in the array have the correct verbosity + for ls in integrator.cache.linsolve + @test ls.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + end + + @testset "ImplicitEulerExtrapolation with Minimal LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Minimal()) + integrator = init(prob, ImplicitEulerExtrapolation(), verbose = verbose, dt = 1e-3) + + for ls in integrator.cache.linsolve + @test ls.verbose == LinearVerbosity(SciMLLogging.Minimal()) + end + end + + @testset "ImplicitDeuflhardExtrapolation with None LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.None()) + integrator = init(prob, ImplicitDeuflhardExtrapolation(), verbose = verbose, dt = 1e-3) + + for ls in integrator.cache.linsolve + @test ls.verbose == LinearVerbosity(SciMLLogging.None()) + end + end + + @testset "ImplicitHairerWannerExtrapolation with All LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.All()) + integrator = init(prob, ImplicitHairerWannerExtrapolation(), verbose = verbose, dt = 1e-3) + + for ls in integrator.cache.linsolve + @test ls.verbose == LinearVerbosity(SciMLLogging.All()) + end + end + end + + @testset "Preset Verbosity Levels" begin + @testset "Rosenbrock23 with Standard() preset (default linear_verbosity = Minimal)" begin + verbose = ODEVerbosity(SciMLLogging.Standard()) + integrator = init(prob, Rosenbrock23(), verbose = verbose, dt = 1e-3) + + # Standard() uses Minimal() for linear_verbosity + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Minimal()) + end + + @testset "RadauIIA3 with Detailed() preset" begin + verbose = ODEVerbosity(SciMLLogging.Detailed()) + integrator = init(prob, RadauIIA3(), verbose = verbose, dt = 1e-3) + + # Detailed() uses Detailed() for linear_verbosity + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + + end + end + + @testset "Nonlinear Verbosity Passthrough to Caches" begin + # Define a simple stiff test problem + function rober(du, u, p, t) + y₁, y₂, y₃ = u + k₁, k₂, k₃ = p + du[1] = -k₁ * y₁ + k₃ * y₂ * y₃ + du[2] = k₁ * y₁ - k₃ * y₂ * y₃ - k₂ * y₂^2 + du[3] = y₁ + y₂ + y₃ - 1 + nothing + end + u0 = [1.0, 0.0, 0.0] + tspan = (0.0, 1e-1) + p = [0.04, 3e7, 1e4] + prob = ODEProblem(rober, u0, tspan, p) + + @testset "ImplicitEuler with Detailed NonlinearVerbosity" begin + verbose = ODEVerbosity(nonlinear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, ImplicitEuler(nlsolve = NonlinearSolveAlg()), verbose = verbose, dt = 1e-3) + + # Check that the cache has an nlsolver field + @test hasproperty(integrator.cache, :nlsolver) + + # Check that the nlsolver has a cache field + @test hasproperty(integrator.cache.nlsolver, :cache) + + # Verify the verbosity was passed through correctly + @test integrator.cache.nlsolver.cache.cache.verbose == NonlinearVerbosity(SciMLLogging.Detailed()) + end + + end +end + + diff --git a/test/interface/verbosity_jet.jl b/test/interface/verbosity_jet.jl new file mode 100644 index 0000000000..4e1885cd4f --- /dev/null +++ b/test/interface/verbosity_jet.jl @@ -0,0 +1,99 @@ +using OrdinaryDiffEq +using OrdinaryDiffEqCore +using OrdinaryDiffEqCore: ODEVerbosity +import OrdinaryDiffEqCore.SciMLLogging as SciMLLogging +using JET +using Test + +@testset "JET Test ODEVerbosity Constructors" begin + @testset "Default constructor" begin + @test_opt ODEVerbosity() + end + + @testset "Preset constructors" begin + @test_opt ODEVerbosity(SciMLLogging.None()) + @test_opt ODEVerbosity(SciMLLogging.Minimal()) + @test_opt ODEVerbosity(SciMLLogging.Standard()) + @test_opt ODEVerbosity(SciMLLogging.Detailed()) + @test_opt ODEVerbosity(SciMLLogging.All()) + end + + @testset "Group-level keyword constructors" begin + @test_opt ODEVerbosity(error_control = SciMLLogging.ErrorLevel()) + @test_opt ODEVerbosity(numerical = SciMLLogging.Silent()) + @test_opt ODEVerbosity(performance = SciMLLogging.InfoLevel()) + @test_opt ODEVerbosity(error_control = SciMLLogging.WarnLevel()) + @test_opt ODEVerbosity(numerical = SciMLLogging.WarnLevel()) + @test_opt ODEVerbosity(performance = SciMLLogging.Silent()) + end + + @testset "Individual keyword arguments" begin + @test_opt ODEVerbosity(dt_NaN = SciMLLogging.ErrorLevel()) + @test_opt ODEVerbosity(alg_switch = SciMLLogging.InfoLevel()) + @test_opt ODEVerbosity(shampine_dt = SciMLLogging.Silent()) + @test_opt ODEVerbosity(init_NaN = SciMLLogging.WarnLevel()) + end + + @testset "Linear and nonlinear verbosity" begin + @test_opt ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + @test_opt ODEVerbosity(nonlinear_verbosity = SciMLLogging.Minimal()) + @test_opt ODEVerbosity(linear_verbosity = SciMLLogging.None()) + @test_opt ODEVerbosity(nonlinear_verbosity = SciMLLogging.All()) + @test_opt ODEVerbosity( + linear_verbosity = SciMLLogging.Detailed(), + nonlinear_verbosity = SciMLLogging.Minimal() + ) + @test_opt ODEVerbosity( + linear_verbosity = SciMLLogging.None(), + nonlinear_verbosity = SciMLLogging.All() + ) + end + + @testset "Mixed group and individual settings" begin + @test_opt ODEVerbosity( + numerical = SciMLLogging.Silent(), + shampine_dt = SciMLLogging.WarnLevel() + ) + @test_opt ODEVerbosity( + numerical = SciMLLogging.Silent(), + shampine_dt = SciMLLogging.WarnLevel(), + performance = SciMLLogging.InfoLevel() + ) + @test_opt ODEVerbosity( + error_control = SciMLLogging.WarnLevel(), + dt_NaN = SciMLLogging.ErrorLevel() + ) + end + + @testset "Multiple group settings" begin + @test_opt ODEVerbosity( + error_control = SciMLLogging.ErrorLevel(), + performance = SciMLLogging.InfoLevel(), + numerical = SciMLLogging.Silent() + ) + @test_opt ODEVerbosity( + error_control = SciMLLogging.WarnLevel(), + performance = SciMLLogging.Silent(), + numerical = SciMLLogging.WarnLevel() + ) + end + + @testset "Complex mixed settings" begin + @test_opt ODEVerbosity( + error_control = SciMLLogging.WarnLevel(), + performance = SciMLLogging.InfoLevel(), + numerical = SciMLLogging.Silent(), + linear_verbosity = SciMLLogging.Detailed(), + nonlinear_verbosity = SciMLLogging.Minimal(), + dt_NaN = SciMLLogging.ErrorLevel(), + shampine_dt = SciMLLogging.WarnLevel() + ) + @test_opt ODEVerbosity( + error_control = SciMLLogging.ErrorLevel(), + performance = SciMLLogging.Silent(), + numerical = SciMLLogging.WarnLevel(), + linear_verbosity = SciMLLogging.All(), + nonlinear_verbosity = SciMLLogging.None() + ) + end +end \ No newline at end of file diff --git a/test/modelingtoolkit/Project.toml b/test/modelingtoolkit/Project.toml index 857bbcab3f..1f49a2df63 100644 --- a/test/modelingtoolkit/Project.toml +++ b/test/modelingtoolkit/Project.toml @@ -14,4 +14,9 @@ ModelingToolkit = "10.10" NonlinearSolve = "4.10" OrdinaryDiffEqBDF = "1" OrdinaryDiffEqNonlinearSolve = "1" -OrdinaryDiffEqSDIRK = "1" \ No newline at end of file +OrdinaryDiffEqSDIRK = "1" + +[sources] +OrdinaryDiffEqBDF = {path = "../../lib/OrdinaryDiffEqBDF"} +OrdinaryDiffEqNonlinearSolve = {path = "../../lib/OrdinaryDiffEqNonlinearSolve"} +OrdinaryDiffEqSDIRK = {path = "../../lib/OrdinaryDiffEqSDIRK"} \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index 09c0af2144..934a938494 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -91,6 +91,8 @@ end @time @safetestset "No Jac Tests" include("interface/nojac.jl") @time @safetestset "Units Tests" include("interface/units_tests.jl") @time @safetestset "Non-Full Diagonal Sparsity Tests" include("interface/nonfulldiagonal_sparse.jl") + @time @safetestset "ODEVerbosity Tests" include("interface/verbosity.jl") + @time @safetestset "ODEVerbosity JET Tests" include("interface/verbosity_jet.jl") end if !is_APPVEYOR && (GROUP == "All" || GROUP == "InterfaceIV" || GROUP == "Interface")