From 8574f0401b1ab4e88c72a3f8b38254b583f6dd32 Mon Sep 17 00:00:00 2001 From: Shreyas Ekanathan Date: Tue, 3 Sep 2024 18:42:07 -0400 Subject: [PATCH] edits --- lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl | 4 ++-- lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl b/lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl index 318e062494..a401e45a3b 100644 --- a/lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl +++ b/lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl @@ -1381,7 +1381,7 @@ end end end integrator.stats.nw += 1 - z = w = Vector{BigFloat}(undef, num_stages) + z = w = Vector{typeof(u)}(undef, num_stages) if integrator.iter == 1 || integrator.u_modified || alg.extrapolant == :constant cache.dtprev = one(cache.dtprev) for i in 1 : num_stages @@ -1441,7 +1441,7 @@ end end dw = Vector{eltype(u)}(undef, num_stages) - dw[1] = _reshape(LU[1] \ _vec(rhs[1])) + dw[1] = _reshape(LU[1] \ _vec(rhs[1]), axes(u)) for i in 2 : Int((num_stages + 1) / 2) tmp = _reshape(LU[i] \ _vec(@.. rhs[2 * i - 2] + rhs[2 * i - 1] * im), axes(u)) dw[2 * i - 2] = real(tmp) diff --git a/lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl b/lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl index dde9d4b462..d08df7f56a 100644 --- a/lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl +++ b/lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl @@ -18,7 +18,8 @@ prob_ode_linear_big = remake(prob_ode_linear, u0 = big.(prob_ode_linear.u0), tsp prob_ode_2Dlinear_big = remake(prob_ode_2Dlinear, u0 = big.(prob_ode_2Dlinear.u0), tspan = big.(prob_ode_2Dlinear.tspan)) for i in [3, 5, 7, 9], prob in [prob_ode_linear_big, prob_ode_2Dlinear_big] - sim21 = test_convergence(1 ./ 2 .^ (2.25:-1:0.25), prob, AdaptiveRadau(num_stages = i)) + dts = 1 ./ 2 .^ (4.25:-1:0.25) + sim21 = test_convergence(dts, prob, AdaptiveRadau(num_stages = i)) @test sim21.𝒪est[:final]≈ (2 * i - 1) atol=testTol end