From 5523da5166a31ffb80759fb1f64612cda60ce977 Mon Sep 17 00:00:00 2001 From: Dennis Ogiermann Date: Wed, 15 Mar 2023 00:01:36 +0100 Subject: [PATCH 1/2] Propagate verbosity flag to inner linear solvers. --- src/cache_utils.jl | 1 + src/caches/adams_bashforth_moulton_caches.jl | 68 ++++---- src/caches/basic_caches.jl | 22 +-- src/caches/bdf_caches.jl | 56 +++---- src/caches/dae_caches.jl | 24 +-- src/caches/extrapolation_caches.jl | 56 +++---- src/caches/feagin_caches.jl | 12 +- src/caches/firk_caches.jl | 8 +- src/caches/high_order_rk_caches.jl | 16 +- src/caches/kencarp_kvaerno_caches.jl | 64 ++++---- src/caches/linear_caches.jl | 68 ++++---- src/caches/linear_nonlinear_caches.jl | 40 ++--- src/caches/low_order_rk_caches.jl | 92 +++++------ src/caches/low_storage_rk_caches.jl | 164 +++++++++---------- src/caches/nordsieck_caches.jl | 8 +- src/caches/pdirk_caches.jl | 16 +- src/caches/prk_caches.jl | 4 +- src/caches/rkc_caches.jl | 28 ++-- src/caches/rkn_caches.jl | 58 +++---- src/caches/rosenbrock_caches.jl | 80 ++++----- src/caches/sdirk_caches.jl | 152 ++++++++--------- src/caches/ssprk_caches.jl | 76 ++++----- src/caches/symplectic_caches.jl | 68 ++++---- src/caches/verner_caches.jl | 16 +- src/generic_rosenbrock.jl | 6 +- src/nlsolve/utils.jl | 12 +- src/solve.jl | 4 +- 27 files changed, 610 insertions(+), 609 deletions(-) diff --git a/src/cache_utils.jl b/src/cache_utils.jl index 7baf1a073e..944e32e245 100644 --- a/src/cache_utils.jl +++ b/src/cache_utils.jl @@ -31,4 +31,5 @@ end reltol, p, calck, + false, Val(iip)) diff --git a/src/caches/adams_bashforth_moulton_caches.jl b/src/caches/adams_bashforth_moulton_caches.jl index 36b197fc1d..cd11862e18 100644 --- a/src/caches/adams_bashforth_moulton_caches.jl +++ b/src/caches/adams_bashforth_moulton_caches.jl @@ -18,7 +18,7 @@ end function alg_cache(alg::AB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) @@ -31,7 +31,7 @@ end function alg_cache(alg::AB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype @@ -58,7 +58,7 @@ end function alg_cache(alg::ABM32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) @@ -71,7 +71,7 @@ end function alg_cache(alg::ABM32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype @@ -103,7 +103,7 @@ end function alg_cache(alg::AB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) @@ -120,7 +120,7 @@ end function alg_cache(alg::AB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype @@ -156,7 +156,7 @@ end function alg_cache(alg::ABM43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) @@ -176,7 +176,7 @@ end function alg_cache(alg::ABM43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype @@ -210,7 +210,7 @@ end function alg_cache(alg::AB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) @@ -227,7 +227,7 @@ end function alg_cache(alg::AB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype @@ -266,7 +266,7 @@ end function alg_cache(alg::ABM54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) @@ -287,7 +287,7 @@ end function alg_cache(alg::ABM54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype @@ -335,7 +335,7 @@ end function alg_cache(alg::VCAB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) c = fill(zero(t), 3, 3) @@ -356,7 +356,7 @@ end function alg_cache(alg::VCAB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) bk1 = zero(rate_prototype) @@ -430,7 +430,7 @@ end function alg_cache(alg::VCAB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 4) c = fill(zero(t), 4, 4) @@ -451,7 +451,7 @@ end function alg_cache(alg::VCAB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) @@ -526,7 +526,7 @@ end function alg_cache(alg::VCAB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 5) c = fill(zero(t), 5, 5) @@ -547,7 +547,7 @@ end function alg_cache(alg::VCAB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) @@ -625,7 +625,7 @@ end function alg_cache(alg::VCABM3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) c = fill(zero(t), 4, 4) @@ -647,7 +647,7 @@ end function alg_cache(alg::VCABM3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) bk1 = zero(rate_prototype) @@ -729,7 +729,7 @@ end function alg_cache(alg::VCABM4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 4) c = fill(zero(t), 5, 5) @@ -752,7 +752,7 @@ end function alg_cache(alg::VCABM4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) @@ -833,7 +833,7 @@ end function alg_cache(alg::VCABM5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(t), 5) c = fill(zero(t), 6, 6) @@ -856,7 +856,7 @@ end function alg_cache(alg::VCABM5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) @@ -947,7 +947,7 @@ end function alg_cache(alg::VCABM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 13) c = fill(zero(t), 13, 13) @@ -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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k4 = zero(rate_prototype) @@ -1043,11 +1043,11 @@ end function alg_cache(alg::CNAB2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) k2 = rate_prototype uprev3 = u @@ -1058,11 +1058,11 @@ end function alg_cache(alg::CNAB2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) k1 = zero(rate_prototype) @@ -1100,11 +1100,11 @@ end function alg_cache(alg::CNLF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) k2 = rate_prototype uprev2 = u @@ -1116,11 +1116,11 @@ end function alg_cache(alg::CNLF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) k1 = zero(rate_prototype) diff --git a/src/caches/basic_caches.jl b/src/caches/basic_caches.jl index cc4ddf0810..1fdef044eb 100644 --- a/src/caches/basic_caches.jl +++ b/src/caches/basic_caches.jl @@ -25,38 +25,38 @@ end function alg_cache(alg::CompositeAlgorithm{Tuple{T1, T2}, F}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, - uprev2, f, t, dt, reltol, p, calck, + uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{V}) where {T1, T2, F, 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, verbose, Val(V)) CompositeCache(caches, alg.choice_function, 1) end function alg_cache(alg::CompositeAlgorithm, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{V}) where {V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} caches = (alg_cache(alg.algs[1], 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, verbose, Val(V)), alg_cache(alg.algs[2], 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, verbose, Val(V))) CompositeCache(caches, alg.choice_function, 1) end # map + closure approach doesn't infer @generated function __alg_cache(algs::T, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, - uprev2, f, t, dt, reltol, p, calck, + uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{V}) 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, verbose, Val($V))) end...) end @@ -70,7 +70,7 @@ end function alg_cache(alg::FunctionMap, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FunctionMapCache(u, uprev, FunctionMap_scale_by_time(alg) ? rate_prototype : @@ -81,7 +81,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FunctionMapConstantCache() end @@ -115,7 +115,7 @@ end function alg_cache(alg::ExplicitRK, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} kk = Vector{typeof(rate_prototype)}(undef, 0) for i in 1:(alg.tableau.stages) @@ -154,7 +154,7 @@ end function alg_cache(alg::ExplicitRK, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ExplicitRKConstantCache(alg.tableau, rate_prototype) end diff --git a/src/caches/bdf_caches.jl b/src/caches/bdf_caches.jl index 19793972cc..236ffbfbaf 100644 --- a/src/caches/bdf_caches.jl +++ b/src/caches/bdf_caches.jl @@ -8,11 +8,11 @@ end function alg_cache(alg::ABDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 2 // 3, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, verbose, Val(false)) eulercache = ImplicitEulerConstantCache(nlsolver) dtₙ₋₁ = one(dt) @@ -37,11 +37,11 @@ end function alg_cache(alg::ABDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 2 // 3, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, verbose, Val(true)) fsalfirst = zero(rate_prototype) fsalfirstprev = zero(rate_prototype) @@ -93,11 +93,11 @@ end function alg_cache(alg::SBDF, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) k2 = rate_prototype k₁ = rate_prototype @@ -116,11 +116,11 @@ end function alg_cache(alg::SBDF, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) order = alg.order @@ -168,11 +168,11 @@ end function alg_cache(alg::QNDF1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) uprev2 = u dtₙ₋₁ = zero(t) @@ -189,11 +189,11 @@ end function alg_cache(alg::QNDF1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) D = Array{typeof(u)}(undef, 1, 1) @@ -250,11 +250,11 @@ end function alg_cache(alg::QNDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) uprev2 = u uprev3 = u @@ -273,11 +273,11 @@ end function alg_cache(alg::QNDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) D = Array{typeof(u)}(undef, 1, 2) @@ -323,13 +323,13 @@ end function alg_cache(alg::QNDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits } where {MO} max_order = MO γ, c = one(eltype(alg.kappa)), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, verbose, Val(false)) dtprev = one(dt) D = Matrix{uEltypeNoUnits}(undef, length(u), max_order + 2) recursivefill!(D, zero(uEltypeNoUnits)) @@ -407,13 +407,13 @@ end function alg_cache(alg::QNDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits } where {MO} max_order = MO γ, c = one(eltype(alg.kappa)), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, verbose, Val(true)) fsalfirst = zero(rate_prototype) dd = zero(u) utilde = zero(u) @@ -466,11 +466,11 @@ end function alg_cache(alg::MEBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -489,11 +489,11 @@ end function alg_cache(alg::MEBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) MEBDF2ConstantCache(nlsolver) end @@ -523,13 +523,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits } 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, verbose, Val(false)) 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; @@ -617,14 +617,14 @@ end function alg_cache(alg::FBDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {MO, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, 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, verbose, Val(true)) 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/src/caches/dae_caches.jl b/src/caches/dae_caches.jl index c5477260b2..135bdcd729 100644 --- a/src/caches/dae_caches.jl +++ b/src/caches/dae_caches.jl @@ -15,26 +15,26 @@ 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, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, α, verbose, Val(false)) DImplicitEulerConstantCache(nlsolver) 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, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, α, verbose, Val(true)) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -53,12 +53,12 @@ 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, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 1, 1 α = 1 // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, verbose, Val(false)) eulercache = DImplicitEulerConstantCache(nlsolver) dtₙ₋₁ = one(dt) @@ -82,12 +82,12 @@ 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, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 1, 1 α = 1 // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, verbose, Val(true)) fsalfirst = zero(rate_prototype) fsalfirstprev = zero(rate_prototype) @@ -132,11 +132,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, verbose, ::Val{false}) 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, verbose, Val(false)) bdf_coeffs = SA[1 -1 0 0 0 0; 2//3 -4//3 1//3 0 0 0; 6//11 -18//11 9//11 -2//11 0 0; @@ -202,13 +202,13 @@ end function alg_cache(alg::DFBDF{MO}, du, u, res_prototype, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) #=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/src/caches/extrapolation_caches.jl b/src/caches/extrapolation_caches.jl index 37615f8e37..0793f54eb8 100644 --- a/src/caches/extrapolation_caches.jl +++ b/src/caches/extrapolation_caches.jl @@ -29,7 +29,7 @@ end function alg_cache(alg::AitkenNeville, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) utilde = zero(u) @@ -65,7 +65,7 @@ end function alg_cache(alg::AitkenNeville, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dtpropose = zero(dt) cur_order = max(alg.init_order, alg.min_order) @@ -146,7 +146,7 @@ end function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dtpropose = zero(dt) #cur_order = max(alg.init_order, alg.min_order) @@ -184,7 +184,7 @@ end function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_tmp = zero(u) u_tmps = Array{typeof(u_tmp), 1}(undef, Threads.nthreads()) @@ -255,7 +255,7 @@ function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, end linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) - linsolve1 = init(linprob, alg.linsolve, alias_A = true, alias_b = true) + linsolve1 = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -263,7 +263,7 @@ function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, linsolve[1] = linsolve1 for i in 2:Threads.nthreads() linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) - linsolve[i] = init(linprob, alg.linsolve, alias_A = true, alias_b = true) + linsolve[i] = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -273,7 +273,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, verbose, Val(false)) diff1 = Array{typeof(u), 1}(undef, Threads.nthreads()) diff2 = Array{typeof(u), 1}(undef, Threads.nthreads()) for i in 1:Threads.nthreads() @@ -889,7 +889,7 @@ end function alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. DiffEqBase.__init in solve.jl @@ -941,7 +941,7 @@ end function alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) @@ -971,7 +971,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, verbose, Val(false)) # Initialize cache ExtrapolationMidpointDeuflhardCache(utilde, u_temp1, u_temp2, u_temp3, u_temp4, tmp, T, res, fsalfirst, k, k_tmps, cc.Q, cc.n_curr, @@ -1039,7 +1039,7 @@ end function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. DiffEqBase.__init in solve.jl @@ -1081,7 +1081,7 @@ end function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} utilde = zero(u) u_temp1 = zero(u) @@ -1110,7 +1110,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, verbose, Val(false)) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -1142,7 +1142,7 @@ function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, end linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) - linsolve1 = init(linprob, alg.linsolve, alias_A = true, alias_b = true) + linsolve1 = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1150,7 +1150,7 @@ function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, linsolve[1] = linsolve1 for i in 2:Threads.nthreads() linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) - linsolve[i] = init(linprob, alg.linsolve, alias_A = true, alias_b = true) + linsolve[i] = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -1192,7 +1192,7 @@ end function alg_cache(alg::ExtrapolationMidpointHairerWanner, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. DiffEqBase.__init in solve.jl @@ -1253,7 +1253,7 @@ end function alg_cache(alg::ExtrapolationMidpointHairerWanner, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) @@ -1280,7 +1280,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, verbose, Val(false)) # Initialize the cache ExtrapolationMidpointHairerWannerCache(utilde, u_temp1, u_temp2, u_temp3, u_temp4, tmp, @@ -1313,7 +1313,7 @@ end function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. DiffEqBase.__init in solve.jl @@ -1410,7 +1410,7 @@ end function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) @@ -1437,7 +1437,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, verbose, Val(false)) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -1470,7 +1470,7 @@ function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, end linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) - linsolve1 = init(linprob, alg.linsolve, alias_A = true, alias_b = true) + linsolve1 = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1478,7 +1478,7 @@ function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, linsolve[1] = linsolve1 for i in 2:Threads.nthreads() linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) - linsolve[i] = init(linprob, alg.linsolve, alias_A = true, alias_b = true) + linsolve[i] = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -1526,7 +1526,7 @@ end function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. DiffEqBase.__init in solve.jl @@ -1606,7 +1606,7 @@ end function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) @@ -1633,7 +1633,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, verbose, Val(false)) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -1666,7 +1666,7 @@ function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype end linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) - linsolve1 = init(linprob, alg.linsolve, alias_A = true, alias_b = true) + linsolve1 = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1674,7 +1674,7 @@ function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype linsolve[1] = linsolve1 for i in 2:Threads.nthreads() linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) - linsolve[i] = init(linprob, alg.linsolve, alias_A = true, alias_b = true) + linsolve[i] = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end diff --git a/src/caches/feagin_caches.jl b/src/caches/feagin_caches.jl index 5d6156f60f..6f9f6d582d 100644 --- a/src/caches/feagin_caches.jl +++ b/src/caches/feagin_caches.jl @@ -27,7 +27,7 @@ end function alg_cache(alg::Feagin10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin10ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -58,7 +58,7 @@ end function alg_cache(alg::Feagin10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Feagin10ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -100,7 +100,7 @@ end function alg_cache(alg::Feagin12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -139,7 +139,7 @@ end function alg_cache(alg::Feagin12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Feagin12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -191,7 +191,7 @@ end function alg_cache(alg::Feagin14, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin14ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -242,7 +242,7 @@ end function alg_cache(alg::Feagin14, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Feagin14ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/src/caches/firk_caches.jl b/src/caches/firk_caches.jl index 9bf431ab7f..99dcb61f60 100644 --- a/src/caches/firk_caches.jl +++ b/src/caches/firk_caches.jl @@ -16,7 +16,7 @@ end function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) @@ -67,7 +67,7 @@ end function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) @@ -140,7 +140,7 @@ end function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) @@ -231,7 +231,7 @@ end function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) diff --git a/src/caches/high_order_rk_caches.jl b/src/caches/high_order_rk_caches.jl index 57a5d28aeb..ac7347feb0 100644 --- a/src/caches/high_order_rk_caches.jl +++ b/src/caches/high_order_rk_caches.jl @@ -25,7 +25,7 @@ end function alg_cache(alg::TanYam7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TanYam7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -49,7 +49,7 @@ end function alg_cache(alg::TanYam7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TanYam7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -93,7 +93,7 @@ end function alg_cache(alg::DP8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -134,7 +134,7 @@ end function alg_cache(alg::DP8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DP8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -169,7 +169,7 @@ end function alg_cache(alg::TsitPap8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TsitPap8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -196,7 +196,7 @@ end function alg_cache(alg::TsitPap8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TsitPap8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -231,7 +231,7 @@ end function alg_cache(alg::PFRK87, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = PFRK87ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -258,7 +258,7 @@ end function alg_cache(alg::PFRK87, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} PFRK87ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/src/caches/kencarp_kvaerno_caches.jl b/src/caches/kencarp_kvaerno_caches.jl index a806b42413..2eaf3a5174 100644 --- a/src/caches/kencarp_kvaerno_caches.jl +++ b/src/caches/kencarp_kvaerno_caches.jl @@ -5,12 +5,12 @@ end function alg_cache(alg::KenCarp3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) KenCarp3ConstantCache(nlsolver, tab) end @@ -35,12 +35,12 @@ end function alg_cache(alg::KenCarp3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) if typeof(f) <: SplitFunction @@ -73,12 +73,12 @@ end function alg_cache(alg::CFNLIRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) CFNLIRK3ConstantCache(nlsolver, tab) end @@ -103,12 +103,12 @@ end function alg_cache(alg::CFNLIRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) k1 = zero(u) @@ -133,12 +133,12 @@ end function alg_cache(alg::Kvaerno4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) Kvaerno4ConstantCache(nlsolver, tab) end @@ -159,12 +159,12 @@ end function alg_cache(alg::Kvaerno4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -185,12 +185,12 @@ end function alg_cache(alg::KenCarp4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) KenCarp4ConstantCache(nlsolver, tab) end @@ -234,12 +234,12 @@ end function alg_cache(alg::KenCarp4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) if typeof(f) <: SplitFunction @@ -279,12 +279,12 @@ end function alg_cache(alg::Kvaerno5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) Kvaerno5ConstantCache(nlsolver, tab) end @@ -308,12 +308,12 @@ end function alg_cache(alg::Kvaerno5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -336,12 +336,12 @@ end function alg_cache(alg::KenCarp5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) KenCarp5ConstantCache(nlsolver, tab) end @@ -374,12 +374,12 @@ end function alg_cache(alg::KenCarp5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) if typeof(f) <: SplitFunction @@ -424,12 +424,12 @@ end function alg_cache(alg::KenCarp47, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) KenCarp47ConstantCache(nlsolver, tab) end @@ -476,12 +476,12 @@ end function alg_cache(alg::KenCarp47, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) if typeof(f) <: SplitFunction @@ -523,12 +523,12 @@ end function alg_cache(alg::KenCarp58, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) KenCarp58ConstantCache(nlsolver, tab) end @@ -577,12 +577,12 @@ end function alg_cache(alg::KenCarp58, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) if typeof(f) <: SplitFunction diff --git a/src/caches/linear_caches.jl b/src/caches/linear_caches.jl index 90034bfbbf..a9c453b723 100644 --- a/src/caches/linear_caches.jl +++ b/src/caches/linear_caches.jl @@ -10,7 +10,7 @@ end function alg_cache(alg::MagnusMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -23,7 +23,7 @@ end function alg_cache(alg::MagnusMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusMidpointConstantCache() end @@ -40,7 +40,7 @@ end function alg_cache(alg::RKMK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -53,7 +53,7 @@ end function alg_cache(alg::RKMK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKMK2ConstantCache() end @@ -70,7 +70,7 @@ end function alg_cache(alg::LieRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -83,7 +83,7 @@ end function alg_cache(alg::LieRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LieRK4ConstantCache() end @@ -100,7 +100,7 @@ end function alg_cache(alg::CG3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -113,7 +113,7 @@ end function alg_cache(alg::CG3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CG3ConstantCache() end @@ -130,7 +130,7 @@ end function alg_cache(alg::CG2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -143,7 +143,7 @@ end function alg_cache(alg::CG2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CG2ConstantCache() end @@ -160,7 +160,7 @@ end function alg_cache(alg::RKMK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -173,7 +173,7 @@ end function alg_cache(alg::RKMK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKMK4ConstantCache() end @@ -193,7 +193,7 @@ end function alg_cache(alg::MagnusAdapt4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -210,7 +210,7 @@ end function alg_cache(alg::MagnusAdapt4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusAdapt4ConstantCache() end @@ -227,7 +227,7 @@ end function alg_cache(alg::MagnusNC8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -240,7 +240,7 @@ end function alg_cache(alg::MagnusNC8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusNC8ConstantCache() end @@ -257,7 +257,7 @@ end function alg_cache(alg::MagnusGL4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -270,7 +270,7 @@ end function alg_cache(alg::MagnusGL4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL4ConstantCache() end @@ -287,7 +287,7 @@ end function alg_cache(alg::MagnusGL8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -300,7 +300,7 @@ end function alg_cache(alg::MagnusGL8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL8ConstantCache() end @@ -317,7 +317,7 @@ end function alg_cache(alg::MagnusNC6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -330,7 +330,7 @@ end function alg_cache(alg::MagnusNC6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusNC6ConstantCache() end @@ -347,7 +347,7 @@ end function alg_cache(alg::MagnusGL6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -360,7 +360,7 @@ end function alg_cache(alg::MagnusGL6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL6ConstantCache() end @@ -376,7 +376,7 @@ end function alg_cache(alg::MagnusGauss4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -389,7 +389,7 @@ end function alg_cache(alg::MagnusGauss4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGauss4ConstantCache() end @@ -406,7 +406,7 @@ end function alg_cache(alg::LieEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -419,7 +419,7 @@ end function alg_cache(alg::LieEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LieEulerConstantCache() end @@ -435,7 +435,7 @@ end function alg_cache(alg::CayleyEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -447,7 +447,7 @@ end function alg_cache(alg::CayleyEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CayleyEulerConstantCache() end @@ -464,7 +464,7 @@ end function alg_cache(alg::MagnusLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) @@ -477,7 +477,7 @@ end function alg_cache(alg::MagnusLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusLeapfrogConstantCache() end @@ -486,7 +486,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, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LinearExponentialConstantCache() end @@ -501,7 +501,7 @@ end function alg_cache(alg::LinearExponential, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) rtmp = zero(rate_prototype) diff --git a/src/caches/linear_nonlinear_caches.jl b/src/caches/linear_nonlinear_caches.jl index d942c70647..8cf5b5ffab 100644 --- a/src/caches/linear_nonlinear_caches.jl +++ b/src/caches/linear_nonlinear_caches.jl @@ -74,7 +74,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, + uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if alg.krylov @@ -158,7 +158,7 @@ end function alg_cache(alg::LawsonEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -215,7 +215,7 @@ end function alg_cache(alg::NorsettEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -243,7 +243,7 @@ end function alg_cache(alg::ETDRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -273,7 +273,7 @@ end function alg_cache(alg::ETDRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -304,7 +304,7 @@ end function alg_cache(alg::ETDRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -338,7 +338,7 @@ end function alg_cache(alg::HochOst4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -375,7 +375,7 @@ for (Alg, Cache) in [(:Exp4, :Exp4ConstantCache), end @eval function alg_cache(alg::$Alg, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, - uprev2, f, t, dt, reltol, p, calck, + uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if DiffEqBase.has_jac(f) @@ -405,7 +405,7 @@ end end function alg_cache(alg::Exp4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -452,7 +452,7 @@ end end function alg_cache(alg::EPIRK4s3A, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -498,7 +498,7 @@ end end function alg_cache(alg::EPIRK4s3B, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -544,7 +544,7 @@ end end function alg_cache(alg::EPIRK5s3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -589,7 +589,7 @@ end end function alg_cache(alg::EXPRB53s3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -635,7 +635,7 @@ end end function alg_cache(alg::EPIRK5P1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -682,7 +682,7 @@ end end function alg_cache(alg::EPIRK5P2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -721,7 +721,7 @@ for (Alg, Cache) in [(:Exprb32, :Exprb32ConstantCache), end @eval function alg_cache(alg::$Alg, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, - uprev2, f, t, dt, reltol, p, calck, + uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if DiffEqBase.has_jac(f) @@ -789,7 +789,7 @@ end end function alg_cache(alg::Exprb32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -817,7 +817,7 @@ struct Exprb43Cache{uType, rateType, JCType, FType, JType, KsType} <: ExpRKCache end function alg_cache(alg::Exprb43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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 @@ -858,7 +858,7 @@ end function alg_cache(alg::ETD2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} A = size(f.f1.f) == () ? convert(Number, f.f1.f) : convert(AbstractMatrix, f.f1.f) Phi = phi(dt * A, 2) @@ -879,7 +879,7 @@ end function alg_cache(alg::ETD2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} A = size(f.f1.f) == () ? convert(Number, f.f1.f) : convert(AbstractMatrix, f.f1.f) Phi = phi(dt * A, 2) diff --git a/src/caches/low_order_rk_caches.jl b/src/caches/low_order_rk_caches.jl index a70e98417a..376f258c70 100644 --- a/src/caches/low_order_rk_caches.jl +++ b/src/caches/low_order_rk_caches.jl @@ -16,7 +16,7 @@ end function alg_cache(alg::SplitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SplitEulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end @@ -25,14 +25,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, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} EulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end @@ -41,7 +41,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} EulerConstantCache() end @@ -74,7 +74,7 @@ end function alg_cache(alg::Heun, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -84,7 +84,7 @@ end function alg_cache(alg::Ralston, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -96,7 +96,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} HeunConstantCache() end @@ -105,7 +105,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RalstonConstantCache() end @@ -127,7 +127,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -140,7 +140,7 @@ end function alg_cache(alg::Midpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MidpointConstantCache() end @@ -165,7 +165,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) @@ -181,7 +181,7 @@ end function alg_cache(alg::RK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RK4ConstantCache() end @@ -205,7 +205,7 @@ end function alg_cache(alg::BS3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -222,7 +222,7 @@ end function alg_cache(alg::BS3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -247,7 +247,7 @@ end function alg_cache(alg::OwrenZen3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -264,7 +264,7 @@ end function alg_cache(alg::OwrenZen3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -291,7 +291,7 @@ end function alg_cache(alg::OwrenZen4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -310,7 +310,7 @@ end function alg_cache(alg::OwrenZen4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -339,7 +339,7 @@ end function alg_cache(alg::OwrenZen5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -360,7 +360,7 @@ end function alg_cache(alg::OwrenZen5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -388,7 +388,7 @@ end function alg_cache(alg::BS5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -409,7 +409,7 @@ end function alg_cache(alg::BS5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} BS5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -490,7 +490,7 @@ end function alg_cache(alg::RK46NL, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -502,14 +502,14 @@ end function alg_cache(alg::RK46NL, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RK46NLConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::Tsit5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -547,7 +547,7 @@ end function alg_cache(alg::Tsit5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Tsit5ConstantCache() end @@ -577,7 +577,7 @@ end function alg_cache(alg::DP5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -610,7 +610,7 @@ end function alg_cache(alg::DP5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DP5ConstantCache() end @@ -634,7 +634,7 @@ end function alg_cache(alg::Anas5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Anas5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -653,7 +653,7 @@ end function alg_cache(alg::Anas5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Anas5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -713,7 +713,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_1 = zero(u) u_2 = zero(u) @@ -729,7 +729,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KYK2014DGSSPRK_3S2_ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -830,14 +830,14 @@ end function alg_cache(alg::RKO65, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) @@ -1092,14 +1092,14 @@ end function alg_cache(alg::FRK65, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = FRK65ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -1194,14 +1194,14 @@ end function alg_cache(alg::RKM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = RKMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k = zero(rate_prototype) @@ -1241,14 +1241,14 @@ end function alg_cache(alg::MSRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -1287,14 +1287,14 @@ end function alg_cache(alg::MSRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -1330,7 +1330,7 @@ end function alg_cache(alg::Stepanov5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Stepanov5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -1338,7 +1338,7 @@ end function alg_cache(alg::Stepanov5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -1377,14 +1377,14 @@ end function alg_cache(alg::SIR54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) diff --git a/src/caches/low_storage_rk_caches.jl b/src/caches/low_storage_rk_caches.jl index aac24187a9..e180f1ee57 100644 --- a/src/caches/low_storage_rk_caches.jl +++ b/src/caches/low_storage_rk_caches.jl @@ -45,7 +45,7 @@ end function alg_cache(alg::ORK256, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ORK256ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -66,7 +66,7 @@ end function alg_cache(alg::ORK256, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ORK256ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -96,7 +96,7 @@ end function alg_cache(alg::CarpenterKennedy2N54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = CarpenterKennedy2N54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -118,7 +118,7 @@ end function alg_cache(alg::CarpenterKennedy2N54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CarpenterKennedy2N54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -153,7 +153,7 @@ end function alg_cache(alg::SHLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SHLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -174,7 +174,7 @@ end function alg_cache(alg::SHLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SHLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -210,7 +210,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK73_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -232,7 +232,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK73_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -271,7 +271,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK84_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -293,7 +293,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK84_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -332,7 +332,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK84_FConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -354,7 +354,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK84_FConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -405,7 +405,7 @@ end function alg_cache(alg::NDBLSRK124, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK124ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -427,7 +427,7 @@ end function alg_cache(alg::NDBLSRK124, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK124ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -481,7 +481,7 @@ end function alg_cache(alg::NDBLSRK134, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK134ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -503,7 +503,7 @@ end function alg_cache(alg::NDBLSRK134, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK134ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -560,7 +560,7 @@ end function alg_cache(alg::NDBLSRK144, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK144ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -582,7 +582,7 @@ end function alg_cache(alg::NDBLSRK144, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK144ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -636,7 +636,7 @@ end function alg_cache(alg::CFRLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -653,7 +653,7 @@ end function alg_cache(alg::CFRLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CFRLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -689,7 +689,7 @@ end function alg_cache(alg::TSLDDRK74, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -705,7 +705,7 @@ end function alg_cache(alg::TSLDDRK74, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TSLDDRK74ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -766,7 +766,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -783,7 +783,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S32ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -850,7 +850,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S82, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -867,7 +867,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S82, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S82ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -916,7 +916,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -933,7 +933,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S53ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -1060,7 +1060,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S173, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -1077,7 +1077,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S173, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S173ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -1150,7 +1150,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S94, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -1167,7 +1167,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S94, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S94ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -1300,7 +1300,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S184, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -1317,7 +1317,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S184, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S184ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -1396,7 +1396,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S105, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -1413,7 +1413,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S105, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S105ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -1558,7 +1558,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S205, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -1575,7 +1575,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S205, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S205ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -1675,7 +1675,7 @@ end function alg_cache(alg::RDPK3Sp35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -1698,7 +1698,7 @@ end function alg_cache(alg::RDPK3Sp35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp35ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1803,7 +1803,7 @@ end function alg_cache(alg::RDPK3Sp49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -1826,7 +1826,7 @@ end function alg_cache(alg::RDPK3Sp49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp49ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1941,7 +1941,7 @@ end function alg_cache(alg::RDPK3Sp510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -1965,7 +1965,7 @@ end function alg_cache(alg::RDPK3Sp510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp510ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2066,7 +2066,7 @@ end function alg_cache(alg::RDPK3SpFSAL35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -2090,7 +2090,7 @@ end function alg_cache(alg::RDPK3SpFSAL35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL35ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2196,7 +2196,7 @@ end function alg_cache(alg::RDPK3SpFSAL49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -2220,7 +2220,7 @@ end function alg_cache(alg::RDPK3SpFSAL49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL49ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2336,7 +2336,7 @@ end function alg_cache(alg::RDPK3SpFSAL510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -2360,7 +2360,7 @@ end function alg_cache(alg::RDPK3SpFSAL510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL510ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2422,7 +2422,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -2442,7 +2442,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK43_2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2485,7 +2485,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -2505,7 +2505,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2572,7 +2572,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -2592,7 +2592,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4SConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2659,7 +2659,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -2679,7 +2679,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2746,7 +2746,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -2766,7 +2766,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4MConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2845,7 +2845,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -2868,7 +2868,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3C_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2916,7 +2916,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -2939,7 +2939,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3M_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2988,7 +2988,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -3011,7 +3011,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3N_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3081,7 +3081,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -3104,7 +3104,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4C_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3174,7 +3174,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -3197,7 +3197,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4M_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3267,7 +3267,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -3290,7 +3290,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4P_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3378,7 +3378,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -3403,7 +3403,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3N_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3453,7 +3453,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -3478,7 +3478,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3M_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3541,7 +3541,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -3566,7 +3566,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK65_4M_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3645,7 +3645,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -3670,7 +3670,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4FM_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -3786,7 +3786,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) @@ -3814,7 +3814,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK75_4M_5RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/src/caches/nordsieck_caches.jl b/src/caches/nordsieck_caches.jl index 4e0dc699be..d0becdff67 100644 --- a/src/caches/nordsieck_caches.jl +++ b/src/caches/nordsieck_caches.jl @@ -21,7 +21,7 @@ end function alg_cache(alg::AN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} N = 5 z = [zero(rate_prototype) for i in 1:(N + 1)] @@ -62,7 +62,7 @@ end function alg_cache(alg::AN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ################################################# # Tsit5 @@ -141,7 +141,7 @@ end function alg_cache(alg::JVODE, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} N = 12 z = [rate_prototype for i in 1:(N + 1)] @@ -205,7 +205,7 @@ end function alg_cache(alg::JVODE, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ################################################# # Tsit5 diff --git a/src/caches/pdirk_caches.jl b/src/caches/pdirk_caches.jl index 6a1d0cb518..37c29eed07 100644 --- a/src/caches/pdirk_caches.jl +++ b/src/caches/pdirk_caches.jl @@ -47,20 +47,20 @@ end function alg_cache(alg::PDIRK44, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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, + uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, verbose, Val(true)) nlsolver2 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, - uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, + uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, verbose, Val(true)) nlsolver = [nlsolver1, nlsolver2] else _nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, - uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, + uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, verbose, Val(true)) nlsolver = [_nlsolver] end @@ -72,20 +72,20 @@ end function alg_cache(alg::PDIRK44, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, verbose, Val(false)) nlsolver2 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, - uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, + uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, verbose, Val(false)) nlsolver = [nlsolver1, nlsolver2] else _nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, - uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, + uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, verbose, Val(false)) nlsolver = [_nlsolver] end diff --git a/src/caches/prk_caches.jl b/src/caches/prk_caches.jl index 1b951ff010..4c90679a4a 100644 --- a/src/caches/prk_caches.jl +++ b/src/caches/prk_caches.jl @@ -64,7 +64,7 @@ end function alg_cache(alg::KuttaPRK2p5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -83,7 +83,7 @@ end function alg_cache(alg::KuttaPRK2p5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KuttaPRK2p5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/src/caches/rkc_caches.jl b/src/caches/rkc_caches.jl index dea385ffd5..58e6412537 100644 --- a/src/caches/rkc_caches.jl +++ b/src/caches/rkc_caches.jl @@ -25,7 +25,7 @@ end function alg_cache(alg::ROCK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ROCK2ConstantCache(constvalue(uEltypeNoUnits), constvalue(tTypeNoUnits), u) @@ -41,7 +41,7 @@ end function alg_cache(alg::ROCK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ROCK2ConstantCache(uEltypeNoUnits, uEltypeNoUnits, u) end @@ -76,7 +76,7 @@ end function alg_cache(alg::ROCK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ROCK4ConstantCache(constvalue(uEltypeNoUnits), constvalue(tTypeNoUnits), u) @@ -93,7 +93,7 @@ end function alg_cache(alg::ROCK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ROCK4ConstantCache(constvalue(uEltypeNoUnits), constvalue(uEltypeNoUnits), u) end @@ -117,7 +117,7 @@ end function alg_cache(alg::RKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = RKCConstantCache(u) gprev = zero(u) @@ -132,7 +132,7 @@ end function alg_cache(alg::RKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKCConstantCache(u) end @@ -164,7 +164,7 @@ end function alg_cache(alg::IRKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -177,7 +177,7 @@ end function alg_cache(alg::IRKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -227,7 +227,7 @@ end function alg_cache(alg::ESERK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ESERK4ConstantCache(u) uᵢ = zero(u) @@ -244,7 +244,7 @@ end function alg_cache(alg::ESERK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ESERK4ConstantCache(u) end @@ -277,7 +277,7 @@ end function alg_cache(alg::ESERK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ESERK5ConstantCache(u) uᵢ = zero(u) @@ -294,7 +294,7 @@ end function alg_cache(alg::ESERK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ESERK5ConstantCache(u) end @@ -324,7 +324,7 @@ end function alg_cache(alg::SERK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = SERK2ConstantCache(u) uᵢ₋₁ = zero(u) @@ -340,7 +340,7 @@ end function alg_cache(alg::SERK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SERK2ConstantCache(u) end diff --git a/src/caches/rkn_caches.jl b/src/caches/rkn_caches.jl index dd39b3321f..f5c8429943 100644 --- a/src/caches/rkn_caches.jl +++ b/src/caches/rkn_caches.jl @@ -13,7 +13,7 @@ end function alg_cache(alg::Nystrom4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) @@ -29,12 +29,12 @@ struct Nystrom4ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Nystrom4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom4ConstantCache() end -# 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} = Nystrom4ConstantCache(constvalue(uBottomEltypeNoUnits),constvalue(tTypeNoUnits)) +# alg_cache(alg::Nystrom4,u,rate_prototype,::Type{uEltypeNoUnits},::Type{uBottomEltypeNoUnits},::Type{tTypeNoUnits},uprev,uprev2,f,t,dt,reltol,p,calck,verbose,::Val{false}) where {uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits} = Nystrom4ConstantCache(constvalue(uBottomEltypeNoUnits),constvalue(tTypeNoUnits)) @cache struct Nystrom4VelocityIndependentCache{uType, rateType, reducedRateType} <: OrdinaryDiffEqMutableCache @@ -49,7 +49,7 @@ end function alg_cache(alg::Nystrom4VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) @@ -64,7 +64,7 @@ struct Nystrom4VelocityIndependentConstantCache <: OrdinaryDiffEqConstantCache e function alg_cache(alg::Nystrom4VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom4VelocityIndependentConstantCache() end @@ -84,7 +84,7 @@ end function alg_cache(alg::IRKN3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) @@ -99,7 +99,7 @@ end function alg_cache(alg::IRKN3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} IRKN3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -120,7 +120,7 @@ end function alg_cache(alg::IRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) @@ -136,7 +136,7 @@ end function alg_cache(alg::IRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} IRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -156,7 +156,7 @@ end function alg_cache(alg::Nystrom5VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) @@ -172,7 +172,7 @@ end function alg_cache(alg::Nystrom5VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom5VelocityIndependentConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -195,7 +195,7 @@ end function alg_cache(alg::DPRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -213,7 +213,7 @@ end function alg_cache(alg::DPRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -237,7 +237,7 @@ end function alg_cache(alg::DPRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -257,7 +257,7 @@ end function alg_cache(alg::DPRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -281,7 +281,7 @@ end function alg_cache(alg::DPRKN6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -301,7 +301,7 @@ end function alg_cache(alg::DPRKN6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -325,7 +325,7 @@ end function alg_cache(alg::DPRKN6FM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN6FMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -345,7 +345,7 @@ end function alg_cache(alg::DPRKN6FM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN6FMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -372,7 +372,7 @@ end function alg_cache(alg::DPRKN8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -395,7 +395,7 @@ end function alg_cache(alg::DPRKN8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -430,7 +430,7 @@ end function alg_cache(alg::DPRKN12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -462,7 +462,7 @@ end function alg_cache(alg::DPRKN12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -484,7 +484,7 @@ end function alg_cache(alg::ERKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -502,7 +502,7 @@ end function alg_cache(alg::ERKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ERKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -524,7 +524,7 @@ end function alg_cache(alg::ERKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -542,7 +542,7 @@ end function alg_cache(alg::ERKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ERKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -567,7 +567,7 @@ end function alg_cache(alg::ERKN7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -588,7 +588,7 @@ end function alg_cache(alg::ERKN7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ERKN7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/src/caches/rosenbrock_caches.jl b/src/caches/rosenbrock_caches.jl index 9486fe3d0c..3e2216dfa3 100644 --- a/src/caches/rosenbrock_caches.jl +++ b/src/caches/rosenbrock_caches.jl @@ -85,7 +85,7 @@ end function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) @@ -111,7 +111,7 @@ function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W, _vec(linsolve_tmp); u0 = _vec(tmp)) Pl, Pr = wrapprecs(alg.precs(W, nothing, u, p, t, nothing, nothing, nothing, nothing)..., weight) - linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, + linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose, Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(Val(true))) @@ -128,7 +128,7 @@ end function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) @@ -155,7 +155,7 @@ function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, Pl, Pr = wrapprecs(alg.precs(W, nothing, u, p, t, nothing, nothing, nothing, nothing)..., weight) - linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, + linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose, Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(Val(true))) grad_config = build_grad_config(alg, f, tf, du1, t) @@ -186,13 +186,13 @@ end function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, uEltypeNoUnits, Val(false)) linprob = nothing #LinearProblem(W,copy(u); u0=copy(u)) - linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true) + linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true,verbose=verbose) Rosenbrock23ConstantCache(constvalue(uBottomEltypeNoUnits), tf, uf, J, W, linsolve, alg_autodiff(alg)) end @@ -215,13 +215,13 @@ end function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, uEltypeNoUnits, Val(false)) linprob = nothing #LinearProblem(W,copy(u); u0=copy(u)) - linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true) + linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true,verbose=verbose) Rosenbrock32ConstantCache(constvalue(uBottomEltypeNoUnits), tf, uf, J, W, linsolve, alg_autodiff(alg)) end @@ -273,7 +273,7 @@ end function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} du = zero(rate_prototype) du1 = zero(rate_prototype) @@ -298,7 +298,7 @@ function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W, _vec(linsolve_tmp); u0 = _vec(tmp)) Pl, Pr = wrapprecs(alg.precs(W, nothing, u, p, t, nothing, nothing, nothing, nothing)..., weight) - linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, + linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose, Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(Val(true))) grad_config = build_grad_config(alg, f, tf, du1, t) @@ -311,13 +311,13 @@ end function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, uEltypeNoUnits, Val(false)) linprob = nothing #LinearProblem(W,copy(u); u0=copy(u)) - linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true) + linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true,verbose=verbose) Rosenbrock33ConstantCache(tf, uf, ROS3PTableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)), J, W, linsolve) @@ -354,7 +354,7 @@ end function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} du = zero(rate_prototype) du1 = zero(rate_prototype) @@ -380,7 +380,7 @@ function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W, _vec(linsolve_tmp); u0 = _vec(tmp)) Pl, Pr = wrapprecs(alg.precs(W, nothing, u, p, t, nothing, nothing, nothing, nothing)..., weight) - linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, + linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose, Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(Val(true))) grad_config = build_grad_config(alg, f, tf, du1, t) @@ -403,13 +403,13 @@ end function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, uEltypeNoUnits, Val(false)) linprob = nothing #LinearProblem(W,copy(u); u0=copy(u)) - linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true) + linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true,verbose=verbose) Rosenbrock34ConstantCache(tf, uf, Rodas3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)), J, W, linsolve) @@ -479,7 +479,7 @@ end function alg_cache(alg::Rodas4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) @@ -509,7 +509,7 @@ function alg_cache(alg::Rodas4, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W, _vec(linsolve_tmp); u0 = _vec(tmp)) Pl, Pr = wrapprecs(alg.precs(W, nothing, u, p, t, nothing, nothing, nothing, nothing)..., weight) - linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, + linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose, Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(Val(true))) grad_config = build_grad_config(alg, f, tf, du1, t) @@ -548,13 +548,13 @@ end function alg_cache(alg::Rodas4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, uEltypeNoUnits, Val(false)) linprob = nothing #LinearProblem(W,copy(u); u0=copy(u)) - linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true) + linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true,verbose=verbose) Rodas4ConstantCache(tf, uf, Rodas4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)), J, W, linsolve, @@ -563,7 +563,7 @@ end function alg_cache(alg::Rodas42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) @@ -593,7 +593,7 @@ function alg_cache(alg::Rodas42, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W, _vec(linsolve_tmp); u0 = _vec(tmp)) Pl, Pr = wrapprecs(alg.precs(W, nothing, u, p, t, nothing, nothing, nothing, nothing)..., weight) - linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, + linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose, Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(Val(true))) grad_config = build_grad_config(alg, f, tf, du1, t) @@ -606,13 +606,13 @@ end function alg_cache(alg::Rodas42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, uEltypeNoUnits, Val(false)) linprob = nothing #LinearProblem(W,copy(u); u0=copy(u)) - linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true) + linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true,verbose=verbose) Rodas4ConstantCache(tf, uf, Rodas42Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)), J, W, linsolve, @@ -621,7 +621,7 @@ end function alg_cache(alg::Rodas4P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) @@ -651,7 +651,7 @@ function alg_cache(alg::Rodas4P, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W, _vec(linsolve_tmp); u0 = _vec(tmp)) Pl, Pr = wrapprecs(alg.precs(W, nothing, u, p, t, nothing, nothing, nothing, nothing)..., weight) - linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, + linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose, Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(Val(true))) grad_config = build_grad_config(alg, f, tf, du1, t) @@ -664,13 +664,13 @@ end function alg_cache(alg::Rodas4P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, uEltypeNoUnits, Val(false)) linprob = nothing #LinearProblem(W,copy(u); u0=copy(u)) - linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true) + linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true,verbose=verbose) Rodas4ConstantCache(tf, uf, Rodas4PTableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)), J, W, linsolve, @@ -679,7 +679,7 @@ end function alg_cache(alg::Rodas4P2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) @@ -709,7 +709,7 @@ function alg_cache(alg::Rodas4P2, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W, _vec(linsolve_tmp); u0 = _vec(tmp)) Pl, Pr = wrapprecs(alg.precs(W, nothing, u, p, t, nothing, nothing, nothing, nothing)..., weight) - linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, + linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose, Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(Val(true))) grad_config = build_grad_config(alg, f, tf, du1, t) @@ -722,13 +722,13 @@ end function alg_cache(alg::Rodas4P2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, uEltypeNoUnits, Val(false)) linprob = nothing #LinearProblem(W,copy(u); u0=copy(u)) - linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true) + linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true,verbose=verbose) Rodas4ConstantCache(tf, uf, Rodas4P2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)), J, W, linsolve, @@ -803,7 +803,7 @@ end function alg_cache(alg::Rodas5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) @@ -836,7 +836,7 @@ function alg_cache(alg::Rodas5, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W, _vec(linsolve_tmp); u0 = _vec(tmp)) Pl, Pr = wrapprecs(alg.precs(W, nothing, u, p, t, nothing, nothing, nothing, nothing)..., weight) - linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, + linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose, Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(Val(true))) grad_config = build_grad_config(alg, f, tf, du1, t) @@ -850,13 +850,13 @@ end function alg_cache(alg::Rodas5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, uEltypeNoUnits, Val(false)) linprob = nothing #LinearProblem(W,copy(u); u0=copy(u)) - linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true) + linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true,verbose=verbose) Rosenbrock5ConstantCache(tf, uf, Rodas5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)), J, W, linsolve) @@ -864,7 +864,7 @@ end function alg_cache(alg::Rodas5P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) @@ -897,7 +897,7 @@ function alg_cache(alg::Rodas5P, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W, _vec(linsolve_tmp); u0 = _vec(tmp)) Pl, Pr = wrapprecs(alg.precs(W, nothing, u, p, t, nothing, nothing, nothing, nothing)..., weight) - linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, + linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose, Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(Val(true))) grad_config = build_grad_config(alg, f, tf, du1, t) @@ -911,13 +911,13 @@ end function alg_cache(alg::Rodas5P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, uEltypeNoUnits, Val(false)) linprob = nothing #LinearProblem(W,copy(u); u0=copy(u)) - linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true) + linsolve = nothing #init(linprob,alg.linsolve,alias_A=true,alias_b=true,verbose=verbose) Rosenbrock5ConstantCache(tf, uf, Rodas5PTableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)), J, W, linsolve) diff --git a/src/caches/sdirk_caches.jl b/src/caches/sdirk_caches.jl index a80f867b84..24deb3c945 100644 --- a/src/caches/sdirk_caches.jl +++ b/src/caches/sdirk_caches.jl @@ -12,11 +12,11 @@ end function alg_cache(alg::ImplicitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) atmp = similar(u, uEltypeNoUnits) @@ -31,11 +31,11 @@ end function alg_cache(alg::ImplicitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) ImplicitEulerConstantCache(nlsolver) end @@ -45,11 +45,11 @@ end function alg_cache(alg::ImplicitMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) ImplicitMidpointConstantCache(nlsolver) end @@ -62,11 +62,11 @@ end function alg_cache(alg::ImplicitMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) ImplicitMidpointCache(u, uprev, fsalfirst, nlsolver) end @@ -79,11 +79,11 @@ end function alg_cache(alg::Trapezoid, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) uprev3 = u tprev2 = t @@ -105,11 +105,11 @@ end function alg_cache(alg::Trapezoid, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) uprev3 = zero(u) @@ -127,12 +127,12 @@ end function alg_cache(alg::TRBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) TRBDF2ConstantCache(nlsolver, tab) end @@ -150,12 +150,12 @@ end function alg_cache(alg::TRBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) atmp = similar(u, uEltypeNoUnits) @@ -172,11 +172,11 @@ end function alg_cache(alg::SDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) SDIRK2ConstantCache(nlsolver) end @@ -192,11 +192,11 @@ end function alg_cache(alg::SDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -216,7 +216,7 @@ end function alg_cache(alg::SDIRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{tTypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SDIRK22Tableau(constvalue(uBottomEltypeNoUnits)) uprev3 = u @@ -224,7 +224,7 @@ function alg_cache(alg::SDIRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, verbose, Val(false)) SDIRK22ConstantCache(uprev3, tprev2, nlsolver) end @@ -244,12 +244,12 @@ end function alg_cache(alg::SDIRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) uprev3 = zero(u) @@ -266,11 +266,11 @@ end function alg_cache(alg::SSPSDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) SSPSDIRK2ConstantCache(nlsolver) end @@ -285,11 +285,11 @@ end function alg_cache(alg::SSPSDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -307,12 +307,12 @@ end function alg_cache(alg::Kvaerno3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) Kvaerno3ConstantCache(nlsolver, tab) end @@ -332,12 +332,12 @@ end function alg_cache(alg::Kvaerno3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -357,12 +357,12 @@ end function alg_cache(alg::Cash4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) Cash4ConstantCache(nlsolver, tab) end @@ -382,12 +382,12 @@ end function alg_cache(alg::Cash4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -408,12 +408,12 @@ end function alg_cache(alg::SFSDIRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) SFSDIRK4ConstantCache(nlsolver, tab) end @@ -434,12 +434,12 @@ end function alg_cache(alg::SFSDIRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -460,12 +460,12 @@ end function alg_cache(alg::SFSDIRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) SFSDIRK5ConstantCache(nlsolver, tab) end @@ -487,12 +487,12 @@ end function alg_cache(alg::SFSDIRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -514,12 +514,12 @@ end function alg_cache(alg::SFSDIRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) SFSDIRK6ConstantCache(nlsolver, tab) end @@ -541,12 +541,12 @@ end function alg_cache(alg::SFSDIRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -568,12 +568,12 @@ end function alg_cache(alg::SFSDIRK7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) SFSDIRK7ConstantCache(nlsolver, tab) end @@ -596,12 +596,12 @@ end function alg_cache(alg::SFSDIRK7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -624,12 +624,12 @@ end function alg_cache(alg::SFSDIRK8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) SFSDIRK8ConstantCache(nlsolver, tab) end @@ -653,12 +653,12 @@ end function alg_cache(alg::SFSDIRK8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -682,7 +682,7 @@ end function alg_cache(alg::Union{Hairer4, Hairer42}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if alg isa Hairer4 tab = Hairer4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -691,7 +691,7 @@ function alg_cache(alg::Union{Hairer4, Hairer42}, u, rate_prototype, ::Type{uElt 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, verbose, Val(false)) Hairer4ConstantCache(nlsolver, tab) end @@ -712,7 +712,7 @@ end function alg_cache(alg::Union{Hairer4, Hairer42}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if alg isa Hairer4 tab = Hairer4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -721,7 +721,7 @@ function alg_cache(alg::Union{Hairer4, Hairer42}, u, rate_prototype, ::Type{uElt 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -755,12 +755,12 @@ end function alg_cache(alg::ESDIRK54I8L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -785,12 +785,12 @@ end function alg_cache(alg::ESDIRK54I8L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) ESDIRK54I8L2SAConstantCache(nlsolver, tab) end @@ -812,12 +812,12 @@ end function alg_cache(alg::ESDIRK436L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -840,12 +840,12 @@ end function alg_cache(alg::ESDIRK436L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) ESDIRK436L2SA2ConstantCache(nlsolver, tab) end @@ -868,12 +868,12 @@ end function alg_cache(alg::ESDIRK437L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -897,12 +897,12 @@ end function alg_cache(alg::ESDIRK437L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) ESDIRK437L2SAConstantCache(nlsolver, tab) end @@ -925,12 +925,12 @@ end function alg_cache(alg::ESDIRK547L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{true}) 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, verbose, Val(true)) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -954,11 +954,11 @@ end function alg_cache(alg::ESDIRK547L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, + uprev, uprev2, f, t, dt, reltol, p, calck, verbose, ::Val{false}) 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, verbose, Val(false)) ESDIRK547L2SA2ConstantCache(nlsolver, tab) end diff --git a/src/caches/ssprk_caches.jl b/src/caches/ssprk_caches.jl index 10c28c84f6..822072d173 100644 --- a/src/caches/ssprk_caches.jl +++ b/src/caches/ssprk_caches.jl @@ -13,7 +13,7 @@ struct SSPRK22ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -26,7 +26,7 @@ end function alg_cache(alg::SSPRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK22ConstantCache() end @@ -46,7 +46,7 @@ struct SSPRK33ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK33, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -59,7 +59,7 @@ end function alg_cache(alg::SSPRK33, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK33ConstantCache() end @@ -117,7 +117,7 @@ end function alg_cache(alg::KYKSSPRK42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -130,7 +130,7 @@ end function alg_cache(alg::KYKSSPRK42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KYKSSPRK42ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -188,7 +188,7 @@ end function alg_cache(alg::SSPRK53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -204,7 +204,7 @@ end function alg_cache(alg::SSPRK53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -257,14 +257,14 @@ end function alg_cache(alg::SHLDDRK52, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -362,14 +362,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, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -424,7 +424,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -440,7 +440,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_2N1ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -493,7 +493,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -509,7 +509,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_2N2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -565,7 +565,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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -581,7 +581,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, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_HConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -643,7 +643,7 @@ end function alg_cache(alg::SSPRK63, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₂ = zero(u) @@ -660,7 +660,7 @@ end function alg_cache(alg::SSPRK63, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK63ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -730,7 +730,7 @@ end function alg_cache(alg::SSPRK73, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₁ = zero(u) @@ -747,7 +747,7 @@ end function alg_cache(alg::SSPRK73, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK73ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -824,7 +824,7 @@ end function alg_cache(alg::SSPRK83, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₂ = zero(u) @@ -842,7 +842,7 @@ end function alg_cache(alg::SSPRK83, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK83ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -879,7 +879,7 @@ end function alg_cache(alg::SSPRK43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -897,7 +897,7 @@ end function alg_cache(alg::SSPRK43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK43ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -919,7 +919,7 @@ struct SSPRK432ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK432, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -936,7 +936,7 @@ end function alg_cache(alg::SSPRK432, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK432ConstantCache() end @@ -973,7 +973,7 @@ end function alg_cache(alg::SSPRKMSVS32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) dts = fill(zero(dt), 3) @@ -989,7 +989,7 @@ end function alg_cache(alg::SSPRKMSVS32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) dtf = fill(zero(dt), 2) @@ -1032,7 +1032,7 @@ end function alg_cache(alg::SSPRKMSVS43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) u_3 = zero(u) @@ -1049,7 +1049,7 @@ end function alg_cache(alg::SSPRKMSVS43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_3 = u u_2 = u @@ -1077,7 +1077,7 @@ struct SSPRK932ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK932, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck @@ -1094,7 +1094,7 @@ end function alg_cache(alg::SSPRK932, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK932ConstantCache() end @@ -1164,7 +1164,7 @@ end function alg_cache(alg::SSPRK54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u₂ = zero(u) u₃ = zero(u) @@ -1183,7 +1183,7 @@ end function alg_cache(alg::SSPRK54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1205,7 +1205,7 @@ struct SSPRK104ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK104, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -1221,7 +1221,7 @@ end function alg_cache(alg::SSPRK104, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK104ConstantCache() end diff --git a/src/caches/symplectic_caches.jl b/src/caches/symplectic_caches.jl index d215cc4697..1b0cc3ea76 100644 --- a/src/caches/symplectic_caches.jl +++ b/src/caches/symplectic_caches.jl @@ -8,7 +8,7 @@ end function alg_cache(alg::SymplecticEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SymplecticEulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end @@ -17,7 +17,7 @@ struct SymplecticEulerConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SymplecticEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SymplecticEulerConstantCache() end @@ -38,7 +38,7 @@ end function alg_cache(alg::VelocityVerlet, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(rate_prototype) k = zero(rate_prototype) @@ -49,7 +49,7 @@ end function alg_cache(alg::VelocityVerlet, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} VelocityVerletConstantCache(uEltypeNoUnits(1 // 2)) end @@ -65,7 +65,7 @@ end function alg_cache(alg::VerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -77,14 +77,14 @@ end function alg_cache(alg::VerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} VerletLeapfrogConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::PseudoVerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -96,7 +96,7 @@ end function alg_cache(alg::PseudoVerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} PseudoVerletLeapfrogConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -104,7 +104,7 @@ end function alg_cache(alg::McAte2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -115,7 +115,7 @@ end function alg_cache(alg::McAte2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -131,7 +131,7 @@ end function alg_cache(alg::Ruth3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -142,14 +142,14 @@ end function alg_cache(alg::Ruth3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -160,7 +160,7 @@ end function alg_cache(alg::McAte3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -176,7 +176,7 @@ end function alg_cache(alg::McAte4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -187,14 +187,14 @@ end function alg_cache(alg::McAte4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -205,7 +205,7 @@ end function alg_cache(alg::CandyRoz4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -221,7 +221,7 @@ end function alg_cache(alg::CalvoSanz4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -233,14 +233,14 @@ end function alg_cache(alg::CalvoSanz4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) 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, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -251,7 +251,7 @@ end function alg_cache(alg::McAte42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte42ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -267,7 +267,7 @@ end function alg_cache(alg::McAte5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -278,7 +278,7 @@ end function alg_cache(alg::McAte5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -294,7 +294,7 @@ end function alg_cache(alg::Yoshida6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -305,7 +305,7 @@ end function alg_cache(alg::Yoshida6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Yoshida6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -321,7 +321,7 @@ end function alg_cache(alg::KahanLi6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -332,7 +332,7 @@ end function alg_cache(alg::KahanLi6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KahanLi6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -348,7 +348,7 @@ end function alg_cache(alg::McAte8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -359,7 +359,7 @@ end function alg_cache(alg::McAte8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -375,7 +375,7 @@ end function alg_cache(alg::KahanLi8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -386,7 +386,7 @@ end function alg_cache(alg::KahanLi8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KahanLi8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -402,7 +402,7 @@ end function alg_cache(alg::SofSpa10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -413,7 +413,7 @@ end function alg_cache(alg::SofSpa10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SofSpa10ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/src/caches/verner_caches.jl b/src/caches/verner_caches.jl index a7f9d9c85f..e2421f5e43 100644 --- a/src/caches/verner_caches.jl +++ b/src/caches/verner_caches.jl @@ -39,7 +39,7 @@ end function alg_cache(alg::Vern6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -66,7 +66,7 @@ end function alg_cache(alg::Vern6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) Vern6ConstantCache(tab) @@ -113,7 +113,7 @@ end function alg_cache(alg::Vern7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -138,7 +138,7 @@ struct Vern7ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Vern7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Vern7ConstantCache() end @@ -188,7 +188,7 @@ end function alg_cache(alg::Vern8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -219,7 +219,7 @@ end function alg_cache(alg::Vern8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) Vern8ConstantCache(tab) @@ -272,7 +272,7 @@ end function alg_cache(alg::Vern9, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -304,7 +304,7 @@ struct Vern9ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Vern9, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, + dt, reltol, p, calck, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Vern9ConstantCache() end diff --git a/src/generic_rosenbrock.jl b/src/generic_rosenbrock.jl index 27672daf4f..985facc101 100644 --- a/src/generic_rosenbrock.jl +++ b/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,verbose,::Val{false}) tf = TimeDerivativeWrapper(f,u,p) uf = UDerivativeWrapper(f,t,p) J,W = build_J_W(alg,u,uprev,p,t,dt,f,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,verbose,::Val{true}) du = zero(rate_prototype) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -248,7 +248,7 @@ function gen_algcache(cacheexpr::Expr,constcachename::Symbol,algname::Symbol,tab uf = UJacobianWrapper(f,t,p) linsolve_tmp = zero(rate_prototype) linprob = LinearProblem(W,_vec(linsolve_tmp); u0=_vec(tmp)) - linsolve = init(linprob,alg.linsolve,alias_A=true,alias_b=true, + linsolve = init(linprob,alg.linsolve,alias_A=true,alias_b=true,verbose=verbose, Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), Pr = Diagonal(_vec(weight))) grad_config = build_grad_config(alg,f,tf,du1,t) diff --git a/src/nlsolve/utils.jl b/src/nlsolve/utils.jl index f940c261d5..64121d19b8 100644 --- a/src/nlsolve/utils.jl +++ b/src/nlsolve/utils.jl @@ -129,26 +129,26 @@ DiffEqBase.has_Wfact_t(f::DAEResidualDerivativeWrapper) = DiffEqBase.has_Wfact_t function build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, γ, c, + ::Type{tTypeNoUnits}, γ, c, verbose, iip) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, γ, c, 1, iip) + tTypeNoUnits, γ, c, 1, verbose, iip) end function build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, γ, c, α, + ::Type{tTypeNoUnits}, γ, c, α, verbose, iip) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} build_nlsolver(alg, alg.nlsolve, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, iip) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, verbose, iip) end function build_nlsolver(alg, nlalg::Union{NLFunctional, NLAnderson, NLNewton}, u, uprev, p, t, dt, f, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - γ, c, α, + γ, c, α, verbose, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} #TODO @@ -192,7 +192,7 @@ function build_nlsolver(alg, nlalg::Union{NLFunctional, NLAnderson, NLNewton}, u linprob = LinearProblem(W, _vec(k); u0 = _vec(dz)) Pl, Pr = wrapprecs(alg.precs(W, nothing, u, p, t, nothing, nothing, nothing, nothing)..., weight) - linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, + linsolve = init(linprob, alg.linsolve, alias_A = true, alias_b = true, verbose=verbose, Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(Val(true))) diff --git a/src/solve.jl b/src/solve.jl index f6b20db3e8..53250fbd91 100644 --- a/src/solve.jl +++ b/src/solve.jl @@ -317,11 +317,11 @@ function DiffEqBase.__init(prob::Union{DiffEqBase.AbstractODEProblem, 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, verbose, Val(isinplace(prob))) else cache = alg_cache(_alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol_internal, p, calck, - Val(isinplace(prob))) + verbose, Val(isinplace(prob))) end # Setting up the step size controller From 59579b8fb30287386dead2bfc05046c231996773 Mon Sep 17 00:00:00 2001 From: Dennis Ogiermann Date: Wed, 15 Mar 2023 00:16:21 +0100 Subject: [PATCH 2/2] Forgot one. --- src/nlsolve/utils.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nlsolve/utils.jl b/src/nlsolve/utils.jl index 64121d19b8..324a871239 100644 --- a/src/nlsolve/utils.jl +++ b/src/nlsolve/utils.jl @@ -232,7 +232,7 @@ function build_nlsolver(alg, nlalg::Union{NLFunctional, NLAnderson, NLNewton}, u t, dt, f, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - γ, c, α, + γ, c, α, verbose, ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} #TODO