diff --git a/src/dense/stiff_addsteps.jl b/src/dense/stiff_addsteps.jl index f61d0d2d75..87d1da4f35 100644 --- a/src/dense/stiff_addsteps.jl +++ b/src/dense/stiff_addsteps.jl @@ -522,7 +522,7 @@ 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) - if length(k) < 2 || always_calc_begin + if length(k) < 3 || 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 @@ -644,7 +644,7 @@ function _ode_addsteps!(k, t, uprev, u, dt, f, p, cache::Rosenbrock5ConstantCach h48 * k8 copyat_or_push!(k, 1, k₁) copyat_or_push!(k, 2, k₂) - copyat_or_push!(k, 2, k₃) + copyat_or_push!(k, 3, k₃) end nothing end @@ -652,7 +652,7 @@ 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) - if length(k) < 2 || always_calc_begin + if length(k) < 3 || 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 @@ -857,7 +857,7 @@ 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) - if length(k) < 2 || always_calc_begin + if length(k) < 3 || 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