Skip to content

Commit

Permalink
edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreyas-Ekanathan committed Sep 3, 2024
1 parent 0740aea commit 8574f04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/OrdinaryDiffEqFIRK/src/firk_perform_step.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion lib/OrdinaryDiffEqFIRK/test/ode_firk_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8574f04

Please sign in to comment.