Skip to content

Commit

Permalink
ensure type consistency in compute_c_coeffs
Browse files Browse the repository at this point in the history
  • Loading branch information
warisa-r committed Nov 2, 2024
1 parent 2d77255 commit fd469d2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ using DelimitedFiles: readdlm

# Initialize Butcher array abscissae c for PairedExplicitRK3 based on SSPRK33 base method
function compute_c_coeffs(num_stages, cS2)
c = zeros(num_stages)
c = zeros(eltype(cS2), num_stages)

# Last timesteps as for SSPRK33, see motivation in Section 3.3 of
# https://doi.org/10.1016/j.jcp.2024.113223
c[num_stages - 1] = 1.0f0
c[num_stages] = 0.5f0
c[num_stages - 1] = one(cS2)
c[num_stages] = convert(eltype(cS2), 0.5)

# Linear increasing timestep for remainder
for i in 2:(num_stages - 2)
Expand Down

0 comments on commit fd469d2

Please sign in to comment.