Skip to content

Commit

Permalink
Fix up Rodas5(p) addsteps!
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Nov 11, 2023
1 parent 52dad4f commit 11a1a20
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dense/stiff_addsteps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -644,15 +644,15 @@ 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₃)

Check warning on line 647 in src/dense/stiff_addsteps.jl

View check run for this annotation

Codecov / codecov/patch

src/dense/stiff_addsteps.jl#L647

Added line #L647 was not covered by tests
end
nothing
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

Check warning on line 655 in src/dense/stiff_addsteps.jl

View check run for this annotation

Codecov / codecov/patch

src/dense/stiff_addsteps.jl#L655

Added line #L655 was not covered by tests
@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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 11a1a20

Please sign in to comment.