From eaf751ce4e7f624af65c71898d453057a284d86f Mon Sep 17 00:00:00 2001 From: Yingbo Ma Date: Sun, 29 Oct 2023 00:12:54 -0400 Subject: [PATCH] New formatter --- src/alg_utils.jl | 138 +-- src/algorithms.jl | 512 +++++------ src/algorithms/explicit_rk.jl | 12 +- src/algorithms/explicit_rk_pde.jl | 22 +- src/caches/adams_bashforth_moulton_caches.jl | 180 ++-- src/caches/basic_caches.jl | 48 +- src/caches/bdf_caches.jl | 92 +- src/caches/dae_caches.jl | 36 +- src/caches/extrapolation_caches.jl | 102 +-- src/caches/feagin_caches.jl | 36 +- src/caches/firk_caches.jl | 24 +- src/caches/high_order_rk_caches.jl | 48 +- src/caches/kencarp_kvaerno_caches.jl | 96 +-- src/caches/linear_caches.jl | 208 ++--- src/caches/linear_nonlinear_caches.jl | 132 +-- src/caches/low_order_rk_caches.jl | 312 +++---- src/caches/low_storage_rk_caches.jl | 492 +++++------ src/caches/nordsieck_caches.jl | 24 +- src/caches/pdirk_caches.jl | 12 +- src/caches/prk_caches.jl | 12 +- src/caches/rkc_caches.jl | 84 +- src/caches/rkn_caches.jl | 192 ++--- src/caches/rosenbrock_caches.jl | 120 +-- src/caches/sdirk_caches.jl | 244 +++--- src/caches/ssprk_caches.jl | 228 ++--- src/caches/symplectic_caches.jl | 204 ++--- src/caches/verner_caches.jl | 48 +- src/composite_algs.jl | 6 +- src/dense/generic_dense.jl | 80 +- src/dense/high_order_rk_addsteps.jl | 8 +- src/dense/interpolants.jl | 792 +++++++++--------- src/dense/low_order_rk_addsteps.jl | 76 +- src/dense/rosenbrock_interpolants.jl | 130 +-- src/dense/stiff_addsteps.jl | 42 +- src/dense/verner_addsteps.jl | 40 +- src/derivative_utils.jl | 42 +- src/derivative_wrappers.jl | 28 +- src/initdt.jl | 18 +- src/initialize_dae.jl | 30 +- src/integrators/controllers.jl | 72 +- src/integrators/integrator_interface.jl | 86 +- src/integrators/integrator_utils.jl | 28 +- src/integrators/type.jl | 54 +- src/interp_func.jl | 146 ++-- src/misc_utils.jl | 6 +- src/nlsolve/functional.jl | 18 +- src/nlsolve/newton.jl | 22 +- src/nlsolve/nlsolve.jl | 4 +- src/nlsolve/type.jl | 10 +- src/nlsolve/utils.jl | 40 +- .../adams_bashforth_moulton_perform_step.jl | 24 +- src/perform_step/bdf_perform_step.jl | 8 +- src/perform_step/composite_perform_step.jl | 4 +- src/perform_step/dae_perform_step.jl | 6 +- src/perform_step/explicit_rk_perform_step.jl | 10 +- .../extrapolation_perform_step.jl | 26 +- src/perform_step/feagin_rk_perform_step.jl | 6 +- src/perform_step/firk_perform_step.jl | 2 +- .../fixed_timestep_perform_step.jl | 8 +- .../high_order_rk_perform_step.jl | 2 +- .../kencarp_kvaerno_perform_step.jl | 58 +- src/perform_step/linear_perform_step.jl | 4 +- src/perform_step/low_order_rk_perform_step.jl | 10 +- .../low_storage_rk_perform_step.jl | 20 +- src/perform_step/prk_perform_step.jl | 2 +- src/perform_step/rkn_perform_step.jl | 16 +- src/perform_step/rosenbrock_perform_step.jl | 32 +- src/perform_step/sdirk_perform_step.jl | 106 +-- src/perform_step/split_perform_step.jl | 2 +- src/perform_step/ssprk_perform_step.jl | 20 +- src/perform_step/symplectic_perform_step.jl | 32 +- src/solve.jl | 132 +-- src/tableaus/low_order_rk_tableaus.jl | 10 +- src/tableaus/rkn_tableaus.jl | 2 +- src/tableaus/verner_tableaus.jl | 12 +- test/downstream/autodiff_events.jl | 2 +- test/integrators/callback_allocation_tests.jl | 20 +- test/integrators/dae_initialization_tests.jl | 4 +- test/integrators/ode_event_tests.jl | 6 +- test/interface/noindex_tests.jl | 4 +- test/regression/ode_dense_tests.jl | 2 +- .../psos_and_energy_conservation.jl | 2 +- test/runtests.jl | 6 +- 83 files changed, 3019 insertions(+), 3017 deletions(-) diff --git a/src/alg_utils.jl b/src/alg_utils.jl index 17d0fe95a6..f89ab4bc7f 100644 --- a/src/alg_utils.jl +++ b/src/alg_utils.jl @@ -1,22 +1,22 @@ ## SciMLBase Trait Definitions function SciMLBase.isautodifferentiable(alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm, - FunctionMap}) + FunctionMap}) true end function SciMLBase.allows_arbitrary_number_types(alg::Union{OrdinaryDiffEqAlgorithm, - DAEAlgorithm, FunctionMap}) + DAEAlgorithm, FunctionMap}) true end function SciMLBase.allowscomplex(alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm, - FunctionMap}) + FunctionMap}) true end SciMLBase.isdiscrete(alg::FunctionMap) = true function SciMLBase.forwarddiffs_model(alg::Union{OrdinaryDiffEqAdaptiveImplicitAlgorithm, - DAEAlgorithm, - OrdinaryDiffEqImplicitAlgorithm, - ExponentialAlgorithm}) + DAEAlgorithm, + OrdinaryDiffEqImplicitAlgorithm, + ExponentialAlgorithm}) alg_autodiff(alg) isa AutoForwardDiff end SciMLBase.forwarddiffs_model_time(alg::RosenbrockAlgorithm) = true @@ -104,7 +104,7 @@ issplit(alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm}) = false issplit(alg::SplitAlgorithms) = true function _composite_beta1_default(algs::Tuple{T1, T2}, current, ::Val{QT}, - beta2) where {T1, T2, QT} + beta2) where {T1, T2, QT} if current == 1 return QT(beta1_default(algs[1], beta2)) else @@ -113,7 +113,7 @@ function _composite_beta1_default(algs::Tuple{T1, T2}, current, ::Val{QT}, end @generated function _composite_beta1_default(algs::T, current, ::Val{QT}, - beta2) where {T <: Tuple, QT} + beta2) where {T <: Tuple, QT} expr = Expr(:block) for i in 1:length(T.types) push!(expr.args, quote @@ -126,7 +126,7 @@ end end function _composite_beta2_default(algs::Tuple{T1, T2}, current, - ::Val{QT}) where {T1, T2, QT} + ::Val{QT}) where {T1, T2, QT} if current == 1 return QT(beta2_default(algs[1])) else @@ -135,7 +135,7 @@ function _composite_beta2_default(algs::Tuple{T1, T2}, current, end @generated function _composite_beta2_default(algs::T, current, - ::Val{QT}) where {T <: Tuple, QT} + ::Val{QT}) where {T <: Tuple, QT} expr = Expr(:block) for i in 1:length(T.types) push!(expr.args, quote @@ -165,7 +165,7 @@ isimplicit(alg::CompositeAlgorithm) = any(isimplicit.(alg.algs)) isdtchangeable(alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm}) = true isdtchangeable(alg::CompositeAlgorithm) = all(isdtchangeable.(alg.algs)) function isdtchangeable(alg::Union{LawsonEuler, NorsettEuler, LieEuler, MagnusGauss4, - CayleyEuler, ETDRK2, ETDRK3, ETDRK4, HochOst4, ETD2}) + CayleyEuler, ETDRK2, ETDRK3, ETDRK4, HochOst4, ETD2}) false end # due to caching @@ -204,10 +204,10 @@ get_chunksize(alg::OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD}) where {CS, A get_chunksize(alg::OrdinaryDiffEqImplicitAlgorithm{CS, AD}) where {CS, AD} = Val(CS) get_chunksize(alg::DAEAlgorithm{CS, AD}) where {CS, AD} = Val(CS) function get_chunksize(alg::Union{OrdinaryDiffEqExponentialAlgorithm{CS, AD}, - OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD}}) where { - CS, - AD, -} + OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD}}) where { + CS, + AD, + } Val(CS) end @@ -218,22 +218,22 @@ get_chunksize_int(alg::OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD}) where {C get_chunksize_int(alg::OrdinaryDiffEqImplicitAlgorithm{CS, AD}) where {CS, AD} = CS get_chunksize_int(alg::DAEAlgorithm{CS, AD}) where {CS, AD} = CS function get_chunksize_int(alg::Union{OrdinaryDiffEqExponentialAlgorithm{CS, AD}, - OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD}}) where { - CS, - AD, -} + OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD}}) where { + CS, + AD, + } CS end # get_chunksize(alg::CompositeAlgorithm) = get_chunksize(alg.algs[alg.current_alg]) function DiffEqBase.prepare_alg(alg::Union{ - OrdinaryDiffEqAdaptiveImplicitAlgorithm{0, AD, - FDT}, - OrdinaryDiffEqImplicitAlgorithm{0, AD, FDT}, - DAEAlgorithm{0, AD, FDT}, - OrdinaryDiffEqExponentialAlgorithm{0, AD, FDT}}, - u0::AbstractArray{T}, - p, prob) where {AD, FDT, T} + OrdinaryDiffEqAdaptiveImplicitAlgorithm{0, AD, + FDT}, + OrdinaryDiffEqImplicitAlgorithm{0, AD, FDT}, + DAEAlgorithm{0, AD, FDT}, + OrdinaryDiffEqExponentialAlgorithm{0, AD, FDT}}, + u0::AbstractArray{T}, + p, prob) where {AD, FDT, T} if alg isa OrdinaryDiffEqExponentialAlgorithm linsolve = nothing elseif alg.linsolve === nothing @@ -305,9 +305,9 @@ end # Linear Exponential doesn't have any of the AD stuff function DiffEqBase.prepare_alg(alg::Union{ETD2, SplitEuler, LinearExponential, - OrdinaryDiffEqLinearExponentialAlgorithm}, - u0::AbstractArray, - p, prob) + OrdinaryDiffEqLinearExponentialAlgorithm}, + u0::AbstractArray, + p, prob) alg end @@ -329,10 +329,10 @@ _alg_autodiff(::OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD}) where {CS, AD} _alg_autodiff(::DAEAlgorithm{CS, AD}) where {CS, AD} = Val{AD}() _alg_autodiff(::OrdinaryDiffEqImplicitAlgorithm{CS, AD}) where {CS, AD} = Val{AD}() function _alg_autodiff(::Union{OrdinaryDiffEqExponentialAlgorithm{CS, AD}, - OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD}, -}) where { - CS, AD, -} + OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD}, + }) where { + CS, AD, + } Val{AD}() end @@ -356,38 +356,38 @@ function get_current_alg_autodiff(alg::CompositeAlgorithm, cache) end function alg_difftype(alg::Union{ - OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD, FDT, ST, CJ - }, - OrdinaryDiffEqImplicitAlgorithm{CS, AD, FDT, ST, CJ}, - OrdinaryDiffEqExponentialAlgorithm{CS, AD, FDT, ST, CJ}, - OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD, FDT, ST, - CJ}, - DAEAlgorithm{CS, AD, FDT, ST, CJ}}) where {CS, AD, FDT, ST, - CJ} + OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD, FDT, ST, CJ + }, + OrdinaryDiffEqImplicitAlgorithm{CS, AD, FDT, ST, CJ}, + OrdinaryDiffEqExponentialAlgorithm{CS, AD, FDT, ST, CJ}, + OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD, FDT, ST, + CJ}, + DAEAlgorithm{CS, AD, FDT, ST, CJ}}) where {CS, AD, FDT, ST, + CJ} FDT end function standardtag(alg::Union{ - OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD, FDT, ST, CJ - }, - OrdinaryDiffEqImplicitAlgorithm{CS, AD, FDT, ST, CJ}, - OrdinaryDiffEqExponentialAlgorithm{CS, AD, FDT, ST, CJ}, - OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD, FDT, ST, - CJ}, - DAEAlgorithm{CS, AD, FDT, ST, CJ}}) where {CS, AD, FDT, ST, - CJ} + OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD, FDT, ST, CJ + }, + OrdinaryDiffEqImplicitAlgorithm{CS, AD, FDT, ST, CJ}, + OrdinaryDiffEqExponentialAlgorithm{CS, AD, FDT, ST, CJ}, + OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD, FDT, ST, + CJ}, + DAEAlgorithm{CS, AD, FDT, ST, CJ}}) where {CS, AD, FDT, ST, + CJ} ST end function concrete_jac(alg::Union{ - OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD, FDT, ST, CJ - }, - OrdinaryDiffEqImplicitAlgorithm{CS, AD, FDT, ST, CJ}, - OrdinaryDiffEqExponentialAlgorithm{CS, AD, FDT, ST, CJ}, - OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD, FDT, ST, - CJ}, - DAEAlgorithm{CS, AD, FDT, ST, CJ}}) where {CS, AD, FDT, ST, - CJ} + OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD, FDT, ST, CJ + }, + OrdinaryDiffEqImplicitAlgorithm{CS, AD, FDT, ST, CJ}, + OrdinaryDiffEqExponentialAlgorithm{CS, AD, FDT, ST, CJ}, + OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD, FDT, ST, + CJ}, + DAEAlgorithm{CS, AD, FDT, ST, CJ}}) where {CS, AD, FDT, ST, + CJ} CJ end @@ -425,11 +425,11 @@ get_current_alg_order(alg::FBDF, cache) = cache.order get_current_adaptive_order(alg::QNDF, cache) = cache.order get_current_adaptive_order(alg::FBDF, cache) = cache.order function get_current_adaptive_order(alg::OrdinaryDiffEqExtrapolationVarOrderVarStepAlgorithm, - cache) + cache) cache.cur_order end function get_current_alg_order(alg::OrdinaryDiffEqExtrapolationVarOrderVarStepAlgorithm, - cache) + cache) cache.cur_order end get_current_alg_order(alg::ExtrapolationMidpointDeuflhard, cache) = 2(cache.n_curr + 1) @@ -449,7 +449,7 @@ end #alg_adaptive_order(alg::OrdinaryDiffEqAdaptiveAlgorithm) = error("Algorithm is adaptive with no order") function get_current_adaptive_order(alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm}, - cache) + cache) alg_adaptive_order(alg) end function get_current_adaptive_order(alg::CompositeAlgorithm, cache) @@ -781,12 +781,12 @@ function default_controller(alg, cache, qoldinit, _beta1 = nothing, _beta2 = not end function default_controller(alg::Union{ExtrapolationMidpointDeuflhard, - ImplicitDeuflhardExtrapolation, - ExtrapolationMidpointHairerWanner, - ImplicitHairerWannerExtrapolation, - ImplicitEulerExtrapolation, - ImplicitEulerBarycentricExtrapolation}, cache, - qoldinit, _beta1 = nothing, _beta2 = nothing) + ImplicitDeuflhardExtrapolation, + ExtrapolationMidpointHairerWanner, + ImplicitHairerWannerExtrapolation, + ImplicitEulerExtrapolation, + ImplicitEulerBarycentricExtrapolation}, cache, + qoldinit, _beta1 = nothing, _beta2 = nothing) QT = typeof(qoldinit) beta1, beta2 = _digest_beta1_beta2(alg, cache, Val(QT), _beta1, _beta2) return ExtrapolationController(beta1) @@ -1058,9 +1058,9 @@ isWmethod(alg::RosenbrockW6S4OS) = true isesdirk(alg::TRBDF2) = true function isesdirk(alg::Union{KenCarp3, KenCarp4, KenCarp5, KenCarp58, - Kvaerno3, Kvaerno4, Kvaerno5, ESDIRK437L2SA, - ESDIRK54I8L2SA, ESDIRK436L2SA2, ESDIRK547L2SA2, - ESDIRK659L2SA, CFNLIRK3}) + Kvaerno3, Kvaerno4, Kvaerno5, ESDIRK437L2SA, + ESDIRK54I8L2SA, ESDIRK436L2SA2, ESDIRK547L2SA2, + ESDIRK659L2SA, CFNLIRK3}) true end isesdirk(alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm}) = false diff --git a/src/algorithms.jl b/src/algorithms.jl index a8959e0606..2d1bde911a 100644 --- a/src/algorithms.jl +++ b/src/algorithms.jl @@ -59,12 +59,12 @@ function DiffEqBase.remake(thing::OrdinaryDiffEqAlgorithm; kwargs...) end function DiffEqBase.remake(thing::Union{ - OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD, FDT, - ST, CJ}, - OrdinaryDiffEqImplicitAlgorithm{CS, AD, FDT, ST, CJ - }, - DAEAlgorithm{CS, AD, FDT, ST, CJ}}; - linsolve, kwargs...) where {CS, AD, FDT, ST, CJ} + OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD, FDT, + ST, CJ}, + OrdinaryDiffEqImplicitAlgorithm{CS, AD, FDT, ST, CJ + }, + DAEAlgorithm{CS, AD, FDT, ST, CJ}}; + linsolve, kwargs...) where {CS, AD, FDT, ST, CJ} T = SciMLBase.remaker_of(thing) T(; SciMLBase.struct_as_namedtuple(thing)..., chunk_size = Val{CS}(), autodiff = Val{AD}(), standardtag = Val{ST}(), @@ -116,11 +116,11 @@ struct ImplicitEulerExtrapolation{CS, AD, F, P, FDT, ST, CJ, TO} <: end function ImplicitEulerExtrapolation(; chunk_size = Val{0}(), autodiff = true, - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, linsolve = nothing, - precs = DEFAULT_PRECS, - max_order = 12, min_order = 3, init_order = 5, - threading = false, sequence = :harmonic) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, linsolve = nothing, + precs = DEFAULT_PRECS, + max_order = 12, min_order = 3, init_order = 5, + threading = false, sequence = :harmonic) linsolve = (linsolve === nothing && (threading == true || threading isa PolyesterThreads)) ? RFLUFactorization(; thread = Val(false)) : linsolve @@ -169,8 +169,8 @@ struct ExtrapolationMidpointDeuflhard{TO} <: sequence_factor::Int # An even factor by which sequence is scaled for midpoint extrapolation end function ExtrapolationMidpointDeuflhard(; min_order = 1, init_order = 5, max_order = 10, - sequence = :harmonic, threading = true, - sequence_factor = 2) + sequence = :harmonic, threading = true, + sequence_factor = 2) # Enforce 1 <= min_order <= init_order <= max_order: min_order = max(1, min_order) init_order = max(min_order, init_order) @@ -223,11 +223,11 @@ struct ImplicitDeuflhardExtrapolation{CS, AD, F, P, FDT, ST, CJ, TO} <: threading::TO end function ImplicitDeuflhardExtrapolation(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - linsolve = nothing, precs = DEFAULT_PRECS, - diff_type = Val{:forward}, - min_order = 1, init_order = 5, max_order = 10, - sequence = :harmonic, threading = false) + standardtag = Val{true}(), concrete_jac = nothing, + linsolve = nothing, precs = DEFAULT_PRECS, + diff_type = Val{:forward}, + min_order = 1, init_order = 5, max_order = 10, + sequence = :harmonic, threading = false) # Enforce 1 <= min_order <= init_order <= max_order: min_order = max(1, min_order) init_order = max(min_order, init_order) @@ -280,8 +280,8 @@ struct ExtrapolationMidpointHairerWanner{TO} <: sequence_factor::Int # An even factor by which sequence is scaled for midpoint extrapolation end function ExtrapolationMidpointHairerWanner(; min_order = 2, init_order = 5, max_order = 10, - sequence = :harmonic, threading = true, - sequence_factor = 2) + sequence = :harmonic, threading = true, + sequence_factor = 2) # Enforce 2 <= min_order # and min_order + 1 <= init_order <= max_order - 1: min_order = max(2, min_order) @@ -336,12 +336,12 @@ struct ImplicitHairerWannerExtrapolation{CS, AD, F, P, FDT, ST, CJ, TO} <: end function ImplicitHairerWannerExtrapolation(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), - concrete_jac = nothing, - linsolve = nothing, precs = DEFAULT_PRECS, - diff_type = Val{:forward}, - min_order = 2, init_order = 5, max_order = 10, - sequence = :harmonic, threading = false) + standardtag = Val{true}(), + concrete_jac = nothing, + linsolve = nothing, precs = DEFAULT_PRECS, + diff_type = Val{:forward}, + min_order = 2, init_order = 5, max_order = 10, + sequence = :harmonic, threading = false) # Enforce 2 <= min_order # and min_order + 1 <= init_order <= max_order - 1: min_order = max(2, min_order) @@ -398,14 +398,14 @@ struct ImplicitEulerBarycentricExtrapolation{CS, AD, F, P, FDT, ST, CJ, TO} <: end function ImplicitEulerBarycentricExtrapolation(; chunk_size = Val{0}(), - autodiff = Val{true}(), - standardtag = Val{true}(), - concrete_jac = nothing, - linsolve = nothing, precs = DEFAULT_PRECS, - diff_type = Val{:forward}, - min_order = 3, init_order = 5, - max_order = 12, sequence = :harmonic, - threading = false, sequence_factor = 2) + autodiff = Val{true}(), + standardtag = Val{true}(), + concrete_jac = nothing, + linsolve = nothing, precs = DEFAULT_PRECS, + diff_type = Val{:forward}, + min_order = 3, init_order = 5, + max_order = 12, sequence = :harmonic, + threading = false, sequence_factor = 2) # Enforce 2 <= min_order # and min_order + 1 <= init_order <= max_order - 1: min_order = max(3, min_order) @@ -484,7 +484,7 @@ struct SIR54{StageLimiter, StepLimiter, Thread} <: OrdinaryDiffEqAdaptiveAlgorit end function SIR54(; stage_limiter! = trivial_limiter!, step_limiter! = trivial_limiter!, - thread = False()) + thread = False()) SIR54{typeof(stage_limiter!), typeof(step_limiter!), typeof(thread)}(stage_limiter!, step_limiter!, thread) @@ -542,7 +542,7 @@ struct Alshina2{StageLimiter, StepLimiter, Thread} <: OrdinaryDiffEqAdaptiveAlgo end function Alshina2(; stage_limiter! = trivial_limiter!, step_limiter! = trivial_limiter!, - thread = False()) + thread = False()) Alshina2{typeof(stage_limiter!), typeof(step_limiter!), typeof(thread)}(stage_limiter!, step_limiter!, thread) @@ -599,7 +599,7 @@ struct Alshina3{StageLimiter, StepLimiter, Thread} <: OrdinaryDiffEqAdaptiveAlgo end function Alshina3(; stage_limiter! = trivial_limiter!, step_limiter! = trivial_limiter!, - thread = False()) + thread = False()) Alshina3{typeof(stage_limiter!), typeof(step_limiter!), typeof(thread)}(stage_limiter!, step_limiter!, thread) @@ -656,7 +656,7 @@ struct Alshina6{StageLimiter, StepLimiter, Thread} <: OrdinaryDiffEqAlgorithm end function Alshina6(; stage_limiter! = trivial_limiter!, step_limiter! = trivial_limiter!, - thread = False()) + thread = False()) Alshina6{typeof(stage_limiter!), typeof(step_limiter!), typeof(thread)}(stage_limiter!, step_limiter!, thread) @@ -1363,9 +1363,9 @@ struct CNAB2{CS, AD, F, F2, P, FDT, ST, CJ} <: end function CNAB2(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear) CNAB2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, @@ -1381,9 +1381,9 @@ struct CNLF2{CS, AD, F, F2, P, FDT, ST, CJ} <: extrapolant::Symbol end function CNLF2(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear) CNLF2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, @@ -1409,10 +1409,10 @@ struct QNDF1{CS, AD, F, F2, P, FDT, ST, CJ, κType} <: end function QNDF1(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear, kappa = -0.1850, - controller = :Standard) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear, kappa = -0.1850, + controller = :Standard) QNDF1{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), typeof(kappa)}(linsolve, @@ -1447,10 +1447,10 @@ struct QNDF2{CS, AD, F, F2, P, FDT, ST, CJ, κType} <: end function QNDF2(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear, kappa = -1 // 9, - controller = :Standard) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear, kappa = -1 // 9, + controller = :Standard) QNDF2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), typeof(kappa)}(linsolve, @@ -1498,12 +1498,12 @@ struct QNDF{MO, CS, AD, F, F2, P, FDT, ST, CJ, K, T, κType} <: end function QNDF(; max_order::Val{MO} = Val{5}(), chunk_size = Val{0}(), - autodiff = Val{true}(), standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, - tol = nothing, - extrapolant = :linear, kappa = promote(-0.1850, -1 // 9, -0.0823, -0.0415, 0), - controller = :Standard) where {MO} + autodiff = Val{true}(), standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, + tol = nothing, + extrapolant = :linear, kappa = promote(-0.1850, -1 // 9, -0.0823, -0.0415, 0), + controller = :Standard) where {MO} QNDF{MO, _unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), @@ -1546,11 +1546,11 @@ struct FBDF{MO, CS, AD, F, F2, P, FDT, ST, CJ, K, T} <: end function FBDF(; max_order::Val{MO} = Val{5}(), chunk_size = Val{0}(), - autodiff = Val{true}(), standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, - tol = nothing, - extrapolant = :linear, controller = :Standard) where {MO} + autodiff = Val{true}(), standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, + tol = nothing, + extrapolant = :linear, controller = :Standard) where {MO} FBDF{MO, _unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), @@ -1578,10 +1578,10 @@ struct SBDF{CS, AD, F, F2, P, FDT, ST, CJ, K, T} <: end function SBDF(order; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, - tol = nothing, - extrapolant = :linear, ark = false) + standardtag = Val{true}(), concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, + tol = nothing, + extrapolant = :linear, ark = false) SBDF{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), typeof(κ), typeof(tol)}(linsolve, @@ -1596,11 +1596,11 @@ end # All keyword form needed for remake function SBDF(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, - tol = nothing, - extrapolant = :linear, - order, ark = false) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, + tol = nothing, + extrapolant = :linear, + order, ark = false) SBDF{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), typeof(κ), typeof(tol)}(linsolve, @@ -1730,7 +1730,7 @@ struct JVODE{bType, aType} <: OrdinaryDiffEqAdamsVarOrderVarStepAlgorithm end function JVODE(algorithm = :Adams; bias1 = 6, bias2 = 6, bias3 = 10, - addon = 1 // 10^6) + addon = 1 // 10^6) JVODE(algorithm, bias1, bias2, bias3, addon) end JVODE_Adams(; kwargs...) = JVODE(:Adams; kwargs...) @@ -1881,10 +1881,10 @@ struct IRKC{CS, AD, F, F2, P, FDT, ST, CJ, K, T, E} <: end function IRKC(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, - tol = nothing, - extrapolant = :linear, controller = :Standard, eigen_est = nothing) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, + tol = nothing, + extrapolant = :linear, controller = :Standard, eigen_est = nothing) IRKC{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), typeof(κ), typeof(tol), typeof(eigen_est)}(linsolve, nlsolve, precs, κ, tol, @@ -1964,12 +1964,12 @@ struct RadauIIA3{CS, AD, F, P, FDT, ST, CJ, Tol, C1, C2} <: end function RadauIIA3(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, - extrapolant = :dense, fast_convergence_cutoff = 1 // 5, - new_W_γdt_cutoff = 1 // 5, - controller = :Predictive, κ = nothing, maxiters = 10) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, + extrapolant = :dense, fast_convergence_cutoff = 1 // 5, + new_W_γdt_cutoff = 1 // 5, + controller = :Predictive, κ = nothing, maxiters = 10) RadauIIA3{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), typeof(κ), typeof(fast_convergence_cutoff), typeof(new_W_γdt_cutoff)}(linsolve, @@ -2013,12 +2013,12 @@ struct RadauIIA5{CS, AD, F, P, FDT, ST, CJ, Tol, C1, C2} <: end function RadauIIA5(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, - extrapolant = :dense, fast_convergence_cutoff = 1 // 5, - new_W_γdt_cutoff = 1 // 5, - controller = :Predictive, κ = nothing, maxiters = 10, smooth_est = true) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, + extrapolant = :dense, fast_convergence_cutoff = 1 // 5, + new_W_γdt_cutoff = 1 // 5, + controller = :Predictive, κ = nothing, maxiters = 10, smooth_est = true) RadauIIA5{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), typeof(κ), typeof(fast_convergence_cutoff), typeof(new_W_γdt_cutoff)}(linsolve, @@ -2051,11 +2051,11 @@ struct ImplicitEuler{CS, AD, F, F2, P, FDT, ST, CJ} <: end function ImplicitEuler(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :constant, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :constant, + controller = :PI) ImplicitEuler{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -2075,10 +2075,10 @@ struct ImplicitMidpoint{CS, AD, F, F2, P, FDT, ST, CJ} <: end function ImplicitMidpoint(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear) ImplicitMidpoint{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -2108,11 +2108,11 @@ struct Trapezoid{CS, AD, F, F2, P, FDT, ST, CJ} <: end function Trapezoid(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear, + controller = :PI) Trapezoid{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -2149,10 +2149,10 @@ struct TRBDF2{CS, AD, F, F2, P, FDT, ST, CJ} <: end function TRBDF2(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) TRBDF2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2187,10 +2187,10 @@ struct SDIRK2{CS, AD, F, F2, P, FDT, ST, CJ} <: end function SDIRK2(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) SDIRK2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2207,10 +2207,10 @@ struct SDIRK22{CS, AD, F, F2, P, FDT, ST, CJ} <: end function SDIRK22(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear, - controller = :PI) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear, + controller = :PI) Trapezoid{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -2231,11 +2231,11 @@ struct SSPSDIRK2{CS, AD, F, F2, P, FDT, ST, CJ} <: end function SSPSDIRK2(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :constant, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :constant, + controller = :PI) SSPSDIRK2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2267,11 +2267,11 @@ struct Kvaerno3{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function Kvaerno3(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) Kvaerno3{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2299,11 +2299,11 @@ struct KenCarp3{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function KenCarp3(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) KenCarp3{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2318,10 +2318,10 @@ struct CFNLIRK3{CS, AD, F, F2, P, FDT, ST, CJ} <: extrapolant::Symbol end function CFNLIRK3(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear) CFNLIRK3{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -2356,10 +2356,10 @@ struct Cash4{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function Cash4(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI, embedding = 3) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI, embedding = 3) Cash4{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, @@ -2378,10 +2378,10 @@ struct SFSDIRK4{CS, AD, F, F2, P, FDT, ST, CJ} <: extrapolant::Symbol end function SFSDIRK4(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear) SFSDIRK4{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -2399,10 +2399,10 @@ struct SFSDIRK5{CS, AD, F, F2, P, FDT, ST, CJ} <: end function SFSDIRK5(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear) SFSDIRK5{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -2420,10 +2420,10 @@ struct SFSDIRK6{CS, AD, F, F2, P, FDT, ST, CJ} <: end function SFSDIRK6(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear) SFSDIRK6{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -2441,10 +2441,10 @@ struct SFSDIRK7{CS, AD, F, F2, P, FDT, ST, CJ} <: end function SFSDIRK7(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear) SFSDIRK7{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -2462,10 +2462,10 @@ struct SFSDIRK8{CS, AD, F, F2, P, FDT, ST, CJ} <: end function SFSDIRK8(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear) SFSDIRK8{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -2492,10 +2492,10 @@ struct Hairer4{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function Hairer4(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) Hairer4{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2520,11 +2520,11 @@ struct Hairer42{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function Hairer42(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) Hairer42{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2556,11 +2556,11 @@ struct Kvaerno4{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function Kvaerno4(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) Kvaerno4{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2592,11 +2592,11 @@ struct Kvaerno5{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function Kvaerno5(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) Kvaerno5{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2624,11 +2624,11 @@ struct KenCarp4{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function KenCarp4(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) KenCarp4{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2661,11 +2661,11 @@ struct KenCarp47{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function KenCarp47(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) KenCarp47{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2693,11 +2693,11 @@ struct KenCarp5{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function KenCarp5(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) KenCarp5{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2727,11 +2727,11 @@ struct KenCarp58{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function KenCarp58(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :PI) KenCarp58{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, smooth_est, extrapolant, @@ -2748,10 +2748,10 @@ struct ESDIRK54I8L2SA{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function ESDIRK54I8L2SA(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear, controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear, controller = :PI) ESDIRK54I8L2SA{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, extrapolant, @@ -2777,10 +2777,10 @@ struct ESDIRK436L2SA2{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function ESDIRK436L2SA2(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear, controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear, controller = :PI) ESDIRK436L2SA2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, extrapolant, @@ -2806,10 +2806,10 @@ struct ESDIRK437L2SA{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function ESDIRK437L2SA(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear, controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear, controller = :PI) ESDIRK437L2SA{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, extrapolant, @@ -2835,10 +2835,10 @@ struct ESDIRK547L2SA2{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function ESDIRK547L2SA2(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear, controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear, controller = :PI) ESDIRK547L2SA2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, extrapolant, @@ -2867,10 +2867,10 @@ struct ESDIRK659L2SA{CS, AD, F, F2, P, FDT, ST, CJ} <: controller::Symbol end function ESDIRK659L2SA(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :linear, controller = :PI) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :linear, controller = :PI) ESDIRK659L2SA{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, nlsolve, precs, extrapolant, @@ -2958,8 +2958,8 @@ for Alg in [ precs::P end function $Alg(; chunk_size = Val{0}(), autodiff = Val{true}(), - standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, linsolve = nothing, precs = DEFAULT_PRECS) + standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, linsolve = nothing, precs = DEFAULT_PRECS) $Alg{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -2977,8 +2977,8 @@ struct GeneralRosenbrock{CS, AD, F, ST, CJ, TabType} <: end function GeneralRosenbrock(; chunk_size = Val{0}(), autodiff = true, - standardtag = Val{true}(), concrete_jac = nothing, - factorization = lu!, tableau = ROSENBROCK_DEFAULT_TABLEAU) + standardtag = Val{true}(), concrete_jac = nothing, + factorization = lu!, tableau = ROSENBROCK_DEFAULT_TABLEAU) GeneralRosenbrock{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(factorization), _unwrap_val(standardtag), _unwrap_val(concrete_jac), typeof(tableau)}(tableau, factorization) @@ -2993,10 +2993,10 @@ struct RosenbrockW6S4OS{CS, AD, F, P, FDT, ST, CJ} <: precs::P end function RosenbrockW6S4OS(; chunk_size = Val{0}(), autodiff = true, - standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:central}, - linsolve = nothing, - precs = DEFAULT_PRECS) + standardtag = Val{true}(), + concrete_jac = nothing, diff_type = Val{:central}, + linsolve = nothing, + precs = DEFAULT_PRECS) RosenbrockW6S4OS{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -3017,9 +3017,9 @@ for Alg in [:LawsonEuler, :NorsettEuler, :ETDRK2, :ETDRK3, :ETDRK4, :HochOst4] iop::Int end @eval function $Alg(; krylov = false, m = 30, iop = 0, autodiff = true, - standardtag = Val{true}(), concrete_jac = nothing, - chunk_size = Val{0}(), - diff_type = Val{:forward}) + standardtag = Val{true}(), concrete_jac = nothing, + chunk_size = Val{0}(), + diff_type = Val{:forward}) $Alg{_unwrap_val(chunk_size), _unwrap_val(autodiff), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(krylov, m, @@ -3034,8 +3034,8 @@ for Alg in [:Exprb32, :Exprb43] iop::Int end @eval function $Alg(; m = 30, iop = 0, autodiff = true, standardtag = Val{true}(), - concrete_jac = nothing, chunk_size = Val{0}(), - diff_type = Val{:forward}) + concrete_jac = nothing, chunk_size = Val{0}(), + diff_type = Val{:forward}) $Alg{_unwrap_val(chunk_size), _unwrap_val(autodiff), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(m, @@ -3050,8 +3050,8 @@ for Alg in [:Exp4, :EPIRK4s3A, :EPIRK4s3B, :EPIRK5s3, :EXPRB53s3, :EPIRK5P1, :EP iop::Int end @eval function $Alg(; adaptive_krylov = true, m = 30, iop = 0, autodiff = true, - standardtag = Val{true}(), concrete_jac = nothing, - chunk_size = Val{0}(), diff_type = Val{:forward}) + standardtag = Val{true}(), concrete_jac = nothing, + chunk_size = Val{0}(), diff_type = Val{:forward}) $Alg{_unwrap_val(chunk_size), _unwrap_val(autodiff), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(adaptive_krylov, m, @@ -3089,11 +3089,11 @@ struct ABDF2{CS, AD, F, F2, P, FDT, ST, CJ, K, T} <: controller::Symbol end function ABDF2(; chunk_size = Val{0}(), autodiff = true, standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - κ = nothing, tol = nothing, linsolve = nothing, precs = DEFAULT_PRECS, - nlsolve = NLNewton(), - smooth_est = true, extrapolant = :linear, - controller = :Standard) + concrete_jac = nothing, diff_type = Val{:forward}, + κ = nothing, tol = nothing, linsolve = nothing, precs = DEFAULT_PRECS, + nlsolve = NLNewton(), + smooth_est = true, extrapolant = :linear, + controller = :Standard) ABDF2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), typeof(κ), typeof(tol)}(linsolve, nlsolve, precs, κ, tol, smooth_est, extrapolant, @@ -3127,9 +3127,9 @@ struct MEBDF2{CS, AD, F, F2, P, FDT, ST, CJ} <: extrapolant::Symbol end function MEBDF2(; chunk_size = Val{0}(), autodiff = true, standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :constant) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :constant) MEBDF2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -3152,9 +3152,9 @@ struct PDIRK44{CS, AD, F, F2, P, FDT, ST, CJ, TO} <: threading::TO end function PDIRK44(; chunk_size = Val{0}(), autodiff = true, standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :constant, threading = true) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :constant, threading = true) PDIRK44{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), typeof(threading)}(linsolve, nlsolve, precs, @@ -3191,10 +3191,10 @@ struct DImplicitEuler{CS, AD, F, F2, P, FDT, ST, CJ} <: DAEAlgorithm{CS, AD, FDT controller::Symbol end function DImplicitEuler(; chunk_size = Val{0}(), autodiff = true, standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :constant, - controller = :Standard) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :constant, + controller = :Standard) DImplicitEuler{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -3209,10 +3209,10 @@ struct DABDF2{CS, AD, F, F2, P, FDT, ST, CJ} <: DAEAlgorithm{CS, AD, FDT, ST, CJ controller::Symbol end function DABDF2(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), - concrete_jac = nothing, diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), - extrapolant = :constant, - controller = :Standard) + concrete_jac = nothing, diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), + extrapolant = :constant, + controller = :Standard) DABDF2{_unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac)}(linsolve, @@ -3230,11 +3230,11 @@ struct DFBDF{MO, CS, AD, F, F2, P, FDT, ST, CJ, K, T} <: DAEAlgorithm{CS, AD, FD controller::Symbol end function DFBDF(; max_order::Val{MO} = Val{5}(), chunk_size = Val{0}(), - autodiff = Val{true}(), standardtag = Val{true}(), concrete_jac = nothing, - diff_type = Val{:forward}, - linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, - tol = nothing, - extrapolant = :linear, controller = :Standard) where {MO} + autodiff = Val{true}(), standardtag = Val{true}(), concrete_jac = nothing, + diff_type = Val{:forward}, + linsolve = nothing, precs = DEFAULT_PRECS, nlsolve = NLNewton(), κ = nothing, + tol = nothing, + extrapolant = :linear, controller = :Standard) where {MO} DFBDF{MO, _unwrap_val(chunk_size), _unwrap_val(autodiff), typeof(linsolve), typeof(nlsolve), typeof(precs), diff_type, _unwrap_val(standardtag), _unwrap_val(concrete_jac), diff --git a/src/algorithms/explicit_rk.jl b/src/algorithms/explicit_rk.jl index ce77bcdb95..b7bf044e4a 100644 --- a/src/algorithms/explicit_rk.jl +++ b/src/algorithms/explicit_rk.jl @@ -6,10 +6,10 @@ function Base.show(io::IO, alg::OrdinaryDiffEqAlgorithm) print(io, ")") end function explicit_rk_docstring(description::String, - name::String; - references::String = "", - extra_keyword_description = "", - extra_keyword_default = "") + name::String; + references::String = "", + extra_keyword_description = "", + extra_keyword_default = "") if !isempty(extra_keyword_default) extra_keyword_default = "\n" * repeat(" ", 8) * extra_keyword_default end @@ -608,8 +608,8 @@ Base.@kwdef struct ORK256{StageLimiter, StepLimiter, Thread} <: OrdinaryDiffEqAl end # for backwards compatibility function ORK256(stage_limiter!, - step_limiter! = trivial_limiter!; - williamson_condition = true) + step_limiter! = trivial_limiter!; + williamson_condition = true) ORK256(stage_limiter!, step_limiter!, False(), williamson_condition) end diff --git a/src/algorithms/explicit_rk_pde.jl b/src/algorithms/explicit_rk_pde.jl index 54a0770923..0e0469162e 100644 --- a/src/algorithms/explicit_rk_pde.jl +++ b/src/algorithms/explicit_rk_pde.jl @@ -20,8 +20,8 @@ Base.@kwdef struct CarpenterKennedy2N54{StageLimiter, StepLimiter, Thread} <: end # for backwards compatibility function CarpenterKennedy2N54(stage_limiter!, - step_limiter! = trivial_limiter!; - williamson_condition = true) + step_limiter! = trivial_limiter!; + williamson_condition = true) CarpenterKennedy2N54(stage_limiter!, step_limiter!, False(), williamson_condition) end @@ -44,8 +44,8 @@ Base.@kwdef struct SHLDDRK64{StageLimiter, StepLimiter, Thread} <: OrdinaryDiffE end # for backwards compatibility function SHLDDRK64(stage_limiter!, - step_limiter! = trivial_limiter!; - williamson_condition = true) + step_limiter! = trivial_limiter!; + williamson_condition = true) SHLDDRK64(stage_limiter!, step_limiter!, False(), williamson_condition) end @@ -93,7 +93,7 @@ struct HSLDDRK64{StageLimiter, StepLimiter, Thread} <: OrdinaryDiffEqAlgorithm thread::Thread williamson_condition::Bool function HSLDDRK64(stage_limiter! = trivial_limiter!, step_limiter! = trivial_limiter!; - williamson_condition = true) + williamson_condition = true) Base.depwarn("HSLDDRK64 is deprecated, use SHLDDRK64 instead.", :HSLDDRK64) SHLDDRK64(stage_limiter!, step_limiter!, thread; williamson_condition = williamson_condition) @@ -120,7 +120,7 @@ Base.@kwdef struct DGLDDRK73_C{StageLimiter, StepLimiter, Thread} <: OrdinaryDif end # for backwards compatibility function DGLDDRK73_C(stage_limiter!, step_limiter! = trivial_limiter!; - williamson_condition = true) + williamson_condition = true) DGLDDRK73_C(stage_limiter!, step_limiter!, False(), @@ -147,7 +147,7 @@ Base.@kwdef struct DGLDDRK84_C{StageLimiter, StepLimiter, Thread} <: OrdinaryDif end # for backwards compatibility function DGLDDRK84_C(stage_limiter!, step_limiter! = trivial_limiter!; - williamson_condition = true) + williamson_condition = true) DGLDDRK84_C(stage_limiter!, step_limiter!, False(), @@ -174,7 +174,7 @@ Base.@kwdef struct DGLDDRK84_F{StageLimiter, StepLimiter, Thread} <: OrdinaryDif end # for backwards compatibility function DGLDDRK84_F(stage_limiter!, step_limiter! = trivial_limiter!; - williamson_condition = true) + williamson_condition = true) DGLDDRK84_F(stage_limiter!, step_limiter!, False(), @@ -198,7 +198,7 @@ Base.@kwdef struct NDBLSRK124{StageLimiter, StepLimiter, Thread} <: OrdinaryDiff end # for backwards compatibility function NDBLSRK124(stage_limiter!, step_limiter! = trivial_limiter!; - williamson_condition = true) + williamson_condition = true) NDBLSRK124(stage_limiter!, step_limiter!, False(), williamson_condition) @@ -221,7 +221,7 @@ Base.@kwdef struct NDBLSRK134{StageLimiter, StepLimiter, Thread} <: OrdinaryDiff end # for backwards compatibility function NDBLSRK134(stage_limiter!, step_limiter! = trivial_limiter!; - williamson_condition = true) + williamson_condition = true) NDBLSRK134(stage_limiter!, step_limiter!, False(), williamson_condition) @@ -244,7 +244,7 @@ Base.@kwdef struct NDBLSRK144{StageLimiter, StepLimiter, Thread} <: OrdinaryDiff end # for backwards compatibility function NDBLSRK144(stage_limiter!, step_limiter! = trivial_limiter!; - williamson_condition = true) + williamson_condition = true) NDBLSRK144{typeof(stage_limiter!), typeof(step_limiter!), False}(stage_limiter!, step_limiter!, False(), williamson_condition) diff --git a/src/caches/adams_bashforth_moulton_caches.jl b/src/caches/adams_bashforth_moulton_caches.jl index 469bcf6d4e..f005717a34 100644 --- a/src/caches/adams_bashforth_moulton_caches.jl +++ b/src/caches/adams_bashforth_moulton_caches.jl @@ -17,9 +17,9 @@ end end function alg_cache(alg::AB3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -30,9 +30,9 @@ function alg_cache(alg::AB3, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::AB3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype AB3ConstantCache(k2, k3, 1) @@ -57,9 +57,9 @@ end end function alg_cache(alg::ABM32, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -70,9 +70,9 @@ function alg_cache(alg::ABM32, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ABM32, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype ABM32ConstantCache(k2, k3, 1) @@ -102,9 +102,9 @@ end end function alg_cache(alg::AB4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -119,9 +119,9 @@ function alg_cache(alg::AB4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::AB4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -155,9 +155,9 @@ end end function alg_cache(alg::ABM43, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -175,9 +175,9 @@ function alg_cache(alg::ABM43, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ABM43, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -209,9 +209,9 @@ end end function alg_cache(alg::AB5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -226,9 +226,9 @@ function alg_cache(alg::AB5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::AB5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -265,9 +265,9 @@ end end function alg_cache(alg::ABM54, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -286,9 +286,9 @@ function alg_cache(alg::ABM54, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ABM54, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -334,9 +334,9 @@ end end function alg_cache(alg::VCAB3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) c = fill(zero(t), 3, 3) g = fill(zero(t), 3) @@ -355,9 +355,9 @@ function alg_cache(alg::VCAB3, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::VCAB3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) bk1 = zero(rate_prototype) bk2 = zero(rate_prototype) @@ -429,9 +429,9 @@ end end function alg_cache(alg::VCAB4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 4) c = fill(zero(t), 4, 4) g = fill(zero(t), 4) @@ -450,9 +450,9 @@ function alg_cache(alg::VCAB4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::VCAB4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -525,9 +525,9 @@ end end function alg_cache(alg::VCAB5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 5) c = fill(zero(t), 5, 5) g = fill(zero(t), 5) @@ -546,9 +546,9 @@ function alg_cache(alg::VCAB5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::VCAB5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -624,9 +624,9 @@ end end function alg_cache(alg::VCABM3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) c = fill(zero(t), 4, 4) g = fill(zero(t), 4) @@ -646,9 +646,9 @@ function alg_cache(alg::VCABM3, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::VCABM3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) bk1 = zero(rate_prototype) bk2 = zero(rate_prototype) @@ -728,9 +728,9 @@ end end function alg_cache(alg::VCABM4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 4) c = fill(zero(t), 5, 5) g = fill(zero(t), 5) @@ -751,9 +751,9 @@ function alg_cache(alg::VCABM4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::VCABM4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -832,9 +832,9 @@ end end function alg_cache(alg::VCABM5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(t), 5) c = fill(zero(t), 6, 6) g = fill(zero(t), 6) @@ -855,9 +855,9 @@ function alg_cache(alg::VCABM5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::VCABM5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -946,9 +946,9 @@ end end function alg_cache(alg::VCABM, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 13) c = fill(zero(t), 13, 13) g = fill(zero(t), 13) @@ -971,9 +971,9 @@ function alg_cache(alg::VCABM, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::VCABM, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k4 = zero(rate_prototype) dts = fill(zero(dt), 13) @@ -1042,9 +1042,9 @@ end end function alg_cache(alg::CNAB2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -1057,9 +1057,9 @@ function alg_cache(alg::CNAB2, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::CNAB2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -1099,9 +1099,9 @@ end end function alg_cache(alg::CNLF2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -1115,9 +1115,9 @@ function alg_cache(alg::CNLF2, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::CNLF2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) diff --git a/src/caches/basic_caches.jl b/src/caches/basic_caches.jl index 4c627d7b71..64b51233b8 100644 --- a/src/caches/basic_caches.jl +++ b/src/caches/basic_caches.jl @@ -17,11 +17,11 @@ if isdefined(Base, :Experimental) && isdefined(Base.Experimental, :silence!) 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, - ::Val{V}) where {T1, T2, F, V, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, + uprev2, f, t, dt, reltol, p, calck, + ::Val{V}) where {T1, T2, F, 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)), @@ -32,9 +32,9 @@ function alg_cache(alg::CompositeAlgorithm{Tuple{T1, T2}, F}, u, rate_prototype, end function alg_cache(alg::CompositeAlgorithm, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{V}) where {V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{V}) where {V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} caches = __alg_cache(alg.algs, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(V)) CompositeCache(caches, alg.choice_function, 1) @@ -42,10 +42,10 @@ 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, - ::Val{V}) where {T <: Tuple, V, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, + uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -63,9 +63,9 @@ alg_cache(alg::OrdinaryDiffEqAlgorithm, prob, callback::F) where {F} = ODEEmptyC end function alg_cache(alg::FunctionMap, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FunctionMapCache(u, uprev, FunctionMap_scale_by_time(alg) ? rate_prototype : (eltype(u) <: Enum ? copy(u) : zero(u))) @@ -74,9 +74,9 @@ end struct FunctionMapConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::FunctionMap, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FunctionMapConstantCache() end @@ -96,9 +96,9 @@ end TruncatedStacktraces.@truncate_stacktrace ExplicitRKCache 1 function alg_cache(alg::ExplicitRK, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} kk = Vector{typeof(rate_prototype)}(undef, 0) for i in 1:(alg.tableau.stages) push!(kk, zero(rate_prototype)) @@ -135,9 +135,9 @@ function ExplicitRKConstantCache(tableau, rate_prototype) end function alg_cache(alg::ExplicitRK, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 9c254e1946..12cf35cfff 100644 --- a/src/caches/bdf_caches.jl +++ b/src/caches/bdf_caches.jl @@ -7,9 +7,9 @@ end function alg_cache(alg::ABDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -36,9 +36,9 @@ end end function alg_cache(alg::ABDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -92,9 +92,9 @@ end end function alg_cache(alg::SBDF, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -115,9 +115,9 @@ function alg_cache(alg::SBDF, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SBDF, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -173,9 +173,9 @@ end end function alg_cache(alg::QNDF1, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -194,9 +194,9 @@ function alg_cache(alg::QNDF1, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::QNDF1, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -261,9 +261,9 @@ end end function alg_cache(alg::QNDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -284,9 +284,9 @@ function alg_cache(alg::QNDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::QNDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -341,10 +341,10 @@ end end function alg_cache(alg::QNDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits -} where {MO} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, @@ -406,10 +406,10 @@ end TruncatedStacktraces.@truncate_stacktrace QNDFCache 1 function alg_cache(alg::QNDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits -} where {MO} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, @@ -465,9 +465,9 @@ end end function alg_cache(alg::MEBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -488,9 +488,9 @@ mutable struct MEBDF2ConstantCache{N} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::MEBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -522,10 +522,10 @@ end end function alg_cache(alg::FBDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits -} where {MO} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, @@ -595,10 +595,10 @@ end TruncatedStacktraces.@truncate_stacktrace FBDFCache 1 function alg_cache(alg::FBDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {MO, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {MO, uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits} γ, c = 1.0, 1.0 fsalfirst = zero(rate_prototype) max_order = MO diff --git a/src/caches/dae_caches.jl b/src/caches/dae_caches.jl index 0dae57cfa7..750c8b81ea 100644 --- a/src/caches/dae_caches.jl +++ b/src/caches/dae_caches.jl @@ -14,9 +14,9 @@ mutable struct DImplicitEulerConstantCache{N} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::DImplicitEuler, du, u, res_prototype, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 α = 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, @@ -26,9 +26,9 @@ function alg_cache(alg::DImplicitEuler, du, u, res_prototype, rate_prototype, end function alg_cache(alg::DImplicitEuler, du, u, res_prototype, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 α = 1 k₁ = zero(rate_prototype) @@ -51,10 +51,10 @@ end end function alg_cache(alg::DABDF2, du, u, res_prototype, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -81,9 +81,9 @@ end end function alg_cache(alg::DABDF2, du, u, res_prototype, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -131,8 +131,8 @@ end 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} + uBottomEltypeNoUnits, tTypeNoUnits, + uprev, uprev2, f, t, dt, reltol, p, calck, ::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, @@ -201,9 +201,9 @@ end end function alg_cache(alg::DFBDF{MO}, du, u, res_prototype, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {MO} + uBottomEltypeNoUnits, + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {MO} γ, c = 1.0, 1.0 fsalfirst = zero(rate_prototype) max_order = MO diff --git a/src/caches/extrapolation_caches.jl b/src/caches/extrapolation_caches.jl index e15669c61c..9ed8d41d53 100644 --- a/src/caches/extrapolation_caches.jl +++ b/src/caches/extrapolation_caches.jl @@ -33,9 +33,9 @@ end end function alg_cache(alg::AitkenNeville, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) utilde = zero(u) k = zero(rate_prototype) @@ -69,9 +69,9 @@ function alg_cache(alg::AitkenNeville, u, rate_prototype, ::Type{uEltypeNoUnits} end function alg_cache(alg::AitkenNeville, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dtpropose = zero(dt) cur_order = max(alg.init_order, alg.min_order) T = Array{typeof(u), 2}(undef, alg.max_order, alg.max_order) @@ -150,9 +150,9 @@ end end function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dtpropose = zero(dt) #cur_order = max(alg.init_order, alg.min_order) QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. DiffEqBase.__init in solve.jl @@ -188,9 +188,9 @@ function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, end function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_tmp = zero(u) u_tmps = Array{typeof(u_tmp), 1}(undef, Threads.nthreads()) @@ -311,10 +311,10 @@ struct extrapolation_coefficients{T1, T2, T3} end function create_extrapolation_coefficients(T, - alg::Union{ExtrapolationMidpointDeuflhard, - ExtrapolationMidpointHairerWanner, - ImplicitDeuflhardExtrapolation, - ImplicitHairerWannerExtrapolation}) + alg::Union{ExtrapolationMidpointDeuflhard, + ExtrapolationMidpointHairerWanner, + ImplicitDeuflhardExtrapolation, + ImplicitHairerWannerExtrapolation}) # Compute and return extrapolation_coefficients @unpack min_order, init_order, max_order, sequence = alg @@ -447,7 +447,7 @@ function create_extrapolation_coefficients(T, alg::ImplicitEulerBarycentricExtra end function create_extrapolation_coefficients(T::Type{<:CompiledFloats}, - alg::ImplicitEulerBarycentricExtrapolation) + alg::ImplicitEulerBarycentricExtrapolation) # Compute and return extrapolation_coefficients @unpack min_order, init_order, max_order, sequence = alg @@ -642,10 +642,10 @@ function create_extrapolation_coefficients(T::Type{<:CompiledFloats}, end function create_extrapolation_coefficients(T::Type{<:CompiledFloats}, - alg::Union{ExtrapolationMidpointDeuflhard, - ExtrapolationMidpointHairerWanner, - ImplicitDeuflhardExtrapolation, - ImplicitHairerWannerExtrapolation}) + alg::Union{ExtrapolationMidpointDeuflhard, + ExtrapolationMidpointHairerWanner, + ImplicitDeuflhardExtrapolation, + ImplicitHairerWannerExtrapolation}) # Compute and return extrapolation_coefficients @unpack min_order, init_order, max_order, sequence = alg @@ -893,9 +893,9 @@ end end function alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. DiffEqBase.__init in solve.jl @@ -945,9 +945,9 @@ end end function alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) @@ -1043,9 +1043,9 @@ end end function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. DiffEqBase.__init in solve.jl @@ -1085,9 +1085,9 @@ function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, end function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} utilde = zero(u) u_temp1 = zero(u) u_temp2 = zero(u) @@ -1196,9 +1196,9 @@ end end function alg_cache(alg::ExtrapolationMidpointHairerWanner, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. DiffEqBase.__init in solve.jl @@ -1257,9 +1257,9 @@ end end function alg_cache(alg::ExtrapolationMidpointHairerWanner, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) @@ -1317,9 +1317,9 @@ end end function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. DiffEqBase.__init in solve.jl @@ -1414,9 +1414,9 @@ end end function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) @@ -1530,9 +1530,9 @@ end end function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. DiffEqBase.__init in solve.jl @@ -1610,9 +1610,9 @@ end end function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) diff --git a/src/caches/feagin_caches.jl b/src/caches/feagin_caches.jl index 81aa73f710..47defa81a2 100644 --- a/src/caches/feagin_caches.jl +++ b/src/caches/feagin_caches.jl @@ -26,9 +26,9 @@ end function alg_cache(alg::Feagin10, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin10ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -57,9 +57,9 @@ function alg_cache(alg::Feagin10, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Feagin10, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Feagin10ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -99,9 +99,9 @@ end end function alg_cache(alg::Feagin12, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -138,9 +138,9 @@ function alg_cache(alg::Feagin12, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Feagin12, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Feagin12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -190,9 +190,9 @@ end end function alg_cache(alg::Feagin14, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin14ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -241,8 +241,8 @@ function alg_cache(alg::Feagin14, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Feagin14, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 536f5bffde..1efd21d849 100644 --- a/src/caches/firk_caches.jl +++ b/src/caches/firk_caches.jl @@ -15,9 +15,9 @@ mutable struct RadauIIA3ConstantCache{F, Tab, Tol, Dt, U, JType} <: end function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA3Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -66,9 +66,9 @@ mutable struct RadauIIA3Cache{uType, cuType, uNoUnitsType, rateType, JType, W1Ty end function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA3Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -139,9 +139,9 @@ mutable struct RadauIIA5ConstantCache{F, Tab, Tol, Dt, U, JType} <: end function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA5Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -201,9 +201,9 @@ end TruncatedStacktraces.@truncate_stacktrace RadauIIA5Cache 1 function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA5Tableau(uToltype, constvalue(tTypeNoUnits)) diff --git a/src/caches/high_order_rk_caches.jl b/src/caches/high_order_rk_caches.jl index a74e980ff3..f372c68ac8 100644 --- a/src/caches/high_order_rk_caches.jl +++ b/src/caches/high_order_rk_caches.jl @@ -24,9 +24,9 @@ end function alg_cache(alg::TanYam7, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TanYam7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -48,9 +48,9 @@ function alg_cache(alg::TanYam7, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::TanYam7, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TanYam7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -92,9 +92,9 @@ end end function alg_cache(alg::DP8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -133,9 +133,9 @@ function alg_cache(alg::DP8, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::DP8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DP8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -168,9 +168,9 @@ end end function alg_cache(alg::TsitPap8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TsitPap8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -195,9 +195,9 @@ function alg_cache(alg::TsitPap8, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::TsitPap8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TsitPap8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -230,9 +230,9 @@ end end function alg_cache(alg::PFRK87, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = PFRK87ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -257,8 +257,8 @@ function alg_cache(alg::PFRK87, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::PFRK87, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 0b7d66dcfe..5bf97bfe34 100644 --- a/src/caches/kencarp_kvaerno_caches.jl +++ b/src/caches/kencarp_kvaerno_caches.jl @@ -4,9 +4,9 @@ end function alg_cache(alg::KenCarp3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -34,9 +34,9 @@ end end function alg_cache(alg::KenCarp3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -72,9 +72,9 @@ end end function alg_cache(alg::CFNLIRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -102,9 +102,9 @@ end end function alg_cache(alg::CFNLIRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -132,9 +132,9 @@ end end function alg_cache(alg::Kvaerno4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -158,9 +158,9 @@ end end function alg_cache(alg::Kvaerno4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -184,9 +184,9 @@ end end function alg_cache(alg::KenCarp4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -219,9 +219,9 @@ end TruncatedStacktraces.@truncate_stacktrace KenCarp4Cache 1 function alg_cache(alg::KenCarp4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -264,9 +264,9 @@ end end function alg_cache(alg::Kvaerno5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -293,9 +293,9 @@ end end function alg_cache(alg::Kvaerno5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -321,9 +321,9 @@ end end function alg_cache(alg::KenCarp5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -359,9 +359,9 @@ end end function alg_cache(alg::KenCarp5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -409,9 +409,9 @@ end end function alg_cache(alg::KenCarp47, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -446,9 +446,9 @@ end TruncatedStacktraces.@truncate_stacktrace KenCarp47Cache 1 function alg_cache(alg::KenCarp47, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -493,9 +493,9 @@ end end function alg_cache(alg::KenCarp58, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -533,9 +533,9 @@ end TruncatedStacktraces.@truncate_stacktrace KenCarp58Cache 1 function alg_cache(alg::KenCarp58, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, diff --git a/src/caches/linear_caches.jl b/src/caches/linear_caches.jl index c4d43c5737..6fbfdc68f1 100644 --- a/src/caches/linear_caches.jl +++ b/src/caches/linear_caches.jl @@ -11,9 +11,9 @@ end function alg_cache(alg::MagnusMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -25,9 +25,9 @@ struct MagnusMidpointConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::MagnusMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusMidpointConstantCache() end @@ -43,9 +43,9 @@ end end function alg_cache(alg::RKMK2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -57,9 +57,9 @@ struct RKMK2ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::RKMK2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKMK2ConstantCache() end @@ -75,9 +75,9 @@ end end function alg_cache(alg::LieRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -89,9 +89,9 @@ struct LieRK4ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::LieRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LieRK4ConstantCache() end @@ -107,9 +107,9 @@ end end function alg_cache(alg::CG3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -121,9 +121,9 @@ struct CG3ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::CG3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CG3ConstantCache() end @@ -139,9 +139,9 @@ end end function alg_cache(alg::CG2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -153,9 +153,9 @@ struct CG2ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::CG2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CG2ConstantCache() end @@ -171,7 +171,7 @@ end end function alg_cache(alg::CG4a, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{true}) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{true}) W = false .* vec(rate_prototype) .* vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -183,7 +183,7 @@ struct CG4aConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::CG4a, u, rate_prototype, uEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{false}) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{false}) CG4aConstantCache() end @@ -199,9 +199,9 @@ end end function alg_cache(alg::RKMK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -213,9 +213,9 @@ struct RKMK4ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::RKMK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKMK4ConstantCache() end @@ -234,9 +234,9 @@ end end function alg_cache(alg::MagnusAdapt4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -252,9 +252,9 @@ struct MagnusAdapt4ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::MagnusAdapt4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusAdapt4ConstantCache() end @@ -270,9 +270,9 @@ end end function alg_cache(alg::MagnusNC8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -284,9 +284,9 @@ struct MagnusNC8ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::MagnusNC8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusNC8ConstantCache() end @@ -302,9 +302,9 @@ end end function alg_cache(alg::MagnusGL4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -316,9 +316,9 @@ struct MagnusGL4ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::MagnusGL4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL4ConstantCache() end @@ -334,9 +334,9 @@ end end function alg_cache(alg::MagnusGL8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -348,9 +348,9 @@ struct MagnusGL8ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::MagnusGL8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL8ConstantCache() end @@ -366,9 +366,9 @@ end end function alg_cache(alg::MagnusNC6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -380,9 +380,9 @@ struct MagnusNC6ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::MagnusNC6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusNC6ConstantCache() end @@ -398,9 +398,9 @@ end end function alg_cache(alg::MagnusGL6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -412,9 +412,9 @@ struct MagnusGL6ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::MagnusGL6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL6ConstantCache() end @cache struct MagnusGauss4Cache{uType, rateType, WType, expType} <: @@ -430,9 +430,9 @@ end end function alg_cache(alg::MagnusGauss4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -444,9 +444,9 @@ struct MagnusGauss4ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::MagnusGauss4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGauss4ConstantCache() end @@ -462,9 +462,9 @@ end end function alg_cache(alg::LieEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -476,9 +476,9 @@ struct LieEulerConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::LieEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LieEulerConstantCache() end @@ -492,9 +492,9 @@ end end function alg_cache(alg::CayleyEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) fsalfirst = zero(rate_prototype) CayleyEulerCache(u, uprev, zero(u), zero(u), fsalfirst, k) @@ -504,9 +504,9 @@ struct CayleyEulerConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::CayleyEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CayleyEulerConstantCache() end @@ -523,9 +523,9 @@ end end function alg_cache(alg::MagnusLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -537,18 +537,18 @@ struct MagnusLeapfrogConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::MagnusLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusLeapfrogConstantCache() end struct LinearExponentialConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::LinearExponential, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LinearExponentialConstantCache() end @@ -563,9 +563,9 @@ end end function alg_cache(alg::LinearExponential, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) rtmp = zero(rate_prototype) n = length(u) diff --git a/src/caches/linear_nonlinear_caches.jl b/src/caches/linear_nonlinear_caches.jl index 79acc9a660..831206bb49 100644 --- a/src/caches/linear_nonlinear_caches.jl +++ b/src/caches/linear_nonlinear_caches.jl @@ -73,10 +73,10 @@ for (Alg, Cache) in [(:LawsonEuler, :LawsonEulerConstantCache), end @eval function alg_cache(alg::$Alg, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, - uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, + uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits} if alg.krylov ops = nothing # no caching else @@ -104,7 +104,7 @@ Construct the non-standard caches (not uType or rateType) for ExpRK integrators. call in `perform_step!`. """ function alg_cache_expRK(alg::OrdinaryDiffEqExponentialAlgorithm, u, ::Type{uEltypeNoUnits}, - uprev, f, t, dt, p, du1, tmp, dz, plist) where {uEltypeNoUnits} + uprev, f, t, dt, p, du1, tmp, dz, plist) where {uEltypeNoUnits} n = length(u) T = eltype(u) # Allocate cache for ForwardDiff @@ -157,9 +157,9 @@ end end function alg_cache(alg::LawsonEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 # other caches @@ -214,9 +214,9 @@ end end function alg_cache(alg::NorsettEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 plist = (1,) @@ -242,9 +242,9 @@ end end function alg_cache(alg::ETDRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 plist = (2, 2) @@ -272,9 +272,9 @@ end end function alg_cache(alg::ETDRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 plist = (1, 3, 3, 3) @@ -303,9 +303,9 @@ end end function alg_cache(alg::ETDRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 plist = (1, 1, 3, 3, 3, 3) @@ -337,9 +337,9 @@ end end function alg_cache(alg::HochOst4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 plist = (3, 3, 3, 3, 3, 3, 3, 3, 3) @@ -374,10 +374,10 @@ for (Alg, Cache) in [(:Exp4, :Exp4ConstantCache), uf::FType # derivative wrapper end @eval function alg_cache(alg::$Alg, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, - uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, + uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits} if DiffEqBase.has_jac(f) uf = nothing else @@ -404,9 +404,9 @@ end KsCache::KsType end function alg_cache(alg::Exp4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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 # Allocate jacobian and caches for ForwardDiff @@ -451,9 +451,9 @@ end KsCache::KsType end function alg_cache(alg::EPIRK4s3A, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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 # Allocate jacobian and caches for ForwardDiff @@ -497,9 +497,9 @@ end KsCache::KsType end function alg_cache(alg::EPIRK4s3B, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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 # Allocate jacobian and caches for ForwardDiff @@ -543,9 +543,9 @@ end KsCache::KsType end function alg_cache(alg::EPIRK5s3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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 # Allocate jacobian and caches for ForwardDiff @@ -588,9 +588,9 @@ end KsCache::KsType end function alg_cache(alg::EXPRB53s3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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 # Allocate jacobian and caches for ForwardDiff @@ -634,9 +634,9 @@ end KsCache::KsType end function alg_cache(alg::EPIRK5P1, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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 # Allocate jacobian and caches for ForwardDiff @@ -681,9 +681,9 @@ end KsCache::KsType end function alg_cache(alg::EPIRK5P2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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 # Allocate jacobian and caches for ForwardDiff @@ -720,10 +720,10 @@ for (Alg, Cache) in [(:Exprb32, :Exprb32ConstantCache), uf::FType # derivative wrapper end @eval function alg_cache(alg::$Alg, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, - uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, + uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits} if DiffEqBase.has_jac(f) uf = nothing else @@ -743,8 +743,8 @@ Construct the non-standard caches (not uType or rateType) for Exprb integrators. call in `perform_step!`. """ function alg_cache_exprb(alg::OrdinaryDiffEqAdaptiveExponentialAlgorithm, u, - ::Type{uEltypeNoUnits}, uprev, f, t, p, du1, tmp, dz, - plist) where {uEltypeNoUnits} + ::Type{uEltypeNoUnits}, uprev, f, t, p, du1, tmp, dz, + plist) where {uEltypeNoUnits} if f isa SplitFunction error("Algorithm $alg cannot be used for split problems. Consider reformat to a regular `ODEProblem`") end @@ -788,9 +788,9 @@ end KsCache::KsType end function alg_cache(alg::Exprb32, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 plist = (3, 3) @@ -816,9 +816,9 @@ struct Exprb43Cache{uType, rateType, JCType, FType, JType, KsType} <: ExpRKCache KsCache::KsType end function alg_cache(alg::Exprb43, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 plist = (1, 4, 4, 4) @@ -870,9 +870,9 @@ struct ETD2ConstantCache{expType} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::ETD2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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) ETD2ConstantCache(Phi[1], Phi[2], Phi[2] + Phi[3], -Phi[3]) @@ -891,9 +891,9 @@ end end function alg_cache(alg::ETD2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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) ETD2Cache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype), Phi[1], Phi[2], diff --git a/src/caches/low_order_rk_caches.jl b/src/caches/low_order_rk_caches.jl index 8a371bd96e..fc6da7da17 100644 --- a/src/caches/low_order_rk_caches.jl +++ b/src/caches/low_order_rk_caches.jl @@ -15,34 +15,34 @@ end end function alg_cache(alg::SplitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SplitEulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end struct SplitEulerConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SplitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} EulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end struct EulerConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Euler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} EulerConstantCache() end @@ -79,9 +79,9 @@ end end function alg_cache(alg::Heun, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) HeunCache(u, uprev, zero(u), atmp, zero(rate_prototype), @@ -89,9 +89,9 @@ function alg_cache(alg::Heun, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Ralston, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) RalstonCache(u, uprev, zero(u), atmp, zero(rate_prototype), @@ -101,18 +101,18 @@ end struct HeunConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Heun, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} HeunConstantCache() end struct RalstonConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Ralston, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RalstonConstantCache() end @@ -138,9 +138,9 @@ end struct MidpointConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Midpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -151,9 +151,9 @@ function alg_cache(alg::Midpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Midpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MidpointConstantCache() end @@ -176,9 +176,9 @@ end struct RK4ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::RK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -192,9 +192,9 @@ function alg_cache(alg::RK4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::RK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RK4ConstantCache() end @@ -216,9 +216,9 @@ end end function alg_cache(alg::BS3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -233,9 +233,9 @@ function alg_cache(alg::BS3, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::BS3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -258,9 +258,9 @@ end end function alg_cache(alg::OwrenZen3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -275,9 +275,9 @@ function alg_cache(alg::OwrenZen3, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::OwrenZen3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -302,9 +302,9 @@ end end function alg_cache(alg::OwrenZen4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -321,9 +321,9 @@ function alg_cache(alg::OwrenZen4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::OwrenZen4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -350,9 +350,9 @@ end end function alg_cache(alg::OwrenZen5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -371,9 +371,9 @@ function alg_cache(alg::OwrenZen5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::OwrenZen5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -399,9 +399,9 @@ end end function alg_cache(alg::BS5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -420,9 +420,9 @@ function alg_cache(alg::BS5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::BS5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} BS5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -501,9 +501,9 @@ struct RK46NLConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::RK46NL, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -513,16 +513,16 @@ function alg_cache(alg::RK46NL, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::RK46NL, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -541,9 +541,9 @@ end TruncatedStacktraces.@truncate_stacktrace Tsit5Cache 1 function alg_cache(alg::Tsit5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Tsit5ConstantCache() end @@ -571,9 +571,9 @@ end end function alg_cache(alg::DP5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -604,9 +604,9 @@ function alg_cache(alg::DP5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::DP5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DP5ConstantCache() end @@ -639,9 +639,9 @@ end end function alg_cache(alg::Anas5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Anas5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -673,9 +673,9 @@ function alg_cache(alg::Anas5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Anas5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Anas5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -733,9 +733,9 @@ struct KYK2014DGSSPRK_3S2_ConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::KYK2014DGSSPRK_3S2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_1 = zero(u) u_2 = zero(u) kk_1 = zero(rate_prototype) @@ -749,9 +749,9 @@ function alg_cache(alg::KYK2014DGSSPRK_3S2, u, rate_prototype, ::Type{uEltypeNoU end function alg_cache(alg::KYK2014DGSSPRK_3S2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KYK2014DGSSPRK_3S2_ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -850,16 +850,16 @@ struct RKO65ConstantCache{T1, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::RKO65, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -1112,16 +1112,16 @@ struct FRK65ConstantCache{T1, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::FRK65, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = FRK65ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -1214,16 +1214,16 @@ struct RKMConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::RKM, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = RKMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k = zero(rate_prototype) k1 = zero(rate_prototype) @@ -1261,16 +1261,16 @@ end end function alg_cache(alg::MSRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1311,16 +1311,16 @@ end end function alg_cache(alg::MSRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1359,17 +1359,17 @@ end end function alg_cache(alg::Stepanov5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Stepanov5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::Stepanov5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1421,16 +1421,16 @@ end end function alg_cache(alg::SIR54, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1464,16 +1464,16 @@ end end function alg_cache(alg::Alshina2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Alshina2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::Alshina2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) utilde = zero(u) @@ -1502,16 +1502,16 @@ end end function alg_cache(alg::Alshina3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Alshina3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::Alshina3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1543,16 +1543,16 @@ end end function alg_cache(alg::Alshina6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Alshina6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::Alshina6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) diff --git a/src/caches/low_storage_rk_caches.jl b/src/caches/low_storage_rk_caches.jl index cb70993224..96b09198fc 100644 --- a/src/caches/low_storage_rk_caches.jl +++ b/src/caches/low_storage_rk_caches.jl @@ -44,9 +44,9 @@ function ORK256ConstantCache(T, T2) end function alg_cache(alg::ORK256, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ORK256ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) williamson_condition = alg.williamson_condition @@ -65,9 +65,9 @@ function alg_cache(alg::ORK256, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ORK256, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ORK256ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -95,9 +95,9 @@ function CarpenterKennedy2N54ConstantCache(T, T2) end function alg_cache(alg::CarpenterKennedy2N54, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = CarpenterKennedy2N54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -117,9 +117,9 @@ function alg_cache(alg::CarpenterKennedy2N54, u, rate_prototype, ::Type{uEltypeN end function alg_cache(alg::CarpenterKennedy2N54, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CarpenterKennedy2N54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -152,9 +152,9 @@ function SHLDDRK64ConstantCache(T, T2) end function alg_cache(alg::SHLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SHLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) williamson_condition = alg.williamson_condition @@ -173,9 +173,9 @@ function alg_cache(alg::SHLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SHLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SHLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -209,9 +209,9 @@ function DGLDDRK73_CConstantCache(T, T2) end function alg_cache(alg::DGLDDRK73_C, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK73_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -231,9 +231,9 @@ function alg_cache(alg::DGLDDRK73_C, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::DGLDDRK73_C, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK73_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -270,9 +270,9 @@ function DGLDDRK84_CConstantCache(T, T2) end function alg_cache(alg::DGLDDRK84_C, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK84_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -292,9 +292,9 @@ function alg_cache(alg::DGLDDRK84_C, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::DGLDDRK84_C, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK84_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -331,9 +331,9 @@ function DGLDDRK84_FConstantCache(T, T2) end function alg_cache(alg::DGLDDRK84_F, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK84_FConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -353,9 +353,9 @@ function alg_cache(alg::DGLDDRK84_F, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::DGLDDRK84_F, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK84_FConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -404,9 +404,9 @@ function NDBLSRK124ConstantCache(T, T2) end function alg_cache(alg::NDBLSRK124, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK124ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -426,9 +426,9 @@ function alg_cache(alg::NDBLSRK124, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::NDBLSRK124, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK124ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -480,9 +480,9 @@ function NDBLSRK134ConstantCache(T, T2) end function alg_cache(alg::NDBLSRK134, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK134ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -502,9 +502,9 @@ function alg_cache(alg::NDBLSRK134, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::NDBLSRK134, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK134ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -559,9 +559,9 @@ function NDBLSRK144ConstantCache(T, T2) end function alg_cache(alg::NDBLSRK144, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK144ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -581,9 +581,9 @@ function alg_cache(alg::NDBLSRK144, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::NDBLSRK144, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK144ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -635,9 +635,9 @@ function CFRLDDRK64ConstantCache(T, T2) end function alg_cache(alg::CFRLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -652,9 +652,9 @@ function alg_cache(alg::CFRLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::CFRLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CFRLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -688,9 +688,9 @@ function TSLDDRK74ConstantCache(T, T2) end function alg_cache(alg::TSLDDRK74, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -704,9 +704,9 @@ function alg_cache(alg::TSLDDRK74, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::TSLDDRK74, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TSLDDRK74ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -765,9 +765,9 @@ function ParsaniKetchesonDeconinck3S32ConstantCache(T, T2) end function alg_cache(alg::ParsaniKetchesonDeconinck3S32, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -782,9 +782,9 @@ function alg_cache(alg::ParsaniKetchesonDeconinck3S32, u, rate_prototype, end function alg_cache(alg::ParsaniKetchesonDeconinck3S32, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S32ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -849,9 +849,9 @@ function ParsaniKetchesonDeconinck3S82ConstantCache(T, T2) end function alg_cache(alg::ParsaniKetchesonDeconinck3S82, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -866,9 +866,9 @@ function alg_cache(alg::ParsaniKetchesonDeconinck3S82, u, rate_prototype, end function alg_cache(alg::ParsaniKetchesonDeconinck3S82, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S82ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -915,9 +915,9 @@ function ParsaniKetchesonDeconinck3S53ConstantCache(T, T2) end function alg_cache(alg::ParsaniKetchesonDeconinck3S53, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -932,9 +932,9 @@ function alg_cache(alg::ParsaniKetchesonDeconinck3S53, u, rate_prototype, end function alg_cache(alg::ParsaniKetchesonDeconinck3S53, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S53ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1059,9 +1059,9 @@ function ParsaniKetchesonDeconinck3S173ConstantCache(T, T2) end function alg_cache(alg::ParsaniKetchesonDeconinck3S173, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1076,9 +1076,9 @@ function alg_cache(alg::ParsaniKetchesonDeconinck3S173, u, rate_prototype, end function alg_cache(alg::ParsaniKetchesonDeconinck3S173, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S173ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1149,9 +1149,9 @@ function ParsaniKetchesonDeconinck3S94ConstantCache(T, T2) end function alg_cache(alg::ParsaniKetchesonDeconinck3S94, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1166,9 +1166,9 @@ function alg_cache(alg::ParsaniKetchesonDeconinck3S94, u, rate_prototype, end function alg_cache(alg::ParsaniKetchesonDeconinck3S94, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S94ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1299,9 +1299,9 @@ function ParsaniKetchesonDeconinck3S184ConstantCache(T, T2) end function alg_cache(alg::ParsaniKetchesonDeconinck3S184, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1316,9 +1316,9 @@ function alg_cache(alg::ParsaniKetchesonDeconinck3S184, u, rate_prototype, end function alg_cache(alg::ParsaniKetchesonDeconinck3S184, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S184ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1395,9 +1395,9 @@ function ParsaniKetchesonDeconinck3S105ConstantCache(T, T2) end function alg_cache(alg::ParsaniKetchesonDeconinck3S105, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1412,9 +1412,9 @@ function alg_cache(alg::ParsaniKetchesonDeconinck3S105, u, rate_prototype, end function alg_cache(alg::ParsaniKetchesonDeconinck3S105, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S105ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1557,9 +1557,9 @@ function ParsaniKetchesonDeconinck3S205ConstantCache(T, T2) end function alg_cache(alg::ParsaniKetchesonDeconinck3S205, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1574,9 +1574,9 @@ function alg_cache(alg::ParsaniKetchesonDeconinck3S205, u, rate_prototype, end function alg_cache(alg::ParsaniKetchesonDeconinck3S205, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S205ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1674,9 +1674,9 @@ function RDPK3Sp35ConstantCache(T, T2) end function alg_cache(alg::RDPK3Sp35, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -1697,9 +1697,9 @@ function alg_cache(alg::RDPK3Sp35, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::RDPK3Sp35, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp35ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1802,9 +1802,9 @@ function RDPK3Sp49ConstantCache(T, T2) end function alg_cache(alg::RDPK3Sp49, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -1825,9 +1825,9 @@ function alg_cache(alg::RDPK3Sp49, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::RDPK3Sp49, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp49ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1940,9 +1940,9 @@ function RDPK3Sp510ConstantCache(T, T2) end function alg_cache(alg::RDPK3Sp510, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -1964,9 +1964,9 @@ function alg_cache(alg::RDPK3Sp510, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::RDPK3Sp510, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp510ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2065,9 +2065,9 @@ function RDPK3SpFSAL35ConstantCache(T, T2) end function alg_cache(alg::RDPK3SpFSAL35, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2089,9 +2089,9 @@ function alg_cache(alg::RDPK3SpFSAL35, u, rate_prototype, ::Type{uEltypeNoUnits} end function alg_cache(alg::RDPK3SpFSAL35, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL35ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2195,9 +2195,9 @@ function RDPK3SpFSAL49ConstantCache(T, T2) end function alg_cache(alg::RDPK3SpFSAL49, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2219,9 +2219,9 @@ function alg_cache(alg::RDPK3SpFSAL49, u, rate_prototype, ::Type{uEltypeNoUnits} end function alg_cache(alg::RDPK3SpFSAL49, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL49ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2335,9 +2335,9 @@ function RDPK3SpFSAL510ConstantCache(T, T2) end function alg_cache(alg::RDPK3SpFSAL510, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2359,9 +2359,9 @@ function alg_cache(alg::RDPK3SpFSAL510, u, rate_prototype, ::Type{uEltypeNoUnits end function alg_cache(alg::RDPK3SpFSAL510, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL510ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2421,9 +2421,9 @@ function CKLLSRK43_2ConstantCache(T, T2) end function alg_cache(alg::CKLLSRK43_2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2441,9 +2441,9 @@ function alg_cache(alg::CKLLSRK43_2, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::CKLLSRK43_2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK43_2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2484,9 +2484,9 @@ function CKLLSRK54_3CConstantCache(T, T2) end function alg_cache(alg::CKLLSRK54_3C, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2504,9 +2504,9 @@ function alg_cache(alg::CKLLSRK54_3C, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::CKLLSRK54_3C, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2571,9 +2571,9 @@ function CKLLSRK95_4SConstantCache(T, T2) end function alg_cache(alg::CKLLSRK95_4S, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2591,9 +2591,9 @@ function alg_cache(alg::CKLLSRK95_4S, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::CKLLSRK95_4S, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4SConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2658,9 +2658,9 @@ function CKLLSRK95_4CConstantCache(T, T2) end function alg_cache(alg::CKLLSRK95_4C, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2678,9 +2678,9 @@ function alg_cache(alg::CKLLSRK95_4C, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::CKLLSRK95_4C, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2745,9 +2745,9 @@ function CKLLSRK95_4MConstantCache(T, T2) end function alg_cache(alg::CKLLSRK95_4M, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2765,9 +2765,9 @@ function alg_cache(alg::CKLLSRK95_4M, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::CKLLSRK95_4M, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4MConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2844,9 +2844,9 @@ function CKLLSRK54_3C_3RConstantCache(T, T2) end function alg_cache(alg::CKLLSRK54_3C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2867,9 +2867,9 @@ function alg_cache(alg::CKLLSRK54_3C_3R, u, rate_prototype, ::Type{uEltypeNoUnit end function alg_cache(alg::CKLLSRK54_3C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3C_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2915,9 +2915,9 @@ function CKLLSRK54_3M_3RConstantCache(T, T2) end function alg_cache(alg::CKLLSRK54_3M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2938,9 +2938,9 @@ function alg_cache(alg::CKLLSRK54_3M_3R, u, rate_prototype, ::Type{uEltypeNoUnit end function alg_cache(alg::CKLLSRK54_3M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3M_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2987,9 +2987,9 @@ function CKLLSRK54_3N_3RConstantCache(T, T2) end function alg_cache(alg::CKLLSRK54_3N_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3010,9 +3010,9 @@ function alg_cache(alg::CKLLSRK54_3N_3R, u, rate_prototype, ::Type{uEltypeNoUnit end function alg_cache(alg::CKLLSRK54_3N_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3N_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3080,9 +3080,9 @@ function CKLLSRK85_4C_3RConstantCache(T, T2) end function alg_cache(alg::CKLLSRK85_4C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3103,9 +3103,9 @@ function alg_cache(alg::CKLLSRK85_4C_3R, u, rate_prototype, ::Type{uEltypeNoUnit end function alg_cache(alg::CKLLSRK85_4C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4C_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3173,9 +3173,9 @@ function CKLLSRK85_4M_3RConstantCache(T, T2) end function alg_cache(alg::CKLLSRK85_4M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3196,9 +3196,9 @@ function alg_cache(alg::CKLLSRK85_4M_3R, u, rate_prototype, ::Type{uEltypeNoUnit end function alg_cache(alg::CKLLSRK85_4M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4M_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3266,9 +3266,9 @@ function CKLLSRK85_4P_3RConstantCache(T, T2) end function alg_cache(alg::CKLLSRK85_4P_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3289,9 +3289,9 @@ function alg_cache(alg::CKLLSRK85_4P_3R, u, rate_prototype, ::Type{uEltypeNoUnit end function alg_cache(alg::CKLLSRK85_4P_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4P_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3377,9 +3377,9 @@ function CKLLSRK54_3N_4RConstantCache(T, T2) end function alg_cache(alg::CKLLSRK54_3N_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3402,9 +3402,9 @@ function alg_cache(alg::CKLLSRK54_3N_4R, u, rate_prototype, ::Type{uEltypeNoUnit end function alg_cache(alg::CKLLSRK54_3N_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3N_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3452,9 +3452,9 @@ function CKLLSRK54_3M_4RConstantCache(T, T2) end function alg_cache(alg::CKLLSRK54_3M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3477,9 +3477,9 @@ function alg_cache(alg::CKLLSRK54_3M_4R, u, rate_prototype, ::Type{uEltypeNoUnit end function alg_cache(alg::CKLLSRK54_3M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3M_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3540,9 +3540,9 @@ function CKLLSRK65_4M_4RConstantCache(T, T2) end function alg_cache(alg::CKLLSRK65_4M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3565,9 +3565,9 @@ function alg_cache(alg::CKLLSRK65_4M_4R, u, rate_prototype, ::Type{uEltypeNoUnit end function alg_cache(alg::CKLLSRK65_4M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK65_4M_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3644,9 +3644,9 @@ function CKLLSRK85_4FM_4RConstantCache(T, T2) end function alg_cache(alg::CKLLSRK85_4FM_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3669,9 +3669,9 @@ function alg_cache(alg::CKLLSRK85_4FM_4R, u, rate_prototype, ::Type{uEltypeNoUni end function alg_cache(alg::CKLLSRK85_4FM_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4FM_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3785,9 +3785,9 @@ function CKLLSRK75_4M_5RConstantCache(T, T2) end function alg_cache(alg::CKLLSRK75_4M_5R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3813,8 +3813,8 @@ function alg_cache(alg::CKLLSRK75_4M_5R, u, rate_prototype, ::Type{uEltypeNoUnit end function alg_cache(alg::CKLLSRK75_4M_5R, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 89a63edf90..7bc5142bd0 100644 --- a/src/caches/nordsieck_caches.jl +++ b/src/caches/nordsieck_caches.jl @@ -20,9 +20,9 @@ mutable struct AN5ConstantCache{zType, lType, dtsType, dType, tsit5Type} <: end function alg_cache(alg::AN5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} N = 5 z = [zero(rate_prototype) for i in 1:(N + 1)] Δ = u @@ -61,9 +61,9 @@ mutable struct AN5Cache{uType, dType, rateType, zType, lType, dtsType, tsit5Type end function alg_cache(alg::AN5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ################################################# # Tsit5 # Cannot alias pointers, since we have to use `k`s to start the Nordsieck vector @@ -140,9 +140,9 @@ mutable struct JVODEConstantCache{zType, lType, dtsType, dType, tsit5Type, etaTy end function alg_cache(alg::JVODE, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} N = 12 z = [rate_prototype for i in 1:(N + 1)] Δ = u @@ -212,9 +212,9 @@ mutable struct JVODECache{ end function alg_cache(alg::JVODE, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ################################################# # Tsit5 # Cannot alias pointers, since we have to use `k`s to start the Nordsieck vector diff --git a/src/caches/pdirk_caches.jl b/src/caches/pdirk_caches.jl index e47315198c..76a1a793f9 100644 --- a/src/caches/pdirk_caches.jl +++ b/src/caches/pdirk_caches.jl @@ -46,9 +46,9 @@ function PDIRK44Tableau(T, T2) end function alg_cache(alg::PDIRK44, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, @@ -71,9 +71,9 @@ function alg_cache(alg::PDIRK44, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::PDIRK44, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, diff --git a/src/caches/prk_caches.jl b/src/caches/prk_caches.jl index 158af13c59..b61685ace2 100644 --- a/src/caches/prk_caches.jl +++ b/src/caches/prk_caches.jl @@ -63,9 +63,9 @@ struct KuttaPRK2p5ConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::KuttaPRK2p5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) k1 = zero(rate_prototype) @@ -82,8 +82,8 @@ function alg_cache(alg::KuttaPRK2p5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::KuttaPRK2p5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 52e59ef5bb..2594804d1d 100644 --- a/src/caches/rkc_caches.jl +++ b/src/caches/rkc_caches.jl @@ -24,9 +24,9 @@ end end function alg_cache(alg::ROCK2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ROCK2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) @@ -41,9 +41,9 @@ function alg_cache(alg::ROCK2, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ROCK2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ROCK2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) end @@ -76,9 +76,9 @@ end end function alg_cache(alg::ROCK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ROCK4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) @@ -94,9 +94,9 @@ function alg_cache(alg::ROCK4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ROCK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ROCK4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) end @@ -118,9 +118,9 @@ end end function alg_cache(alg::RKC, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = RKCConstantCache(u) gprev = zero(u) gprev2 = zero(u) @@ -133,9 +133,9 @@ function alg_cache(alg::RKC, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::RKC, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKCConstantCache(u) end @@ -165,9 +165,9 @@ end end function alg_cache(alg::IRKC, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -178,9 +178,9 @@ function alg_cache(alg::IRKC, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::IRKC, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -228,9 +228,9 @@ end end function alg_cache(alg::ESERK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ESERK4ConstantCache(u) uᵢ = zero(u) uᵢ₋₁ = zero(u) @@ -245,9 +245,9 @@ function alg_cache(alg::ESERK4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ESERK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ESERK4ConstantCache(u) end @@ -278,9 +278,9 @@ end end function alg_cache(alg::ESERK5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ESERK5ConstantCache(u) uᵢ = zero(u) uᵢ₋₁ = zero(u) @@ -295,9 +295,9 @@ function alg_cache(alg::ESERK5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ESERK5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ESERK5ConstantCache(u) end @@ -325,9 +325,9 @@ end end function alg_cache(alg::SERK2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = SERK2ConstantCache(u) uᵢ₋₁ = zero(u) uᵢ₋₂ = zero(u) @@ -341,8 +341,8 @@ function alg_cache(alg::SERK2, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SERK2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SERK2ConstantCache(u) end diff --git a/src/caches/rkn_caches.jl b/src/caches/rkn_caches.jl index 7ffa67bf23..d4b91707de 100644 --- a/src/caches/rkn_caches.jl +++ b/src/caches/rkn_caches.jl @@ -12,9 +12,9 @@ end # 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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) k₂ = zero(reduced_rate_prototype) @@ -28,9 +28,9 @@ end 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, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom4ConstantCache() end @@ -53,9 +53,9 @@ end end function alg_cache(alg::FineRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = FineRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -72,9 +72,9 @@ function alg_cache(alg::FineRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::FineRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FineRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -97,9 +97,9 @@ end end function alg_cache(alg::FineRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = FineRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -118,9 +118,9 @@ function alg_cache(alg::FineRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::FineRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FineRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -136,9 +136,9 @@ end end function alg_cache(alg::Nystrom4VelocityIndependent, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) k₂ = zero(reduced_rate_prototype) @@ -151,9 +151,9 @@ end struct Nystrom4VelocityIndependentConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Nystrom4VelocityIndependent, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom4VelocityIndependentConstantCache() end @@ -171,9 +171,9 @@ end end function alg_cache(alg::IRKN3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -186,9 +186,9 @@ function alg_cache(alg::IRKN3, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::IRKN3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} IRKN3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -207,9 +207,9 @@ end end function alg_cache(alg::IRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -223,9 +223,9 @@ function alg_cache(alg::IRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::IRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} IRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -243,9 +243,9 @@ end end function alg_cache(alg::Nystrom5VelocityIndependent, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) k₂ = zero(reduced_rate_prototype) @@ -259,9 +259,9 @@ function alg_cache(alg::Nystrom5VelocityIndependent, u, rate_prototype, end function alg_cache(alg::Nystrom5VelocityIndependent, u, rate_prototype, - ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom5VelocityIndependentConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -282,9 +282,9 @@ struct DPRKN4Cache{uType, rateType, reducedRateType, uNoUnitsType, TabType} <: end function alg_cache(alg::DPRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -300,9 +300,9 @@ function alg_cache(alg::DPRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::DPRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -324,9 +324,9 @@ end end function alg_cache(alg::DPRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -344,9 +344,9 @@ function alg_cache(alg::DPRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::DPRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -368,9 +368,9 @@ end end function alg_cache(alg::DPRKN6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -388,9 +388,9 @@ function alg_cache(alg::DPRKN6, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::DPRKN6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -412,9 +412,9 @@ end end function alg_cache(alg::DPRKN6FM, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN6FMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -432,9 +432,9 @@ function alg_cache(alg::DPRKN6FM, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::DPRKN6FM, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN6FMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -459,9 +459,9 @@ end end function alg_cache(alg::DPRKN8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -482,9 +482,9 @@ function alg_cache(alg::DPRKN8, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::DPRKN8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -517,9 +517,9 @@ end end function alg_cache(alg::DPRKN12, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -549,9 +549,9 @@ function alg_cache(alg::DPRKN12, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::DPRKN12, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -571,9 +571,9 @@ end end function alg_cache(alg::ERKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -589,9 +589,9 @@ function alg_cache(alg::ERKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ERKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ERKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -611,9 +611,9 @@ end end function alg_cache(alg::ERKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -629,9 +629,9 @@ function alg_cache(alg::ERKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ERKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ERKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -654,9 +654,9 @@ end end function alg_cache(alg::ERKN7, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -675,8 +675,8 @@ function alg_cache(alg::ERKN7, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ERKN7, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 d553078f32..54b9b5d6af 100644 --- a/src/caches/rosenbrock_caches.jl +++ b/src/caches/rosenbrock_caches.jl @@ -68,9 +68,9 @@ TruncatedStacktraces.@truncate_stacktrace Rosenbrock23Cache 1 end function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -111,9 +111,9 @@ function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -170,9 +170,9 @@ function Rosenbrock23ConstantCache(::Type{T}, tf, uf, J, W, linsolve, autodiff) end function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -200,9 +200,9 @@ function Rosenbrock32ConstantCache(::Type{T}, tf, uf, J, W, linsolve, autodiff) end function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -258,9 +258,9 @@ end end function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} du = zero(rate_prototype) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -296,9 +296,9 @@ function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -339,9 +339,9 @@ end end function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} du = zero(rate_prototype) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -388,9 +388,9 @@ struct Rosenbrock34ConstantCache{TF, UF, Tab, JType, WType, F} <: end function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -464,9 +464,9 @@ end end function alg_cache(alg::Rodas4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) du = zero(rate_prototype) @@ -509,9 +509,9 @@ end TruncatedStacktraces.@truncate_stacktrace Rodas4Cache 1 function alg_cache(alg::Rodas4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -524,9 +524,9 @@ function alg_cache(alg::Rodas4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Rodas42, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) du = zero(rate_prototype) @@ -567,9 +567,9 @@ function alg_cache(alg::Rodas42, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Rodas42, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -582,9 +582,9 @@ function alg_cache(alg::Rodas42, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Rodas4P, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) du = zero(rate_prototype) @@ -625,9 +625,9 @@ function alg_cache(alg::Rodas4P, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Rodas4P, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -640,9 +640,9 @@ function alg_cache(alg::Rodas4P, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Rodas4P2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) du = zero(rate_prototype) @@ -683,9 +683,9 @@ function alg_cache(alg::Rodas4P2, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Rodas4P2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -751,9 +751,9 @@ end TruncatedStacktraces.@truncate_stacktrace Rosenbrock5Cache 1 function alg_cache(alg::Rodas5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) dense3 = zero(rate_prototype) @@ -798,9 +798,9 @@ function alg_cache(alg::Rodas5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Rodas5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -812,9 +812,9 @@ function alg_cache(alg::Rodas5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Rodas5P, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) dense3 = zero(rate_prototype) @@ -859,9 +859,9 @@ function alg_cache(alg::Rodas5P, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Rodas5P, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) diff --git a/src/caches/sdirk_caches.jl b/src/caches/sdirk_caches.jl index 2b6d891d3b..22e76f0feb 100644 --- a/src/caches/sdirk_caches.jl +++ b/src/caches/sdirk_caches.jl @@ -11,9 +11,9 @@ abstract type SDIRKMutableCache <: OrdinaryDiffEqMutableCache end end function alg_cache(alg::ImplicitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -30,9 +30,9 @@ mutable struct ImplicitEulerConstantCache{N} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::ImplicitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -44,9 +44,9 @@ mutable struct ImplicitMidpointConstantCache{N} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::ImplicitMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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)) @@ -61,9 +61,9 @@ end end function alg_cache(alg::ImplicitMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -78,9 +78,9 @@ mutable struct TrapezoidConstantCache{uType, tType, N} <: OrdinaryDiffEqConstant end function alg_cache(alg::Trapezoid, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -104,9 +104,9 @@ end end function alg_cache(alg::Trapezoid, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -126,9 +126,9 @@ mutable struct TRBDF2ConstantCache{Tab, N} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::TRBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -149,9 +149,9 @@ end end function alg_cache(alg::TRBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -171,9 +171,9 @@ mutable struct SDIRK2ConstantCache{N} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -191,9 +191,9 @@ end end function alg_cache(alg::SDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -215,9 +215,9 @@ struct SDIRK22ConstantCache{uType, tType, N, Tab} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SDIRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{tTypeNoUnits}, ::Type{uBottomEltypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{tTypeNoUnits}, ::Type{uBottomEltypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SDIRK22Tableau(constvalue(uBottomEltypeNoUnits)) uprev3 = u tprev2 = t @@ -243,9 +243,9 @@ end end function alg_cache(alg::SDIRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, @@ -265,9 +265,9 @@ mutable struct SSPSDIRK2ConstantCache{N} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPSDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -284,9 +284,9 @@ end end function alg_cache(alg::SSPSDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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)) @@ -306,9 +306,9 @@ mutable struct Kvaerno3ConstantCache{Tab, N} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Kvaerno3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -331,9 +331,9 @@ end end function alg_cache(alg::Kvaerno3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -356,9 +356,9 @@ mutable struct Cash4ConstantCache{N, Tab} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Cash4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -381,9 +381,9 @@ end end function alg_cache(alg::Cash4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -407,9 +407,9 @@ mutable struct SFSDIRK4ConstantCache{N, Tab} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SFSDIRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -433,9 +433,9 @@ end end function alg_cache(alg::SFSDIRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -459,9 +459,9 @@ mutable struct SFSDIRK5ConstantCache{N, Tab} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SFSDIRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -486,9 +486,9 @@ end end function alg_cache(alg::SFSDIRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -513,9 +513,9 @@ mutable struct SFSDIRK6ConstantCache{N, Tab} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SFSDIRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -540,9 +540,9 @@ end end function alg_cache(alg::SFSDIRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -567,9 +567,9 @@ mutable struct SFSDIRK7ConstantCache{N, Tab} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SFSDIRK7, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -595,9 +595,9 @@ end end function alg_cache(alg::SFSDIRK7, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -623,9 +623,9 @@ mutable struct SFSDIRK8ConstantCache{N, Tab} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SFSDIRK8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -652,9 +652,9 @@ end end function alg_cache(alg::SFSDIRK8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -681,9 +681,9 @@ mutable struct Hairer4ConstantCache{N, Tab} <: OrdinaryDiffEqConstantCache 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, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if alg isa Hairer4 tab = Hairer4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) else @@ -711,9 +711,9 @@ end 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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if alg isa Hairer4 tab = Hairer4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) else # Hairer42 @@ -754,9 +754,9 @@ end end function alg_cache(alg::ESDIRK54I8L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -784,9 +784,9 @@ mutable struct ESDIRK54I8L2SAConstantCache{N, Tab} <: OrdinaryDiffEqConstantCach end function alg_cache(alg::ESDIRK54I8L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -811,9 +811,9 @@ end end function alg_cache(alg::ESDIRK436L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -839,9 +839,9 @@ mutable struct ESDIRK436L2SA2ConstantCache{N, Tab} <: OrdinaryDiffEqConstantCach end function alg_cache(alg::ESDIRK436L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -867,9 +867,9 @@ end end function alg_cache(alg::ESDIRK437L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -896,9 +896,9 @@ mutable struct ESDIRK437L2SAConstantCache{N, Tab} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::ESDIRK437L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -924,9 +924,9 @@ end end function alg_cache(alg::ESDIRK547L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -953,9 +953,9 @@ mutable struct ESDIRK547L2SA2ConstantCache{N, Tab} <: OrdinaryDiffEqConstantCach end function alg_cache(alg::ESDIRK547L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::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, @@ -983,10 +983,10 @@ end end function alg_cache(alg::ESDIRK659L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, - p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, + p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK659L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -1015,10 +1015,10 @@ mutable struct ESDIRK659L2SAConstantCache{N, Tab} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::ESDIRK659L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where - {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + uprev, uprev2, f, t, dt, reltol, p, calck, + ::Val{false}) where + {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK659L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, diff --git a/src/caches/ssprk_caches.jl b/src/caches/ssprk_caches.jl index a5faf769dc..8392025cca 100644 --- a/src/caches/ssprk_caches.jl +++ b/src/caches/ssprk_caches.jl @@ -12,9 +12,9 @@ end 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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -25,9 +25,9 @@ function alg_cache(alg::SSPRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK22ConstantCache() end @@ -45,9 +45,9 @@ end 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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -58,9 +58,9 @@ function alg_cache(alg::SSPRK33, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK33, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK33ConstantCache() end @@ -122,9 +122,9 @@ function KYKSSPRK42ConstantCache(T, T2) end function alg_cache(alg::KYKSSPRK42, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -135,9 +135,9 @@ function alg_cache(alg::KYKSSPRK42, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::KYKSSPRK42, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KYKSSPRK42ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -193,9 +193,9 @@ struct SSPRK53ConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK53, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -209,9 +209,9 @@ function alg_cache(alg::SSPRK53, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK53, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -262,16 +262,16 @@ function SHLDDRK52ConstantCache(T1, T2) end function alg_cache(alg::SHLDDRK52, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -367,16 +367,16 @@ function SHLDDRK_2NConstantCache(T1, T2) end function alg_cache(alg::SHLDDRK_2N, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -435,9 +435,9 @@ struct SSPRK53_2N1ConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK53_2N1, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -451,9 +451,9 @@ function alg_cache(alg::SSPRK53_2N1, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK53_2N1, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_2N1ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -510,9 +510,9 @@ struct SSPRK53_2N2ConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK53_2N2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -526,9 +526,9 @@ function alg_cache(alg::SSPRK53_2N2, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK53_2N2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_2N2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -582,9 +582,9 @@ struct SSPRK53_HConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK53_H, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -598,9 +598,9 @@ function alg_cache(alg::SSPRK53_H, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK53_H, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_HConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -660,9 +660,9 @@ struct SSPRK63ConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK63, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₂ = zero(u) k = zero(rate_prototype) @@ -677,9 +677,9 @@ function alg_cache(alg::SSPRK63, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK63, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK63ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -747,9 +747,9 @@ struct SSPRK73ConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK73, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₁ = zero(u) k = zero(rate_prototype) @@ -764,9 +764,9 @@ function alg_cache(alg::SSPRK73, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK73, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK73ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -841,9 +841,9 @@ struct SSPRK83ConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK83, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₂ = zero(u) u₃ = zero(u) @@ -859,9 +859,9 @@ function alg_cache(alg::SSPRK83, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK83, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK83ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -896,9 +896,9 @@ struct SSPRK43ConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK43, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -914,9 +914,9 @@ function alg_cache(alg::SSPRK43, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK43, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK43ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -942,9 +942,9 @@ end 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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -959,9 +959,9 @@ function alg_cache(alg::SSPRK432, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK432, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK432ConstantCache() end @@ -996,9 +996,9 @@ end end function alg_cache(alg::SSPRKMSVS32, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) dts = fill(zero(dt), 3) dtf = fill(zero(dt), 2) @@ -1012,9 +1012,9 @@ function alg_cache(alg::SSPRKMSVS32, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRKMSVS32, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) dtf = fill(zero(dt), 2) μ = zero(dt) @@ -1060,9 +1060,9 @@ end end function alg_cache(alg::SSPRKMSVS43, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) u_3 = zero(u) u_2 = zero(u) @@ -1077,9 +1077,9 @@ function alg_cache(alg::SSPRKMSVS43, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRKMSVS43, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_3 = u u_2 = u u_1 = u @@ -1111,9 +1111,9 @@ end 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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -1128,9 +1128,9 @@ function alg_cache(alg::SSPRK932, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK932, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK932ConstantCache() end @@ -1198,9 +1198,9 @@ struct SSPRK54ConstantCache{T, T2} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SSPRK54, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u₂ = zero(u) u₃ = zero(u) tmp = zero(u) @@ -1217,9 +1217,9 @@ function alg_cache(alg::SSPRK54, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK54, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1239,9 +1239,9 @@ end 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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1255,8 +1255,8 @@ function alg_cache(alg::SSPRK104, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SSPRK104, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK104ConstantCache() end diff --git a/src/caches/symplectic_caches.jl b/src/caches/symplectic_caches.jl index 0e446cd414..71c55340dc 100644 --- a/src/caches/symplectic_caches.jl +++ b/src/caches/symplectic_caches.jl @@ -7,18 +7,18 @@ end function alg_cache(alg::SymplecticEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SymplecticEulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end 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, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SymplecticEulerConstantCache() end @@ -37,9 +37,9 @@ struct VelocityVerletConstantCache{uEltypeNoUnits} <: OrdinaryDiffEqConstantCach end function alg_cache(alg::VelocityVerlet, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(rate_prototype) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -48,9 +48,9 @@ function alg_cache(alg::VelocityVerlet, u, rate_prototype, ::Type{uEltypeNoUnits end function alg_cache(alg::VelocityVerlet, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} VelocityVerletConstantCache(uEltypeNoUnits(1 // 2)) end @@ -64,9 +64,9 @@ end end function alg_cache(alg::VerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -76,16 +76,16 @@ function alg_cache(alg::VerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits end function alg_cache(alg::VerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -95,17 +95,17 @@ function alg_cache(alg::PseudoVerletLeapfrog, u, rate_prototype, ::Type{uEltypeN end function alg_cache(alg::PseudoVerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} PseudoVerletLeapfrogConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::McAte2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -114,9 +114,9 @@ function alg_cache(alg::McAte2, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::McAte2, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -130,9 +130,9 @@ end end function alg_cache(alg::Ruth3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -141,16 +141,16 @@ function alg_cache(alg::Ruth3, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Ruth3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -159,9 +159,9 @@ function alg_cache(alg::McAte3, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::McAte3, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -175,9 +175,9 @@ end end function alg_cache(alg::McAte4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -186,16 +186,16 @@ function alg_cache(alg::McAte4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::McAte4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -204,9 +204,9 @@ function alg_cache(alg::CandyRoz4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::CandyRoz4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -220,9 +220,9 @@ end end function alg_cache(alg::CalvoSanz4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -232,16 +232,16 @@ function alg_cache(alg::CalvoSanz4, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::CalvoSanz4, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -250,9 +250,9 @@ function alg_cache(alg::McAte42, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::McAte42, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte42ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -266,9 +266,9 @@ end end function alg_cache(alg::McAte5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -277,9 +277,9 @@ function alg_cache(alg::McAte5, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::McAte5, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -293,9 +293,9 @@ end end function alg_cache(alg::Yoshida6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -304,9 +304,9 @@ function alg_cache(alg::Yoshida6, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::Yoshida6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Yoshida6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -320,9 +320,9 @@ end end function alg_cache(alg::KahanLi6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -331,9 +331,9 @@ function alg_cache(alg::KahanLi6, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::KahanLi6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KahanLi6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -347,9 +347,9 @@ end end function alg_cache(alg::McAte8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -358,9 +358,9 @@ function alg_cache(alg::McAte8, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::McAte8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -374,9 +374,9 @@ end end function alg_cache(alg::KahanLi8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -385,9 +385,9 @@ function alg_cache(alg::KahanLi8, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::KahanLi8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KahanLi8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -401,9 +401,9 @@ end end function alg_cache(alg::SofSpa10, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -412,8 +412,8 @@ function alg_cache(alg::SofSpa10, u, rate_prototype, ::Type{uEltypeNoUnits}, end function alg_cache(alg::SofSpa10, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::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 a87bedcccd..08b1de0919 100644 --- a/src/caches/verner_caches.jl +++ b/src/caches/verner_caches.jl @@ -25,9 +25,9 @@ end TruncatedStacktraces.@truncate_stacktrace Vern6Cache 1 function alg_cache(alg::Vern6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -52,9 +52,9 @@ struct Vern6ConstantCache{TabType} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Vern6, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) Vern6ConstantCache(tab) end @@ -86,9 +86,9 @@ end TruncatedStacktraces.@truncate_stacktrace Vern7Cache 1 function alg_cache(alg::Vern7, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = k2 @@ -111,9 +111,9 @@ end 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, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Vern7ConstantCache() end @@ -148,9 +148,9 @@ end TruncatedStacktraces.@truncate_stacktrace Vern8Cache 1 function alg_cache(alg::Vern8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -179,9 +179,9 @@ struct Vern8ConstantCache{TabType} <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Vern8, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) Vern8ConstantCache(tab) end @@ -219,9 +219,9 @@ end TruncatedStacktraces.@truncate_stacktrace Vern9Cache 1 function alg_cache(alg::Vern9, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = k2 @@ -251,8 +251,8 @@ end 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, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Vern9ConstantCache() end diff --git a/src/composite_algs.jl b/src/composite_algs.jl index a6474fa00b..c4bc7ef26a 100644 --- a/src/composite_algs.jl +++ b/src/composite_algs.jl @@ -25,9 +25,9 @@ struct AutoSwitch{nAlg, sAlg, tolType, T} switch_max::Int end function AutoSwitch(nonstiffalg, stiffalg; maxstiffstep = 10, maxnonstiffstep = 3, - nonstifftol = 9 // 10, stifftol = 9 // 10, dtfac = 2, - stiffalgfirst = false, - switch_max = 5) + nonstifftol = 9 // 10, stifftol = 9 // 10, dtfac = 2, + stiffalgfirst = false, + switch_max = 5) AutoSwitch(nonstiffalg, stiffalg, maxstiffstep, maxnonstiffstep, promote(nonstifftol, stifftol)..., dtfac, stiffalgfirst, switch_max) end diff --git a/src/dense/generic_dense.jl b/src/dense/generic_dense.jl index f457828358..2032e34be7 100644 --- a/src/dense/generic_dense.jl +++ b/src/dense/generic_dense.jl @@ -35,7 +35,7 @@ end end @inline function ode_addsteps!(integrator, f = integrator.f, always_calc_begin = false, - allow_calc_end = true, force_calc_end = false) + allow_calc_end = true, force_calc_end = false) cache = integrator.cache if !(typeof(cache) <: CompositeCache) _ode_addsteps!(integrator.k, integrator.tprev, integrator.uprev, integrator.u, @@ -99,7 +99,7 @@ end end @generated function composite_ode_interpolant(Θ, integrator, caches::T, current, idxs, - deriv) where {T <: Tuple} + deriv) where {T <: Tuple} expr = Expr(:block) for i in 1:length(T.types) push!(expr.args, @@ -131,7 +131,7 @@ end end @generated function composite_ode_interpolant!(val, Θ, integrator, caches::T, current, idxs, - deriv) where {T <: Tuple} + deriv) where {T <: Tuple} expr = Expr(:block) for i in 1:length(T.types) push!(expr.args, @@ -151,7 +151,7 @@ end end @inline function current_interpolant(t::Number, integrator::DiffEqBase.DEIntegrator, idxs, - deriv) + deriv) Θ = (t - integrator.tprev) / integrator.dt ode_interpolant(Θ, integrator, idxs, deriv) end @@ -162,19 +162,19 @@ end end @inline function current_interpolant!(val, t::Number, integrator::DiffEqBase.DEIntegrator, - idxs, deriv) + idxs, deriv) Θ = (t - integrator.tprev) / integrator.dt ode_interpolant!(val, Θ, integrator, idxs, deriv) end @inline function current_interpolant!(val, t, integrator::DiffEqBase.DEIntegrator, idxs, - deriv) + deriv) Θ = (t .- integrator.tprev) ./ integrator.dt [ode_interpolant!(val, ϕ, integrator, idxs, deriv) for ϕ in Θ] end @inline function current_interpolant!(val, t::Array, integrator::DiffEqBase.DEIntegrator, - idxs, deriv) + idxs, deriv) Θ = similar(t) @inbounds @simd ivdep for i in eachindex(t) Θ[i] = (t[i] - integrator.tprev) / integrator.dt @@ -183,25 +183,25 @@ end end @inline function current_extrapolant(t::Number, integrator::DiffEqBase.DEIntegrator, - idxs = nothing, deriv = Val{0}) + idxs = nothing, deriv = Val{0}) Θ = (t - integrator.tprev) / (integrator.t - integrator.tprev) ode_extrapolant(Θ, integrator, idxs, deriv) end @inline function current_extrapolant!(val, t::Number, integrator::DiffEqBase.DEIntegrator, - idxs = nothing, deriv = Val{0}) + idxs = nothing, deriv = Val{0}) Θ = (t - integrator.tprev) / (integrator.t - integrator.tprev) ode_extrapolant!(val, Θ, integrator, idxs, deriv) end @inline function current_extrapolant(t::AbstractArray, integrator::DiffEqBase.DEIntegrator, - idxs = nothing, deriv = Val{0}) + idxs = nothing, deriv = Val{0}) Θ = (t .- integrator.tprev) ./ (integrator.t - integrator.tprev) [ode_extrapolant(ϕ, integrator, idxs, deriv) for ϕ in Θ] end @inline function current_extrapolant!(val, t, integrator::DiffEqBase.DEIntegrator, - idxs = nothing, deriv = Val{0}) + idxs = nothing, deriv = Val{0}) Θ = (t .- integrator.tprev) ./ (integrator.t - integrator.tprev) [ode_extrapolant!(val, ϕ, integrator, idxs, deriv) for ϕ in Θ] end @@ -218,7 +218,7 @@ end end @generated function composite_ode_extrapolant!(val, Θ, integrator, caches::T, current, idxs, - deriv) where {T <: Tuple} + deriv) where {T <: Tuple} expr = Expr(:block) for i in 1:length(T.types) push!(expr.args, @@ -249,7 +249,7 @@ end end @generated function composite_ode_extrapolant(Θ, integrator, caches::T, current, idxs, - deriv) where {T <: Tuple} + deriv) where {T <: Tuple} expr = Expr(:block) for i in 1:length(T.types) push!(expr.args, @@ -269,16 +269,16 @@ end end function _evaluate_interpolant(f, Θ, dt, timeseries, i₋, i₊, - cache, idxs, - deriv, ks, ts, p) + cache, idxs, + deriv, ks, ts, p) _ode_addsteps!(ks[i₊], ts[i₋], timeseries[i₋], timeseries[i₊], dt, f, p, cache) # update the kcurrent return ode_interpolant(Θ, dt, timeseries[i₋], timeseries[i₊], ks[i₊], cache, idxs, deriv) end function evaluate_composite_cache(f, Θ, dt, timeseries, i₋, i₊, - caches::Tuple{C1, C2, Vararg}, idxs, - deriv, ks, ts, p, cacheid) where {C1, C2} + caches::Tuple{C1, C2, Vararg}, idxs, + deriv, ks, ts, p, cacheid) where {C1, C2} if (cacheid -= 1) != 0 return evaluate_composite_cache(f, Θ, dt, timeseries, i₋, i₊, Base.tail(caches), idxs, @@ -289,15 +289,15 @@ function evaluate_composite_cache(f, Θ, dt, timeseries, i₋, i₊, deriv, ks, ts, p) end function evaluate_composite_cache(f, Θ, dt, timeseries, i₋, i₊, - caches::Tuple{C}, idxs, - deriv, ks, ts, p, _) where {C} + caches::Tuple{C}, idxs, + deriv, ks, ts, p, _) where {C} _evaluate_interpolant(f, Θ, dt, timeseries, i₋, i₊, only(caches), idxs, deriv, ks, ts, p) end function evaluate_interpolant(f, Θ, dt, timeseries, i₋, i₊, cache, idxs, - deriv, ks, ts, id, p) + deriv, ks, ts, id, p) if typeof(cache) <: (FunctionMapCache) || typeof(cache) <: FunctionMapConstantCache return ode_interpolant(Θ, dt, timeseries[i₋], timeseries[i₊], 0, cache, idxs, deriv) @@ -320,7 +320,7 @@ Get the value at tvals where the solution is known at the times ts (sorted), with values timeseries and derivatives ks """ function ode_interpolation(tvals, id::I, idxs, deriv::D, p, - continuity::Symbol = :left) where {I, D} + continuity::Symbol = :left) where {I, D} @unpack ts, timeseries, ks, f, cache = id @inbounds tdir = sign(ts[end] - ts[1]) idx = sortperm(tvals, rev = tdir < 0) @@ -357,7 +357,7 @@ Get the value at tvals where the solution is known at the times ts (sorted), with values timeseries and derivatives ks """ function ode_interpolation!(vals, tvals, id::I, idxs, deriv::D, p, - continuity::Symbol = :left) where {I, D} + continuity::Symbol = :left) where {I, D} @unpack ts, timeseries, ks, f, cache = id @inbounds tdir = sign(ts[end] - ts[1]) idx = sortperm(tvals, rev = tdir < 0) @@ -442,7 +442,7 @@ Get the value at tval where the solution is known at the times ts (sorted), with values timeseries and derivatives ks """ function ode_interpolation(tval::Number, id::I, idxs, deriv::D, p, - continuity::Symbol = :left) where {I, D} + continuity::Symbol = :left) where {I, D} @unpack ts, timeseries, ks, f, cache = id @inbounds tdir = sign(ts[end] - ts[1]) @@ -490,7 +490,7 @@ Get the value at tval where the solution is known at the times ts (sorted), with values timeseries and derivatives ks """ function ode_interpolation!(out, tval::Number, id::I, idxs, deriv::D, p, - continuity::Symbol = :left) where {I, D} + continuity::Symbol = :left) where {I, D} @unpack ts, timeseries, ks, f, cache = id @inbounds tdir = sign(ts[end] - ts[1]) @@ -535,7 +535,7 @@ end By default, Hermite interpolant so update the derivative at the two ends """ function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache, always_calc_begin = false, - allow_calc_end = true, force_calc_end = false) + allow_calc_end = true, force_calc_end = false) if length(k) < 2 || always_calc_begin if typeof(cache) <: OrdinaryDiffEqMutableCache rtmp = similar(u, eltype(eltype(k))) @@ -559,7 +559,7 @@ function ode_interpolant(Θ, dt, y₀, y₁, k, cache, idxs, T::Type{Val{TI}}) w end function ode_interpolant(Θ, dt, y₀, y₁, k, cache::OrdinaryDiffEqMutableCache, idxs, - T::Type{Val{TI}}) where {TI} + T::Type{Val{TI}}) where {TI} if typeof(idxs) <: Number || typeof(y₀) <: Union{Number, SArray} # typeof(y₀) can be these if saveidxs gives a single value _ode_interpolant(Θ, dt, y₀, y₁, k, cache, idxs, T) @@ -606,21 +606,21 @@ Hairer Norsett Wanner Solving Ordinary Differential Euations I - Nonstiff Proble Herimte Interpolation, chosen if no other dispatch for ode_interpolant """ @muladd function hermite_interpolant(Θ, dt, y₀, y₁, k, ::Type{Val{false}}, idxs::Nothing, - T::Type{Val{0}}) # Default interpolant is Hermite + T::Type{Val{0}}) # Default interpolant is Hermite #@.. broadcast=false (1-Θ)*y₀+Θ*y₁+Θ*(Θ-1)*((1-2Θ)*(y₁-y₀)+(Θ-1)*dt*k[1] + Θ*dt*k[2]) @inbounds (1 - Θ) * y₀ + Θ * y₁ + Θ * (Θ - 1) * ((1 - 2Θ) * (y₁ - y₀) + (Θ - 1) * dt * k[1] + Θ * dt * k[2]) end @muladd function hermite_interpolant(Θ, dt, y₀, y₁, k, ::Type{Val{true}}, idxs::Nothing, - T::Type{Val{0}}) # Default interpolant is Hermite + T::Type{Val{0}}) # Default interpolant is Hermite #@.. broadcast=false (1-Θ)*y₀+Θ*y₁+Θ*(Θ-1)*((1-2Θ)*(y₁-y₀)+(Θ-1)*dt*k[1] + Θ*dt*k[2]) @inbounds @.. broadcast=false (1 - Θ)*y₀+Θ*y₁+ Θ*(Θ-1)*((1 - 2Θ)*(y₁ - y₀)+(Θ-1)*dt*k[1]+Θ*dt*k[2]) end @muladd function hermite_interpolant(Θ, dt, y₀::Array, y₁, k, ::Type{Val{true}}, - idxs::Nothing, T::Type{Val{0}}) # Default interpolant is Hermite + idxs::Nothing, T::Type{Val{0}}) # Default interpolant is Hermite out = similar(y₀) @inbounds @simd ivdep for i in eachindex(y₀) out[i] = (1 - Θ) * y₀[i] + Θ * y₁[i] + @@ -645,7 +645,7 @@ end end @muladd function hermite_interpolant!(out::Array, Θ, dt, y₀, y₁, k, idxs::Nothing, - T::Type{Val{0}}) # Default interpolant is Hermite + T::Type{Val{0}}) # Default interpolant is Hermite @inbounds @simd ivdep for i in eachindex(out) out[i] = (1 - Θ) * y₀[i] + Θ * y₁[i] + Θ * (Θ - 1) * @@ -674,7 +674,7 @@ end Herimte Interpolation, chosen if no other dispatch for ode_interpolant """ @muladd function hermite_interpolant(Θ, dt, y₀, y₁, k, ::Type{Val{false}}, idxs::Nothing, - T::Type{Val{1}}) # Default interpolant is Hermite + T::Type{Val{1}}) # Default interpolant is Hermite #@.. broadcast=false k[1] + Θ*(-4*dt*k[1] - 2*dt*k[2] - 6*y₀ + Θ*(3*dt*k[1] + 3*dt*k[2] + 6*y₀ - 6*y₁) + 6*y₁)/dt @inbounds k[1] + Θ * (-4 * dt * k[1] - 2 * dt * k[2] - 6 * y₀ + @@ -682,7 +682,7 @@ Herimte Interpolation, chosen if no other dispatch for ode_interpolant end @muladd function hermite_interpolant(Θ, dt, y₀, y₁, k, ::Type{Val{true}}, idxs::Nothing, - T::Type{Val{1}}) # Default interpolant is Hermite + T::Type{Val{1}}) # Default interpolant is Hermite @inbounds @.. broadcast=false k[1]+Θ * (-4 * dt * k[1] - 2 * dt * k[2] - 6 * y₀ + Θ * (3 * dt * k[1] + 3 * dt * k[2] + 6 * y₀ - 6 * y₁) + @@ -706,7 +706,7 @@ end end @muladd function hermite_interpolant!(out::Array, Θ, dt, y₀, y₁, k, idxs::Nothing, - T::Type{Val{1}}) # Default interpolant is Hermite + T::Type{Val{1}}) # Default interpolant is Hermite @inbounds @simd ivdep for i in eachindex(out) out[i] = k[1][i] + Θ * (-4 * dt * k[1][i] - 2 * dt * k[2][i] - 6 * y₀[i] + @@ -738,14 +738,14 @@ end Herimte Interpolation, chosen if no other dispatch for ode_interpolant """ @muladd function hermite_interpolant(Θ, dt, y₀, y₁, k, ::Type{Val{false}}, idxs::Nothing, - T::Type{Val{2}}) # Default interpolant is Hermite + T::Type{Val{2}}) # Default interpolant is Hermite #@.. broadcast=false (-4*dt*k[1] - 2*dt*k[2] - 6*y₀ + Θ*(6*dt*k[1] + 6*dt*k[2] + 12*y₀ - 12*y₁) + 6*y₁)/(dt*dt) @inbounds (-4 * dt * k[1] - 2 * dt * k[2] - 6 * y₀ + Θ * (6 * dt * k[1] + 6 * dt * k[2] + 12 * y₀ - 12 * y₁) + 6 * y₁) / (dt * dt) end @muladd function hermite_interpolant(Θ, dt, y₀, y₁, k, ::Type{Val{true}}, idxs::Nothing, - T::Type{Val{2}}) # Default interpolant is Hermite + T::Type{Val{2}}) # Default interpolant is Hermite #@.. broadcast=false (-4*dt*k[1] - 2*dt*k[2] - 6*y₀ + Θ*(6*dt*k[1] + 6*dt*k[2] + 12*y₀ - 12*y₁) + 6*y₁)/(dt*dt) @inbounds @.. broadcast=false (-4 * dt * k[1] - 2 * dt * k[2] - 6 * y₀ + Θ * (6 * dt * k[1] + 6 * dt * k[2] + 12 * y₀ - 12 * y₁) + @@ -769,7 +769,7 @@ end end @muladd function hermite_interpolant!(out::Array, Θ, dt, y₀, y₁, k, idxs::Nothing, - T::Type{Val{2}}) # Default interpolant is Hermite + T::Type{Val{2}}) # Default interpolant is Hermite @inbounds @simd ivdep for i in eachindex(out) out[i] = (-4 * dt * k[1][i] - 2 * dt * k[2][i] - 6 * y₀[i] + Θ * (6 * dt * k[1][i] + 6 * dt * k[2][i] + 12 * y₀[i] - 12 * y₁[i]) + @@ -804,13 +804,13 @@ end Herimte Interpolation, chosen if no other dispatch for ode_interpolant """ @muladd function hermite_interpolant(Θ, dt, y₀, y₁, k, ::Type{Val{false}}, idxs::Nothing, - T::Type{Val{3}}) # Default interpolant is Hermite + T::Type{Val{3}}) # Default interpolant is Hermite #@.. broadcast=false (6*dt*k[1] + 6*dt*k[2] + 12*y₀ - 12*y₁)/(dt*dt*dt) @inbounds (6 * dt * k[1] + 6 * dt * k[2] + 12 * y₀ - 12 * y₁) / (dt * dt * dt) end @muladd function hermite_interpolant(Θ, dt, y₀, y₁, k, ::Type{Val{true}}, idxs::Nothing, - T::Type{Val{3}}) # Default interpolant is Hermite + T::Type{Val{3}}) # Default interpolant is Hermite #@.. broadcast=false (6*dt*k[1] + 6*dt*k[2] + 12*y₀ - 12*y₁)/(dt*dt*dt) @inbounds @.. broadcast=false (6 * dt * k[1] + 6 * dt * k[2] + 12 * y₀ - 12 * y₁)/(dt * @@ -837,7 +837,7 @@ end end @muladd function hermite_interpolant!(out::Array, Θ, dt, y₀, y₁, k, idxs::Nothing, - T::Type{Val{3}}) # Default interpolant is Hermite + T::Type{Val{3}}) # Default interpolant is Hermite @inbounds @simd ivdep for i in eachindex(out) out[i] = (6 * dt * k[1][i] + 6 * dt * k[2][i] + 12 * y₀[i] - 12 * y₁[i]) / (dt * dt * dt) @@ -871,7 +871,7 @@ end end @muladd @inline function linear_interpolant!(out, Θ, dt, y₀, y₁, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) Θm1 = (1 - Θ) @.. broadcast=false out=Θm1 * y₀ + Θ * y₁ out diff --git a/src/dense/high_order_rk_addsteps.jl b/src/dense/high_order_rk_addsteps.jl index d1fdfa68ca..7b54008570 100644 --- a/src/dense/high_order_rk_addsteps.jl +++ b/src/dense/high_order_rk_addsteps.jl @@ -1,6 +1,6 @@ @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::DP8ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 7 || always_calc_begin @unpack c7, c8, c9, c10, c11, c6, c5, c4, c3, c2, b1, b6, b7, b8, b9, b10, b11, b12, a0201, a0301, a0302, a0401, a0403, a0501, a0503, a0504, a0601, a0604, a0605, a0701, a0704, a0705, a0706, a0801, a0804, a0805, a0806, a0807, a0901, a0904, a0905, a0906, a0907, a0908, a1001, a1004, a1005, a1006, a1007, a1008, a1009, a1101, a1104, a1105, a1106, a1107, a1108, a1109, a1110, a1201, a1204, a1205, a1206, a1207, a1208, a1209, a1210, a1211 = cache @unpack c14, c15, c16, a1401, a1407, a1408, a1409, a1410, a1411, a1412, a1413, a1501, a1506, a1507, a1508, a1511, a1512, a1513, a1514, a1601, a1606, a1607, a1608, a1609, a1613, a1614, a1615 = cache @@ -68,8 +68,8 @@ end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::DP8Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 7 || always_calc_begin @unpack c7, c8, c9, c10, c11, c6, c5, c4, c3, c2, b1, b6, b7, b8, b9, b10, b11, b12, a0201, a0301, a0302, a0401, a0403, a0501, a0503, a0504, a0601, a0604, a0605, a0701, a0704, a0705, a0706, a0801, a0804, a0805, a0806, a0807, a0901, a0904, a0905, a0906, a0907, a0908, a1001, a1004, a1005, a1006, a1007, a1008, a1009, a1101, a1104, a1105, a1106, a1107, a1108, a1109, a1110, a1201, a1204, a1205, a1206, a1207, a1208, a1209, a1210, a1211 = cache.tab @unpack c14, c15, c16, a1401, a1407, a1408, a1409, a1410, a1411, a1412, a1413, a1501, a1506, a1507, a1508, a1511, a1512, a1513, a1514, a1601, a1606, a1607, a1608, a1609, a1613, a1614, a1615 = cache.tab diff --git a/src/dense/interpolants.jl b/src/dense/interpolants.jl index bb9c15b208..1fb5ecf5c5 100644 --- a/src/dense/interpolants.jl +++ b/src/dense/interpolants.jl @@ -1,12 +1,12 @@ @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{FunctionMapConstantCache, FunctionMapCache}, - idxs, T::Type{Val{0}}) + cache::Union{FunctionMapConstantCache, FunctionMapCache}, + idxs, T::Type{Val{0}}) y₀ end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{FunctionMapConstantCache, FunctionMapCache}, - idxs, T::Type{Val{0}}) + cache::Union{FunctionMapConstantCache, FunctionMapCache}, + idxs, T::Type{Val{0}}) recursivecopy!(out, y₀) end @@ -21,29 +21,29 @@ Hairer Norsett Wanner Solving Ordinary Differential Euations I - Nonstiff Proble end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::DP5ConstantCache, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) @dp5pre0 @inbounds y₀ + dt * (k[1] * b10 + k[2] * b20 + k[3] * b30 + k[4] * b40) end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::DP5Cache, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) @dp5pre0 @inbounds @.. broadcast=false y₀+dt * (k[1] * b10 + k[2] * b20 + k[3] * b30 + k[4] * b40) end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs, - T::Type{Val{0}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs, + T::Type{Val{0}}) @dp5pre0 @views @.. broadcast=false y₀[idxs]+dt * (k[1][idxs] * b10 + k[2][idxs] * b20 + k[3][idxs] * b30 + k[4][idxs] * b40) end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, - T::Type{Val{0}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, + T::Type{Val{0}}) @dp5pre0 @inbounds @.. broadcast=false out=y₀ + dt * @@ -52,8 +52,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs, - T::Type{Val{0}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs, + T::Type{Val{0}}) @dp5pre0 @views @.. broadcast=false out=y₀[idxs] + dt * @@ -69,23 +69,23 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, - T::Type{Val{1}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, + T::Type{Val{1}}) @dp5pre1 @inbounds @.. broadcast=false k[1]+k[2]*b20diff+k[3]*b30diff+k[4]*b40diff end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs, - T::Type{Val{1}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs, + T::Type{Val{1}}) @dp5pre1 @views @.. broadcast=false k[1][idxs]+k[2][idxs]*b20diff+k[3][idxs]*b30diff+ k[4][idxs]*b40diff end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, - T::Type{Val{1}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, + T::Type{Val{1}}) @dp5pre1 @inbounds @.. broadcast=false out=k[1] + k[2] * b20diff + k[3] * b30diff + k[4] * b40diff @@ -93,8 +93,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs, - T::Type{Val{1}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs, + T::Type{Val{1}}) @dp5pre1 @views @.. broadcast=false out=k[1][idxs] + k[2][idxs] * b20diff + k[3][idxs] * b30diff + k[4][idxs] * b40diff @@ -109,24 +109,24 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, - T::Type{Val{2}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, + T::Type{Val{2}}) @dp5pre2 @inbounds @.. broadcast=false (k[2] * b20diff2 + k[3] * b30diff2 + k[4] * b40diff2)*invdt end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs, - T::Type{Val{2}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs, + T::Type{Val{2}}) @dp5pre2 @views @.. broadcast=false (k[2][idxs] * b20diff2 + k[3][idxs] * b30diff2 + k[4][idxs] * b40diff2)*invdt end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, - T::Type{Val{2}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, + T::Type{Val{2}}) @dp5pre2 @inbounds @.. broadcast=false out=(k[2] * b20diff2 + k[3] * b30diff2 + k[4] * b40diff2) * @@ -135,8 +135,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs, - T::Type{Val{2}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs, + T::Type{Val{2}}) @dp5pre2 @views @.. broadcast=false out=(k[2][idxs] * b20diff2 + k[3][idxs] * b30diff2 + k[4][idxs] * b40diff2) * invdt @@ -150,30 +150,30 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, - T::Type{Val{3}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, + T::Type{Val{3}}) @dp5pre3 @inbounds @.. broadcast=false (k[3] * b30diff3 + k[4] * b40diff3)*invdt2 end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs, - T::Type{Val{3}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs, + T::Type{Val{3}}) @dp5pre3 @views @.. broadcast=false (k[3][idxs] * b30diff3 + k[4][idxs] * b40diff3)*invdt2 end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, - T::Type{Val{3}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, + T::Type{Val{3}}) @dp5pre3 @inbounds @.. broadcast=false out=(k[3] * b30diff3 + k[4] * b40diff3) * invdt2 out end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs, - T::Type{Val{3}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs, + T::Type{Val{3}}) @dp5pre3 @views @.. broadcast=false out=(k[3][idxs] * b30diff3 + k[4][idxs] * b40diff3) * invdt2 out @@ -184,30 +184,30 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, - T::Type{Val{4}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, + T::Type{Val{4}}) @dp5pre4 @inbounds @.. broadcast=false k[4]*b40diff4invdt3 end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs, - T::Type{Val{4}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs, + T::Type{Val{4}}) @dp5pre4 @views @.. broadcast=false k[4][idxs]*b40diff4invdt3 end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, - T::Type{Val{4}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs::Nothing, + T::Type{Val{4}}) @dp5pre4 @inbounds @.. broadcast=false out=k[4] * b40diff4invdt3 out end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP5ConstantCache, DP5Cache}, idxs, - T::Type{Val{4}}) + cache::Union{DP5ConstantCache, DP5Cache}, idxs, + T::Type{Val{4}}) @dp5pre4 @views @.. broadcast=false out=k[4][idxs] * b40diff4invdt3 out @@ -226,42 +226,42 @@ Ketcheson, Lóczi, Jangabylova, Kusmanov: Dense output for SSP RK methods (2017) end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, + idxs::Nothing, T::Type{Val{0}}) @ssprkpre0 @inbounds @.. broadcast=false y₀*c00+y₁*c10+k[1]*b10dt end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, idxs, - T::Type{Val{0}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, idxs, + T::Type{Val{0}}) @ssprkpre0 @views @.. broadcast=false y₀[idxs]*c00+y₁[idxs]*c10+k[1][idxs]*b10dt end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, + idxs::Nothing, T::Type{Val{0}}) @ssprkpre0 @inbounds @.. broadcast=false out=y₀ * c00 + y₁ * c10 + k[1] * b10dt out end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, idxs, - T::Type{Val{0}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, idxs, + T::Type{Val{0}}) @ssprkpre0 @views @.. broadcast=false out=y₀[idxs] * c00 + y₁[idxs] * c10 + k[1][idxs] * b10dt out @@ -273,42 +273,42 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, + idxs::Nothing, T::Type{Val{1}}) @ssprkpre1 @inbounds @.. broadcast=false (y₁ - y₀) * c10diffinvdt+k[1] * b10diff end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, idxs, - T::Type{Val{1}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, idxs, + T::Type{Val{1}}) @ssprkpre1 @views @.. broadcast=false (y₁[idxs] - y₀[idxs]) * c10diffinvdt+k[1][idxs] * b10diff end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, + idxs::Nothing, T::Type{Val{1}}) @ssprkpre1 @inbounds @.. broadcast=false out=(y₁ - y₀) * c10diffinvdt + k[1] * b10diff out end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, idxs, - T::Type{Val{1}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, idxs, + T::Type{Val{1}}) @ssprkpre1 @views @.. broadcast=false out=(y₁[idxs] - y₀[idxs]) * c10diffinvdt + k[1][idxs] * b10diff @@ -322,43 +322,43 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, + idxs::Nothing, T::Type{Val{2}}) @ssprkpre2 @inbounds @.. broadcast=false (y₁ - y₀) * c10diff2invdt2+k[1] * b10diff2invdt end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, idxs, - T::Type{Val{2}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, idxs, + T::Type{Val{2}}) @ssprkpre2 @views @.. broadcast=false (y₁[idxs] - y₀[idxs]) * c10diff2invdt2+k[1][idxs] * b10diff2invdt end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, + idxs::Nothing, T::Type{Val{2}}) @ssprkpre2 @inbounds @.. broadcast=false out=(y₁ - y₀) * c10diff2invdt2 + k[1] * b10diff2invdt out end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{SSPRK22ConstantCache, SSPRK22Cache, - SSPRK33ConstantCache, SSPRK33Cache, - SSPRK43ConstantCache, SSPRK43Cache, - SSPRK432ConstantCache, SSPRK432Cache}, idxs, - T::Type{Val{2}}) + cache::Union{SSPRK22ConstantCache, SSPRK22Cache, + SSPRK33ConstantCache, SSPRK33Cache, + SSPRK43ConstantCache, SSPRK43Cache, + SSPRK432ConstantCache, SSPRK432Cache}, idxs, + T::Type{Val{2}}) @ssprkpre2 @views @.. broadcast=false out=(y₁[idxs] - y₀[idxs]) * c10diff2invdt2 + k[1][idxs] * b10diff2invdt @@ -389,7 +389,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Tsit5ConstantCache, - idxs::Nothing, T::Type{Val{0}}) + idxs::Nothing, T::Type{Val{0}}) @tsit5pre0 #@.. broadcast=false y₀ + dt*(k[1]*b1Θ + k[2]*b2Θ + k[3]*b3Θ + k[4]*b4Θ + k[5]*b5Θ + k[6]*b6Θ + k[7]*b7Θ) return @inbounds y₀ + @@ -398,7 +398,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Tsit5Cache, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) @tsit5pre0 return @inbounds @.. broadcast=false y₀+dt * (k[1] * b1Θ + k[2] * b2Θ + k[3] * b3Θ + k[4] * b4Θ + @@ -406,8 +406,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, + T::Type{Val{0}}) @tsit5pre0 return y₀[idxs] + dt * (k[1][idxs] * b1Θ + k[2][idxs] * b2Θ + k[3][idxs] * b3Θ + @@ -415,8 +415,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, + idxs::Nothing, T::Type{Val{0}}) @tsit5pre0 @inbounds @.. broadcast=false out=y₀ + dt * @@ -426,8 +426,8 @@ end end @muladd function _ode_interpolant!(out::Array, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, + idxs::Nothing, T::Type{Val{0}}) @tsit5pre0 @inbounds @simd ivdep for i in eachindex(out) out[i] = y₀[i] + @@ -438,8 +438,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, + T::Type{Val{0}}) @tsit5pre0 @views @.. broadcast=false out=y₀[idxs] + dt * @@ -453,8 +453,8 @@ end end @muladd function _ode_interpolant!(out::Array, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, + T::Type{Val{0}}) @tsit5pre0 @inbounds for (j, i) in enumerate(idxs) out[j] = y₀[i] + @@ -476,7 +476,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Tsit5ConstantCache, - idxs::Nothing, T::Type{Val{1}}) + idxs::Nothing, T::Type{Val{1}}) @tsit5pre1 # return @.. broadcast=false k[1]*b1Θdiff + k[2]*b2Θdiff + k[3]*b3Θdiff + k[4]*b4Θdiff + k[5]*b5Θdiff + k[6]*b6Θdiff + k[7]*b7Θdiff return @inbounds k[1] * b1Θdiff + k[2] * b2Θdiff + k[3] * b3Θdiff + k[4] * b4Θdiff + @@ -484,15 +484,15 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Tsit5Cache, idxs::Nothing, - T::Type{Val{1}}) + T::Type{Val{1}}) @tsit5pre1 return @inbounds @.. broadcast=false k[1]*b1Θdiff+k[2]*b2Θdiff+k[3]*b3Θdiff+ k[4]*b4Θdiff+k[5]*b5Θdiff+k[6]*b6Θdiff+k[7]*b7Θdiff end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, + T::Type{Val{1}}) @tsit5pre1 # return @.. broadcast=false k[1][idxs]*b1Θdiff + k[2][idxs]*b2Θdiff + k[3][idxs]*b3Θdiff + k[4][idxs]*b4Θdiff + k[5][idxs]*b5Θdiff + k[6][idxs]*b6Θdiff + k[7][idxs]*b7Θdiff return k[1][idxs] * b1Θdiff + k[2][idxs] * b2Θdiff + k[3][idxs] * b3Θdiff + @@ -501,8 +501,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, + idxs::Nothing, T::Type{Val{1}}) @tsit5pre1 @inbounds @.. broadcast=false out=k[1] * b1Θdiff + k[2] * b2Θdiff + k[3] * b3Θdiff + k[4] * b4Θdiff + k[5] * b5Θdiff + k[6] * b6Θdiff + @@ -514,8 +514,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, + T::Type{Val{1}}) @tsit5pre1 @views @.. broadcast=false out=k[1][idxs] * b1Θdiff + k[2][idxs] * b2Θdiff + k[3][idxs] * b3Θdiff + k[4][idxs] * b4Θdiff + @@ -540,8 +540,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, + idxs::Nothing, T::Type{Val{2}}) @tsit5pre2 # return @.. broadcast=false k[1]*b1Θdiff2 + k[2]*b2Θdiff2 + k[3]*b3Θdiff2 + k[4]*b4Θdiff2 + k[5]*b5Θdiff2 + k[6]*b6Θdiff2 + k[7]*b7Θdiff2 return @inbounds (k[1] * b1Θdiff2 + k[2] * b2Θdiff2 + k[3] * b3Θdiff2 + @@ -550,8 +550,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, - T::Type{Val{2}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, + T::Type{Val{2}}) @tsit5pre2 # return @.. broadcast=false k[1][idxs]*b1Θdiff2 + k[2][idxs]*b2Θdiff2 + k[3][idxs]*b3Θdiff2 + k[4][idxs]*b4Θdiff2 + k[5][idxs]*b5Θdiff2 + k[6][idxs]*b6Θdiff2 + k[7][idxs]*b7Θdiff2 return (k[1][idxs] * b1Θdiff2 + k[2][idxs] * b2Θdiff2 + k[3][idxs] * b3Θdiff2 + @@ -560,8 +560,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, + idxs::Nothing, T::Type{Val{2}}) @tsit5pre2 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff2 + k[2] * b2Θdiff2 + k[3] * b3Θdiff2 + k[4] * b4Θdiff2 + k[5] * b5Θdiff2 + k[6] * b6Θdiff2 + @@ -573,8 +573,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, - T::Type{Val{2}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, + T::Type{Val{2}}) @tsit5pre2 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff2 + k[2][idxs] * b2Θdiff2 + k[3][idxs] * b3Θdiff2 + k[4][idxs] * b4Θdiff2 + @@ -599,8 +599,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, - idxs::Nothing, T::Type{Val{3}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, + idxs::Nothing, T::Type{Val{3}}) @tsit5pre3 # return @.. broadcast=false k[1]*b1Θdiff3 + k[2]*b2Θdiff3 + k[3]*b3Θdiff3 + k[4]*b4Θdiff3 + k[5]*b5Θdiff3 + k[6]*b6Θdiff3 + k[7]*b7Θdiff3 return @inbounds (k[1] * b1Θdiff3 + k[2] * b2Θdiff3 + k[3] * b3Θdiff3 + @@ -609,8 +609,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, - T::Type{Val{3}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, + T::Type{Val{3}}) @tsit5pre3 # return @.. broadcast=false k[1][idxs]*b1Θdiff3 + k[2][idxs]*b2Θdiff3 + k[3][idxs]*b3Θdiff3 + k[4][idxs]*b4Θdiff3 + k[5][idxs]*b5Θdiff3 + k[6][idxs]*b6Θdiff3 + k[7][idxs]*b7Θdiff3 return (k[1][idxs] * b1Θdiff3 + k[2][idxs] * b2Θdiff3 + k[3][idxs] * b3Θdiff3 + @@ -619,8 +619,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, - idxs::Nothing, T::Type{Val{3}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, + idxs::Nothing, T::Type{Val{3}}) @tsit5pre3 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff3 + k[2] * b2Θdiff3 + k[3] * b3Θdiff3 + k[4] * b4Θdiff3 + k[5] * b5Θdiff3 + k[6] * b6Θdiff3 + @@ -632,8 +632,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, - T::Type{Val{3}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, + T::Type{Val{3}}) @tsit5pre3 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff3 + k[2][idxs] * b2Θdiff3 + k[3][idxs] * b3Θdiff3 + k[4][idxs] * b4Θdiff3 + @@ -658,8 +658,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, - idxs::Nothing, T::Type{Val{4}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, + idxs::Nothing, T::Type{Val{4}}) @tsit5pre4 # return @.. broadcast=false k[1]*b1Θdiff4 + k[2]*b2Θdiff4 + k[3]*b3Θdiff4 + k[4]*b4Θdiff4 + k[5]*b5Θdiff4 + k[6]*b6Θdiff4 + k[7]*b7Θdiff4 return @inbounds (k[1] * b1Θdiff4 + k[2] * b2Θdiff4 + k[3] * b3Θdiff4 + @@ -668,8 +668,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, - T::Type{Val{4}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, + T::Type{Val{4}}) @tsit5pre4 # return @.. broadcast=false k[1][idxs]*b1Θdiff4 + k[2][idxs]*b2Θdiff4 + k[3][idxs]*b3Θdiff4 + k[4][idxs]*b4Θdiff4 + k[5][idxs]*b5Θdiff4 + k[6][idxs]*b6Θdiff4 + k[7][idxs]*b7Θdiff4 return (k[1][idxs] * b1Θdiff4 + k[2][idxs] * b2Θdiff4 + k[3][idxs] * b3Θdiff4 + @@ -678,8 +678,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, - idxs::Nothing, T::Type{Val{4}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, + idxs::Nothing, T::Type{Val{4}}) @tsit5pre4 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff4 + k[2] * b2Θdiff4 + k[3] * b3Θdiff4 + k[4] * b4Θdiff4 + k[5] * b5Θdiff4 + k[6] * b6Θdiff4 + @@ -691,8 +691,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, - T::Type{Val{4}}) + cache::Union{Tsit5ConstantCache, Tsit5Cache}, idxs, + T::Type{Val{4}}) @tsit5pre4 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff4 + k[2][idxs] * b2Θdiff4 + k[3][idxs] * b3Θdiff4 + k[4][idxs] * b4Θdiff4 + @@ -724,16 +724,16 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs::Nothing, T::Type{Val{0}}) @owrenzen3pre0 @inbounds @.. broadcast=false y₀+dt * (k[1] * b1Θ + k[2] * b2Θ + k[3] * b3Θ + k[4] * b4Θ) end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs, T::Type{Val{0}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs, T::Type{Val{0}}) @owrenzen3pre0 @views @.. broadcast=false y₀[idxs]+dt * (k[1][idxs] * b1Θ + k[2][idxs] * b2Θ + k[3][idxs] * b3Θ + @@ -741,8 +741,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs::Nothing, T::Type{Val{0}}) @owrenzen3pre0 @inbounds @.. broadcast=false out=y₀ + dt * @@ -751,8 +751,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs, T::Type{Val{0}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs, T::Type{Val{0}}) @owrenzen3pre0 @views @.. broadcast=false out=y₀[idxs] + dt * @@ -770,23 +770,23 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs::Nothing, T::Type{Val{1}}) @owrenzen3pre1 @inbounds @.. broadcast=false k[1]*b1Θdiff+k[2]*b2Θdiff+k[3]*b3Θdiff+k[4]*b4Θdiff end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs, T::Type{Val{1}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs, T::Type{Val{1}}) @owrenzen3pre1 @views @.. broadcast=false k[1][idxs]*b1Θdiff+k[2][idxs]*b2Θdiff+k[3][idxs]*b3Θdiff+ k[4][idxs]*b4Θdiff end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs::Nothing, T::Type{Val{1}}) @owrenzen3pre1 @inbounds @.. broadcast=false out=k[1] * b1Θdiff + k[2] * b2Θdiff + k[3] * b3Θdiff + k[4] * b4Θdiff @@ -794,8 +794,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs, T::Type{Val{1}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs, T::Type{Val{1}}) @owrenzen3pre1 @views @.. broadcast=false out=k[1][idxs] * b1Θdiff + k[2][idxs] * b2Θdiff + k[3][idxs] * b3Θdiff + k[4][idxs] * b4Θdiff @@ -812,24 +812,24 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs::Nothing, T::Type{Val{2}}) @owrenzen3pre2 @inbounds @.. broadcast=false (k[1] * b1Θdiff2 + k[2] * b2Θdiff2 + k[3] * b3Θdiff2 + k[4] * b4Θdiff2)*invdt end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs, T::Type{Val{2}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs, T::Type{Val{2}}) @owrenzen3pre2 @views @.. broadcast=false (k[1][idxs] * b1Θdiff2 + k[2][idxs] * b2Θdiff2 + k[3][idxs] * b3Θdiff2 + k[4][idxs] * b4Θdiff2)*invdt end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs::Nothing, T::Type{Val{2}}) @owrenzen3pre2 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff2 + k[2] * b2Θdiff2 + k[3] * b3Θdiff2 + k[4] * b4Θdiff2) * invdt @@ -837,8 +837,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs, T::Type{Val{2}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs, T::Type{Val{2}}) @owrenzen3pre2 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff2 + k[2][idxs] * b2Θdiff2 + k[3][idxs] * b3Θdiff2 + k[4][idxs] * b4Θdiff2) * invdt @@ -855,24 +855,24 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs::Nothing, T::Type{Val{3}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs::Nothing, T::Type{Val{3}}) @owrenzen3pre3 @inbounds @.. broadcast=false (k[1] * b1Θdiff3 + k[2] * b2Θdiff3 + k[3] * b3Θdiff3 + k[4] * b4Θdiff3)*invdt2 end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs, T::Type{Val{3}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs, T::Type{Val{3}}) @owrenzen3pre3 @views @.. broadcast=false (k[1][idxs] * b1Θdiff3 + k[2][idxs] * b2Θdiff3 + k[3][idxs] * b3Θdiff3 + k[4][idxs] * b4Θdiff3)*invdt2 end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs::Nothing, T::Type{Val{3}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs::Nothing, T::Type{Val{3}}) @owrenzen3pre3 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff3 + k[2] * b2Θdiff3 + k[3] * b3Θdiff3 + k[4] * b4Θdiff3) * invdt2 @@ -880,8 +880,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, - idxs, T::Type{Val{3}}) + cache::Union{OwrenZen3ConstantCache, OwrenZen3Cache}, + idxs, T::Type{Val{3}}) @owrenzen3pre3 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff3 + k[2][idxs] * b2Θdiff3 + k[3][idxs] * b3Θdiff3 + k[4][idxs] * b4Θdiff3) * invdt2 @@ -909,8 +909,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs::Nothing, T::Type{Val{0}}) @owrenzen4pre0 # return @.. broadcast=false y₀ + dt*(k[1]*b1Θ + k[3]*b3Θ + k[4]*b4Θ + k[5]*b5Θ + k[6]*b6Θ) return @inbounds y₀ + @@ -918,8 +918,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs, T::Type{Val{0}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs, T::Type{Val{0}}) @owrenzen4pre0 # return @.. broadcast=false y₀[idxs] + dt*(k[1][idxs]*b1Θ + k[3][idxs]*b3Θ + # k[4][idxs]*b4Θ + k[5][idxs]*b5Θ + k[6][idxs]*b6Θ) @@ -929,8 +929,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs::Nothing, T::Type{Val{0}}) @owrenzen4pre0 @inbounds @.. broadcast=false out=y₀ + dt * @@ -944,8 +944,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs, T::Type{Val{0}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs, T::Type{Val{0}}) @owrenzen4pre0 @inbounds @.. broadcast=false out=y₀[idxs] + dt * (k[1][idxs] * b1Θ + k[3][idxs] * b3Θ + @@ -968,24 +968,24 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs::Nothing, T::Type{Val{1}}) @owrenzen4pre1 @inbounds @.. broadcast=false k[1]*b1Θdiff+k[3]*b3Θdiff+k[4]*b4Θdiff+k[5]*b5Θdiff+ k[6]*b6Θdiff end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs, T::Type{Val{1}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs, T::Type{Val{1}}) @owrenzen4pre1 @views @.. broadcast=false k[1][idxs]*b1Θdiff+k[3][idxs]*b3Θdiff+k[4][idxs]*b4Θdiff+ k[5][idxs]*b5Θdiff+k[6][idxs]*b6Θdiff end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs::Nothing, T::Type{Val{1}}) @owrenzen4pre1 @inbounds @.. broadcast=false out=k[1] * b1Θdiff + k[3] * b3Θdiff + k[4] * b4Θdiff + k[5] * b5Θdiff + k[6] * b6Θdiff @@ -993,8 +993,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs, T::Type{Val{1}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs, T::Type{Val{1}}) @owrenzen4pre1 @views @.. broadcast=false out=k[1][idxs] * b1Θdiff + k[3][idxs] * b3Θdiff + k[4][idxs] * b4Θdiff + @@ -1013,16 +1013,16 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs::Nothing, T::Type{Val{2}}) @owrenzen4pre2 @.. broadcast=false (k[1] * b1Θdiff2 + k[3] * b3Θdiff2 + k[4] * b4Θdiff2 + k[5] * b5Θdiff2 + k[6] * b6Θdiff2)*invdt end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs, T::Type{Val{2}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs, T::Type{Val{2}}) @owrenzen4pre2 @views @.. broadcast=false (k[1][idxs] * b1Θdiff2 + k[3][idxs] * b3Θdiff2 + k[4][idxs] * b4Θdiff2 + @@ -1030,8 +1030,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs::Nothing, T::Type{Val{2}}) @owrenzen4pre2 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff2 + k[3] * b3Θdiff2 + k[4] * b4Θdiff2 + k[5] * b5Θdiff2 + k[6] * b6Θdiff2) * invdt @@ -1039,8 +1039,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs, T::Type{Val{2}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs, T::Type{Val{2}}) @owrenzen4pre2 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff2 + k[3][idxs] * b3Θdiff2 + k[4][idxs] * b4Θdiff2 + @@ -1059,16 +1059,16 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs::Nothing, T::Type{Val{3}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs::Nothing, T::Type{Val{3}}) @owrenzen4pre3 @inbounds @.. broadcast=false (k[1] * b1Θdiff3 + k[3] * b3Θdiff3 + k[4] * b4Θdiff3 + k[5] * b5Θdiff3 + k[6] * b6Θdiff3)*invdt2 end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs, T::Type{Val{3}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs, T::Type{Val{3}}) @owrenzen4pre3 @views @.. broadcast=false (k[1][idxs] * b1Θdiff3 + k[3][idxs] * b3Θdiff3 + k[4][idxs] * b4Θdiff3 + @@ -1076,8 +1076,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs::Nothing, T::Type{Val{3}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs::Nothing, T::Type{Val{3}}) @owrenzen4pre3 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff3 + k[3] * b3Θdiff3 + k[4] * b4Θdiff3 + k[5] * b5Θdiff3 + k[6] * b6Θdiff3) * invdt2 @@ -1085,8 +1085,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs, T::Type{Val{3}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs, T::Type{Val{3}}) @owrenzen4pre3 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff3 + k[3][idxs] * b3Θdiff3 + k[4][idxs] * b4Θdiff3 + @@ -1105,16 +1105,16 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs::Nothing, T::Type{Val{4}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs::Nothing, T::Type{Val{4}}) @owrenzen4pre4 @.. broadcast=false (k[1] * b1Θdiff4 + k[3] * b3Θdiff4 + k[4] * b4Θdiff4 + k[5] * b5Θdiff4 + k[6] * b6Θdiff4)*invdt3 end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs, T::Type{Val{4}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs, T::Type{Val{4}}) @owrenzen4pre4 @views @.. broadcast=false (k[1][idxs] * b1Θdiff4 + k[3][idxs] * b3Θdiff4 + k[4][idxs] * b4Θdiff4 + @@ -1122,8 +1122,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs::Nothing, T::Type{Val{4}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs::Nothing, T::Type{Val{4}}) @owrenzen4pre4 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff4 + k[3] * b3Θdiff4 + k[4] * b4Θdiff4 + k[5] * b5Θdiff4 + k[6] * b6Θdiff4) * invdt3 @@ -1131,8 +1131,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, - idxs, T::Type{Val{4}}) + cache::Union{OwrenZen4ConstantCache, OwrenZen4Cache}, + idxs, T::Type{Val{4}}) @owrenzen4pre4 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff4 + k[3][idxs] * b3Θdiff4 + k[4][idxs] * b4Θdiff4 + @@ -1163,8 +1163,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{0}}) @owrenzen5pre0 # return @.. broadcast=false y₀ + dt*(k[1]*b1Θ + k[3]*b3Θ + k[4]*b4Θ + k[5]*b5Θ + k[6]*b6Θ + # k[7]*b7Θ + k[8]*b8Θ) @@ -1174,8 +1174,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{0}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{0}}) @owrenzen5pre0 # return @.. broadcast=false y₀[idxs] + dt*(k[1][idxs]*b1Θ + k[3][idxs]*b3Θ + # k[4][idxs]*b4Θ + k[5][idxs]*b5Θ + k[6][idxs]*b6Θ + @@ -1187,8 +1187,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{0}}) @owrenzen5pre0 @inbounds @.. broadcast=false out=y₀ + dt * @@ -1203,8 +1203,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{0}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{0}}) @owrenzen5pre0 @views @.. broadcast=false out=y₀[idxs] + dt * (k[1][idxs] * b1Θ + k[3][idxs] * b3Θ + @@ -1229,16 +1229,16 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{1}}) @owrenzen5pre1 return @inbounds k[1] * b1Θdiff + k[3] * b3Θdiff + k[4] * b4Θdiff + k[5] * b5Θdiff + k[6] * b6Θdiff + k[7] * b7Θdiff + k[8] * b8Θdiff end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{1}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{1}}) @owrenzen5pre1 k[1][idxs] * b1Θdiff + k[3][idxs] * b3Θdiff + k[4][idxs] * b4Θdiff + k[5][idxs] * b5Θdiff + @@ -1246,8 +1246,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{1}}) @owrenzen5pre1 @inbounds @.. broadcast=false out=k[1] * b1Θdiff + k[3] * b3Θdiff + k[4] * b4Θdiff + k[5] * b5Θdiff + k[6] * b6Θdiff + k[7] * b7Θdiff + @@ -1260,8 +1260,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{1}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{1}}) @owrenzen5pre1 @views @.. broadcast=false out=k[1][idxs] * b1Θdiff + k[3][idxs] * b3Θdiff + k[4][idxs] * b4Θdiff + @@ -1287,8 +1287,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{2}}) @owrenzen5pre2 return @inbounds (k[1] * b1Θdiff2 + k[3] * b3Θdiff2 + k[4] * b4Θdiff2 + k[5] * b5Θdiff2 + @@ -1296,8 +1296,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{2}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{2}}) @owrenzen5pre2 (k[1][idxs] * b1Θdiff2 + k[3][idxs] * b3Θdiff2 + k[4][idxs] * b4Θdiff2 + k[5][idxs] * b5Θdiff2 + @@ -1305,8 +1305,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{2}}) @owrenzen5pre2 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff2 + k[3] * b3Θdiff2 + k[4] * b4Θdiff2 + k[5] * b5Θdiff2 + k[6] * b6Θdiff2 + k[7] * b7Θdiff2 + @@ -1319,8 +1319,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{2}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{2}}) @owrenzen5pre2 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff2 + k[3][idxs] * b3Θdiff2 + k[4][idxs] * b4Θdiff2 + @@ -1346,8 +1346,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{3}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{3}}) @owrenzen5pre3 return @inbounds (k[1] * b1Θdiff3 + k[3] * b3Θdiff3 + k[4] * b4Θdiff3 + k[5] * b5Θdiff3 + @@ -1355,8 +1355,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{3}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{3}}) @owrenzen5pre3 (k[1][idxs] * b1Θdiff3 + k[3][idxs] * b3Θdiff3 + k[4][idxs] * b4Θdiff3 + k[5][idxs] * b5Θdiff3 + @@ -1364,8 +1364,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{3}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{3}}) @owrenzen5pre3 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff3 + k[3] * b3Θdiff3 + k[4] * b4Θdiff3 + k[5] * b5Θdiff3 + k[6] * b6Θdiff3 + k[7] * b7Θdiff3 + @@ -1378,8 +1378,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{3}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{3}}) @owrenzen5pre3 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff3 + k[3][idxs] * b3Θdiff3 + k[4][idxs] * b4Θdiff3 + @@ -1405,8 +1405,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{4}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{4}}) @owrenzen5pre4 return @inbounds (k[1] * b1Θdiff4 + k[3] * b3Θdiff4 + k[4] * b4Θdiff4 + k[5] * b5Θdiff4 + @@ -1414,8 +1414,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{4}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{4}}) @owrenzen5pre4 (k[1][idxs] * b1Θdiff4 + k[3][idxs] * b3Θdiff4 + k[4][idxs] * b4Θdiff4 + k[5][idxs] * b5Θdiff4 + @@ -1423,8 +1423,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{4}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{4}}) @owrenzen5pre4 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff4 + k[3] * b3Θdiff4 + k[4] * b4Θdiff4 + k[5] * b5Θdiff4 + k[6] * b6Θdiff4 + k[7] * b7Θdiff4 + @@ -1437,8 +1437,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{4}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{4}}) @owrenzen5pre4 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff4 + k[3][idxs] * b3Θdiff4 + k[4][idxs] * b4Θdiff4 + @@ -1464,8 +1464,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{5}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{5}}) @owrenzen5pre5 return @inbounds (k[1] * b1Θdiff5 + k[3] * b3Θdiff5 + k[4] * b4Θdiff5 + k[5] * b5Θdiff5 + @@ -1473,8 +1473,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{5}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{5}}) @owrenzen5pre5 (k[1][idxs] * b1Θdiff5 + k[3][idxs] * b3Θdiff5 + k[4][idxs] * b4Θdiff5 + k[5][idxs] * b5Θdiff5 + @@ -1482,8 +1482,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs::Nothing, T::Type{Val{5}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs::Nothing, T::Type{Val{5}}) @owrenzen5pre5 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff5 + k[3] * b3Θdiff5 + k[4] * b4Θdiff5 + k[5] * b5Θdiff5 + k[6] * b6Θdiff5 + k[7] * b7Θdiff5 + @@ -1496,8 +1496,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, - idxs, T::Type{Val{5}}) + cache::Union{OwrenZen5ConstantCache, OwrenZen5Cache}, + idxs, T::Type{Val{5}}) @owrenzen5pre5 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff5 + k[3][idxs] * b3Θdiff5 + k[4][idxs] * b4Θdiff5 + @@ -1538,7 +1538,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::BS5ConstantCache, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) @bs5pre0 # return @.. broadcast=false y₀ + dt*Θ*k[1] + dt*(k[1]*b1Θ + k[3]*b3Θ + k[4]*b4Θ + k[5]*b5Θ + k[6]*b6Θ + k[7]*b7Θ + k[8]*b8Θ + k[9]*b9Θ + k[10]*b10Θ + k[11]*b11Θ) return @inbounds y₀ + dt * Θ * k[1] + @@ -1548,7 +1548,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::BS5Cache, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) @bs5pre0 # return @.. broadcast=false y₀ + dt*Θ*k[1] + dt*(k[1]*b1Θ + k[3]*b3Θ + k[4]*b4Θ + k[5]*b5Θ + k[6]*b6Θ + k[7]*b7Θ + k[8]*b8Θ + k[9]*b9Θ + k[10]*b10Θ + k[11]*b11Θ) return @inbounds @.. broadcast=false y₀+dt*Θ*k[1]+ @@ -1559,8 +1559,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{BS5ConstantCache, BS5Cache}, idxs, - T::Type{Val{0}}) + cache::Union{BS5ConstantCache, BS5Cache}, idxs, + T::Type{Val{0}}) @bs5pre0 # return @.. broadcast=false y₀[idxs] + dt*Θ*k[1][idxs] + dt*(k[1][idxs]*b1Θ + k[3][idxs]*b3Θ + # k[4][idxs]*b4Θ + k[5][idxs]*b5Θ + k[6][idxs]*b6Θ + k[7][idxs]*b7Θ + @@ -1572,8 +1572,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{BS5ConstantCache, BS5Cache}, idxs::Nothing, - T::Type{Val{0}}) + cache::Union{BS5ConstantCache, BS5Cache}, idxs::Nothing, + T::Type{Val{0}}) @bs5pre0 @inbounds @.. broadcast=false out=y₀ + dt * Θ * k[1] + dt * @@ -1587,8 +1587,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{BS5ConstantCache, BS5Cache}, idxs, - T::Type{Val{0}}) + cache::Union{BS5ConstantCache, BS5Cache}, idxs, + T::Type{Val{0}}) @bs5pre0 @views @.. broadcast=false out=y₀[idxs] + dt * Θ * k[1][idxs] + dt * @@ -1618,8 +1618,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{BS5ConstantCache, BS5Cache}, idxs::Nothing, - T::Type{Val{1}}) + cache::Union{BS5ConstantCache, BS5Cache}, idxs::Nothing, + T::Type{Val{1}}) @bs5pre1 # return @.. broadcast=false k[1] + k[1]*b1Θdiff + k[3]*b3Θdiff + k[4]*b4Θdiff + k[5]*b5Θdiff + k[6]*b6Θdiff + k[7]*b7Θdiff + k[8]*b8Θdiff + k[9]*b9Θdiff + k[10]*b10Θdiff + k[11]*b11Θdiff return @inbounds k[1] + k[1] * b1Θdiff + k[3] * b3Θdiff + k[4] * b4Θdiff + @@ -1629,8 +1629,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{BS5ConstantCache, BS5Cache}, idxs, - T::Type{Val{1}}) + cache::Union{BS5ConstantCache, BS5Cache}, idxs, + T::Type{Val{1}}) @bs5pre1 # return @.. broadcast=false k[1][idxs] + k[1][idxs]*b1Θdiff + k[3][idxs]*b3Θdiff + # k[4][idxs]*b4Θdiff + k[5][idxs]*b5Θdiff + k[6][idxs]*b6Θdiff + @@ -1643,8 +1643,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{BS5ConstantCache, BS5Cache}, idxs::Nothing, - T::Type{Val{1}}) + cache::Union{BS5ConstantCache, BS5Cache}, idxs::Nothing, + T::Type{Val{1}}) @bs5pre1 @inbounds @.. broadcast=false out=k[1] + k[1] * b1Θdiff + k[3] * b3Θdiff + k[4] * b4Θdiff + k[5] * b5Θdiff + k[6] * b6Θdiff + @@ -1657,8 +1657,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{BS5ConstantCache, BS5Cache}, idxs, - T::Type{Val{1}}) + cache::Union{BS5ConstantCache, BS5Cache}, idxs, + T::Type{Val{1}}) @bs5pre1 @views @.. broadcast=false out=k[1][idxs] + k[1][idxs] * b1Θdiff + k[3][idxs] * b3Θdiff + k[4][idxs] * b4Θdiff + @@ -1693,7 +1693,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Vern6ConstantCache, - idxs::Nothing, T::Type{Val{0}}) + idxs::Nothing, T::Type{Val{0}}) @vern6pre0 #@.. broadcast=false y₀ + dt*(k[1]*b1Θ + k[4]*b4Θ + k[5]*b5Θ + k[6]*b6Θ + k[7]*b7Θ + k[8]*b8Θ + k[9]*b9Θ + k[10]*b10Θ + k[11]*b11Θ + k[12]*b12Θ) return @inbounds y₀ + @@ -1702,7 +1702,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Vern6Cache, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) @vern6pre0 #@.. broadcast=false y₀ + dt*(k[1]*b1Θ + k[4]*b4Θ + k[5]*b5Θ + k[6]*b6Θ + k[7]*b7Θ + k[8]*b8Θ + k[9]*b9Θ + k[10]*b10Θ + k[11]*b11Θ + k[12]*b12Θ) return @inbounds @.. broadcast=false y₀+dt * (k[1] * b1Θ + k[4] * b4Θ + k[5] * b5Θ + @@ -1712,8 +1712,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern6ConstantCache, Vern6Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Vern6ConstantCache, Vern6Cache}, idxs, + T::Type{Val{0}}) @vern6pre0 return y₀[idxs] + dt * (k[1][idxs] * b1Θ + k[4][idxs] * b4Θ + k[5][idxs] * b5Θ + @@ -1722,8 +1722,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern6ConstantCache, Vern6Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{Vern6ConstantCache, Vern6Cache}, + idxs::Nothing, T::Type{Val{0}}) @vern6pre0 @inbounds @.. broadcast=false out=y₀ + dt * @@ -1734,8 +1734,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern6ConstantCache, Vern6Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Vern6ConstantCache, Vern6Cache}, idxs, + T::Type{Val{0}}) @vern6pre0 @views @.. broadcast=false out=y₀[idxs] + dt * @@ -1761,8 +1761,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern6ConstantCache, Vern6Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{Vern6ConstantCache, Vern6Cache}, + idxs::Nothing, T::Type{Val{1}}) @vern6pre1 #@.. broadcast=false k[1]*b1Θdiff + k[4]*b4Θdiff + k[5]*b5Θdiff + k[6]*b6Θdiff + k[7]*b7Θdiff + k[8]*b8Θdiff + k[9]*b9Θdiff + k[10]*b10Θdiff + k[11]*b11Θdiff + k[12]*b12Θdiff return @inbounds k[1] * b1Θdiff + k[4] * b4Θdiff + k[5] * b5Θdiff + k[6] * b6Θdiff + @@ -1771,8 +1771,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern6ConstantCache, Vern6Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Vern6ConstantCache, Vern6Cache}, idxs, + T::Type{Val{1}}) @vern6pre1 return k[1][idxs] * b1Θdiff + k[4][idxs] * b4Θdiff + k[5][idxs] * b5Θdiff + k[6][idxs] * b6Θdiff + k[7][idxs] * b7Θdiff + k[8][idxs] * b8Θdiff + @@ -1781,8 +1781,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern6ConstantCache, Vern6Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{Vern6ConstantCache, Vern6Cache}, + idxs::Nothing, T::Type{Val{1}}) @vern6pre1 @inbounds @.. broadcast=false out=k[1] * b1Θdiff + k[4] * b4Θdiff + k[5] * b5Θdiff + k[6] * b6Θdiff + k[7] * b7Θdiff + k[8] * b8Θdiff + @@ -1792,8 +1792,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern6ConstantCache, Vern6Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Vern6ConstantCache, Vern6Cache}, idxs, + T::Type{Val{1}}) @vern6pre1 @views @.. broadcast=false out=k[1][idxs] * b1Θdiff + k[4][idxs] * b4Θdiff + k[5][idxs] * b5Θdiff + k[6][idxs] * b6Θdiff + @@ -1834,7 +1834,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Vern7ConstantCache, - idxs::Nothing, T::Type{Val{0}}) + idxs::Nothing, T::Type{Val{0}}) @vern7pre0 #@.. broadcast=false y₀ + dt*(k[1]*b1Θ + k[4]*b4Θ + k[5]*b5Θ + k[6]*b6Θ + k[7]*b7Θ + k[8]*b8Θ + k[9]*b9Θ + k[11]*b11Θ + k[12]*b12Θ + k[13]*b13Θ + k[14]*b14Θ + k[15]*b15Θ + k[16]*b16Θ) return @inbounds y₀ + @@ -1844,7 +1844,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Vern7Cache, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) @vern7pre0 #@.. broadcast=false y₀ + dt*(k[1]*b1Θ + k[4]*b4Θ + k[5]*b5Θ + k[6]*b6Θ + k[7]*b7Θ + k[8]*b8Θ + k[9]*b9Θ + k[11]*b11Θ + k[12]*b12Θ + k[13]*b13Θ + k[14]*b14Θ + k[15]*b15Θ + k[16]*b16Θ) return @inbounds @.. broadcast=false y₀+dt * (k[1] * b1Θ + k[4] * b4Θ + k[5] * b5Θ + @@ -1855,8 +1855,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern7ConstantCache, Vern7Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Vern7ConstantCache, Vern7Cache}, idxs, + T::Type{Val{0}}) @vern7pre0 return y₀[idxs] + dt * (k[1][idxs] * b1Θ + k[4][idxs] * b4Θ + k[5][idxs] * b5Θ + @@ -1866,8 +1866,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern7ConstantCache, Vern7Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{Vern7ConstantCache, Vern7Cache}, + idxs::Nothing, T::Type{Val{0}}) @vern7pre0 @inbounds @.. broadcast=false out=y₀ + dt * @@ -1879,8 +1879,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern7ConstantCache, Vern7Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Vern7ConstantCache, Vern7Cache}, idxs, + T::Type{Val{0}}) @vern7pre0 @views @.. broadcast=false out=y₀[idxs] + dt * @@ -1911,8 +1911,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern7ConstantCache, Vern7Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{Vern7ConstantCache, Vern7Cache}, + idxs::Nothing, T::Type{Val{1}}) @vern7pre1 #@.. broadcast=false k[1]*b1Θdiff + k[4]*b4Θdiff + k[5]*b5Θdiff + k[6]*b6Θdiff + k[7]*b7Θdiff + k[8]*b8Θdiff + k[9]*b9Θdiff + k[11]*b11Θdiff + k[12]*b12Θdiff + k[13]*b13Θdiff + k[14]*b14Θdiff + k[15]*b15Θdiff + k[16]*b16Θdiff return @inbounds k[1] * b1Θdiff + k[4] * b4Θdiff + k[5] * b5Θdiff + k[6] * b6Θdiff + @@ -1923,8 +1923,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern7ConstantCache, Vern7Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Vern7ConstantCache, Vern7Cache}, idxs, + T::Type{Val{1}}) @vern7pre1 return k[1][idxs] * b1Θdiff + k[4][idxs] * b4Θdiff + k[5][idxs] * b5Θdiff + k[6][idxs] * b6Θdiff + k[7][idxs] * b7Θdiff + k[8][idxs] * b8Θdiff + @@ -1934,8 +1934,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern7ConstantCache, Vern7Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{Vern7ConstantCache, Vern7Cache}, + idxs::Nothing, T::Type{Val{1}}) @vern7pre1 @inbounds @.. broadcast=false out=k[1] * b1Θdiff + k[4] * b4Θdiff + k[5] * b5Θdiff + k[6] * b6Θdiff + k[7] * b7Θdiff + k[8] * b8Θdiff + @@ -1946,8 +1946,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern7ConstantCache, Vern7Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Vern7ConstantCache, Vern7Cache}, idxs, + T::Type{Val{1}}) @vern7pre1 @views @.. broadcast=false out=k[1][idxs] * b1Θdiff + k[4][idxs] * b4Θdiff + k[5][idxs] * b5Θdiff + k[6][idxs] * b6Θdiff + @@ -2001,7 +2001,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Vern8ConstantCache, - idxs::Nothing, T::Type{Val{0}}) + idxs::Nothing, T::Type{Val{0}}) @vern8pre0 #@.. broadcast=false y₀ + dt*(k[1]*b1Θ + k[6]*b6Θ + k[7]*b7Θ + k[8]*b8Θ + k[9]*b9Θ + k[10]*b10Θ + k[11]*b11Θ + k[12]*b12Θ + k[14]*b14Θ + k[15]*b15Θ + k[16]*b16Θ + k[17]*b17Θ + k[18]*b18Θ + k[19]*b19Θ + k[20]*b20Θ + k[21]*b21Θ) return @inbounds y₀ + @@ -2014,7 +2014,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Vern8Cache, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) @vern8pre0 #@.. broadcast=false y₀ + dt*(k[1]*b1Θ + k[6]*b6Θ + k[7]*b7Θ + k[8]*b8Θ + k[9]*b9Θ + k[10]*b10Θ + k[11]*b11Θ + k[12]*b12Θ + k[14]*b14Θ + k[15]*b15Θ + k[16]*b16Θ + k[17]*b17Θ + k[18]*b18Θ + k[19]*b19Θ + k[20]*b20Θ + k[21]*b21Θ) return @inbounds @.. broadcast=false y₀+dt * (k[1] * b1Θ + k[6] * b6Θ + k[7] * b7Θ + @@ -2027,8 +2027,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern8ConstantCache, Vern8Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Vern8ConstantCache, Vern8Cache}, idxs, + T::Type{Val{0}}) @vern8pre0 return y₀[idxs] + dt * (k[1][idxs] * b1Θ + k[6][idxs] * b6Θ + k[7][idxs] * b7Θ + @@ -2040,8 +2040,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern8ConstantCache, Vern8Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{Vern8ConstantCache, Vern8Cache}, + idxs::Nothing, T::Type{Val{0}}) @vern8pre0 @inbounds @.. broadcast=false out=y₀ + dt * @@ -2054,8 +2054,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern8ConstantCache, Vern8Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Vern8ConstantCache, Vern8Cache}, idxs, + T::Type{Val{0}}) @vern8pre0 @views @.. broadcast=false out=y₀[idxs] + dt * @@ -2106,8 +2106,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern8ConstantCache, Vern8Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{Vern8ConstantCache, Vern8Cache}, + idxs::Nothing, T::Type{Val{1}}) @vern8pre1 #@.. broadcast=false k[1]*b1Θdiff + k[6]*b6Θdiff + k[7]*b7Θdiff + k[8]*b8Θdiff + k[9]*b9Θdiff + k[10]*b10Θdiff + k[11]*b11Θdiff + k[12]*b12Θdiff + k[14]*b14Θdiff + k[15]*b15Θdiff + k[16]*b16Θdiff + k[17]*b17Θdiff + k[18]*b18Θdiff + k[19]*b19Θdiff + k[20]*b20Θdiff + k[21]*b21Θdiff return @inbounds k[1] * b1Θdiff + k[6] * b6Θdiff + k[7] * b7Θdiff + k[8] * b8Θdiff + @@ -2120,8 +2120,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern8ConstantCache, Vern8Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Vern8ConstantCache, Vern8Cache}, idxs, + T::Type{Val{1}}) @vern8pre1 return k[1][idxs] * b1Θdiff + k[6][idxs] * b6Θdiff + k[7][idxs] * b7Θdiff + k[8][idxs] * b8Θdiff + k[9][idxs] * b9Θdiff + k[10][idxs] * b10Θdiff + @@ -2132,8 +2132,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern8ConstantCache, Vern8Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{Vern8ConstantCache, Vern8Cache}, + idxs::Nothing, T::Type{Val{1}}) @vern8pre1 @inbounds @.. broadcast=false out=k[1] * b1Θdiff + k[6] * b6Θdiff + k[7] * b7Θdiff + k[8] * b8Θdiff + k[9] * b9Θdiff + k[10] * b10Θdiff + @@ -2146,8 +2146,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern8ConstantCache, Vern8Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Vern8ConstantCache, Vern8Cache}, idxs, + T::Type{Val{1}}) @vern8pre1 @views @.. broadcast=false out=k[1][idxs] * b1Θdiff + k[6][idxs] * b6Θdiff + k[7][idxs] * b7Θdiff + k[8][idxs] * b8Θdiff + @@ -2210,7 +2210,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Vern9ConstantCache, - idxs::Nothing, T::Type{Val{0}}) + idxs::Nothing, T::Type{Val{0}}) @vern9pre0 #@.. broadcast=false y₀ + dt*(k[1]*b1Θ + k[2]*b8Θ + k[3]*b9Θ + k[4]*b10Θ + k[5]*b11Θ + k[6]*b12Θ + k[7]*b13Θ + k[8]*b14Θ + k[9]*b15Θ + k[11]*b17Θ + k[12]*b18Θ + k[13]*b19Θ + k[14]*b20Θ + k[15]*b21Θ + k[16]*b22Θ + k[17]*b23Θ + k[18]*b24Θ + k[19]*b25Θ + k[20]*b26Θ) return @inbounds y₀ + @@ -2223,7 +2223,7 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Vern9Cache, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) @vern9pre0 #@.. broadcast=false y₀ + dt*(k[1]*b1Θ + k[2]*b8Θ + k[3]*b9Θ + k[4]*b10Θ + k[5]*b11Θ + k[6]*b12Θ + k[7]*b13Θ + k[8]*b14Θ + k[9]*b15Θ + k[11]*b17Θ + k[12]*b18Θ + k[13]*b19Θ + k[14]*b20Θ + k[15]*b21Θ + k[16]*b22Θ + k[17]*b23Θ + k[18]*b24Θ + k[19]*b25Θ + k[20]*b26Θ) return @inbounds @.. broadcast=false y₀+dt * (k[1] * b1Θ + k[2] * b8Θ + k[3] * b9Θ + @@ -2237,8 +2237,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, + T::Type{Val{0}}) @vern9pre0 return y₀[idxs] + dt * (k[1][idxs] * b1Θ + k[2][idxs] * b8Θ + k[3][idxs] * b9Θ + @@ -2251,8 +2251,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, + idxs::Nothing, T::Type{Val{0}}) @vern9pre0 @inbounds @.. broadcast=false out=y₀ + dt * @@ -2266,8 +2266,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, + T::Type{Val{0}}) @vern9pre0 @views @.. broadcast=false out=y₀[idxs] + dt * @@ -2344,8 +2344,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, + idxs::Nothing, T::Type{Val{1}}) @vern9pre1 #@.. broadcast=false k[1]*b1Θdiff + k[2]*b8Θdiff + k[3]*b9Θdiff + k[4]*b10Θdiff + k[5]*b11Θdiff + k[6]*b12Θdiff + k[7]*b13Θdiff + k[8]*b14Θdiff + k[9]*b15Θdiff + k[11]*b17Θdiff + k[12]*b18Θdiff + k[13]*b19Θdiff + k[14]*b20Θdiff + k[15]*b21Θdiff + k[16]*b22Θdiff + k[17]*b23Θdiff + k[18]*b24Θdiff + k[19]*b25Θdiff + k[20]*b26Θdiff return @inbounds k[1] * b1Θdiff + k[2] * b8Θdiff + k[3] * b9Θdiff + k[4] * b10Θdiff + @@ -2358,8 +2358,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, + T::Type{Val{1}}) @vern9pre1 return k[1][idxs] * b1Θdiff + k[2][idxs] * b8Θdiff + k[3][idxs] * b9Θdiff + k[4][idxs] * b10Θdiff + k[5][idxs] * b11Θdiff + @@ -2373,8 +2373,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, + idxs::Nothing, T::Type{Val{1}}) @vern9pre1 @inbounds @.. broadcast=false out=k[1] * b1Θdiff + k[2] * b8Θdiff + k[3] * b9Θdiff + k[4] * b10Θdiff + k[5] * b11Θdiff + k[6] * b12Θdiff + @@ -2388,8 +2388,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, + T::Type{Val{1}}) @vern9pre1 @views @.. broadcast=false out=k[1][idxs] * b1Θdiff + k[2][idxs] * b8Θdiff + k[3][idxs] * b9Θdiff + k[4][idxs] * b10Θdiff + @@ -2448,8 +2448,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, + idxs::Nothing, T::Type{Val{2}}) @vern9pre2 #@.. broadcast=false k[1]*b1Θdiff + k[2]*b8Θdiff + k[3]*b9Θdiff + k[4]*b10Θdiff + k[5]*b11Θdiff + k[6]*b12Θdiff + k[7]*b13Θdiff + k[8]*b14Θdiff + k[9]*b15Θdiff + k[11]*b17Θdiff + k[12]*b18Θdiff + k[13]*b19Θdiff + k[14]*b20Θdiff + k[15]*b21Θdiff + k[16]*b22Θdiff + k[17]*b23Θdiff + k[18]*b24Θdiff + k[19]*b25Θdiff + k[20]*b26Θdiff return @inbounds (k[1] * b1Θdiff + k[2] * b8Θdiff + k[3] * b9Θdiff + k[4] * b10Θdiff + @@ -2463,8 +2463,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, - T::Type{Val{2}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, + T::Type{Val{2}}) @vern9pre2 return (k[1][idxs] * b1Θdiff + k[2][idxs] * b8Θdiff + k[3][idxs] * b9Θdiff + k[4][idxs] * b10Θdiff + k[5][idxs] * b11Θdiff + @@ -2478,8 +2478,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, - idxs::Nothing, T::Type{Val{2}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, + idxs::Nothing, T::Type{Val{2}}) @vern9pre2 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff + k[2] * b8Θdiff + k[3] * b9Θdiff + k[4] * b10Θdiff + k[5] * b11Θdiff + k[6] * b12Θdiff + @@ -2493,8 +2493,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, - T::Type{Val{2}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, + T::Type{Val{2}}) @vern9pre2 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff + k[2][idxs] * b8Θdiff + k[3][idxs] * b9Θdiff + k[4][idxs] * b10Θdiff + @@ -2550,8 +2550,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, - idxs::Nothing, T::Type{Val{3}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, + idxs::Nothing, T::Type{Val{3}}) @vern9pre3 #@.. broadcast=false k[1]*b1Θdiff + k[2]*b8Θdiff + k[3]*b9Θdiff + k[4]*b10Θdiff + k[5]*b11Θdiff + k[6]*b12Θdiff + k[7]*b13Θdiff + k[8]*b14Θdiff + k[9]*b15Θdiff + k[11]*b17Θdiff + k[12]*b18Θdiff + k[13]*b19Θdiff + k[14]*b20Θdiff + k[15]*b21Θdiff + k[16]*b22Θdiff + k[17]*b23Θdiff + k[18]*b24Θdiff + k[19]*b25Θdiff + k[20]*b26Θdiff return @inbounds (k[1] * b1Θdiff + k[2] * b8Θdiff + k[3] * b9Θdiff + k[4] * b10Θdiff + @@ -2565,8 +2565,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, - T::Type{Val{3}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, + T::Type{Val{3}}) @vern9pre3 return (k[1][idxs] * b1Θdiff + k[2][idxs] * b8Θdiff + k[3][idxs] * b9Θdiff + k[4][idxs] * b10Θdiff + k[5][idxs] * b11Θdiff + @@ -2580,8 +2580,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, - idxs::Nothing, T::Type{Val{3}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, + idxs::Nothing, T::Type{Val{3}}) @vern9pre3 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff + k[2] * b8Θdiff + k[3] * b9Θdiff + k[4] * b10Θdiff + k[5] * b11Θdiff + k[6] * b12Θdiff + @@ -2595,8 +2595,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, - T::Type{Val{3}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, + T::Type{Val{3}}) @vern9pre3 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff + k[2][idxs] * b8Θdiff + k[3][idxs] * b9Θdiff + k[4][idxs] * b10Θdiff + @@ -2636,8 +2636,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, - idxs::Nothing, T::Type{Val{4}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, + idxs::Nothing, T::Type{Val{4}}) @vern9pre4 #@.. broadcast=false k[1]*b1Θdiff + k[2]*b8Θdiff + k[3]*b9Θdiff + k[4]*b10Θdiff + k[5]*b11Θdiff + k[6]*b12Θdiff + k[7]*b13Θdiff + k[8]*b14Θdiff + k[9]*b15Θdiff + k[11]*b17Θdiff + k[12]*b18Θdiff + k[13]*b19Θdiff + k[14]*b20Θdiff + k[15]*b21Θdiff + k[16]*b22Θdiff + k[17]*b23Θdiff + k[18]*b24Θdiff + k[19]*b25Θdiff + k[20]*b26Θdiff return @inbounds (k[1] * b1Θdiff + k[2] * b8Θdiff + k[3] * b9Θdiff + k[4] * b10Θdiff + @@ -2651,8 +2651,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, - T::Type{Val{4}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, + T::Type{Val{4}}) @vern9pre4 return (k[1][idxs] * b1Θdiff + k[2][idxs] * b8Θdiff + k[3][idxs] * b9Θdiff + k[4][idxs] * b10Θdiff + k[5][idxs] * b11Θdiff + @@ -2666,8 +2666,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, - idxs::Nothing, T::Type{Val{4}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, + idxs::Nothing, T::Type{Val{4}}) @vern9pre4 @inbounds @.. broadcast=false out=(k[1] * b1Θdiff + k[2] * b8Θdiff + k[3] * b9Θdiff + k[4] * b10Θdiff + k[5] * b11Θdiff + k[6] * b12Θdiff + @@ -2681,8 +2681,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, - T::Type{Val{4}}) + cache::Union{Vern9ConstantCache, Vern9Cache}, idxs, + T::Type{Val{4}}) @vern9pre4 @views @.. broadcast=false out=(k[1][idxs] * b1Θdiff + k[2][idxs] * b8Θdiff + k[3][idxs] * b9Θdiff + k[4][idxs] * b10Θdiff + @@ -2700,8 +2700,8 @@ end """ """ @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP8ConstantCache, DP8Cache}, idxs::Nothing, - T::Type{Val{0}}) + cache::Union{DP8ConstantCache, DP8Cache}, idxs::Nothing, + T::Type{Val{0}}) Θ1 = 1 - Θ # return @.. broadcast=false y₀ + dt*Θ*(k[1] + Θ1*(k[2] + Θ*(k[3]+Θ1*(k[4] + Θ*(k[5] + Θ1*(k[6]+Θ*k[7])))))) return @inbounds y₀ + @@ -2712,8 +2712,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP8ConstantCache, DP8Cache}, idxs, - T::Type{Val{0}}) + cache::Union{DP8ConstantCache, DP8Cache}, idxs, + T::Type{Val{0}}) Θ1 = 1 - Θ # return @.. broadcast=false y₀[idxs] + dt*Θ*(k[1][idxs] + Θ1*(k[2][idxs] + Θ*(k[3][idxs]+Θ1*(k[4][idxs] + Θ*(k[5][idxs] + Θ1*(k[6][idxs]+Θ*k[7][idxs])))))) return y₀[idxs] + @@ -2725,8 +2725,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP8ConstantCache, DP8Cache}, idxs::Nothing, - T::Type{Val{0}}) + cache::Union{DP8ConstantCache, DP8Cache}, idxs::Nothing, + T::Type{Val{0}}) Θ1 = 1 - Θ @inbounds @.. broadcast=false out=y₀ + dt * Θ * @@ -2742,8 +2742,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP8ConstantCache, DP8Cache}, idxs, - T::Type{Val{0}}) + cache::Union{DP8ConstantCache, DP8Cache}, idxs, + T::Type{Val{0}}) Θ1 = 1 - Θ @views @.. broadcast=false out=y₀[idxs] + dt * Θ * @@ -2760,8 +2760,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP8ConstantCache, DP8Cache}, idxs::Nothing, - T::Type{Val{1}}) + cache::Union{DP8ConstantCache, DP8Cache}, idxs::Nothing, + T::Type{Val{1}}) @inbounds b1diff = @.. broadcast=false k[1]+k[2] @inbounds b2diff = @.. broadcast=false -2*k[2]+2*k[3]+2*k[4] @inbounds b3diff = @.. broadcast=false -3 * k[3]-6 * k[4]+3*k[5]+3*k[6] @@ -2776,8 +2776,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DP8ConstantCache, DP8Cache}, idxs, - T::Type{Val{1}}) + cache::Union{DP8ConstantCache, DP8Cache}, idxs, + T::Type{Val{1}}) b1diff = @.. broadcast=false k[1][idxs]+k[2][idxs] b2diff = @.. broadcast=false -2*k[2][idxs]+2*k[3][idxs]+2*k[4][idxs] b3diff = @.. broadcast=false -3 * k[3][idxs]-6 * k[4][idxs]+3*k[5][idxs]+3*k[6][idxs] @@ -2793,8 +2793,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP8ConstantCache, DP8Cache}, idxs::Nothing, - T::Type{Val{1}}) + cache::Union{DP8ConstantCache, DP8Cache}, idxs::Nothing, + T::Type{Val{1}}) # b1diff = k[1] + k[2] # b2diff = -2*k[2] + 2*k[3] + 2*k[4] # b3diff = -3*k[3] - 6*k[4] + 3*k[5] + 3*k[6] @@ -2813,8 +2813,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DP8ConstantCache, DP8Cache}, idxs, - T::Type{Val{1}}) + cache::Union{DP8ConstantCache, DP8Cache}, idxs, + T::Type{Val{1}}) # b1diff = k[1][idxs] + k[2][idxs] # b2diff = -2*k[2][idxs] + 2*k[3][idxs] + 2*k[4][idxs] # b3diff = -3*k[3][idxs] - 6*k[4][idxs] + 3*k[5][idxs] + 3*k[6][idxs] @@ -2872,8 +2872,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DPRKN6ConstantCache, DPRKN6Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{DPRKN6ConstantCache, DPRKN6Cache}, + idxs::Nothing, T::Type{Val{0}}) @dprkn6pre0 return ArrayPartition(duprev + dt * Θ * @@ -2887,8 +2887,8 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{DPRKN6ConstantCache, DPRKN6Cache}, idxs, - T::Type{Val{0}}) + cache::Union{DPRKN6ConstantCache, DPRKN6Cache}, idxs, + T::Type{Val{0}}) @dprkn6pre0 return ArrayPartition(duprev[idxs] + dt * Θ * @@ -2904,8 +2904,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DPRKN6ConstantCache, DPRKN6Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{DPRKN6ConstantCache, DPRKN6Cache}, + idxs::Nothing, T::Type{Val{0}}) @dprkn6pre0 @inbounds @.. broadcast=false out.x[2]=uprev + dt * Θ * @@ -2929,8 +2929,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{DPRKN6ConstantCache, DPRKN6Cache}, idxs, - T::Type{Val{0}}) + cache::Union{DPRKN6ConstantCache, DPRKN6Cache}, idxs, + T::Type{Val{0}}) @dprkn6pre0 @inbounds @.. broadcast=false out.x[2]=uprev[idxs] + dt * Θ * diff --git a/src/dense/low_order_rk_addsteps.jl b/src/dense/low_order_rk_addsteps.jl index 79d0a4f599..d8b2696c10 100644 --- a/src/dense/low_order_rk_addsteps.jl +++ b/src/dense/low_order_rk_addsteps.jl @@ -1,20 +1,20 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::FunctionMapCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) nothing end function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::FunctionMapConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) nothing end function _ode_addsteps!(k, t, uprev, u, dt, f, p, - cache::Union{SSPRK22ConstantCache, SSPRK33ConstantCache, - SSPRK43ConstantCache, SSPRK432ConstantCache}, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + cache::Union{SSPRK22ConstantCache, SSPRK33ConstantCache, + SSPRK43ConstantCache, SSPRK432ConstantCache}, + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 1 || always_calc_begin copyat_or_push!(k, 1, f(uprev, p, t)) end @@ -22,9 +22,9 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, end function _ode_addsteps!(k, t, uprev, u, dt, f, p, - cache::Union{SSPRK22Cache, SSPRK33Cache, SSPRK43Cache, - SSPRK432Cache}, always_calc_begin = false, - allow_calc_end = true, force_calc_end = false) + cache::Union{SSPRK22Cache, SSPRK33Cache, SSPRK43Cache, + SSPRK432Cache}, always_calc_begin = false, + allow_calc_end = true, force_calc_end = false) if length(k) < 1 || always_calc_begin f(cache.k, uprev, p, t) copyat_or_push!(k, 1, cache.k) @@ -33,8 +33,8 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::OwrenZen4Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 6 || always_calc_begin uidx = eachindex(uprev) @unpack k1, k2, k3, k4, k5, k6, tmp = cache @@ -63,8 +63,8 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::OwrenZen5Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 8 || always_calc_begin uidx = eachindex(uprev) @unpack k1, k2, k3, k4, k5, k6, k7, k8, tmp = cache @@ -106,8 +106,8 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::DP5Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 4 || always_calc_begin T = constvalue(recursive_unitless_bottom_eltype(u)) T2 = constvalue(typeof(one(t))) @@ -146,8 +146,8 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Tsit5Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 7 || always_calc_begin T = constvalue(recursive_unitless_bottom_eltype(u)) T2 = constvalue(typeof(one(t))) @@ -187,8 +187,8 @@ Computers and Mathematics with Applications, Vol. 32, No. 6, 1996, pages 15 to 2 Called to add the extra k9, k10, k11 steps for the Order 5 interpolation when needed """ @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::BS5Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 8 || always_calc_begin uidx = eachindex(uprev) @unpack k1, k2, k3, k4, k5, k6, k7, k8, tmp = cache @@ -252,9 +252,9 @@ Called to add the extra k9, k10, k11 steps for the Order 5 interpolation when ne end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, - cache::OwrenZen3ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + cache::OwrenZen3ConstantCache, + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 4 || always_calc_begin @unpack a21, a31, a32, a41, a42, a43, c1, c2 = cache k1 = f(uprev, p, t) @@ -273,8 +273,8 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::OwrenZen3Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 4 || always_calc_begin @unpack k1, k2, k3, k4, tmp = cache @unpack a21, a31, a32, a41, a42, a43, c1, c2 = cache.tab @@ -296,9 +296,9 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, - cache::OwrenZen4ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + cache::OwrenZen4ConstantCache, + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 6 || always_calc_begin @unpack a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a63, a64, a65, c1, c2, c3, c4 = cache k1 = f(uprev, p, t) @@ -360,9 +360,9 @@ end =# @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, - cache::OwrenZen5ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + cache::OwrenZen5ConstantCache, + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 8 || always_calc_begin @unpack a21, a31, a32, a41, a42, a51, a52, a53, a54, a61, a62, a63, a64, a65, a71, a72, a73, a74, a75, a76, a81, a83, a84, a85, a86, a87, c1, c2, c3, c4, c5, c6 = cache k1 = f(uprev, p, t) @@ -441,8 +441,8 @@ end =# @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::DP5ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 4 || always_calc_begin T = constvalue(recursive_unitless_bottom_eltype(u)) T2 = constvalue(typeof(one(t))) @@ -519,8 +519,8 @@ end =# @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Tsit5ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 7 || always_calc_begin T = constvalue(recursive_unitless_bottom_eltype(u)) T2 = constvalue(typeof(one(t))) @@ -596,8 +596,8 @@ Computers and Mathematics with Applications, Vol. 32, No. 6, 1996, pages 15 to 2 Called to add the extra k9, k10, k11 steps for the Order 5 interpolation when needed """ @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::BS5ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 8 || always_calc_begin @unpack c1, c2, c3, c4, c5, a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, a71, a72, a73, a74, a75, a76, a81, a83, a84, a85, a86, a87 = cache copyat_or_push!(k, 1, f(uprev, p, t)) diff --git a/src/dense/rosenbrock_interpolants.jl b/src/dense/rosenbrock_interpolants.jl index 996a126e25..6a32c46ad1 100644 --- a/src/dense/rosenbrock_interpolants.jl +++ b/src/dense/rosenbrock_interpolants.jl @@ -16,40 +16,40 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock23ConstantCache, - Rosenbrock32ConstantCache}, idxs::Nothing, - T::Type{Val{0}}) + cache::Union{Rosenbrock23ConstantCache, + Rosenbrock32ConstantCache}, idxs::Nothing, + T::Type{Val{0}}) @rosenbrock2332pre0 @inbounds y₀ + dt * (c1 * k[1] + c2 * k[2]) end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock23Cache, Rosenbrock32Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{Rosenbrock23Cache, Rosenbrock32Cache}, + idxs::Nothing, T::Type{Val{0}}) @rosenbrock2332pre0 @inbounds @.. broadcast=false y₀+dt * (c1 * k[1] + c2 * k[2]) end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock23ConstantCache, Rosenbrock23Cache, - Rosenbrock32ConstantCache, Rosenbrock32Cache, - }, idxs, T::Type{Val{0}}) + cache::Union{Rosenbrock23ConstantCache, Rosenbrock23Cache, + Rosenbrock32ConstantCache, Rosenbrock32Cache, + }, idxs, T::Type{Val{0}}) @rosenbrock2332pre0 @.. broadcast=false y₀[idxs]+dt * (c1 * k[1][idxs] + c2 * k[2][idxs]) end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock23ConstantCache, - Rosenbrock23Cache, - Rosenbrock32ConstantCache, Rosenbrock32Cache, - }, idxs::Nothing, T::Type{Val{0}}) + cache::Union{Rosenbrock23ConstantCache, + Rosenbrock23Cache, + Rosenbrock32ConstantCache, Rosenbrock32Cache, + }, idxs::Nothing, T::Type{Val{0}}) @rosenbrock2332pre0 @inbounds @.. broadcast=false out=y₀ + dt * (c1 * k[1] + c2 * k[2]) out end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, cache::Rosenbrock23Cache{<:Array}, - idxs::Nothing, T::Type{Val{0}}) + idxs::Nothing, T::Type{Val{0}}) @rosenbrock2332pre0 @inbounds @simd ivdep for i in eachindex(out) out[i] = y₀[i] + dt * (c1 * k[1][i] + c2 * k[2][i]) @@ -58,10 +58,10 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock23ConstantCache, - Rosenbrock23Cache, - Rosenbrock32ConstantCache, Rosenbrock32Cache, - }, idxs, T::Type{Val{0}}) + cache::Union{Rosenbrock23ConstantCache, + Rosenbrock23Cache, + Rosenbrock32ConstantCache, Rosenbrock32Cache, + }, idxs, T::Type{Val{0}}) @rosenbrock2332pre0 @views @.. broadcast=false out=y₀[idxs] + dt * (c1 * k[1][idxs] + c2 * k[2][idxs]) out @@ -75,36 +75,36 @@ end end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock23ConstantCache, Rosenbrock23Cache, - Rosenbrock32ConstantCache, Rosenbrock32Cache, - }, idxs::Nothing, T::Type{Val{1}}) + cache::Union{Rosenbrock23ConstantCache, Rosenbrock23Cache, + Rosenbrock32ConstantCache, Rosenbrock32Cache, + }, idxs::Nothing, T::Type{Val{1}}) @rosenbrock2332pre1 @.. broadcast=false c1diff * k[1]+c2diff * k[2] end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock23ConstantCache, Rosenbrock23Cache, - Rosenbrock32ConstantCache, Rosenbrock32Cache, - }, idxs, T::Type{Val{1}}) + cache::Union{Rosenbrock23ConstantCache, Rosenbrock23Cache, + Rosenbrock32ConstantCache, Rosenbrock32Cache, + }, idxs, T::Type{Val{1}}) @rosenbrock2332pre1 @.. broadcast=false c1diff * k[1][idxs]+c2diff * k[2][idxs] end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock23ConstantCache, - Rosenbrock23Cache, - Rosenbrock32ConstantCache, Rosenbrock32Cache, - }, idxs::Nothing, T::Type{Val{1}}) + cache::Union{Rosenbrock23ConstantCache, + Rosenbrock23Cache, + Rosenbrock32ConstantCache, Rosenbrock32Cache, + }, idxs::Nothing, T::Type{Val{1}}) @rosenbrock2332pre1 @.. broadcast=false out=c1diff * k[1] + c2diff * k[2] out end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock23ConstantCache, - Rosenbrock23Cache, - Rosenbrock32ConstantCache, Rosenbrock32Cache, - }, idxs, T::Type{Val{1}}) + cache::Union{Rosenbrock23ConstantCache, + Rosenbrock23Cache, + Rosenbrock32ConstantCache, Rosenbrock32Cache, + }, idxs, T::Type{Val{1}}) @rosenbrock2332pre1 @views @.. broadcast=false out=c1diff * k[1][idxs] + c2diff * k[2][idxs] out @@ -114,34 +114,34 @@ end From MATLAB ODE Suite by Shampine """ @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Rodas4ConstantCache, - idxs::Nothing, T::Type{Val{0}}) + idxs::Nothing, T::Type{Val{0}}) Θ1 = 1 - Θ @inbounds Θ1 * y₀ + Θ * (y₁ + Θ1 * (k[1] + Θ * k[2])) end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Rodas4Cache, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) Θ1 = 1 - Θ @inbounds @.. broadcast=false Θ1 * y₀+Θ * (y₁ + Θ1 * (k[1] + Θ * k[2])) end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Rodas4ConstantCache, Rodas4Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Rodas4ConstantCache, Rodas4Cache}, idxs, + T::Type{Val{0}}) Θ1 = 1 - Θ @.. broadcast=false Θ1 * y₀[idxs]+Θ * (y₁[idxs] + Θ1 * (k[1][idxs] + Θ * k[2][idxs])) end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rodas4ConstantCache, Rodas4Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{Rodas4ConstantCache, Rodas4Cache}, + idxs::Nothing, T::Type{Val{0}}) Θ1 = 1 - Θ @.. broadcast=false out=Θ1 * y₀ + Θ * (y₁ + Θ1 * (k[1] + Θ * k[2])) out end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, cache::Rodas4Cache{<:Array}, - idxs::Nothing, T::Type{Val{0}}) + idxs::Nothing, T::Type{Val{0}}) Θ1 = 1 - Θ @inbounds @simd ivdep for i in eachindex(out) out[i] = Θ1 * y₀[i] + Θ * (y₁[i] + Θ1 * (k[1][i] + Θ * k[2][i])) @@ -150,8 +150,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rodas4ConstantCache, Rodas4Cache}, idxs, - T::Type{Val{0}}) + cache::Union{Rodas4ConstantCache, Rodas4Cache}, idxs, + T::Type{Val{0}}) Θ1 = 1 - Θ @views @.. broadcast=false out=Θ1 * y₀[idxs] + Θ * (y₁[idxs] + Θ1 * (k[1][idxs] + Θ * k[2][idxs])) @@ -160,35 +160,35 @@ end # First Derivative @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Rodas4ConstantCache, - idxs::Nothing, T::Type{Val{1}}) + idxs::Nothing, T::Type{Val{1}}) @inbounds (k[1] + Θ * (-2 * k[1] + 2 * k[2] - 3 * k[2] * Θ) - y₀ + y₁) / dt end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Rodas4Cache, idxs::Nothing, - T::Type{Val{1}}) + T::Type{Val{1}}) @inbounds @.. broadcast=false (k[1] + Θ * (-2 * k[1] + 2 * k[2] - 3 * k[2] * Θ) - y₀ + y₁)/dt end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Rodas4ConstantCache, Rodas4Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Rodas4ConstantCache, Rodas4Cache}, idxs, + T::Type{Val{1}}) @.. broadcast=false (k[1][idxs] + Θ * (-2 * k[1][idxs] + 2 * k[2][idxs] - 3 * k[2][idxs] * Θ) - y₀[idxs] + y₁[idxs])/dt end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rodas4ConstantCache, Rodas4Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{Rodas4ConstantCache, Rodas4Cache}, + idxs::Nothing, T::Type{Val{1}}) @.. broadcast=false out=(k[1] + Θ * (-2 * k[1] + 2 * k[2] - 3 * k[2] * Θ) - y₀ + y₁) / dt out end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rodas4ConstantCache, Rodas4Cache}, idxs, - T::Type{Val{1}}) + cache::Union{Rodas4ConstantCache, Rodas4Cache}, idxs, + T::Type{Val{1}}) @views @.. broadcast=false out=(k[1][idxs] + Θ * (-2 * k[1][idxs] + 2 * k[2][idxs] - @@ -200,20 +200,20 @@ end #- @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Rosenbrock5ConstantCache, - idxs::Nothing, T::Type{Val{0}}) + idxs::Nothing, T::Type{Val{0}}) Θ1 = 1 - Θ @inbounds Θ1 * y₀ + Θ * (y₁ + Θ1 * (k[1] + Θ * (k[2] + Θ * k[3]))) end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Rosenbrock5Cache, idxs::Nothing, - T::Type{Val{0}}) + T::Type{Val{0}}) Θ1 = 1 - Θ @inbounds @.. broadcast=false Θ1 * y₀+Θ * (y₁ + Θ1 * (k[1] + Θ * (k[2] + Θ * k[3]))) end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, - idxs, T::Type{Val{0}}) + cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, + idxs, T::Type{Val{0}}) Θ1 = 1 - Θ @.. broadcast=false Θ1 * y₀[idxs]+Θ * (y₁[idxs] + @@ -221,15 +221,15 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, - idxs::Nothing, T::Type{Val{0}}) + cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, + idxs::Nothing, T::Type{Val{0}}) Θ1 = 1 - Θ @.. broadcast=false out=Θ1 * y₀ + Θ * (y₁ + Θ1 * (k[1] + Θ * (k[2] + Θ * k[3]))) out end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, cache::Rosenbrock5Cache{<:Array}, - idxs::Nothing, T::Type{Val{0}}) + idxs::Nothing, T::Type{Val{0}}) Θ1 = 1 - Θ @inbounds @simd ivdep for i in eachindex(out) out[i] = Θ1 * y₀[i] + Θ * (y₁[i] + Θ1 * (k[1][i] + Θ * (k[2][i] + Θ * k[3][i]))) @@ -238,8 +238,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, - idxs, T::Type{Val{0}}) + cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, + idxs, T::Type{Val{0}}) Θ1 = 1 - Θ @views @.. broadcast=false out=Θ1 * y₀[idxs] + Θ * (y₁[idxs] + @@ -249,22 +249,22 @@ end # First Derivative @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Rosenbrock5ConstantCache, - idxs::Nothing, T::Type{Val{1}}) + idxs::Nothing, T::Type{Val{1}}) @inbounds (k[1] + Θ * (-2 * k[1] + 2 * k[2] + Θ * (-3 * k[2] + 3 * k[3] - 4 * Θ * k[3])) - y₀ + y₁) / dt end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, cache::Rosenbrock5Cache, idxs::Nothing, - T::Type{Val{1}}) + T::Type{Val{1}}) @inbounds @.. broadcast=false (k[1] + Θ * (-2 * k[1] + 2 * k[2] + Θ * (-3 * k[2] + 3 * k[3] - 4 * Θ * k[3])) - y₀ + y₁)/dt end @muladd function _ode_interpolant(Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, - idxs, T::Type{Val{1}}) + cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, + idxs, T::Type{Val{1}}) @.. broadcast=false (k[1][idxs] + Θ * (-2 * k[1][idxs] + 2 * k[2][idxs] + Θ * (-3 * k[2][idxs] + 3 * k[3][idxs] - 4 * Θ * k[3][idxs])) - @@ -272,8 +272,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, - idxs::Nothing, T::Type{Val{1}}) + cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, + idxs::Nothing, T::Type{Val{1}}) @.. broadcast=false out=(k[1] + Θ * (-2 * k[1] + 2 * k[2] + Θ * (-3 * k[2] + 3 * k[3] - 4 * Θ * k[3])) - y₀ + y₁) / dt @@ -281,8 +281,8 @@ end end @muladd function _ode_interpolant!(out, Θ, dt, y₀, y₁, k, - cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, - idxs, T::Type{Val{1}}) + cache::Union{Rosenbrock5ConstantCache, Rosenbrock5Cache}, + idxs, T::Type{Val{1}}) @views @.. broadcast=false out=(k[1][idxs] + Θ * (-2 * k[1][idxs] + 2 * k[2][idxs] + Θ * diff --git a/src/dense/stiff_addsteps.jl b/src/dense/stiff_addsteps.jl index 14c0b05dd5..bbaa28740d 100644 --- a/src/dense/stiff_addsteps.jl +++ b/src/dense/stiff_addsteps.jl @@ -1,8 +1,8 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, - cache::Union{Rosenbrock23ConstantCache, - Rosenbrock32ConstantCache}, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + cache::Union{Rosenbrock23ConstantCache, + Rosenbrock32ConstantCache}, + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 2 || always_calc_begin @unpack tf, uf, d = cache γ = dt * d @@ -31,9 +31,9 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, end function _ode_addsteps!(k, t, uprev, u, dt, f, p, - cache::Union{Rosenbrock23Cache, Rosenbrock32Cache}, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + cache::Union{Rosenbrock23Cache, Rosenbrock32Cache}, + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 2 || always_calc_begin @unpack k₁, k₂, k₃, du1, du2, f₁, fsalfirst, fsallast, dT, J, W, tmp, uf, tf, linsolve_tmp, weight = cache @unpack c₃₂, d = cache.tab @@ -90,8 +90,8 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, end function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rosenbrock23Cache{<:Array}, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 2 || always_calc_begin @unpack k₁, k₂, k₃, du1, du2, f₁, fsalfirst, fsallast, dT, J, W, uf, tf, linsolve_tmp, weight = cache @unpack c₃₂, d = cache.tab @@ -148,8 +148,8 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rosenbrock23Cache{<:Arr end function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rodas4ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 2 || always_calc_begin @unpack tf, uf = cache @unpack a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, C21, C31, C32, C41, C42, C43, C51, C52, C53, C54, C61, C62, C63, C64, C65, gamma, c2, c3, c4, d1, d2, d3, d4 = cache.tab @@ -236,8 +236,8 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rodas4ConstantCache, end function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rodas4Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 2 || always_calc_begin @unpack du, du1, du2, tmp, k1, k2, k3, k4, k5, k6, dT, J, W, uf, tf, linsolve_tmp, jac_config, fsalfirst, weight = cache @unpack a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, C21, C31, C32, C41, C42, C43, C51, C52, C53, C54, C61, C62, C63, C64, C65, gamma, c2, c3, c4, d1, d2, d3, d4 = cache.tab @@ -361,8 +361,8 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rodas4Cache, end function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rodas4Cache{<:Array}, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 2 || always_calc_begin @unpack du, du1, du2, tmp, k1, k2, k3, k4, k5, k6, dT, J, W, uf, tf, linsolve_tmp, jac_config, fsalfirst = cache @unpack a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, C21, C31, C32, C41, C42, C43, C51, C52, C53, C54, C61, C62, C63, C64, C65, gamma, c2, c3, c4, d1, d2, d3, d4 = cache.tab @@ -520,8 +520,8 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rodas4Cache{<:Array}, end function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rosenbrock5ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 2 || always_calc_begin @unpack tf, uf = cache @unpack a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, C21, C31, C32, C41, C42, C43, C51, C52, C53, C54, C61, C62, C63, C64, C65, C71, C72, C73, C74, C75, C76, C81, C82, C83, C84, C85, C86, C87, gamma, d1, d2, d3, d4, d5, c2, c3, c4, c5 = cache.tab @@ -650,8 +650,8 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rosenbrock5ConstantCach end function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rosenbrock5Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 2 || always_calc_begin @unpack du, du1, du2, tmp, k1, k2, k3, k4, k5, k6, k7, k8, dT, J, W, uf, tf, linsolve_tmp, jac_config, fsalfirst, weight = cache @unpack a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, C21, C31, C32, C41, C42, C43, C51, C52, C53, C54, C61, C62, C63, C64, C65, C71, C72, C73, C74, C75, C76, C81, C82, C83, C84, C85, C86, C87, gamma, d1, d2, d3, d4, d5, c2, c3, c4, c5 = cache.tab @@ -855,8 +855,8 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rosenbrock5Cache, end function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rosenbrock5Cache{<:Array}, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 2 || always_calc_begin @unpack du, du1, du2, k1, k2, k3, k4, k5, k6, k7, k8, dT, J, W, uf, tf, linsolve_tmp, jac_config, fsalfirst = cache @unpack a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, C21, C31, C32, C41, C42, C43, C51, C52, C53, C54, C61, C62, C63, C64, C65, C71, C72, C73, C74, C75, C76, C81, C82, C83, C84, C85, C86, C87, gamma, d1, d2, d3, d4, d5, c2, c3, c4, c5 = cache.tab diff --git a/src/dense/verner_addsteps.jl b/src/dense/verner_addsteps.jl index d37f09600e..f199338c1d 100644 --- a/src/dense/verner_addsteps.jl +++ b/src/dense/verner_addsteps.jl @@ -1,6 +1,6 @@ @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Vern6Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 9 || always_calc_begin @unpack c1, c2, c3, c4, c5, c6, a21, a31, a32, a41, a43, a51, a53, a54, a61, a63, a64, a65, a71, a73, a74, a75, a76, a81, a83, a84, a85, a86, a87, a91, a94, a95, a96, a97, a98 = cache.tab @unpack k1, k2, k3, k4, k5, k6, k7, k8, k9, tmp = cache @@ -66,8 +66,8 @@ end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Vern7Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) T = constvalue(recursive_unitless_bottom_eltype(u)) T2 = constvalue(typeof(one(t))) if length(k) < 10 || always_calc_begin @@ -163,8 +163,8 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Vern7Cache{<:Array}, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) T = constvalue(recursive_unitless_bottom_eltype(u)) T2 = constvalue(typeof(one(t))) if length(k) < 10 || always_calc_begin @@ -303,8 +303,8 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Vern8Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 13 || always_calc_begin @unpack c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, a0201, a0301, a0302, a0401, a0403, a0501, a0503, a0504, a0601, a0604, a0605, a0701, a0704, a0705, a0706, a0801, a0804, a0805, a0806, a0807, a0901, a0904, a0905, a0906, a0907, a0908, a1001, a1004, a1005, a1006, a1007, a1008, a1009, a1101, a1104, a1105, a1106, a1107, a1108, a1109, a1110, a1201, a1204, a1205, a1206, a1207, a1208, a1209, a1210, a1211, a1301, a1304, a1305, a1306, a1307, a1308, a1309, a1310 = cache.tab @unpack k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, tmp = cache @@ -431,8 +431,8 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Vern9Cache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) T = constvalue(recursive_unitless_bottom_eltype(u)) T2 = constvalue(typeof(one(t))) if length(k) < 10 || always_calc_begin @@ -586,8 +586,8 @@ end nothing end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Vern9Cache{<:Array}, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) T = constvalue(recursive_unitless_bottom_eltype(u)) T2 = constvalue(typeof(one(t))) if length(k) < 10 || always_calc_begin @@ -815,8 +815,8 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Vern6ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 9 || always_calc_begin @unpack c1, c2, c3, c4, c5, c6, a21, a31, a32, a41, a43, a51, a53, a54, a61, a63, a64, a65, a71, a73, a74, a75, a76, a81, a83, a84, a85, a86, a87, a91, a94, a95, a96, a97, a98 = cache.tab copyat_or_push!(k, 1, f(uprev, p, t)) @@ -869,8 +869,8 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Vern7ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) T = constvalue(recursive_unitless_bottom_eltype(u)) T2 = constvalue(typeof(one(t))) if length(k) < 10 || always_calc_begin @@ -945,8 +945,8 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Vern8ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) if length(k) < 13 || always_calc_begin @unpack c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, a0201, a0301, a0302, a0401, a0403, a0501, a0503, a0504, a0601, a0604, a0605, a0701, a0704, a0705, a0706, a0801, a0804, a0805, a0806, a0807, a0901, a0904, a0905, a0906, a0907, a0908, a1001, a1004, a1005, a1006, a1007, a1008, a1009, a1101, a1104, a1105, a1106, a1107, a1108, a1109, a1110, a1201, a1204, a1205, a1206, a1207, a1208, a1209, a1210, a1211, a1301, a1304, a1305, a1306, a1307, a1308, a1309, a1310 = cache.tab copyat_or_push!(k, 1, f(uprev, p, t)) @@ -1056,8 +1056,8 @@ end end @muladd function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Vern9ConstantCache, - always_calc_begin = false, allow_calc_end = true, - force_calc_end = false) + always_calc_begin = false, allow_calc_end = true, + force_calc_end = false) T = constvalue(recursive_unitless_bottom_eltype(u)) T2 = constvalue(typeof(one(t))) if length(k) < 10 || always_calc_begin diff --git a/src/derivative_utils.jl b/src/derivative_utils.jl index b1b3a39a8e..ea0ac3f486 100644 --- a/src/derivative_utils.jl +++ b/src/derivative_utils.jl @@ -199,7 +199,7 @@ mutable struct WOperator{IIP, T, jacvec::JV function WOperator{IIP}(mass_matrix, gamma, J, u, jacvec = nothing; - transform = false) where {IIP} + transform = false) where {IIP} # TODO: there is definitely a missing interface. # Tentative interface: `has_concrete` and `concertize(A)` if J isa Union{Number, ScalarOperator} @@ -296,11 +296,11 @@ Base.eltype(W::WOperator) = eltype(W.J) # In WOperator update_coefficients!, accept both missing u/p/t and missing dtgamma/transform and don't update them in that case. # This helps support partial updating logic used with Newton solvers. function SciMLOperators.update_coefficients!(W::WOperator, - u = nothing, - p = nothing, - t = nothing; - dtgamma = nothing, - transform = nothing) + u = nothing, + p = nothing, + t = nothing; + dtgamma = nothing, + transform = nothing) if (u !== nothing) && (p !== nothing) && (t !== nothing) update_coefficients!(W.J, u, p, t) update_coefficients!(W.mass_matrix, u, p, t) @@ -483,7 +483,7 @@ end end function jacobian2W!(W::AbstractMatrix, mass_matrix::MT, dtgamma::Number, J::AbstractMatrix, - W_transform::Bool)::Nothing where {MT} + W_transform::Bool)::Nothing where {MT} # check size and dimension iijj = axes(W) @boundscheck (iijj == axes(J) && length(iijj) == 2) || _throwWJerror(W, J) @@ -565,7 +565,7 @@ function jacobian2W!(W::AbstractMatrix, mass_matrix::MT, dtgamma::Number, J::Abs end function jacobian2W!(W::Matrix, mass_matrix::MT, dtgamma::Number, J::Matrix, - W_transform::Bool)::Nothing where {MT} + W_transform::Bool)::Nothing where {MT} # check size and dimension iijj = axes(W) @boundscheck (iijj == axes(J) && length(iijj) == 2) || _throwWJerror(W, J) @@ -605,7 +605,7 @@ function jacobian2W!(W::Matrix, mass_matrix::MT, dtgamma::Number, J::Matrix, end function jacobian2W(mass_matrix::MT, dtgamma::Number, J::AbstractMatrix, - W_transform::Bool)::Nothing where {MT} + W_transform::Bool)::Nothing where {MT} # check size and dimension mass_matrix isa UniformScaling || @boundscheck axes(mass_matrix) == axes(J) || _throwJMerror(J, mass_matrix) @@ -629,7 +629,7 @@ function jacobian2W(mass_matrix::MT, dtgamma::Number, J::AbstractMatrix, end function calc_W!(W, integrator, nlsolver::Union{Nothing, AbstractNLSolver}, cache, dtgamma, - repeat_step, W_transform = false, newJW = nothing) + repeat_step, W_transform = false, newJW = nothing) @unpack t, dt, uprev, u, f, p = integrator lcache = nlsolver === nothing ? cache : nlsolver.cache next_step = is_always_new(nlsolver) @@ -788,7 +788,7 @@ end end function calc_rosenbrock_differentiation!(integrator, cache, dtd1, dtgamma, repeat_step, - W_transform) + W_transform) nlsolver = nothing # we need to skip calculating `J` and `W` when a step is repeated new_jac = new_W = false @@ -807,8 +807,8 @@ function update_W!(integrator, cache, dtgamma, repeat_step, newJW = nothing) end function update_W!(nlsolver::AbstractNLSolver, - integrator::SciMLBase.DEIntegrator{<:Any, true}, cache, dtgamma, - repeat_step::Bool, newJW = nothing) + integrator::SciMLBase.DEIntegrator{<:Any, true}, cache, dtgamma, + repeat_step::Bool, newJW = nothing) if isnewton(nlsolver) calc_W!(get_W(nlsolver), integrator, nlsolver, cache, dtgamma, repeat_step, true, newJW) @@ -817,8 +817,8 @@ function update_W!(nlsolver::AbstractNLSolver, end function update_W!(nlsolver::AbstractNLSolver, - integrator::SciMLBase.DEIntegrator{<:Any, false}, cache, dtgamma, - repeat_step::Bool, newJW = nothing) + integrator::SciMLBase.DEIntegrator{<:Any, false}, cache, dtgamma, + repeat_step::Bool, newJW = nothing) if isnewton(nlsolver) isdae = integrator.alg isa DAEAlgorithm new_jac, new_W = true, true @@ -843,7 +843,7 @@ function update_W!(nlsolver::AbstractNLSolver, end function build_J_W(alg, u, uprev, p, t, dt, f::F, ::Type{uEltypeNoUnits}, - ::Val{IIP}) where {IIP, uEltypeNoUnits, F} + ::Val{IIP}) where {IIP, uEltypeNoUnits, F} # TODO - make J, W AbstractSciMLOperators (lazily defined with scimlops functionality) # TODO - if jvp given, make it SciMLOperators.FunctionOperator # TODO - make mass matrix a SciMLOperator so it can be updated with time. Default to IdentityOperator @@ -929,9 +929,9 @@ build_uf(alg, nf, t, p, ::Val{true}) = UJacobianWrapper(nf, t, p) build_uf(alg, nf, t, p, ::Val{false}) = UDerivativeWrapper(nf, t, p) function LinearSolve.init_cacheval(alg::LinearSolve.DefaultLinearSolver, A::WOperator, b, u, - Pl, Pr, - maxiters::Int, abstol, reltol, verbose::Bool, - assumptions::OperatorAssumptions) + Pl, Pr, + maxiters::Int, abstol, reltol, verbose::Bool, + assumptions::OperatorAssumptions) LinearSolve.init_cacheval(alg, A.J, b, u, Pl, Pr, maxiters::Int, abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions) @@ -939,8 +939,8 @@ end for alg in InteractiveUtils.subtypes(OrdinaryDiffEq.LinearSolve.AbstractFactorization) @eval function LinearSolve.init_cacheval(alg::$alg, A::WOperator, b, u, Pl, Pr, - maxiters::Int, abstol, reltol, verbose::Bool, - assumptions::OperatorAssumptions) + maxiters::Int, abstol, reltol, verbose::Bool, + assumptions::OperatorAssumptions) LinearSolve.init_cacheval(alg, A.J, b, u, Pl, Pr, maxiters::Int, abstol, reltol, verbose::Bool, assumptions::OperatorAssumptions) diff --git a/src/derivative_wrappers.jl b/src/derivative_wrappers.jl index 75f3484407..d22674a1c3 100644 --- a/src/derivative_wrappers.jl +++ b/src/derivative_wrappers.jl @@ -76,8 +76,8 @@ function Base.showerror(io::IO, e::FirstAutodiffJacError) end function derivative!(df::AbstractArray{<:Number}, f, - x::Union{Number, AbstractArray{<:Number}}, fx::AbstractArray{<:Number}, - integrator, grad_config) + x::Union{Number, AbstractArray{<:Number}}, fx::AbstractArray{<:Number}, + integrator, grad_config) alg = unwrap_alg(integrator, true) tmp = length(x) # We calculate derivtive for all elements in gradient if alg_autodiff(alg) isa AutoForwardDiff @@ -120,7 +120,7 @@ function derivative!(df::AbstractArray{<:Number}, f, end function derivative(f, x::Union{Number, AbstractArray{<:Number}}, - integrator) + integrator) local d tmp = length(x) # We calculate derivative for all elements in gradient alg = unwrap_alg(integrator, true) @@ -174,11 +174,11 @@ function _nfcount(N, ::Type{diff_type}) where {diff_type} end function jacobian_finitediff(f, x, ::Type{diff_type}, dir, colorvec, sparsity, - jac_prototype) where {diff_type} + jac_prototype) where {diff_type} (FiniteDiff.finite_difference_derivative(f, x, diff_type, eltype(x), dir = dir), 2) end function jacobian_finitediff(f, x::AbstractArray, ::Type{diff_type}, dir, colorvec, - sparsity, jac_prototype) where {diff_type} + sparsity, jac_prototype) where {diff_type} f_in = diff_type === Val{:forward} ? f(x) : similar(x) ret_eltype = eltype(f_in) J = FiniteDiff.finite_difference_jacobian(f, x, diff_type, ret_eltype, f_in, @@ -225,8 +225,8 @@ function jacobian_finitediff!(J, f, x, jac_config, integrator) end function jacobian!(J::AbstractMatrix{<:Number}, f, x::AbstractArray{<:Number}, - fx::AbstractArray{<:Number}, integrator::DiffEqBase.DEIntegrator, - jac_config) + fx::AbstractArray{<:Number}, integrator::DiffEqBase.DEIntegrator, + jac_config) alg = unwrap_alg(integrator, true) if alg_autodiff(alg) isa AutoForwardDiff if integrator.iter == 1 @@ -258,7 +258,7 @@ function jacobian!(J::AbstractMatrix{<:Number}, f, x::AbstractArray{<:Number}, end function build_jac_config(alg, f::F1, uf::F2, du1, uprev, u, tmp, du2, - ::Val{transform} = Val(true)) where {transform, F1, F2} + ::Val{transform} = Val(true)) where {transform, F1, F2} haslinsolve = hasfield(typeof(alg), :linsolve) if !DiffEqBase.has_jac(f) && # No Jacobian if has analytical solution @@ -313,12 +313,12 @@ function build_jac_config(alg, f::F1, uf::F2, du1, uprev, u, tmp, du2, end function get_chunksize(jac_config::ForwardDiff.JacobianConfig{ - T, - V, - N, - D, -}) where {T, V, N, D -} + T, + V, + N, + D, + }) where {T, V, N, D + } Val(N) end # don't degrade compile time information to runtime information diff --git a/src/initdt.jl b/src/initdt.jl index d7056b1da5..8c22742b54 100644 --- a/src/initdt.jl +++ b/src/initdt.jl @@ -1,7 +1,7 @@ @muladd function ode_determine_initdt(u0, t, tdir, dtmax, abstol, reltol, internalnorm, - prob::DiffEqBase.AbstractODEProblem{uType, tType, true - }, - integrator) where {tType, uType} + prob::DiffEqBase.AbstractODEProblem{uType, tType, true + }, + integrator) where {tType, uType} _tType = eltype(tType) f = prob.f p = integrator.p @@ -226,9 +226,9 @@ function Base.showerror(io::IO, e::TypeNotConstantError) end @muladd function ode_determine_initdt(u0, t, tdir, dtmax, abstol, reltol, internalnorm, - prob::DiffEqBase.AbstractODEProblem{uType, tType, - false}, - integrator) where {uType, tType} + prob::DiffEqBase.AbstractODEProblem{uType, tType, + false}, + integrator) where {uType, tType} _tType = eltype(tType) f = prob.f p = prob.p @@ -288,9 +288,9 @@ end end @inline function ode_determine_initdt(u0, t, tdir, dtmax, abstol, reltol, internalnorm, - prob::DiffEqBase.AbstractDAEProblem{duType, uType, - tType}, - integrator) where {duType, uType, tType} + prob::DiffEqBase.AbstractDAEProblem{duType, uType, + tType}, + integrator) where {duType, uType, tType} _tType = eltype(tType) tspan = prob.tspan init_dt = abs(tspan[2] - tspan[1]) diff --git a/src/initialize_dae.jl b/src/initialize_dae.jl index af4f96ceae..1a35df6ede 100644 --- a/src/initialize_dae.jl +++ b/src/initialize_dae.jl @@ -45,7 +45,7 @@ variable, then the system is not Index 1! ## Expansion function DiffEqBase.initialize_dae!(integrator::ODEIntegrator, - initializealg = integrator.initializealg) + initializealg = integrator.initializealg) _initialize_dae!(integrator, integrator.sol.prob, initializealg, Val(DiffEqBase.isinplace(integrator.sol.prob))) @@ -54,19 +54,19 @@ end ## Default algorithms function _initialize_dae!(integrator, prob::ODEProblem, - alg::DefaultInit, x::Val{true}) + alg::DefaultInit, x::Val{true}) _initialize_dae!(integrator, prob, BrownFullBasicInit(integrator.opts.abstol), x) end function _initialize_dae!(integrator, prob::ODEProblem, - alg::DefaultInit, x::Val{false}) + alg::DefaultInit, x::Val{false}) _initialize_dae!(integrator, prob, BrownFullBasicInit(integrator.opts.abstol), x) end function _initialize_dae!(integrator, prob::DAEProblem, - alg::DefaultInit, x::Val{false}) + alg::DefaultInit, x::Val{false}) if prob.differential_vars === nothing _initialize_dae!(integrator, prob, ShampineCollocationInit(), x) @@ -77,7 +77,7 @@ function _initialize_dae!(integrator, prob::DAEProblem, end function _initialize_dae!(integrator, prob::DAEProblem, - alg::DefaultInit, x::Val{true}) + alg::DefaultInit, x::Val{true}) if prob.differential_vars === nothing _initialize_dae!(integrator, prob, ShampineCollocationInit(), x) @@ -90,7 +90,7 @@ end ## NoInit function _initialize_dae!(integrator, prob::Union{ODEProblem, DAEProblem}, - alg::NoInit, x::Union{Val{true}, Val{false}}) + alg::NoInit, x::Union{Val{true}, Val{false}}) end ## ShampineCollocationInit @@ -104,7 +104,7 @@ Solve for `u` =# function _initialize_dae!(integrator, prob::ODEProblem, alg::ShampineCollocationInit, - isinplace::Val{true}) + isinplace::Val{true}) @unpack p, t, f = integrator M = integrator.f.mass_matrix dtmax = integrator.opts.dtmax @@ -197,7 +197,7 @@ function _initialize_dae!(integrator, prob::ODEProblem, alg::ShampineCollocation end function _initialize_dae!(integrator, prob::ODEProblem, alg::ShampineCollocationInit, - isinplace::Val{false}) + isinplace::Val{false}) @unpack p, t, f = integrator u0 = integrator.u M = integrator.f.mass_matrix @@ -273,7 +273,7 @@ function _initialize_dae!(integrator, prob::ODEProblem, alg::ShampineCollocation end function _initialize_dae!(integrator, prob::DAEProblem, - alg::ShampineCollocationInit, isinplace::Val{true}) + alg::ShampineCollocationInit, isinplace::Val{true}) @unpack p, t, f = integrator u0 = integrator.u @@ -333,7 +333,7 @@ function _initialize_dae!(integrator, prob::DAEProblem, end function _initialize_dae!(integrator, prob::DAEProblem, - alg::ShampineCollocationInit, isinplace::Val{false}) + alg::ShampineCollocationInit, isinplace::Val{false}) @unpack p, t, f = integrator u0 = integrator.u dtmax = integrator.opts.dtmax @@ -392,12 +392,12 @@ Solve for the algebraic variables algebraic_jacobian(::Nothing, algebraic_eqs, algebraic_vars) = nothing function algebraic_jacobian(jac_prototype::T, algebraic_eqs, - algebraic_vars) where {T <: AbstractMatrix} + algebraic_vars) where {T <: AbstractMatrix} jac_prototype[algebraic_eqs, algebraic_vars] end function _initialize_dae!(integrator, prob::ODEProblem, - alg::BrownFullBasicInit, isinplace::Val{true}) + alg::BrownFullBasicInit, isinplace::Val{true}) @unpack p, t, f = integrator u = integrator.u M = integrator.f.mass_matrix @@ -457,7 +457,7 @@ function _initialize_dae!(integrator, prob::ODEProblem, end function _initialize_dae!(integrator, prob::ODEProblem, - alg::BrownFullBasicInit, isinplace::Val{false}) + alg::BrownFullBasicInit, isinplace::Val{false}) @unpack p, t, f = integrator u0 = integrator.u @@ -526,7 +526,7 @@ function _initialize_dae!(integrator, prob::ODEProblem, end function _initialize_dae!(integrator, prob::DAEProblem, - alg::BrownFullBasicInit, isinplace::Val{true}) + alg::BrownFullBasicInit, isinplace::Val{true}) @unpack p, t, f = integrator differential_vars = prob.differential_vars u = integrator.u @@ -587,7 +587,7 @@ function _initialize_dae!(integrator, prob::DAEProblem, end function _initialize_dae!(integrator, prob::DAEProblem, - alg::BrownFullBasicInit, isinplace::Val{false}) + alg::BrownFullBasicInit, isinplace::Val{false}) @unpack p, t, f = integrator differential_vars = prob.differential_vars diff --git a/src/integrators/controllers.jl b/src/integrators/controllers.jl index cb3e74c2e2..d40c585054 100644 --- a/src/integrators/controllers.jl +++ b/src/integrators/controllers.jl @@ -246,8 +246,8 @@ struct PIDController{QT, Limiter} <: AbstractController end function PIDController(beta1, beta2, beta3 = zero(beta1); - limiter = default_dt_factor_limiter, - accept_safety = 0.81) + limiter = default_dt_factor_limiter, + accept_safety = 0.81) beta = MVector(map(float, promote(beta1, beta2, beta3))...) QT = eltype(beta) err = MVector{3, QT}(true, true, true) @@ -621,8 +621,8 @@ function post_newton_controller!(integrator, alg::Union{FBDF, DFBDF}) end function choose_order!(alg::Union{FBDF, DFBDF}, integrator, - cache::OrdinaryDiffEqMutableCache, - ::Val{max_order}) where {max_order} + cache::OrdinaryDiffEqMutableCache, + ::Val{max_order}) where {max_order} @unpack t, dt, u, cache, uprev = integrator @unpack atmp, ts_tmp, terkm2, terkm1, terk, terkp1, terk_tmp, u_history = cache k = cache.order @@ -657,8 +657,8 @@ function choose_order!(alg::Union{FBDF, DFBDF}, integrator, end function choose_order!(alg::Union{FBDF, DFBDF}, integrator, - cache::OrdinaryDiffEqConstantCache, - ::Val{max_order}) where {max_order} + cache::OrdinaryDiffEqConstantCache, + ::Val{max_order}) where {max_order} @unpack t, dt, u, cache, uprev = integrator @unpack ts_tmp, terkm2, terkm1, terk, terkp1, u_history = cache k = cache.order @@ -701,9 +701,9 @@ function choose_order!(alg::Union{FBDF, DFBDF}, integrator, end function stepsize_controller!(integrator, - alg::Union{FBDF{max_order}, DFBDF{max_order}}) where { - max_order, -} + alg::Union{FBDF{max_order}, DFBDF{max_order}}) where { + max_order, + } @unpack cache = integrator cache.prev_order = cache.order k, terk = choose_order!(alg, integrator, cache, Val(max_order)) @@ -721,7 +721,7 @@ function stepsize_controller!(integrator, end function step_accept_controller!(integrator, alg::Union{FBDF{max_order}, DFBDF{max_order}}, - q) where {max_order} + q) where {max_order} integrator.cache.consfailcnt = 0 if q <= integrator.opts.qsteady_max && q >= integrator.opts.qsteady_min q = one(q) @@ -743,8 +743,8 @@ function reset_alg_dependent_opts!(controller::ExtrapolationController, alg1, al end @inline function stepsize_controller!(integrator, - alg::Union{ExtrapolationMidpointDeuflhard, - ImplicitDeuflhardExtrapolation}) + alg::Union{ExtrapolationMidpointDeuflhard, + ImplicitDeuflhardExtrapolation}) # Dummy function # ExtrapolationMidpointDeuflhard's stepsize scaling is stored in the cache; # it is computed by stepsize_controller_internal! (in perfom_step!) resp. stepsize_predictor! @@ -753,8 +753,8 @@ end end function stepsize_controller_internal!(integrator, - alg::Union{ExtrapolationMidpointDeuflhard, - ImplicitDeuflhardExtrapolation}) + alg::Union{ExtrapolationMidpointDeuflhard, + ImplicitDeuflhardExtrapolation}) # Standard step size controller # Compute and save the stepsize scaling based on the latest error estimate of the current order @unpack controller = integrator.opts @@ -774,8 +774,8 @@ function stepsize_controller_internal!(integrator, end function stepsize_predictor!(integrator, - alg::Union{ExtrapolationMidpointDeuflhard, - ImplicitDeuflhardExtrapolation}, n_new::Int) + alg::Union{ExtrapolationMidpointDeuflhard, + ImplicitDeuflhardExtrapolation}, n_new::Int) # Compute and save the stepsize scaling for order n_new based on the latest error estimate of the current order. @unpack controller = integrator.opts @@ -801,8 +801,8 @@ function stepsize_predictor!(integrator, end function step_accept_controller!(integrator, - alg::Union{ExtrapolationMidpointDeuflhard, - ImplicitDeuflhardExtrapolation}, q) + alg::Union{ExtrapolationMidpointDeuflhard, + ImplicitDeuflhardExtrapolation}, q) # Compute new order and stepsize, return new stepsize @unpack min_order, max_order = alg @unpack n_curr, n_old, Q = integrator.cache @@ -840,8 +840,8 @@ function step_accept_controller!(integrator, end function step_reject_controller!(integrator, - alg::Union{ExtrapolationMidpointDeuflhard, - ImplicitDeuflhardExtrapolation}) + alg::Union{ExtrapolationMidpointDeuflhard, + ImplicitDeuflhardExtrapolation}) # Compute and save reduced stepsize dt_red of order n_old # Use the latest error estimate to predict dt_red if an estimate of order n_old is not available if integrator.cache.n_curr < integrator.cache.n_old @@ -856,10 +856,10 @@ function step_reject_controller!(integrator, end @inline function stepsize_controller!(integrator, - alg::Union{ExtrapolationMidpointHairerWanner, - ImplicitHairerWannerExtrapolation, - ImplicitEulerExtrapolation, - ImplicitEulerBarycentricExtrapolation}) + alg::Union{ExtrapolationMidpointHairerWanner, + ImplicitHairerWannerExtrapolation, + ImplicitEulerExtrapolation, + ImplicitEulerBarycentricExtrapolation}) # Dummy function # ExtrapolationMidpointHairerWanner's stepsize scaling is stored in the cache; # it is computed by stepsize_controller_internal! (in perfom_step!), step_accept_controller! or step_reject_controller! @@ -867,10 +867,10 @@ end end function stepsize_controller_internal!(integrator, - alg::Union{ExtrapolationMidpointHairerWanner, - ImplicitHairerWannerExtrapolation, - ImplicitEulerExtrapolation, - ImplicitEulerBarycentricExtrapolation}) + alg::Union{ExtrapolationMidpointHairerWanner, + ImplicitHairerWannerExtrapolation, + ImplicitEulerExtrapolation, + ImplicitEulerBarycentricExtrapolation}) # Standard step size controller # Compute and save the stepsize scaling based on the latest error estimate of the current order @unpack controller = integrator.opts @@ -921,10 +921,10 @@ function stepsize_controller_internal!(integrator, end function step_accept_controller!(integrator, - alg::Union{ExtrapolationMidpointHairerWanner, - ImplicitHairerWannerExtrapolation, - ImplicitEulerExtrapolation, - ImplicitEulerBarycentricExtrapolation}, q) + alg::Union{ExtrapolationMidpointHairerWanner, + ImplicitHairerWannerExtrapolation, + ImplicitEulerExtrapolation, + ImplicitEulerBarycentricExtrapolation}, q) # Compute new order and stepsize, return new stepsize @unpack min_order, max_order = alg @unpack n_curr, n_old, Q, sigma, work, dt_new = integrator.cache @@ -977,10 +977,10 @@ function step_accept_controller!(integrator, end function step_reject_controller!(integrator, - alg::Union{ExtrapolationMidpointHairerWanner, - ImplicitHairerWannerExtrapolation, - ImplicitEulerExtrapolation, - ImplicitEulerBarycentricExtrapolation}) + alg::Union{ExtrapolationMidpointHairerWanner, + ImplicitHairerWannerExtrapolation, + ImplicitEulerExtrapolation, + ImplicitEulerBarycentricExtrapolation}) # Compute and save order and stepsize for redoing the current step @unpack n_old, n_curr, Q = integrator.cache diff --git a/src/integrators/integrator_interface.jl b/src/integrators/integrator_interface.jl index 33077ff038..4e4227d2a9 100644 --- a/src/integrators/integrator_interface.jl +++ b/src/integrators/integrator_interface.jl @@ -2,7 +2,7 @@ # is specialized, yet, it needs to take both ODEIntegrator and DDEIntegrator. # Hence, we need to have two separate functions. function _change_t_via_interpolation!(integrator, t, - modify_save_endpoint::Type{Val{T}}) where {T} + modify_save_endpoint::Type{Val{T}}) where {T} # Can get rid of an allocation here with a function # get_tmp_arr(integrator.cache) which gives a pointer to some # cache array which can be modified. @@ -24,12 +24,12 @@ function _change_t_via_interpolation!(integrator, t, return nothing end function DiffEqBase.change_t_via_interpolation!(integrator::ODEIntegrator, - t, - modify_save_endpoint::Type{Val{T}} = Val{ - false, - }) where { - T, -} + t, + modify_save_endpoint::Type{Val{T}} = Val{ + false, + }) where { + T, + } _change_t_via_interpolation!(integrator, t, modify_save_endpoint) return nothing end @@ -112,72 +112,72 @@ for typ in (OrdinaryDiffEqAlgorithm, Union{RadauIIA3, RadauIIA5}, OrdinaryDiffEqRosenbrockAdaptiveAlgorithm, Union{SSPRK22, SSPRK33, SSPRK53_2N1, SSPRK53_2N2, SSPRK43, SSPRK432, SSPRK932}) @eval @inline function DiffEqBase.get_tmp_cache(integrator, alg::$typ, - cache::OrdinaryDiffEqConstantCache) + cache::OrdinaryDiffEqConstantCache) nothing end end # the ordering of the cache arrays is important!!! @inline function DiffEqBase.get_tmp_cache(integrator, alg::OrdinaryDiffEqAlgorithm, - cache::OrdinaryDiffEqMutableCache) + cache::OrdinaryDiffEqMutableCache) (cache.tmp,) end @inline function DiffEqBase.get_tmp_cache(integrator, alg::Union{RadauIIA3, RadauIIA5}, - cache::OrdinaryDiffEqMutableCache) + cache::OrdinaryDiffEqMutableCache) (cache.tmp, cache.atmp) end @inline function DiffEqBase.get_tmp_cache(integrator, - alg::OrdinaryDiffEqNewtonAdaptiveAlgorithm, - cache::OrdinaryDiffEqMutableCache) + alg::OrdinaryDiffEqNewtonAdaptiveAlgorithm, + cache::OrdinaryDiffEqMutableCache) (cache.nlsolver.tmp, cache.atmp) end @inline function DiffEqBase.get_tmp_cache(integrator, alg::OrdinaryDiffEqNewtonAlgorithm, - cache::OrdinaryDiffEqMutableCache) + cache::OrdinaryDiffEqMutableCache) (cache.nlsolver.tmp, cache.nlsolver.z) end @inline function DiffEqBase.get_tmp_cache(integrator, - alg::OrdinaryDiffEqRosenbrockAdaptiveAlgorithm, - cache::OrdinaryDiffEqMutableCache) + alg::OrdinaryDiffEqRosenbrockAdaptiveAlgorithm, + cache::OrdinaryDiffEqMutableCache) (cache.tmp, cache.linsolve_tmp) end @inline function DiffEqBase.get_tmp_cache(integrator, - alg::Union{SSPRK22, SSPRK33, SSPRK53_2N1, - SSPRK53_2N2, SSPRK43, SSPRK432, - SSPRK932}, - cache::OrdinaryDiffEqMutableCache) + alg::Union{SSPRK22, SSPRK33, SSPRK53_2N1, + SSPRK53_2N2, SSPRK43, SSPRK432, + SSPRK932}, + cache::OrdinaryDiffEqMutableCache) (cache.k,) end @inline function DiffEqBase.get_tmp_cache(integrator, - alg::OrdinaryDiffEqImplicitExtrapolationAlgorithm, - cache::OrdinaryDiffEqMutableCache) + alg::OrdinaryDiffEqImplicitExtrapolationAlgorithm, + cache::OrdinaryDiffEqMutableCache) (cache.tmp, cache.utilde) end @inline function DiffEqBase.get_tmp_cache(integrator, - alg::OrdinaryDiffEqAdaptiveExponentialAlgorithm, - cache::OrdinaryDiffEqMutableCache) + alg::OrdinaryDiffEqAdaptiveExponentialAlgorithm, + cache::OrdinaryDiffEqMutableCache) (cache.tmp, cache.utilde) end @inline function DiffEqBase.get_tmp_cache(integrator, - alg::OrdinaryDiffEqExponentialAlgorithm, - cache::OrdinaryDiffEqMutableCache) + alg::OrdinaryDiffEqExponentialAlgorithm, + cache::OrdinaryDiffEqMutableCache) (cache.tmp, cache.dz) end @inline function DiffEqBase.get_tmp_cache(integrator, - alg::OrdinaryDiffEqLinearExponentialAlgorithm, - cache::OrdinaryDiffEqMutableCache) + alg::OrdinaryDiffEqLinearExponentialAlgorithm, + cache::OrdinaryDiffEqMutableCache) (cache.tmp,) end @inline function DiffEqBase.get_tmp_cache(integrator, - alg::LinearExponential, - cache::OrdinaryDiffEqMutableCache) + alg::LinearExponential, + cache::OrdinaryDiffEqMutableCache) (cache.tmp,) end @inline function DiffEqBase.get_tmp_cache(integrator, alg::CompositeAlgorithm, - cache::CompositeCache) + cache::CompositeCache) get_tmp_cache(integrator, integrator.alg.algs[1], cache.caches[1]) end @inline function DiffEqBase.get_tmp_cache(integrator, alg::DAEAlgorithm, - cache::OrdinaryDiffEqMutableCache) + cache::OrdinaryDiffEqMutableCache) (cache.nlsolver.cache.dz, cache.atmp) end @@ -305,7 +305,7 @@ function addat_non_user_cache!(integrator::ODEIntegrator, cache::CompositeCache, end function resize_non_user_cache!(integrator::ODEIntegrator, - cache::RosenbrockMutableCache, i) + cache::RosenbrockMutableCache, i) cache.J = similar(cache.J, i, i) cache.W = similar(cache.W, i, i) resize_jac_config!(cache.jac_config, i) @@ -348,17 +348,17 @@ end DiffEqBase.has_reinit(integrator::ODEIntegrator) = true function DiffEqBase.reinit!(integrator::ODEIntegrator, u0 = integrator.sol.prob.u0; - t0 = integrator.sol.prob.tspan[1], - tf = integrator.sol.prob.tspan[2], - erase_sol = true, - tstops = integrator.opts.tstops_cache, - saveat = integrator.opts.saveat_cache, - d_discontinuities = integrator.opts.d_discontinuities_cache, - reset_dt = (integrator.dtcache == zero(integrator.dt)) && - integrator.opts.adaptive, - reinit_callbacks = true, initialize_save = true, - reinit_cache = true, - reinit_retcode = true) + t0 = integrator.sol.prob.tspan[1], + tf = integrator.sol.prob.tspan[2], + erase_sol = true, + tstops = integrator.opts.tstops_cache, + saveat = integrator.opts.saveat_cache, + d_discontinuities = integrator.opts.d_discontinuities_cache, + reset_dt = (integrator.dtcache == zero(integrator.dt)) && + integrator.opts.adaptive, + reinit_callbacks = true, initialize_save = true, + reinit_cache = true, + reinit_retcode = true) if isinplace(integrator.sol.prob) recursivecopy!(integrator.u, u0) recursivecopy!(integrator.uprev, integrator.u) diff --git a/src/integrators/integrator_utils.jl b/src/integrators/integrator_utils.jl index a72bde464e..e93a1c1a48 100644 --- a/src/integrators/integrator_utils.jl +++ b/src/integrators/integrator_utils.jl @@ -1,5 +1,5 @@ function save_idxsinitialize(integrator, cache::OrdinaryDiffEqCache, - ::Type{uType}) where {uType} + ::Type{uType}) where {uType} error("This algorithm does not have an initialization function") end @@ -288,10 +288,10 @@ end # Use a generated function to call apply_callback! in a type-stable way @generated function apply_ith_callback!(integrator, - time, upcrossing, event_idx, cb_idx, - callbacks::NTuple{N, - Union{ContinuousCallback, - VectorContinuousCallback}}) where {N} + time, upcrossing, event_idx, cb_idx, + callbacks::NTuple{N, + Union{ContinuousCallback, + VectorContinuousCallback}}) where {N} ex = quote throw(BoundsError(callbacks, cb_idx)) end @@ -302,7 +302,7 @@ end ex = quote if (cb_idx == $i) return DiffEqBase.apply_callback!(integrator, callbacks[$i], time, - upcrossing, event_idx) + upcrossing, event_idx) else $ex end @@ -321,15 +321,15 @@ function handle_callbacks!(integrator) saved_in_cb = false if !(typeof(continuous_callbacks) <: Tuple{}) time, upcrossing, event_occurred, event_idx, idx, counter = DiffEqBase.find_first_continuous_callback(integrator, - continuous_callbacks...) + continuous_callbacks...) if event_occurred integrator.event_last_time = idx integrator.vector_event_last_time = event_idx continuous_modified, saved_in_cb = apply_ith_callback!(integrator, - time, upcrossing, - event_idx, - idx, - continuous_callbacks) + time, upcrossing, + event_idx, + idx, + continuous_callbacks) else integrator.event_last_time = 0 integrator.vector_event_last_time = 1 @@ -337,7 +337,7 @@ function handle_callbacks!(integrator) end if !integrator.force_stepfail && !(typeof(discrete_callbacks) <: Tuple{}) discrete_modified, saved_in_cb = DiffEqBase.apply_discrete_callback!(integrator, - discrete_callbacks...) + discrete_callbacks...) end if !saved_in_cb savevalues!(integrator) @@ -503,12 +503,12 @@ function nlsolve_f(integrator::ODEIntegrator) end function (integrator::ODEIntegrator)(t, ::Type{deriv} = Val{0}; - idxs = nothing) where {deriv} + idxs = nothing) where {deriv} current_interpolant(t, integrator, idxs, deriv) end function (integrator::ODEIntegrator)(val::AbstractArray, t::Union{Number, AbstractArray}, - ::Type{deriv} = Val{0}; idxs = nothing) where {deriv} + ::Type{deriv} = Val{0}; idxs = nothing) where {deriv} current_interpolant!(val, t, integrator, idxs, deriv) end diff --git a/src/integrators/type.jl b/src/integrators/type.jl index 6f96de274a..a74ea04e5e 100644 --- a/src/integrators/type.jl +++ b/src/integrators/type.jl @@ -137,33 +137,33 @@ mutable struct ODEIntegrator{algType <: Union{OrdinaryDiffEqAlgorithm, DAEAlgori fsallast::FSALType function ODEIntegrator{algType, IIP, uType, duType, tType, pType, eigenType, EEstT, - tTypeNoUnits, tdirType, ksEltype, SolType, - F, CacheType, O, FSALType, EventErrorType, CallbackCacheType, - InitializeAlgType}(sol, u, du, k, t, dt, f, p, uprev, uprev2, - duprev, tprev, - alg, dtcache, dtchangeable, dtpropose, tdir, - eigen_est, EEst, qold, q11, erracc, dtacc, - success_iter, - iter, saveiter, saveiter_dense, cache, - callback_cache, - kshortsize, force_stepfail, last_stepfail, - just_hit_tstop, - do_error_check, - event_last_time, vector_event_last_time, - last_event_error, - accept_step, isout, reeval_fsal, u_modified, - reinitialize, isdae, - opts, stats, - initializealg) where {algType, IIP, uType, - duType, tType, pType, - eigenType, EEstT, - tTypeNoUnits, tdirType, - ksEltype, SolType, F, - CacheType, O, - FSALType, - EventErrorType, - CallbackCacheType, - InitializeAlgType} + tTypeNoUnits, tdirType, ksEltype, SolType, + F, CacheType, O, FSALType, EventErrorType, CallbackCacheType, + InitializeAlgType}(sol, u, du, k, t, dt, f, p, uprev, uprev2, + duprev, tprev, + alg, dtcache, dtchangeable, dtpropose, tdir, + eigen_est, EEst, qold, q11, erracc, dtacc, + success_iter, + iter, saveiter, saveiter_dense, cache, + callback_cache, + kshortsize, force_stepfail, last_stepfail, + just_hit_tstop, + do_error_check, + event_last_time, vector_event_last_time, + last_event_error, + accept_step, isout, reeval_fsal, u_modified, + reinitialize, isdae, + opts, stats, + initializealg) where {algType, IIP, uType, + duType, tType, pType, + eigenType, EEstT, + tTypeNoUnits, tdirType, + ksEltype, SolType, F, + CacheType, O, + FSALType, + EventErrorType, + CallbackCacheType, + InitializeAlgType} new{algType, IIP, uType, duType, tType, pType, eigenType, EEstT, tTypeNoUnits, tdirType, ksEltype, SolType, F, CacheType, O, FSALType, EventErrorType, CallbackCacheType, InitializeAlgType, diff --git a/src/interp_func.jl b/src/interp_func.jl index 0f43051a87..37d86886b6 100644 --- a/src/interp_func.jl +++ b/src/interp_func.jl @@ -23,133 +23,133 @@ struct CompositeInterpolationData{F, uType, tType, kType, cacheType} <: end function DiffEqBase.interp_summary(interp::OrdinaryDiffEqInterpolation{ - cacheType, -}) where { - cacheType, -} + cacheType, + }) where { + cacheType, + } DiffEqBase.interp_summary(cacheType, interp.dense) end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where {cacheType <: - FunctionMapConstantCache} + dense::Bool) where {cacheType <: + FunctionMapConstantCache} "left-endpoint piecewise constant" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where {cacheType <: FunctionMapCache} + dense::Bool) where {cacheType <: FunctionMapCache} "left-endpoint piecewise constant" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{DP5ConstantCache, DP5Cache}} + dense::Bool) where { + cacheType <: + Union{DP5ConstantCache, DP5Cache}} dense ? "specialized 4th order \"free\" interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{Rosenbrock23ConstantCache, - Rosenbrock32ConstantCache, - Rosenbrock23Cache, - Rosenbrock32Cache}} + dense::Bool) where { + cacheType <: + Union{Rosenbrock23ConstantCache, + Rosenbrock32ConstantCache, + Rosenbrock23Cache, + Rosenbrock32Cache}} dense ? "specialized 2nd order \"free\" stiffness-aware interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{Rodas4ConstantCache, - Rodas4Cache}} + dense::Bool) where { + cacheType <: + Union{Rodas4ConstantCache, + Rodas4Cache}} dense ? "specialized 3rd order \"free\" stiffness-aware interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{Rosenbrock5ConstantCache, - Rosenbrock5Cache}} + dense::Bool) where { + cacheType <: + Union{Rosenbrock5ConstantCache, + Rosenbrock5Cache}} dense ? "specialized 4rd order \"free\" stiffness-aware interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{SSPRK22, SSPRK22ConstantCache, - SSPRK33, SSPRK33ConstantCache, - SSPRK43, SSPRK43ConstantCache, - SSPRK432, SSPRK432ConstantCache, - }} + dense::Bool) where { + cacheType <: + Union{SSPRK22, SSPRK22ConstantCache, + SSPRK33, SSPRK33ConstantCache, + SSPRK43, SSPRK43ConstantCache, + SSPRK432, SSPRK432ConstantCache, + }} dense ? "2nd order \"free\" SSP interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: Union{OwrenZen3Cache, - OwrenZen3ConstantCache}} + dense::Bool) where { + cacheType <: Union{OwrenZen3Cache, + OwrenZen3ConstantCache}} dense ? "specialized 3rd order \"free\" interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: Union{OwrenZen4Cache, - OwrenZen4ConstantCache}} + dense::Bool) where { + cacheType <: Union{OwrenZen4Cache, + OwrenZen4ConstantCache}} dense ? "specialized 4th order \"free\" interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: Union{OwrenZen5Cache, - OwrenZen5ConstantCache}} + dense::Bool) where { + cacheType <: Union{OwrenZen5Cache, + OwrenZen5ConstantCache}} dense ? "specialized 5th order \"free\" interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{Tsit5Cache, Tsit5ConstantCache - }} + dense::Bool) where { + cacheType <: + Union{Tsit5Cache, Tsit5ConstantCache + }} dense ? "specialized 4th order \"free\" interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{BS5ConstantCache, BS5Cache}} + dense::Bool) where { + cacheType <: + Union{BS5ConstantCache, BS5Cache}} dense ? "specialized 5th order lazy interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{Vern6Cache, Vern6ConstantCache - }} + dense::Bool) where { + cacheType <: + Union{Vern6Cache, Vern6ConstantCache + }} dense ? "specialized 6th order lazy interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{Vern7Cache, Vern7ConstantCache - }} + dense::Bool) where { + cacheType <: + Union{Vern7Cache, Vern7ConstantCache + }} dense ? "specialized 7th order lazy interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{Vern8Cache, Vern8ConstantCache - }} + dense::Bool) where { + cacheType <: + Union{Vern8Cache, Vern8ConstantCache + }} dense ? "specialized 8th order lazy interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{Vern9Cache, Vern9ConstantCache - }} + dense::Bool) where { + cacheType <: + Union{Vern9Cache, Vern9ConstantCache + }} dense ? "specialized 9th order lazy interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{DP8ConstantCache, DP8Cache}} + dense::Bool) where { + cacheType <: + Union{DP8ConstantCache, DP8Cache}} dense ? "specialized 7th order interpolation" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, dense::Bool) where {cacheType} dense ? "3rd order Hermite" : "1st order linear" end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where {cacheType <: CompositeCache} + dense::Bool) where {cacheType <: CompositeCache} if !dense return "1st order linear" end @@ -157,10 +157,10 @@ function DiffEqBase.interp_summary(::Type{cacheType}, join([DiffEqBase.interp_summary(ct, dense) for ct in fieldtypes(caches)], ", ") end function DiffEqBase.interp_summary(::Type{cacheType}, - dense::Bool) where { - cacheType <: - Union{DPRKN6ConstantCache, - DPRKN6Cache}} + dense::Bool) where { + cacheType <: + Union{DPRKN6ConstantCache, + DPRKN6Cache}} dense ? "specialized 6th order interpolation" : "1st order linear" end @@ -168,14 +168,14 @@ function (interp::InterpolationData)(tvals, idxs, deriv, p, continuity::Symbol = ode_interpolation(tvals, interp, idxs, deriv, p, continuity) end function (interp::CompositeInterpolationData)(tvals, idxs, deriv, p, - continuity::Symbol = :left) + continuity::Symbol = :left) ode_interpolation(tvals, interp, idxs, deriv, p, continuity) end function (interp::InterpolationData)(val, tvals, idxs, deriv, p, continuity::Symbol = :left) ode_interpolation!(val, tvals, interp, idxs, deriv, p, continuity) end function (interp::CompositeInterpolationData)(val, tvals, idxs, deriv, p, - continuity::Symbol = :left) + continuity::Symbol = :left) ode_interpolation!(val, tvals, interp, idxs, deriv, p, continuity) end diff --git a/src/misc_utils.jl b/src/misc_utils.jl index 02d3d7c626..dd14d0c7ae 100644 --- a/src/misc_utils.jl +++ b/src/misc_utils.jl @@ -81,9 +81,9 @@ macro threaded(option, ex) end function dolinsolve(integrator, linsolve; A = nothing, linu = nothing, b = nothing, - du = nothing, u = nothing, p = nothing, t = nothing, - weight = nothing, solverdata = nothing, - reltol = integrator === nothing ? nothing : integrator.opts.reltol) + du = nothing, u = nothing, p = nothing, t = nothing, + weight = nothing, solverdata = nothing, + reltol = integrator === nothing ? nothing : integrator.opts.reltol) A !== nothing && (linsolve.A = A) b !== nothing && (linsolve.b = b) linu !== nothing && (linsolve.u = linu) diff --git a/src/nlsolve/functional.jl b/src/nlsolve/functional.jl index 5b358b7ee0..a64054b879 100644 --- a/src/nlsolve/functional.jl +++ b/src/nlsolve/functional.jl @@ -1,14 +1,14 @@ ## initialize! @muladd function initialize!(nlsolver::NLSolver{<:NLFunctional}, - integrator::DiffEqBase.DEIntegrator) + integrator::DiffEqBase.DEIntegrator) nlsolver.cache.tstep = integrator.t + nlsolver.c * integrator.dt nothing end @muladd function initialize!(nlsolver::NLSolver{<:NLAnderson}, - integrator::DiffEqBase.DEIntegrator) + integrator::DiffEqBase.DEIntegrator) @unpack cache = nlsolver cache.history = 0 @@ -92,9 +92,9 @@ end end @muladd function compute_step_fixedpoint!(nlsolver::NLSolver{ - <:Union{NLFunctional, - NLAnderson}, false}, - integrator) + <:Union{NLFunctional, + NLAnderson}, false}, + integrator) @unpack uprev, t, p, dt, opts = integrator @unpack z, γ, α, cache, tmp = nlsolver @unpack tstep = cache @@ -152,9 +152,9 @@ end end @muladd function compute_step_fixedpoint!(nlsolver::NLSolver{ - <:Union{NLFunctional, - NLAnderson}, true}, - integrator) + <:Union{NLFunctional, + NLAnderson}, true}, + integrator) @unpack uprev, t, p, dt, opts = integrator @unpack z, tmp, ztmp, γ, α, cache = nlsolver @unpack ustep, tstep, k, atmp, dz = cache @@ -221,7 +221,7 @@ function Base.resize!(nlcache::NLFunctionalCache, i::Int) end function Base.resize!(nlcache::NLAndersonCache, nlsolver::NLSolver{<:NLAnderson}, - integrator, i::Int) + integrator, i::Int) resize!(nlcache, nlsolver.alg, i) end diff --git a/src/nlsolve/newton.jl b/src/nlsolve/newton.jl index e4939385c3..e7d0fbe14c 100644 --- a/src/nlsolve/newton.jl +++ b/src/nlsolve/newton.jl @@ -1,7 +1,7 @@ ## initialize! @muladd function initialize!(nlsolver::NLSolver{<:NLNewton, false}, - integrator::DiffEqBase.DEIntegrator) + integrator::DiffEqBase.DEIntegrator) @unpack dt = integrator @unpack cache = nlsolver @@ -12,7 +12,7 @@ end @muladd function initialize!(nlsolver::NLSolver{<:NLNewton, true}, - integrator::DiffEqBase.DEIntegrator) + integrator::DiffEqBase.DEIntegrator) @unpack u, uprev, t, dt, opts = integrator @unpack cache = nlsolver @unpack weight = cache @@ -161,8 +161,8 @@ end end @muladd function compute_step!(nlsolver::NLSolver{<:NLNewton, true, <:Array}, - integrator, - γW) + integrator, + γW) @unpack uprev, t, p, dt, opts = integrator @unpack z, tmp, ztmp, γ, α, iter, cache = nlsolver @unpack W_γdt, ustep, tstep, k, atmp, dz, W, new_W, invγdt, linsolve, weight = cache @@ -234,7 +234,7 @@ end end @inline function _compute_rhs(nlsolver::NLSolver{<:NLNewton, false}, integrator, f::TF, - z) where {TF} + z) where {TF} @unpack uprev, t, p, dt = integrator @unpack tmp, ztmp, γ, α, cache = nlsolver @unpack tstep, invγdt = cache @@ -273,7 +273,7 @@ end end @inline function _compute_rhs!(nlsolver::NLSolver{<:NLNewton, true}, integrator, f::TF, - z) where {TF} + z) where {TF} @unpack uprev, t, p, dt = integrator @unpack tmp, ztmp, γ, α, cache = nlsolver @unpack ustep, tstep, k, invγdt = cache @@ -317,7 +317,7 @@ end end @inline function _compute_rhs!(nlsolver::NLSolver{<:NLNewton, true, <:Array}, integrator, - f::TF, z) where {TF} + f::TF, z) where {TF} @unpack uprev, t, p, dt = integrator @unpack tmp, ztmp, γ, α, cache = nlsolver @unpack ustep, tstep, k, invγdt = cache @@ -385,14 +385,14 @@ function relax(dz, nlsolver::AbstractNLSolver, integrator::DEIntegrator, f::TF) relax(dz, nlsolver, integrator, f, relax(nlsolver)) end function relax!(dz, nlsolver::AbstractNLSolver, integrator::DEIntegrator, f::TF, - r::Number) where {TF} + r::Number) where {TF} if !iszero(r) rmul!(dz, 1 - r) end end function relax!(dz, nlsolver::AbstractNLSolver, integrator::DEIntegrator, f::TF, - linesearch) where {TF} + linesearch) where {TF} let dz = dz, integrator = integrator, nlsolver = nlsolver, @@ -435,7 +435,7 @@ function relax!(dz, nlsolver::AbstractNLSolver, integrator::DEIntegrator, f::TF, end function relax(dz, nlsolver::AbstractNLSolver, integrator::DEIntegrator, f::TF, - r::Number) where {TF} + r::Number) where {TF} if !iszero(r) dz = (1 - r) * dz end @@ -443,7 +443,7 @@ function relax(dz, nlsolver::AbstractNLSolver, integrator::DEIntegrator, f::TF, end function relax(dz, nlsolver::AbstractNLSolver, integrator::DEIntegrator, f::TF, - linesearch) where {TF} + linesearch) where {TF} let dz = dz, integrator = integrator, nlsolver = nlsolver, diff --git a/src/nlsolve/nlsolve.jl b/src/nlsolve/nlsolve.jl index b522239ae3..ad91af8305 100644 --- a/src/nlsolve/nlsolve.jl +++ b/src/nlsolve/nlsolve.jl @@ -12,7 +12,7 @@ dt⋅f(innertmp + γ⋅z, p, t + c⋅dt) + outertmp = z where `dt` is the step size and `γ` and `c` are constants, and return the solution `z`. """ function nlsolve!(nlsolver::AbstractNLSolver, integrator::DiffEqBase.DEIntegrator, - cache = nothing, repeat_step = false) + cache = nothing, repeat_step = false) always_new = is_always_new(nlsolver) check_div′ = check_div(nlsolver) @label REDO @@ -117,7 +117,7 @@ function initial_η(nlsolver::NLSolver, integrator) end function apply_step!(nlsolver::NLSolver{algType, iip}, - integrator::DiffEqBase.DEIntegrator) where {algType, iip} + integrator::DiffEqBase.DEIntegrator) where {algType, iip} if iip @.. broadcast=false nlsolver.z=nlsolver.ztmp else diff --git a/src/nlsolve/type.jl b/src/nlsolve/type.jl index 1207648d3e..61ad8d82c7 100644 --- a/src/nlsolve/type.jl +++ b/src/nlsolve/type.jl @@ -40,7 +40,7 @@ struct NLAnderson{K, D, C} <: AbstractNLSolverAlgorithm end function NLAnderson(; κ = 1 // 100, max_iter = 10, max_history::Int = 5, aa_start::Int = 1, - droptol = nothing, fast_convergence_cutoff = 1 // 5) + droptol = nothing, fast_convergence_cutoff = 1 // 5) NLAnderson(κ, fast_convergence_cutoff, max_iter, max_history, aa_start, droptol) end @@ -55,8 +55,8 @@ struct NLNewton{K, C1, C2, R} <: AbstractNLSolverAlgorithm end function NLNewton(; κ = 1 // 100, max_iter = 10, fast_convergence_cutoff = 1 // 5, - new_W_dt_cutoff = 1 // 5, always_new = false, check_div = true, - relax = 0 // 1) + new_W_dt_cutoff = 1 // 5, always_new = false, check_div = true, + relax = 0 // 1) if relax isa Number && !(0 <= relax < 1) throw(ArgumentError("The relaxation parameter must be in [0, 1), got `relax = $relax`")) end @@ -92,8 +92,8 @@ end # default to DIRK function NLSolver{iip, tType}(z, tmp, ztmp, γ, c, α, alg, κ, fast_convergence_cutoff, ηold, - iter, maxiters, status, cache, method = DIRK, tmp2 = nothing, - nfails::Int = 0) where {iip, tType} + iter, maxiters, status, cache, method = DIRK, tmp2 = nothing, + nfails::Int = 0) where {iip, tType} NLSolver{typeof(alg), iip, typeof(z), typeof(γ), typeof(tmp2), tType, typeof(cache)}(z, tmp, tmp2, diff --git a/src/nlsolve/utils.jl b/src/nlsolve/utils.jl index 9199fd3576..cd2645c407 100644 --- a/src/nlsolve/utils.jl +++ b/src/nlsolve/utils.jl @@ -129,31 +129,31 @@ DiffEqBase.has_Wfact(f::DAEResidualDerivativeWrapper) = DiffEqBase.has_Wfact(f.f DiffEqBase.has_Wfact_t(f::DAEResidualDerivativeWrapper) = DiffEqBase.has_Wfact_t(f.f) function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, - ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, γ, c, - iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, γ, c, + iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, 1, iip) end function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, - ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, γ, c, α, - iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, γ, c, α, + iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} build_nlsolver(alg, alg.nlsolve, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, iip) end function build_nlsolver(alg, nlalg::Union{NLFunctional, NLAnderson, NLNewton}, u, uprev, p, - t, dt, - f::F, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - γ, c, α, - ::Val{true}) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits} + t, dt, + f::F, rate_prototype, ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + γ, c, α, + ::Val{true}) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits} #TODO #nlalg = DiffEqBase.handle_defaults(alg, nlalg) # define unitless type @@ -232,12 +232,12 @@ function build_nlsolver(alg, nlalg::Union{NLFunctional, NLAnderson, NLNewton}, u end function build_nlsolver(alg, nlalg::Union{NLFunctional, NLAnderson, NLNewton}, u, uprev, p, - t, dt, - f::F, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, - γ, c, α, - ::Val{false}) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits} + t, dt, + f::F, rate_prototype, ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, + γ, c, α, + ::Val{false}) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits} #TODO #nlalg = DiffEqBase.handle_defaults(alg, nlalg) # define unitless type diff --git a/src/perform_step/adams_bashforth_moulton_perform_step.jl b/src/perform_step/adams_bashforth_moulton_perform_step.jl index 41427d8926..e9e9c1d9aa 100644 --- a/src/perform_step/adams_bashforth_moulton_perform_step.jl +++ b/src/perform_step/adams_bashforth_moulton_perform_step.jl @@ -1,10 +1,10 @@ function initialize!(integrator, - cache::Union{AB3ConstantCache, - AB4ConstantCache, - AB5ConstantCache, - ABM32ConstantCache, - ABM43ConstantCache, - ABM54ConstantCache}) + cache::Union{AB3ConstantCache, + AB4ConstantCache, + AB5ConstantCache, + ABM32ConstantCache, + ABM43ConstantCache, + ABM54ConstantCache}) integrator.fsalfirst = integrator.f(integrator.uprev, integrator.p, integrator.t) # Pre-start fsal integrator.stats.nf += 1 integrator.kshortsize = 2 @@ -17,12 +17,12 @@ function initialize!(integrator, end function initialize!(integrator, - cache::Union{AB3Cache, - AB4Cache, - AB5Cache, - ABM32Cache, - ABM43Cache, - ABM54Cache}) + cache::Union{AB3Cache, + AB4Cache, + AB5Cache, + ABM32Cache, + ABM43Cache, + ABM54Cache}) @unpack fsalfirst, k = cache integrator.fsalfirst = fsalfirst integrator.fsallast = k diff --git a/src/perform_step/bdf_perform_step.jl b/src/perform_step/bdf_perform_step.jl index 2f1a938106..173e026ea2 100644 --- a/src/perform_step/bdf_perform_step.jl +++ b/src/perform_step/bdf_perform_step.jl @@ -724,7 +724,7 @@ function initialize!(integrator, cache::QNDFConstantCache) end function perform_step!(integrator, cache::QNDFConstantCache{max_order}, - repeat_step = false) where {max_order} + repeat_step = false) where {max_order} @unpack t, dt, uprev, u, f, p = integrator @unpack dtprev, order, D, U, nlsolver, γₖ = cache alg = unwrap_alg(integrator, true) @@ -838,7 +838,7 @@ function initialize!(integrator, cache::QNDFCache) end function perform_step!(integrator, cache::QNDFCache{max_order}, - repeat_step = false) where {max_order} + repeat_step = false) where {max_order} @unpack t, dt, uprev, u, f, p = integrator @unpack dtprev, order, D, nlsolver, γₖ, dd, atmp, atmpm1, atmpp1, utilde, utildem1, utildep1, ϕ, u₀ = cache alg = unwrap_alg(integrator, true) @@ -1063,7 +1063,7 @@ function initialize!(integrator, cache::FBDFConstantCache) end function perform_step!(integrator, cache::FBDFConstantCache{max_order}, - repeat_step = false) where {max_order} + repeat_step = false) where {max_order} @unpack ts, u_history, order, u_corrector, bdf_coeffs, r, nlsolver, weights, ts_tmp, iters_from_event, nconsteps = cache @unpack t, dt, u, f, p, uprev = integrator @@ -1218,7 +1218,7 @@ function initialize!(integrator, cache::FBDFCache) end function perform_step!(integrator, cache::FBDFCache{max_order}, - repeat_step = false) where {max_order} + repeat_step = false) where {max_order} @unpack ts, u_history, order, u_corrector, bdf_coeffs, r, nlsolver, weights, terk_tmp, terkp1_tmp, atmp, tmp, equi_ts, u₀, ts_tmp = cache @unpack t, dt, u, f, p, uprev = integrator diff --git a/src/perform_step/composite_perform_step.jl b/src/perform_step/composite_perform_step.jl index ae872fd521..75057a3adc 100644 --- a/src/perform_step/composite_perform_step.jl +++ b/src/perform_step/composite_perform_step.jl @@ -86,7 +86,7 @@ function perform_step!(integrator, cache::CompositeCache, repeat_step = false) end function perform_step!(integrator, cache::CompositeCache{Tuple{T1, T2}, F}, - repeat_step = false) where {T1, T2, F} + repeat_step = false) where {T1, T2, F} if cache.current == 1 perform_step!(integrator, @inbounds(cache.caches[1]), repeat_step) elseif cache.current == 2 @@ -97,7 +97,7 @@ end choose_algorithm!(integrator, cache::OrdinaryDiffEqCache) = nothing function choose_algorithm!(integrator, - cache::CompositeCache{Tuple{T1, T2}, F}) where {T1, T2, F} + cache::CompositeCache{Tuple{T1, T2}, F}) where {T1, T2, F} new_current = cache.choice_function(integrator) old_current = cache.current @inbounds if new_current != old_current diff --git a/src/perform_step/dae_perform_step.jl b/src/perform_step/dae_perform_step.jl index 3cc2ab9740..fe8075be2d 100644 --- a/src/perform_step/dae_perform_step.jl +++ b/src/perform_step/dae_perform_step.jl @@ -14,7 +14,7 @@ function initialize!(integrator, cache::DImplicitEulerCache) end @muladd function perform_step!(integrator, cache::DImplicitEulerConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack nlsolver = cache @@ -234,7 +234,7 @@ function initialize!(integrator, cache::DFBDFConstantCache) end function perform_step!(integrator, cache::DFBDFConstantCache{max_order}, - repeat_step = false) where {max_order} + repeat_step = false) where {max_order} @unpack ts, u_history, order, u_corrector, bdf_coeffs, r, nlsolver, weights, ts_tmp, iters_from_event, nconsteps = cache @unpack t, dt, u, f, p, uprev = integrator @@ -359,7 +359,7 @@ function initialize!(integrator, cache::DFBDFCache) end function perform_step!(integrator, cache::DFBDFCache{max_order}, - repeat_step = false) where {max_order} + repeat_step = false) where {max_order} @unpack ts, u_history, order, u_corrector, bdf_coeffs, r, nlsolver, weights, terk_tmp, terkp1_tmp, atmp, tmp, equi_ts, u₀, ts_tmp = cache @unpack t, dt, u, f, p, uprev = integrator diff --git a/src/perform_step/explicit_rk_perform_step.jl b/src/perform_step/explicit_rk_perform_step.jl index d7755d7543..7d0ec517b2 100644 --- a/src/perform_step/explicit_rk_perform_step.jl +++ b/src/perform_step/explicit_rk_perform_step.jl @@ -11,7 +11,7 @@ function initialize!(integrator, cache::ExplicitRKConstantCache) end @muladd function perform_step!(integrator, cache::ExplicitRKConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator alg = unwrap_alg(integrator, false) @unpack A, c, α, αEEst, stages = cache @@ -86,7 +86,7 @@ function initialize!(integrator, cache::ExplicitRKCache) end @generated function accumulate_explicit_stages!(out, A, uprev, kk, dt, ::Val{s}, - ::Val{r} = Val(s)) where {s, r} + ::Val{r} = Val(s)) where {s, r} if s == 1 return :(@muladd @.. broadcast=false out=uprev + dt * kk[1]) elseif s == 2 @@ -125,7 +125,7 @@ function accumulate_EEst!(out, αEEst, utilde, kk, dt, stages) end @muladd function compute_stages!(f::F, A, c, utilde, u, tmp, uprev, kk, p, t, dt, - stages::Integer) where {F} + stages::Integer) where {F} # Middle for i in 2:(stages - 1) @.. broadcast=false utilde=zero(kk[1][1]) @@ -147,7 +147,7 @@ end end @generated function compute_stages!(f::F, A, c, u, tmp, uprev, kk, p, t, dt, - ::Val{s}) where {F, s} + ::Val{s}) where {F, s} quote Base.@nexprs $(s - 2) i′->begin i = i′ + 1 @@ -160,7 +160,7 @@ end end function runtime_split_stages!(f::F, A, c, utilde, u, tmp, uprev, kk, p, t, dt, - stages::Integer) where {F} + stages::Integer) where {F} Base.@nif 17 (s->(s == stages)) (s->compute_stages!(f, A, c, u, tmp, uprev, kk, p, t, dt, Val(s))) (s->compute_stages!(f, A, diff --git a/src/perform_step/extrapolation_perform_step.jl b/src/perform_step/extrapolation_perform_step.jl index 752df262c4..984efa060e 100644 --- a/src/perform_step/extrapolation_perform_step.jl +++ b/src/perform_step/extrapolation_perform_step.jl @@ -266,7 +266,7 @@ function initialize!(integrator, cache::ImplicitEulerExtrapolationCache) end function perform_step!(integrator, cache::ImplicitEulerExtrapolationCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator alg = unwrap_alg(integrator, true) @unpack T, utilde, atmp, dtpropose, n_curr, A, stage_number, diff1, diff2 = cache @@ -525,7 +525,7 @@ function initialize!(integrator, cache::ImplicitEulerExtrapolationConstantCache) end function perform_step!(integrator, cache::ImplicitEulerExtrapolationConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator alg = unwrap_alg(integrator, true) @unpack dtpropose, T, n_curr, work, A, tf, uf = cache @@ -732,7 +732,7 @@ function initialize!(integrator, cache::ExtrapolationMidpointDeuflhardCache) end function perform_step!(integrator, cache::ExtrapolationMidpointDeuflhardCache, - repeat_step = false) + repeat_step = false) # Unpack all information needed @unpack t, uprev, dt, f, p = integrator alg = unwrap_alg(integrator, false) @@ -949,7 +949,7 @@ function initialize!(integrator, cache::ExtrapolationMidpointDeuflhardConstantCa end function perform_step!(integrator, cache::ExtrapolationMidpointDeuflhardConstantCache, - repeat_step = false) + repeat_step = false) # Unpack all information needed @unpack t, uprev, dt, f, p = integrator alg = unwrap_alg(integrator, false) @@ -1143,7 +1143,7 @@ function initialize!(integrator, cache::ImplicitDeuflhardExtrapolationCache) end function perform_step!(integrator, cache::ImplicitDeuflhardExtrapolationCache, - repeat_step = false) + repeat_step = false) # Unpack all information needed @unpack t, uprev, dt, f, p = integrator alg = unwrap_alg(integrator, true) @@ -1546,7 +1546,7 @@ function initialize!(integrator, cache::ImplicitDeuflhardExtrapolationConstantCa end function perform_step!(integrator, cache::ImplicitDeuflhardExtrapolationConstantCache, - repeat_step = false) + repeat_step = false) # Unpack all information needed @unpack t, uprev, dt, f, p = integrator alg = unwrap_alg(integrator, true) @@ -1804,7 +1804,7 @@ function initialize!(integrator, cache::ExtrapolationMidpointHairerWannerCache) end function perform_step!(integrator, cache::ExtrapolationMidpointHairerWannerCache, - repeat_step = false) + repeat_step = false) # Unpack all information needed @unpack t, uprev, dt, f, p = integrator alg = unwrap_alg(integrator, false) @@ -2024,7 +2024,7 @@ function initialize!(integrator, cache::ExtrapolationMidpointHairerWannerConstan end function perform_step!(integrator, cache::ExtrapolationMidpointHairerWannerConstantCache, - repeat_step = false) + repeat_step = false) # Unpack all information needed @unpack t, uprev, dt, f, p = integrator alg = unwrap_alg(integrator, false) @@ -2220,7 +2220,7 @@ function initialize!(integrator, cache::ImplicitHairerWannerExtrapolationConstan end function perform_step!(integrator, cache::ImplicitHairerWannerExtrapolationConstantCache, - repeat_step = false) + repeat_step = false) # Unpack all information needed @unpack t, uprev, dt, f, p = integrator alg = unwrap_alg(integrator, true) @@ -2495,7 +2495,7 @@ function initialize!(integrator, cache::ImplicitHairerWannerExtrapolationCache) end function perform_step!(integrator, cache::ImplicitHairerWannerExtrapolationCache, - repeat_step = false) + repeat_step = false) # Unpack all information needed @unpack t, uprev, dt, f, p = integrator alg = unwrap_alg(integrator, true) @@ -2916,8 +2916,8 @@ function initialize!(integrator, cache::ImplicitEulerBarycentricExtrapolationCon end function perform_step!(integrator, - cache::ImplicitEulerBarycentricExtrapolationConstantCache, - repeat_step = false) + cache::ImplicitEulerBarycentricExtrapolationConstantCache, + repeat_step = false) # Unpack all information needed @unpack t, uprev, dt, f, p = integrator alg = unwrap_alg(integrator, true) @@ -3189,7 +3189,7 @@ function initialize!(integrator, cache::ImplicitEulerBarycentricExtrapolationCac end function perform_step!(integrator, cache::ImplicitEulerBarycentricExtrapolationCache, - repeat_step = false) + repeat_step = false) # Unpack all information needed @unpack t, uprev, dt, f, p = integrator alg = unwrap_alg(integrator, true) diff --git a/src/perform_step/feagin_rk_perform_step.jl b/src/perform_step/feagin_rk_perform_step.jl index 928ed70609..b5b2012526 100644 --- a/src/perform_step/feagin_rk_perform_step.jl +++ b/src/perform_step/feagin_rk_perform_step.jl @@ -11,7 +11,7 @@ function initialize!(integrator, cache::Feagin10ConstantCache) end @muladd function perform_step!(integrator, cache::Feagin10ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack adaptiveConst, a0100, a0200, a0201, a0300, a0302, a0400, a0402, a0403, a0500, a0503, a0504, a0600, a0603, a0604, a0605, a0700, a0704, a0705, a0706, a0800, a0805, a0806, a0807, a0900, a0905, a0906, a0907, a0908, a1000, a1005, a1006, a1007, a1008, a1009, a1100, a1105, a1106, a1107, a1108, a1109, a1110, a1200, a1203, a1204, a1205, a1206, a1207, a1208, a1209, a1210, a1211, a1300, a1302, a1303, a1305, a1306, a1307, a1308, a1309, a1310, a1311, a1312, a1400, a1401, a1404, a1406, a1412, a1413, a1500, a1502, a1514, a1600, a1601, a1602, a1604, a1605, a1606, a1607, a1608, a1609, a1610, a1611, a1612, a1613, a1614, a1615, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16 = cache k1 = integrator.fsalfirst @@ -269,7 +269,7 @@ function initialize!(integrator, cache::Feagin12ConstantCache) end @muladd function perform_step!(integrator, cache::Feagin12ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack adaptiveConst, a0100, a0200, a0201, a0300, a0302, a0400, a0402, a0403, a0500, a0503, a0504, a0600, a0603, a0604, a0605, a0700, a0704, a0705, a0706, a0800, a0805, a0806, a0807, a0900, a0905, a0906, a0907, a0908, a1000, a1005, a1006, a1007, a1008, a1009, a1100, a1105, a1106, a1107, a1108, a1109, a1110, a1200, a1208, a1209, a1210, a1211, a1300, a1308, a1309, a1310, a1311, a1312, a1400, a1408, a1409, a1410, a1411, a1412, a1413, a1500, a1508, a1509, a1510, a1511, a1512, a1513, a1514, a1600, a1608, a1609, a1610, a1611, a1612, a1613, a1614, a1615, a1700, a1705, a1706, a1707, a1708, a1709, a1710, a1711, a1712, a1713, a1714, a1715, a1716, a1800, a1805, a1806, a1807, a1808, a1809, a1810, a1811, a1812, a1813, a1814, a1815, a1816, a1817, a1900, a1904, a1905, a1906, a1908, a1909, a1910, a1911, a1912, a1913, a1914, a1915, a1916, a1917, a1918, a2000, a2003, a2004, a2005, a2007, a2009, a2010, a2017, a2018, a2019, a2100, a2102, a2103, a2106, a2107, a2109, a2110, a2117, a2118, a2119, a2120, a2200, a2201, a2204, a2206, a2220, a2221, a2300, a2302, a2322, a2400, a2401, a2402, a2404, a2406, a2407, a2408, a2409, a2410, a2411, a2412, a2413, a2414, a2415, a2416, a2417, a2418, a2419, a2420, a2421, a2422, a2423, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25 = cache k1 = integrator.fsalfirst @@ -644,7 +644,7 @@ function initialize!(integrator, cache::Feagin14ConstantCache) end @muladd function perform_step!(integrator, cache::Feagin14ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack adaptiveConst, a0100, a0200, a0201, a0300, a0302, a0400, a0402, a0403, a0500, a0503, a0504, a0600, a0603, a0604, a0605, a0700, a0704, a0705, a0706, a0800, a0805, a0806, a0807, a0900, a0905, a0906, a0907, a0908, a1000, a1005, a1006, a1007, a1008, a1009, a1100, a1105, a1106, a1107, a1108, a1109, a1110, a1200, a1208, a1209, a1210, a1211, a1300, a1308, a1309, a1310, a1311, a1312, a1400, a1408, a1409, a1410, a1411, a1412, a1413, a1500, a1508, a1509, a1510, a1511, a1512, a1513, a1514, a1600, a1608, a1609, a1610, a1611, a1612, a1613, a1614, a1615, a1700, a1712, a1713, a1714, a1715, a1716, a1800, a1812, a1813, a1814, a1815, a1816, a1817, a1900, a1912, a1913, a1914, a1915, a1916, a1917, a1918, a2000, a2012, a2013, a2014, a2015, a2016, a2017, a2018, a2019, a2100, a2112, a2113, a2114, a2115, a2116, a2117, a2118, a2119, a2120, a2200, a2212, a2213, a2214, a2215, a2216, a2217, a2218, a2219, a2220, a2221, a2300, a2308, a2309, a2310, a2311, a2312, a2313, a2314, a2315, a2316, a2317, a2318, a2319, a2320, a2321, a2322, a2400, a2408, a2409, a2410, a2411, a2412, a2413, a2414, a2415, a2416, a2417, a2418, a2419, a2420, a2421, a2422, a2423, a2500, a2508, a2509, a2510, a2511, a2512, a2513, a2514, a2515, a2516, a2517, a2518, a2519, a2520, a2521, a2522, a2523, a2524, a2600, a2605, a2606, a2607, a2608, a2609, a2610, a2612, a2613, a2614, a2615, a2616, a2617, a2618, a2619, a2620, a2621, a2622, a2623, a2624, a2625, a2700, a2705, a2706, a2707, a2708, a2709, a2711, a2712, a2713, a2714, a2715, a2716, a2717, a2718, a2719, a2720, a2721, a2722, a2723, a2724, a2725, a2726, a2800, a2805, a2806, a2807, a2808, a2810, a2811, a2813, a2814, a2815, a2823, a2824, a2825, a2826, a2827, a2900, a2904, a2905, a2906, a2909, a2910, a2911, a2913, a2914, a2915, a2923, a2924, a2925, a2926, a2927, a2928, a3000, a3003, a3004, a3005, a3007, a3009, a3010, a3013, a3014, a3015, a3023, a3024, a3025, a3027, a3028, a3029, a3100, a3102, a3103, a3106, a3107, a3109, a3110, a3113, a3114, a3115, a3123, a3124, a3125, a3127, a3128, a3129, a3130, a3200, a3201, a3204, a3206, a3230, a3231, a3300, a3302, a3332, a3400, a3401, a3402, a3404, a3406, a3407, a3409, a3410, a3411, a3412, a3413, a3414, a3415, a3416, a3417, a3418, a3419, a3420, a3421, a3422, a3423, a3424, a3425, a3426, a3427, a3428, a3429, a3430, a3431, a3432, a3433, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32, c33, c34, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33, b34, b35 = cache k1 = integrator.fsalfirst diff --git a/src/perform_step/firk_perform_step.jl b/src/perform_step/firk_perform_step.jl index 199c25d062..594af3eb8b 100644 --- a/src/perform_step/firk_perform_step.jl +++ b/src/perform_step/firk_perform_step.jl @@ -340,7 +340,7 @@ end end @muladd function perform_step!(integrator, cache::RadauIIA5ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack T11, T12, T13, T21, T22, T23, T31, TI11, TI12, TI13, TI21, TI22, TI23, TI31, TI32, TI33 = cache.tab @unpack c1, c2, γ, α, β, e1, e2, e3 = cache.tab diff --git a/src/perform_step/fixed_timestep_perform_step.jl b/src/perform_step/fixed_timestep_perform_step.jl index 1da282c66d..d34ea02d86 100644 --- a/src/perform_step/fixed_timestep_perform_step.jl +++ b/src/perform_step/fixed_timestep_perform_step.jl @@ -97,8 +97,8 @@ function initialize!(integrator, cache::Union{HeunConstantCache, RalstonConstant end @muladd function perform_step!(integrator, - cache::Union{HeunConstantCache, RalstonConstantCache}, - repeat_step = false) + cache::Union{HeunConstantCache, RalstonConstantCache}, + repeat_step = false) @unpack t, dt, uprev, u, f, p, fsalfirst = integrator # precalculations @@ -153,7 +153,7 @@ function initialize!(integrator, cache::Union{HeunCache, RalstonCache}) end @muladd function perform_step!(integrator, cache::Union{HeunCache, RalstonCache}, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack fsalfirst, k, tmp, atmp, stage_limiter!, step_limiter!, thread = cache @@ -211,7 +211,7 @@ function initialize!(integrator, cache::MidpointConstantCache) end @muladd function perform_step!(integrator, cache::MidpointConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator halfdt = dt / 2 tmp = @.. broadcast=false uprev+halfdt * integrator.fsalfirst diff --git a/src/perform_step/high_order_rk_perform_step.jl b/src/perform_step/high_order_rk_perform_step.jl index e9605577b4..9b813aafda 100644 --- a/src/perform_step/high_order_rk_perform_step.jl +++ b/src/perform_step/high_order_rk_perform_step.jl @@ -613,7 +613,7 @@ end =# @muladd function perform_step!(integrator, cache::TsitPap8ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, a0201, a0301, a0302, a0401, a0403, a0501, a0503, a0504, a0601, a0604, a0605, a0701, a0704, a0705, a0706, a0801, a0804, a0805, a0806, a0807, a0901, a0904, a0905, a0906, a0907, a0908, a1001, a1004, a1005, a1006, a1007, a1008, a1009, a1101, a1104, a1105, a1106, a1107, a1108, a1109, a1110, a1201, a1204, a1205, a1206, a1207, a1208, a1209, a1210, a1211, a1301, a1304, a1305, a1306, a1307, a1308, a1309, a1310, b1, b6, b7, b8, b9, b10, b11, b12, btilde1, btilde6, btilde7, btilde8, btilde9, btilde10, btilde11, btilde12, btilde13 = cache k1 = integrator.fsalfirst diff --git a/src/perform_step/kencarp_kvaerno_perform_step.jl b/src/perform_step/kencarp_kvaerno_perform_step.jl index d4c1a03725..ba0091aa54 100644 --- a/src/perform_step/kencarp_kvaerno_perform_step.jl +++ b/src/perform_step/kencarp_kvaerno_perform_step.jl @@ -1,14 +1,14 @@ function initialize!(integrator, - cache::Union{Kvaerno3ConstantCache, - KenCarp3ConstantCache, - Kvaerno4ConstantCache, - KenCarp4ConstantCache, - KenCarp47ConstantCache, - Kvaerno5ConstantCache, - KenCarp5ConstantCache, - KenCarp58ConstantCache, - CFNLIRK3ConstantCache, - }) + cache::Union{Kvaerno3ConstantCache, + KenCarp3ConstantCache, + Kvaerno4ConstantCache, + KenCarp4ConstantCache, + KenCarp47ConstantCache, + Kvaerno5ConstantCache, + KenCarp5ConstantCache, + KenCarp58ConstantCache, + CFNLIRK3ConstantCache, + }) integrator.kshortsize = 2 integrator.k = typeof(integrator.k)(undef, integrator.kshortsize) integrator.fsalfirst = integrator.f(integrator.uprev, integrator.p, integrator.t) # Pre-start fsal @@ -21,16 +21,16 @@ function initialize!(integrator, end function initialize!(integrator, - cache::Union{Kvaerno3Cache, - KenCarp3Cache, - Kvaerno4Cache, - KenCarp4Cache, - Kvaerno5Cache, - KenCarp5Cache, - CFNLIRK3Cache, - KenCarp47Cache, - KenCarp58Cache, - }) + cache::Union{Kvaerno3Cache, + KenCarp3Cache, + Kvaerno4Cache, + KenCarp4Cache, + Kvaerno5Cache, + KenCarp5Cache, + CFNLIRK3Cache, + KenCarp47Cache, + KenCarp58Cache, + }) integrator.kshortsize = 2 integrator.fsalfirst = cache.fsalfirst integrator.fsallast = du_alias_or_new(cache.nlsolver, integrator.fsalfirst) @@ -42,7 +42,7 @@ function initialize!(integrator, end @muladd function perform_step!(integrator, cache::Kvaerno3ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator nlsolver = cache.nlsolver @unpack γ, a31, a32, a41, a42, a43, btilde1, btilde2, btilde3, btilde4, c3, α31, α32 = cache.tab @@ -184,7 +184,7 @@ end end @muladd function perform_step!(integrator, cache::KenCarp3ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, p = integrator nlsolver = cache.nlsolver @unpack γ, a31, a32, a41, a42, a43, btilde1, btilde2, btilde3, btilde4, c3, α31, α32, ea21, ea31, ea32, ea41, ea42, ea43, eb1, eb2, eb3, eb4, ebtilde1, ebtilde2, ebtilde3, ebtilde4 = cache.tab @@ -443,7 +443,7 @@ end end @muladd function perform_step!(integrator, cache::CFNLIRK3ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, p = integrator nlsolver = cache.nlsolver @unpack γ, a31, a32, a41, a42, a43, c2, c3, ea21, ea31, ea32, ea41, ea42, ea43, eb1, eb2, eb3, eb4 = cache.tab @@ -652,7 +652,7 @@ end end @muladd function perform_step!(integrator, cache::Kvaerno4ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator nlsolver = cache.nlsolver @unpack γ, a31, a32, a41, a42, a43, a51, a52, a53, a54, c3, c4 = cache.tab @@ -819,7 +819,7 @@ end end @muladd function perform_step!(integrator, cache::KenCarp4ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, p = integrator nlsolver = cache.nlsolver @unpack γ, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a63, a64, a65, c3, c4, c5 = cache.tab @@ -1173,7 +1173,7 @@ end end @muladd function perform_step!(integrator, cache::Kvaerno5ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator nlsolver = cache.nlsolver @unpack γ, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a63, a64, a65, a71, a73, a74, a75, a76, c3, c4, c5, c6 = cache.tab @@ -1379,7 +1379,7 @@ end end @muladd function perform_step!(integrator, cache::KenCarp5ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, p = integrator nlsolver = cache.nlsolver @unpack γ, a31, a32, a41, a43, a51, a53, a54, a61, a63, a64, a65, a71, a73, a74, a75, a76, a81, a84, a85, a86, a87, c3, c4, c5, c6, c7 = cache.tab @@ -1817,7 +1817,7 @@ end end @muladd function perform_step!(integrator, cache::KenCarp47ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, p = integrator nlsolver = cache.nlsolver @unpack γ, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, a73, a74, a75, a76, c3, c4, c5, c6 = cache.tab @@ -2213,7 +2213,7 @@ end end @muladd function perform_step!(integrator, cache::KenCarp58ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, p = integrator nlsolver = cache.nlsolver @unpack γ, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, a71, a72, a73, a74, a75, a76, a83, a84, a85, a86, a87, c3, c4, c5, c6, c7 = cache.tab diff --git a/src/perform_step/linear_perform_step.jl b/src/perform_step/linear_perform_step.jl index 613b77e941..b156b97a7c 100644 --- a/src/perform_step/linear_perform_step.jl +++ b/src/perform_step/linear_perform_step.jl @@ -696,7 +696,7 @@ function initialize!(integrator, cache::MagnusLeapfrogCache) end function perform_step!(integrator, cache::MagnusLeapfrogCache, repeat_step = false, - alg_extrapolates = true, iter = 1) + alg_extrapolates = true, iter = 1) @unpack t, dt, uprev, uprev2, u, p, iter = integrator alg = unwrap_alg(integrator, nothing) @unpack W, k, tmp, exp_cache = cache @@ -747,7 +747,7 @@ function initialize!(integrator, cache::LinearExponentialConstantCache) end function perform_step!(integrator, cache::LinearExponentialConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, f, p = integrator alg = unwrap_alg(integrator, nothing) A = convert(AbstractMatrix, f.f) # assume f to be an ODEFunction wrapped around a linear operator diff --git a/src/perform_step/low_order_rk_perform_step.jl b/src/perform_step/low_order_rk_perform_step.jl index 08d039e420..fef4f144ee 100644 --- a/src/perform_step/low_order_rk_perform_step.jl +++ b/src/perform_step/low_order_rk_perform_step.jl @@ -89,7 +89,7 @@ function initialize!(integrator, cache::OwrenZen3ConstantCache) end @muladd function perform_step!(integrator, cache::OwrenZen3ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack a21, a31, a32, a41, a42, a43, c1, c2, btilde1, btilde2, btilde3 = cache k1 = integrator.fsalfirst @@ -169,7 +169,7 @@ function initialize!(integrator, cache::OwrenZen4ConstantCache) end @muladd function perform_step!(integrator, cache::OwrenZen4ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a63, a64, a65, c1, c2, c3, c4, btilde1, btilde3, btilde4, btilde5 = cache k1 = integrator.fsalfirst @@ -302,7 +302,7 @@ function initialize!(integrator, cache::OwrenZen5ConstantCache) end @muladd function perform_step!(integrator, cache::OwrenZen5ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack a21, a31, a32, a41, a42, a51, a52, a53, a54, a61, a62, a63, a64, a65, a71, a72, a73, a74, a75, a76, a81, a83, a84, a85, a86, a87, c1, c2, c3, c4, c5, c6, btilde1, btilde3, btilde4, btilde5, btilde6, btilde7 = cache k1 = integrator.fsalfirst @@ -1057,7 +1057,7 @@ function initialize!(integrator, cache::KYK2014DGSSPRK_3S2_ConstantCache) end @muladd function perform_step!(integrator, cache::KYK2014DGSSPRK_3S2_ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack α_10, α_20, α_21, α_30, α_32, β_10, β_21, β_30, β_32, c_1, c_2 = cache u_1 = α_10 * uprev + dt * β_10 * integrator.fsalfirst @@ -1086,7 +1086,7 @@ function initialize!(integrator, cache::KYK2014DGSSPRK_3S2_Cache) end @muladd function perform_step!(integrator, cache::KYK2014DGSSPRK_3S2_Cache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack k, fsalfirst, u_1, u_2, kk_1, kk_2, stage_limiter!, step_limiter!, thread = cache @unpack α_10, α_20, α_21, α_30, α_32, β_10, β_21, β_30, β_32, c_1, c_2 = cache.tab diff --git a/src/perform_step/low_storage_rk_perform_step.jl b/src/perform_step/low_storage_rk_perform_step.jl index 492108f40f..4ee07826a7 100644 --- a/src/perform_step/low_storage_rk_perform_step.jl +++ b/src/perform_step/low_storage_rk_perform_step.jl @@ -12,7 +12,7 @@ function initialize!(integrator, cache::LowStorageRK2NConstantCache) end @muladd function perform_step!(integrator, cache::LowStorageRK2NConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, u, f, p = integrator @unpack A2end, B1, B2end, c2end = cache @@ -85,7 +85,7 @@ function initialize!(integrator, cache::LowStorageRK2CConstantCache) end @muladd function perform_step!(integrator, cache::LowStorageRK2CConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, u, f, p = integrator @unpack A2end, B1, B2end, c2end = cache @@ -151,7 +151,7 @@ function initialize!(integrator, cache::LowStorageRK3SConstantCache) end @muladd function perform_step!(integrator, cache::LowStorageRK3SConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ12end, γ22end, γ32end, δ2end, β1, β2end, c2end = cache @@ -220,7 +220,7 @@ function initialize!(integrator, cache::LowStorageRK3SpConstantCache) end @muladd function perform_step!(integrator, cache::LowStorageRK3SpConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ12end, γ22end, γ32end, δ2end, β1, β2end, c2end, bhat1, bhat2end = cache @@ -315,7 +315,7 @@ function initialize!(integrator, cache::LowStorageRK3SpFSALConstantCache) end @muladd function perform_step!(integrator, cache::LowStorageRK3SpFSALConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ12end, γ22end, γ32end, δ2end, β1, β2end, c2end, bhat1, bhat2end, bhatfsal = cache @@ -366,7 +366,7 @@ function initialize!(integrator, cache::LowStorageRK3SpFSALCache) end @muladd function perform_step!(integrator, cache::LowStorageRK3SpFSALCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack k, tmp, utilde, atmp, stage_limiter!, step_limiter!, thread = cache @unpack γ12end, γ22end, γ32end, δ2end, β1, β2end, c2end, bhat1, bhat2end, bhatfsal = cache.tab @@ -420,7 +420,7 @@ function initialize!(integrator, cache::LowStorageRK2RPConstantCache) end @muladd function perform_step!(integrator, cache::LowStorageRK2RPConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, u, uprev, f, fsalfirst, p = integrator @unpack Aᵢ, Bₗ, B̂ₗ, Bᵢ, B̂ᵢ, Cᵢ = cache @@ -512,7 +512,7 @@ function initialize!(integrator, cache::LowStorageRK3RPConstantCache) end @muladd function perform_step!(integrator, cache::LowStorageRK3RPConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, u, uprev, f, fsalfirst, p = integrator @unpack Aᵢ₁, Aᵢ₂, Bₗ, B̂ₗ, Bᵢ, B̂ᵢ, Cᵢ = cache @@ -616,7 +616,7 @@ function initialize!(integrator, cache::LowStorageRK4RPConstantCache) end @muladd function perform_step!(integrator, cache::LowStorageRK4RPConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, u, uprev, f, fsalfirst, p = integrator @unpack Aᵢ₁, Aᵢ₂, Aᵢ₃, Bₗ, B̂ₗ, Bᵢ, B̂ᵢ, Cᵢ = cache @@ -731,7 +731,7 @@ function initialize!(integrator, cache::LowStorageRK5RPConstantCache) end @muladd function perform_step!(integrator, cache::LowStorageRK5RPConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, u, uprev, f, fsalfirst, p = integrator @unpack Aᵢ₁, Aᵢ₂, Aᵢ₃, Aᵢ₄, Bₗ, B̂ₗ, Bᵢ, B̂ᵢ, Cᵢ = cache diff --git a/src/perform_step/prk_perform_step.jl b/src/perform_step/prk_perform_step.jl index 58fa3a5099..98bea051a4 100644 --- a/src/perform_step/prk_perform_step.jl +++ b/src/perform_step/prk_perform_step.jl @@ -10,7 +10,7 @@ function initialize!(integrator, cache::KuttaPRK2p5ConstantCache) end @muladd function perform_step!(integrator, cache::KuttaPRK2p5ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator alg = unwrap_alg(integrator, false) @unpack α21, α31, α32, α41, α42, α43, α5_6 = cache diff --git a/src/perform_step/rkn_perform_step.jl b/src/perform_step/rkn_perform_step.jl index 4d93f3c9c6..1c29dc53e4 100644 --- a/src/perform_step/rkn_perform_step.jl +++ b/src/perform_step/rkn_perform_step.jl @@ -52,7 +52,7 @@ function initialize!(integrator, cache::NystromDefaultInitialization) end @muladd function perform_step!(integrator, cache::Nystrom4ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator duprev, uprev = integrator.uprev.x k₁ = integrator.fsalfirst.x[1] @@ -124,7 +124,7 @@ end end @muladd function perform_step!(integrator, cache::FineRKN4ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator duprev, uprev = integrator.uprev.x @unpack c2, c3, c4, c5, a21, a31, a32, a41, a43, a51, @@ -233,7 +233,7 @@ end end @muladd function perform_step!(integrator, cache::FineRKN5ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator duprev, uprev = integrator.uprev.x @unpack c2, c3, c4, c5, c6, c7, a21, a31, a32, a41, a43, a51, a52, a53, a54, a61, a62, a63, a64, a71, a73, a74, a75, abar21, abar31, abar32, abar41, abar42, abar43, abar51, abar52, abar53, abar54, abar61, abar62, abar63, abar64, abar65, abar71, abar73, abar74, abar75, abar76, b1, b3, b4, b5, bbar1, bbar3, bbar4, bbar5, bbar6, btilde1, btilde3, btilde4, btilde5, bptilde1, bptilde3, bptilde4, bptilde5, bptilde6, bptilde7 = cache @@ -366,7 +366,7 @@ end end @muladd function perform_step!(integrator, cache::Nystrom4VelocityIndependentConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator duprev, uprev = integrator.uprev.x k₁ = integrator.fsalfirst.x[1] @@ -395,7 +395,7 @@ end end @muladd function perform_step!(integrator, cache::Nystrom4VelocityIndependentCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator du, u = integrator.u.x duprev, uprev = integrator.uprev.x @@ -551,7 +551,7 @@ end end @muladd function perform_step!(integrator, cache::Nystrom5VelocityIndependentConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator duprev, uprev = integrator.uprev.x @unpack c1, c2, a21, a31, a32, a41, a42, a43, bbar1, bbar2, bbar3, b1, b2, b3, b4 = cache @@ -578,7 +578,7 @@ end end @muladd function perform_step!(integrator, cache::Nystrom5VelocityIndependentCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator du, u = integrator.u.x duprev, uprev = integrator.uprev.x @@ -965,7 +965,7 @@ end end @muladd function perform_step!(integrator, cache::DPRKN6FMConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator duprev, uprev = integrator.uprev.x @unpack c1, c2, c3, c4, c5, a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, b1, b2, b3, b4, b5, bp1, bp2, bp3, bp4, bp5, bp6, btilde1, btilde2, btilde3, btilde4, btilde5, bptilde1, bptilde2, bptilde3, bptilde4, bptilde5 = cache diff --git a/src/perform_step/rosenbrock_perform_step.jl b/src/perform_step/rosenbrock_perform_step.jl index 2256c403ae..f711d25a1f 100644 --- a/src/perform_step/rosenbrock_perform_step.jl +++ b/src/perform_step/rosenbrock_perform_step.jl @@ -1,5 +1,5 @@ function initialize!(integrator, cache::Union{Rosenbrock23Cache, - Rosenbrock32Cache}) + Rosenbrock32Cache}) integrator.kshortsize = 2 @unpack k₁, k₂, fsalfirst, fsallast = cache integrator.fsalfirst = fsalfirst @@ -12,8 +12,8 @@ function initialize!(integrator, cache::Union{Rosenbrock23Cache, end function initialize!(integrator, - cache::Union{Rosenbrock23ConstantCache, - Rosenbrock32ConstantCache}) + cache::Union{Rosenbrock23ConstantCache, + Rosenbrock32ConstantCache}) integrator.kshortsize = 2 integrator.k = typeof(integrator.k)(undef, integrator.kshortsize) integrator.fsalfirst = integrator.f(integrator.uprev, integrator.p, integrator.t) @@ -127,7 +127,7 @@ end end @muladd function perform_step!(integrator, cache::Rosenbrock23Cache{<:Array}, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p, opts = integrator @unpack k₁, k₂, k₃, du1, du2, f₁, fsalfirst, fsallast, dT, J, W, tmp, uf, tf, linsolve_tmp, jac_config, atmp, weight = cache @unpack c₃₂, d = cache.tab @@ -342,7 +342,7 @@ end end @muladd function perform_step!(integrator, cache::Rosenbrock23ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack c₃₂, d, tf, uf = cache @@ -407,7 +407,7 @@ end end @muladd function perform_step!(integrator, cache::Rosenbrock32ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack c₃₂, d, tf, uf = cache @@ -475,9 +475,9 @@ end end function initialize!(integrator, - cache::Union{Rosenbrock33ConstantCache, - Rosenbrock34ConstantCache, - Rosenbrock4ConstantCache}) + cache::Union{Rosenbrock33ConstantCache, + Rosenbrock34ConstantCache, + Rosenbrock4ConstantCache}) integrator.kshortsize = 2 integrator.k = typeof(integrator.k)(undef, integrator.kshortsize) integrator.fsalfirst = integrator.f(integrator.uprev, integrator.p, integrator.t) @@ -490,9 +490,9 @@ function initialize!(integrator, end function initialize!(integrator, - cache::Union{Rosenbrock33Cache, - Rosenbrock34Cache, - Rosenbrock4Cache}) + cache::Union{Rosenbrock33Cache, + Rosenbrock34Cache, + Rosenbrock4Cache}) integrator.kshortsize = 2 @unpack fsalfirst, fsallast = cache integrator.fsalfirst = fsalfirst @@ -505,7 +505,7 @@ function initialize!(integrator, end @muladd function perform_step!(integrator, cache::Rosenbrock33ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack tf, uf = cache @unpack a21, a31, a32, C21, C31, C32, b1, b2, b3, btilde1, btilde2, btilde3, gamma, c2, c3, d1, d2, d3 = cache.tab @@ -674,7 +674,7 @@ end ################################################################################ @muladd function perform_step!(integrator, cache::Rosenbrock34ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack tf, uf = cache @unpack a21, a31, a32, C21, C31, C32, C41, C42, C43, b1, b2, b3, b4, btilde1, btilde2, btilde3, btilde4, gamma, c2, c3, d1, d2, d3, d4 = cache.tab @@ -1418,7 +1418,7 @@ function initialize!(integrator, cache::Rosenbrock5ConstantCache) end @muladd function perform_step!(integrator, cache::Rosenbrock5ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack tf, uf = cache @unpack a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, C21, C31, C32, C41, C42, C43, C51, C52, C53, C54, C61, C62, C63, C64, C65, C71, C72, C73, C74, C75, C76, C81, C82, C83, C84, C85, C86, C87, gamma, d1, d2, d3, d4, d5, c2, c3, c4, c5 = cache.tab @@ -1826,7 +1826,7 @@ end end @muladd function perform_step!(integrator, cache::Rosenbrock5Cache{<:Array}, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack du, du1, du2, k1, k2, k3, k4, k5, k6, k7, k8, dT, J, W, uf, tf, linsolve_tmp, jac_config, atmp, weight = cache @unpack a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, C21, C31, C32, C41, C42, C43, C51, C52, C53, C54, C61, C62, C63, C64, C65, C71, C72, C73, C74, C75, C76, C81, C82, C83, C84, C85, C86, C87, gamma, d1, d2, d3, d4, d5, c2, c3, c4, c5 = cache.tab diff --git a/src/perform_step/sdirk_perform_step.jl b/src/perform_step/sdirk_perform_step.jl index c5c133cbf5..c2fd4ee726 100644 --- a/src/perform_step/sdirk_perform_step.jl +++ b/src/perform_step/sdirk_perform_step.jl @@ -1,23 +1,23 @@ function initialize!(integrator, - cache::Union{ImplicitEulerConstantCache, - ImplicitMidpointConstantCache, - TrapezoidConstantCache, - TRBDF2ConstantCache, - SDIRK2ConstantCache, - SDIRK22ConstantCache, - SSPSDIRK2ConstantCache, - Cash4ConstantCache, - Hairer4ConstantCache, - ESDIRK54I8L2SAConstantCache, - ESDIRK436L2SA2ConstantCache, - ESDIRK437L2SAConstantCache, - ESDIRK547L2SA2ConstantCache, - ESDIRK659L2SAConstantCache, - SFSDIRK4ConstantCache, - SFSDIRK5ConstantCache, - SFSDIRK6ConstantCache, - SFSDIRK7ConstantCache, - SFSDIRK8ConstantCache}) + cache::Union{ImplicitEulerConstantCache, + ImplicitMidpointConstantCache, + TrapezoidConstantCache, + TRBDF2ConstantCache, + SDIRK2ConstantCache, + SDIRK22ConstantCache, + SSPSDIRK2ConstantCache, + Cash4ConstantCache, + Hairer4ConstantCache, + ESDIRK54I8L2SAConstantCache, + ESDIRK436L2SA2ConstantCache, + ESDIRK437L2SAConstantCache, + ESDIRK547L2SA2ConstantCache, + ESDIRK659L2SAConstantCache, + SFSDIRK4ConstantCache, + SFSDIRK5ConstantCache, + SFSDIRK6ConstantCache, + SFSDIRK7ConstantCache, + SFSDIRK8ConstantCache}) integrator.kshortsize = 2 integrator.k = typeof(integrator.k)(undef, integrator.kshortsize) integrator.fsalfirst = integrator.f(integrator.uprev, integrator.p, integrator.t) # Pre-start fsal @@ -30,25 +30,25 @@ function initialize!(integrator, end function initialize!(integrator, - cache::Union{ImplicitEulerCache, - ImplicitMidpointCache, - TrapezoidCache, - TRBDF2Cache, - SDIRK2Cache, - SDIRK22Cache, - SSPSDIRK2Cache, - Cash4Cache, - Hairer4Cache, - ESDIRK54I8L2SACache, - ESDIRK436L2SA2Cache, - ESDIRK437L2SACache, - ESDIRK547L2SA2Cache, - ESDIRK659L2SACache, - SFSDIRK4Cache, - SFSDIRK5Cache, - SFSDIRK6Cache, - SFSDIRK7Cache, - SFSDIRK8Cache}) + cache::Union{ImplicitEulerCache, + ImplicitMidpointCache, + TrapezoidCache, + TRBDF2Cache, + SDIRK2Cache, + SDIRK22Cache, + SSPSDIRK2Cache, + Cash4Cache, + Hairer4Cache, + ESDIRK54I8L2SACache, + ESDIRK436L2SA2Cache, + ESDIRK437L2SACache, + ESDIRK547L2SA2Cache, + ESDIRK659L2SACache, + SFSDIRK4Cache, + SFSDIRK5Cache, + SFSDIRK6Cache, + SFSDIRK7Cache, + SFSDIRK8Cache}) integrator.kshortsize = 2 integrator.fsalfirst = cache.fsalfirst integrator.fsallast = du_alias_or_new(cache.nlsolver, integrator.fsalfirst) @@ -60,7 +60,7 @@ function initialize!(integrator, end @muladd function perform_step!(integrator, cache::ImplicitEulerConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator nlsolver = cache.nlsolver alg = unwrap_alg(integrator, true) @@ -154,7 +154,7 @@ end end @muladd function perform_step!(integrator, cache::ImplicitMidpointConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator nlsolver = cache.nlsolver alg = unwrap_alg(integrator, true) @@ -181,7 +181,7 @@ end end @muladd function perform_step!(integrator, cache::ImplicitMidpointCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack nlsolver = cache @unpack z, tmp = nlsolver @@ -207,7 +207,7 @@ end end @muladd function perform_step!(integrator, cache::TrapezoidConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator nlsolver = cache.nlsolver alg = unwrap_alg(integrator, true) @@ -794,7 +794,7 @@ end end @muladd function perform_step!(integrator, cache::SSPSDIRK2ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator nlsolver = cache.nlsolver alg = unwrap_alg(integrator, true) @@ -1099,7 +1099,7 @@ end end @muladd function perform_step!(integrator, cache::SFSDIRK4ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ, a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, c2, c3, c4 = cache.tab nlsolver = cache.nlsolver @@ -1221,7 +1221,7 @@ end end @muladd function perform_step!(integrator, cache::SFSDIRK5ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ, a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, c2, c3, c4, c5 = cache.tab nlsolver = cache.nlsolver @@ -1364,7 +1364,7 @@ end end @muladd function perform_step!(integrator, cache::SFSDIRK6ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ, a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, a71, a72, a73, a74, a75, a76, c2, c3, c4, c5, c6 = cache.tab nlsolver = cache.nlsolver @@ -1531,7 +1531,7 @@ end end @muladd function perform_step!(integrator, cache::SFSDIRK7ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ, a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, a71, a72, a73, a74, a75, a76, a81, a82, a83, a84, a85, a86, a87, c2, c3, c4, c5, c6, c7 = cache.tab nlsolver = cache.nlsolver @@ -1721,7 +1721,7 @@ end end @muladd function perform_step!(integrator, cache::SFSDIRK8ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ, a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65, a71, a72, a73, a74, a75, a76, a81, a82, a83, a84, a85, a86, a87, a91, a92, a93, a94, a95, a96, a97, a98, c2, c3, c4, c5, c6, c7, c8 = cache.tab nlsolver = cache.nlsolver @@ -2108,7 +2108,7 @@ end end @muladd function perform_step!(integrator, cache::ESDIRK54I8L2SAConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ, a31, a32, @@ -2325,7 +2325,7 @@ end end @muladd function perform_step!(integrator, cache::ESDIRK436L2SA2ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ, a31, a32, @@ -2499,7 +2499,7 @@ end end @muladd function perform_step!(integrator, cache::ESDIRK437L2SAConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ, a31, a32, @@ -2694,7 +2694,7 @@ end end @muladd function perform_step!(integrator, cache::ESDIRK547L2SA2ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ, a31, a32, @@ -2889,7 +2889,7 @@ end end @muladd function perform_step!(integrator, cache::ESDIRK659L2SAConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack γ, a31, a32, diff --git a/src/perform_step/split_perform_step.jl b/src/perform_step/split_perform_step.jl index ef908da912..80f7a906d7 100644 --- a/src/perform_step/split_perform_step.jl +++ b/src/perform_step/split_perform_step.jl @@ -13,7 +13,7 @@ function initialize!(integrator, cache::SplitEulerConstantCache) end @muladd function perform_step!(integrator, cache::SplitEulerConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator u = @.. broadcast=false uprev+dt * integrator.fsalfirst integrator.fsallast = f.f1(u, p, t + dt) + f.f2(u, p, t + dt) # For the interpolation, needs k at the updated point diff --git a/src/perform_step/ssprk_perform_step.jl b/src/perform_step/ssprk_perform_step.jl index 9d6b37c651..4f39c2e83c 100644 --- a/src/perform_step/ssprk_perform_step.jl +++ b/src/perform_step/ssprk_perform_step.jl @@ -131,7 +131,7 @@ function initialize!(integrator, cache::SHLDDRK52ConstantCache) end @muladd function perform_step!(integrator, cache::SHLDDRK52ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack α2, α3, α4, α5, β1, β2, β3, β4, β5, c2, c3, c4, c5 = cache @@ -215,7 +215,7 @@ function initialize!(integrator, cache::SHLDDRK_2NConstantCache) end @muladd function perform_step!(integrator, cache::SHLDDRK_2NConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack α21, α31, α41, α51, β11, β21, β31, β41, β51, c21, c31, c41, c51, α22, α32, α42, α52, α62, β12, β22, β32, β42, β52, β62, c22, c32, c42, c52, c62 = cache @@ -497,7 +497,7 @@ function initialize!(integrator, cache::SSPRK53_2N1ConstantCache) end @muladd function perform_step!(integrator, cache::SSPRK53_2N1ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack α40, α43, β10, β21, β32, β43, β54, c1, c2, c3, c4 = cache #stores in u for all intermediate stages @@ -573,7 +573,7 @@ function initialize!(integrator, cache::SSPRK53_2N2ConstantCache) end @muladd function perform_step!(integrator, cache::SSPRK53_2N2ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack α30, α32, α50, α54, β10, β21, β32, β43, β54, c1, c2, c3, c4 = cache #stores in u for all intermediate stages @@ -647,7 +647,7 @@ function initialize!(integrator, cache::SSPRK53_HConstantCache) end @muladd function perform_step!(integrator, cache::SSPRK53_HConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack α30, α32, α40, α41, α43, β10, β21, β32, β43, β54, c1, c2, c3, c4 = cache #stores in u for all intermediate stages @@ -1078,7 +1078,7 @@ function initialize!(integrator, cache::SSPRK432ConstantCache) end @muladd function perform_step!(integrator, cache::SSPRK432ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator dt_2 = dt / 2 @@ -1169,7 +1169,7 @@ function initialize!(integrator, cache::SSPRKMSVS32ConstantCache) end @muladd function perform_step!(integrator, cache::SSPRKMSVS32ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack u_1, u_2, dts, dtf, μ, v_n = cache @@ -1298,7 +1298,7 @@ function initialize!(integrator, cache::SSPRKMSVS43ConstantCache) end @muladd function perform_step!(integrator, cache::SSPRKMSVS43ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator @unpack u_1, u_2, u_3, k1, k2, k3 = cache @@ -1409,7 +1409,7 @@ function initialize!(integrator, cache::SSPRK932ConstantCache) end @muladd function perform_step!(integrator, cache::SSPRK932ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator dt_6 = dt / 6 dt_3 = dt / 3 @@ -1623,7 +1623,7 @@ function initialize!(integrator, cache::SSPRK104ConstantCache) end @muladd function perform_step!(integrator, cache::SSPRK104ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, uprev, u, f, p = integrator dt_6 = dt / 6 dt_3 = dt / 3 diff --git a/src/perform_step/symplectic_perform_step.jl b/src/perform_step/symplectic_perform_step.jl index a143cb69d3..2d2cb6d14c 100644 --- a/src/perform_step/symplectic_perform_step.jl +++ b/src/perform_step/symplectic_perform_step.jl @@ -18,7 +18,7 @@ function initialize!(integrator, cache::SymplecticEulerConstantCache) end @muladd function perform_step!(integrator, cache::SymplecticEulerConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator duprev, uprev = integrator.uprev.x kuprev = integrator.fsalfirst.x[2] @@ -141,8 +141,8 @@ function store_symp_state!(integrator, ::OrdinaryDiffEqMutableCache, kdu, ku) end function initialize!(integrator, - cache::C) where {C <: - Union{MutableCachesHamilton, MutableCachesNewton}} + cache::C) where {C <: + Union{MutableCachesHamilton, MutableCachesNewton}} integrator.fsalfirst = cache.fsalfirst integrator.fsallast = cache.k @@ -160,9 +160,9 @@ function initialize!(integrator, end function initialize!(integrator, - cache::C) where { - C <: - Union{ConstantCachesHamilton, ConstantCachesNewton}} + cache::C) where { + C <: + Union{ConstantCachesHamilton, ConstantCachesNewton}} integrator.kshortsize = 2 integrator.k = typeof(integrator.k)(undef, integrator.kshortsize) @@ -178,7 +178,7 @@ function initialize!(integrator, end @muladd function perform_step!(integrator, cache::VelocityVerletConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator duprev, uprev = load_symp_state(integrator) @@ -214,7 +214,7 @@ end end @muladd function perform_step!(integrator, cache::Symplectic2ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator @unpack a1, a2, b1, b2 = cache duprev, uprev, _, kuprev = load_symp_state(integrator) @@ -266,7 +266,7 @@ end end @muladd function perform_step!(integrator, cache::Symplectic3ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator @unpack a1, a2, a3, b1, b2, b3 = cache duprev, uprev, _, kuprev = load_symp_state(integrator) @@ -334,7 +334,7 @@ end end @muladd function perform_step!(integrator, cache::Symplectic4ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator @unpack a1, a2, a3, a4, b1, b2, b3, b4 = cache duprev, uprev, _, kuprev = load_symp_state(integrator) @@ -418,7 +418,7 @@ end end @muladd function perform_step!(integrator, cache::Symplectic45ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator alg = unwrap_alg(integrator, false) @unpack a1, a2, a3, a4, a5, b1, b2, b3, b4, b5 = cache @@ -526,7 +526,7 @@ end end @muladd function perform_step!(integrator, cache::Symplectic5ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator @unpack a1, a2, a3, a4, a5, a6, b1, b2, b3, b4, b5, b6 = cache duprev, uprev, _, kuprev = load_symp_state(integrator) @@ -640,7 +640,7 @@ end end @muladd function perform_step!(integrator, cache::Symplectic6ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator @unpack a1, a2, a3, a4, a5, a6, a7, a8, b1, b2, b3, b4, b5, b6, b7, b8 = cache duprev, uprev, _, kuprev = load_symp_state(integrator) @@ -780,7 +780,7 @@ end end @muladd function perform_step!(integrator, cache::Symplectic62ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator @unpack a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10 = cache duprev, uprev, _, kuprev = load_symp_state(integrator) @@ -1201,7 +1201,7 @@ end end @muladd function perform_step!(integrator, cache::KahanLi8ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator @unpack a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, b18 = cache @@ -1483,7 +1483,7 @@ end end @muladd function perform_step!(integrator, cache::SofSpa10ConstantCache, - repeat_step = false) + repeat_step = false) @unpack t, dt, f, p = integrator @unpack a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30, a31, a32, a33, a34, diff --git a/src/solve.jl b/src/solve.jl index 3fa4c67f82..9ff642c727 100644 --- a/src/solve.jl +++ b/src/solve.jl @@ -1,76 +1,76 @@ function DiffEqBase.__solve(prob::Union{DiffEqBase.AbstractODEProblem, - DiffEqBase.AbstractDAEProblem}, - alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm}, args...; - kwargs...) + DiffEqBase.AbstractDAEProblem}, + alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm}, args...; + kwargs...) integrator = DiffEqBase.__init(prob, alg, args...; kwargs...) solve!(integrator) integrator.sol end function DiffEqBase.__init(prob::Union{DiffEqBase.AbstractODEProblem, - DiffEqBase.AbstractDAEProblem}, - alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm}, - timeseries_init = (), - ts_init = (), - ks_init = (), - recompile::Type{Val{recompile_flag}} = Val{true}; - saveat = (), - tstops = (), - d_discontinuities = (), - save_idxs = nothing, - save_everystep = isempty(saveat), - save_on = true, - save_start = save_everystep || isempty(saveat) || - saveat isa Number || prob.tspan[1] in saveat, - save_end = nothing, - callback = nothing, - dense = save_everystep && - !(typeof(alg) <: Union{DAEAlgorithm, FunctionMap}) && - isempty(saveat), - calck = (callback !== nothing && callback !== CallbackSet()) || - (dense) || !isempty(saveat), # and no dense output - dt = alg isa FunctionMap && isempty(tstops) ? - eltype(prob.tspan)(1) : eltype(prob.tspan)(0), - dtmin = nothing, - dtmax = eltype(prob.tspan)((prob.tspan[end] - prob.tspan[1])), - force_dtmin = false, - adaptive = anyadaptive(alg), - gamma = gamma_default(alg), - abstol = nothing, - reltol = nothing, - qmin = qmin_default(alg), - qmax = qmax_default(alg), - qsteady_min = qsteady_min_default(alg), - qsteady_max = qsteady_max_default(alg), - beta1 = nothing, - beta2 = nothing, - qoldinit = anyadaptive(alg) ? 1 // 10^4 : 0, - controller = nothing, - fullnormalize = true, - failfactor = 2, - maxiters = anyadaptive(alg) ? 1000000 : typemax(Int), - internalnorm = ODE_DEFAULT_NORM, - internalopnorm = LinearAlgebra.opnorm, - isoutofdomain = ODE_DEFAULT_ISOUTOFDOMAIN, - unstable_check = ODE_DEFAULT_UNSTABLE_CHECK, - verbose = true, - timeseries_errors = true, - dense_errors = false, - advance_to_tstop = false, - stop_at_next_tstop = false, - initialize_save = true, - progress = false, - progress_steps = 1000, - progress_name = "ODE", - progress_message = ODE_DEFAULT_PROG_MESSAGE, - progress_id = gensym("OrdinaryDiffEq"), - userdata = nothing, - allow_extrapolation = alg_extrapolates(alg), - initialize_integrator = true, - alias_u0 = false, - alias_du0 = false, - initializealg = DefaultInit(), - kwargs...) where {recompile_flag} + DiffEqBase.AbstractDAEProblem}, + alg::Union{OrdinaryDiffEqAlgorithm, DAEAlgorithm}, + timeseries_init = (), + ts_init = (), + ks_init = (), + recompile::Type{Val{recompile_flag}} = Val{true}; + saveat = (), + tstops = (), + d_discontinuities = (), + save_idxs = nothing, + save_everystep = isempty(saveat), + save_on = true, + save_start = save_everystep || isempty(saveat) || + saveat isa Number || prob.tspan[1] in saveat, + save_end = nothing, + callback = nothing, + dense = save_everystep && + !(typeof(alg) <: Union{DAEAlgorithm, FunctionMap}) && + isempty(saveat), + calck = (callback !== nothing && callback !== CallbackSet()) || + (dense) || !isempty(saveat), # and no dense output + dt = alg isa FunctionMap && isempty(tstops) ? + eltype(prob.tspan)(1) : eltype(prob.tspan)(0), + dtmin = nothing, + dtmax = eltype(prob.tspan)((prob.tspan[end] - prob.tspan[1])), + force_dtmin = false, + adaptive = anyadaptive(alg), + gamma = gamma_default(alg), + abstol = nothing, + reltol = nothing, + qmin = qmin_default(alg), + qmax = qmax_default(alg), + qsteady_min = qsteady_min_default(alg), + qsteady_max = qsteady_max_default(alg), + beta1 = nothing, + beta2 = nothing, + qoldinit = anyadaptive(alg) ? 1 // 10^4 : 0, + controller = nothing, + fullnormalize = true, + failfactor = 2, + maxiters = anyadaptive(alg) ? 1000000 : typemax(Int), + internalnorm = ODE_DEFAULT_NORM, + internalopnorm = LinearAlgebra.opnorm, + isoutofdomain = ODE_DEFAULT_ISOUTOFDOMAIN, + unstable_check = ODE_DEFAULT_UNSTABLE_CHECK, + verbose = true, + timeseries_errors = true, + dense_errors = false, + advance_to_tstop = false, + stop_at_next_tstop = false, + initialize_save = true, + progress = false, + progress_steps = 1000, + progress_name = "ODE", + progress_message = ODE_DEFAULT_PROG_MESSAGE, + progress_id = gensym("OrdinaryDiffEq"), + userdata = nothing, + allow_extrapolation = alg_extrapolates(alg), + initialize_integrator = true, + alias_u0 = false, + alias_du0 = false, + initializealg = DefaultInit(), + kwargs...) where {recompile_flag} if prob isa DiffEqBase.AbstractDAEProblem && alg isa OrdinaryDiffEqAlgorithm error("You cannot use an ODE Algorithm with a DAEProblem") end diff --git a/src/tableaus/low_order_rk_tableaus.jl b/src/tableaus/low_order_rk_tableaus.jl index cda68ffb71..ee32473a3a 100644 --- a/src/tableaus/low_order_rk_tableaus.jl +++ b/src/tableaus/low_order_rk_tableaus.jl @@ -537,8 +537,8 @@ struct Tsit5ConstantCacheActual{T, T2} end @fold function Tsit5ConstantCacheActual(::Type{T}, - ::Type{T2}) where {T <: CompiledFloats, - T2 <: CompiledFloats} + ::Type{T2}) where {T <: CompiledFloats, + T2 <: CompiledFloats} c1 = convert(T2, 0.161) c2 = convert(T2, 0.327) c3 = convert(T2, 0.9) @@ -1313,9 +1313,9 @@ struct DP5ConstantCacheActual{T, T2} end @fold function DP5ConstantCacheActual(::Type{T}, - ::Type{T2}) where {T <: CompiledFloats, - T2 <: - CompiledFloats} + ::Type{T2}) where {T <: CompiledFloats, + T2 <: + CompiledFloats} a21 = convert(T, 0.2) a31 = convert(T, 0.075) a32 = convert(T, 0.225) diff --git a/src/tableaus/rkn_tableaus.jl b/src/tableaus/rkn_tableaus.jl index d4e89d2a15..c9b50e05ff 100644 --- a/src/tableaus/rkn_tableaus.jl +++ b/src/tableaus/rkn_tableaus.jl @@ -370,7 +370,7 @@ struct Nystrom5VelocityIndependentConstantCache{T, T2} <: OrdinaryDiffEqConstant end function Nystrom5VelocityIndependentConstantCache(T::Type{<:CompiledFloats}, - T2::Type{<:CompiledFloats}) + T2::Type{<:CompiledFloats}) c1 = convert(T2, 0.2) c2 = convert(T2, 0.6666666666666666) # c3 = convert(T2,1) diff --git a/src/tableaus/verner_tableaus.jl b/src/tableaus/verner_tableaus.jl index 63ef03b18c..9c877a36d7 100644 --- a/src/tableaus/verner_tableaus.jl +++ b/src/tableaus/verner_tableaus.jl @@ -574,8 +574,8 @@ struct Vern7ExtraStages{T, T2} end @fold function Vern7ExtraStages(::Type{T}, - ::Type{T2}) where {T <: CompiledFloats, - T2 <: CompiledFloats} + ::Type{T2}) where {T <: CompiledFloats, + T2 <: CompiledFloats} c11 = convert(T2, 1) a1101 = convert(T, 0.04715561848627222) a1104 = convert(T, 0.25750564298434153) @@ -1043,7 +1043,7 @@ struct Vern7Tableau{T, T2} end @fold function Vern7Tableau(::Type{T}, - ::Type{T2}) where {T <: CompiledFloats, T2 <: CompiledFloats} + ::Type{T2}) where {T <: CompiledFloats, T2 <: CompiledFloats} c2 = convert(T2, 0.005) c3 = convert(T2, 0.10888888888888888) c4 = convert(T2, 0.16333333333333333) @@ -2444,8 +2444,8 @@ struct Vern9ExtraStages{T, T2} end @fold function Vern9ExtraStages(::Type{T}, - ::Type{T2}) where {T <: CompiledFloats, - T2 <: CompiledFloats} + ::Type{T2}) where {T <: CompiledFloats, + T2 <: CompiledFloats} # FIVE ADDITIONAL STAGES FOR INTERPOLANT OF ORDER 8 c17 = convert(T2, 1) a1701 = convert(T, 0.014611976858423152) @@ -3376,7 +3376,7 @@ struct Vern9Tableau{T, T2} end @fold function Vern9Tableau(::Type{T}, - ::Type{T2}) where {T <: CompiledFloats, T2 <: CompiledFloats} + ::Type{T2}) where {T <: CompiledFloats, T2 <: CompiledFloats} c1 = convert(T2, 0.03462) c2 = convert(T2, 0.09702435063878045) c3 = convert(T2, 0.14553652595817068) diff --git a/test/downstream/autodiff_events.jl b/test/downstream/autodiff_events.jl index a59c9f5a2a..1fe277d5c3 100644 --- a/test/downstream/autodiff_events.jl +++ b/test/downstream/autodiff_events.jl @@ -36,7 +36,7 @@ ad @test ad ≈ findiff function test_f2(p, sensealg = ForwardDiffSensitivity(), controller = nothing, - alg = Tsit5()) + alg = Tsit5()) _prob = remake(prob, p = p) u = solve(_prob, alg, sensealg = sensealg, controller = controller, abstol = 1e-14, reltol = 1e-14, callback = cb, save_everystep = false) diff --git a/test/integrators/callback_allocation_tests.jl b/test/integrators/callback_allocation_tests.jl index 5b0df8f0cf..213d220253 100644 --- a/test/integrators/callback_allocation_tests.jl +++ b/test/integrators/callback_allocation_tests.jl @@ -21,17 +21,17 @@ function cb_affect!(integrator) end cbs = CallbackSet(ContinuousCallback(cond_1, cb_affect!), - ContinuousCallback(cond_2, cb_affect!), - ContinuousCallback(cond_3, cb_affect!), - ContinuousCallback(cond_4, cb_affect!), - ContinuousCallback(cond_5, cb_affect!), - ContinuousCallback(cond_6, cb_affect!), - ContinuousCallback(cond_7, cb_affect!), - ContinuousCallback(cond_8, cb_affect!), - ContinuousCallback(cond_9, cb_affect!)) + ContinuousCallback(cond_2, cb_affect!), + ContinuousCallback(cond_3, cb_affect!), + ContinuousCallback(cond_4, cb_affect!), + ContinuousCallback(cond_5, cb_affect!), + ContinuousCallback(cond_6, cb_affect!), + ContinuousCallback(cond_7, cb_affect!), + ContinuousCallback(cond_8, cb_affect!), + ContinuousCallback(cond_9, cb_affect!)) integrator = init(ODEProblem(f!, [0.8, 1.0], (0.0, 100.0), [0, 0]), Tsit5(), callback = cbs, - save_on = false); + save_on = false); # Force a callback event to occur so we can call handle_callbacks! directly. # Step to a point where u[1] is still > 0.5, so we can force it below 0.5 and # call handle callbacks @@ -42,6 +42,6 @@ if VERSION >= v"1.7" integrator.u[1] = 0.4 @allocations OrdinaryDiffEq.handle_callbacks!(integrator) end - handle_allocs(integrator); + handle_allocs(integrator) @test handle_allocs(integrator) == 0 end diff --git a/test/integrators/dae_initialization_tests.jl b/test/integrators/dae_initialization_tests.jl index 77e13227bd..82e16ee197 100644 --- a/test/integrators/dae_initialization_tests.jl +++ b/test/integrators/dae_initialization_tests.jl @@ -202,8 +202,8 @@ struct BrokenNLSolve <: SciMLBase.AbstractNonlinearAlgorithm BrokenNLSolve(; kwargs...) = new() end function SciMLBase.__solve(prob::NonlinearProblem, - alg::BrokenNLSolve, args...; - kwargs...) + alg::BrokenNLSolve, args...; + kwargs...) u = fill(reinterpret(Float64, 0xDEADBEEFDEADBEEF), 3) SciMLBase.build_solution(prob, alg, u, copy(u); retcode = ReturnCode.Success) diff --git a/test/integrators/ode_event_tests.jl b/test/integrators/ode_event_tests.jl index a62267e33b..7822a12e82 100644 --- a/test/integrators/ode_event_tests.jl +++ b/test/integrators/ode_event_tests.jl @@ -415,15 +415,15 @@ if VERSION >= v"1.7" @testset "Callbacks with LinearExponential" begin A = sprand(ComplexF64, 100, 100, 0.5) A += A' - + t_l = LinRange(0, 1, 100) - + saved_values = SavedValues(Float64, Float64) function save_func(u, t, integrator) real(u' * A * u) end cb = SavingCallback(save_func, saved_values, saveat = t_l) - + u0 = normalize(rand(ComplexF64, 100)) A = MatrixOperator(-1im * A) prob = ODEProblem(A, u0, (0, 1.0)) diff --git a/test/interface/noindex_tests.jl b/test/interface/noindex_tests.jl index d9c4107cd0..f789ce996e 100644 --- a/test/interface/noindex_tests.jl +++ b/test/interface/noindex_tests.jl @@ -20,14 +20,14 @@ NoIndexStyle(::Val{N}) where {N} = NoIndexStyle{N}() NoIndexStyle{M}(::Val{N}) where {N, M} = NoIndexStyle{N}() Base.BroadcastStyle(::Type{<:NoIndexArray{T, N}}) where {T, N} = NoIndexStyle{N}() function Base.similar(bc::Base.Broadcast.Broadcasted{NoIndexStyle{N}}, - ::Type{ElType}) where {N, ElType} + ::Type{ElType}) where {N, ElType} NoIndexArray(similar(Array{ElType, N}, axes(bc))) end Base.Broadcast._broadcast_getindex(x::NoIndexArray, i) = x.x[i] Base.Broadcast.extrude(x::NoIndexArray) = x @inline function Base.copyto!(dest::NoIndexArray, - bc::Base.Broadcast.Broadcasted{<:NoIndexStyle}) + bc::Base.Broadcast.Broadcasted{<:NoIndexStyle}) axes(dest) == axes(bc) || throwdm(axes(dest), axes(bc)) bc′ = Base.Broadcast.preprocess(dest, bc) dest′ = dest.x diff --git a/test/regression/ode_dense_tests.jl b/test/regression/ode_dense_tests.jl index 2d2a630925..35777017ca 100644 --- a/test/regression/ode_dense_tests.jl +++ b/test/regression/ode_dense_tests.jl @@ -39,7 +39,7 @@ const deriv_test_points = range(0, stop = 1, length = 5) # commands below to get numerical values for `tol_ode_linear` and # `tol_ode_2Dlinear`. function regression_test(alg, tol_ode_linear, tol_ode_2Dlinear; test_diff1 = false, - nth_der = 1, dertol = 1e-6) + nth_der = 1, dertol = 1e-6) println("\n") show(stdout, alg) println() diff --git a/test/regression/psos_and_energy_conservation.jl b/test/regression/psos_and_energy_conservation.jl index 8e3ba6336f..7b95b95fc4 100644 --- a/test/regression/psos_and_energy_conservation.jl +++ b/test/regression/psos_and_energy_conservation.jl @@ -94,7 +94,7 @@ cb = ManifoldProjection(ghh, nlopts = Dict(:ftol => 1e-13), save = false) # Callback for Poincare surface of section function psos_callback(j, direction = +1, offset::Real = 0, - callback_kwargs = Dict{Symbol, Any}(:abstol => 1e-9)) + callback_kwargs = Dict{Symbol, Any}(:abstol => 1e-9)) # Prepare callback: s = sign(direction) diff --git a/test/runtests.jl b/test/runtests.jl index 055edc4fdf..7b265bfd77 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -81,7 +81,8 @@ end @time @safetestset "Events Tests" include("integrators/ode_event_tests.jl") @time @safetestset "Alg Events Tests" include("integrators/alg_events_tests.jl") @time @safetestset "Discrete Callback Dual Tests" include("integrators/discrete_callback_dual_test.jl") - @time VERSION >= v"1.9" && @safetestset "Callback Allocation Tests" include("integrators/callback_allocation_tests.jl") + @time VERSION >= v"1.9" && + @safetestset "Callback Allocation Tests" include("integrators/callback_allocation_tests.jl") @time @safetestset "Iterator Tests" include("integrators/iterator_tests.jl") @time @safetestset "Integrator Interface Tests" include("integrators/integrator_interface_tests.jl") @time @safetestset "Error Check Tests" include("integrators/check_error.jl") @@ -148,7 +149,8 @@ end if !is_APPVEYOR && GROUP == "Downstream" activate_downstream_env() @time @safetestset "DelayDiffEq Tests" include("downstream/delaydiffeq.jl") - @time VERSION >= v"1.9" && @safetestset "Autodiff Events Tests" include("downstream/autodiff_events.jl") + @time VERSION >= v"1.9" && + @safetestset "Autodiff Events Tests" include("downstream/autodiff_events.jl") @time @safetestset "Measurements Tests" include("downstream/measurements.jl") end