Skip to content

Commit

Permalink
fix merge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring committed Jan 8, 2025
1 parent d54ef10 commit 985dc5f
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function compute_PairedExplicitRK2_butcher_tableau(num_stages, eig_vals, tspan,

# - 2 Since first entry of A is always zero (explicit method) and second is given by c_2 (consistency)
coeffs_max = num_stages - 2

a_matrix = zeros(2, coeffs_max)
a_matrix[1, :] = c[3:end]

Expand All @@ -50,14 +50,14 @@ function compute_PairedExplicitRK2_butcher_tableau(num_stages, eig_vals, tspan,
dteps,
eig_vals; verbose)

if num_stages != consistency_order
if coeffs_max > 0
monomial_coeffs = undo_normalization!(monomial_coeffs, consistency_order,
num_stages)
num_monomial_coeffs = length(monomial_coeffs)
@assert num_monomial_coeffs == coeffs_max
A = compute_a_coeffs(num_stages, stage_scaling_factors, monomial_coeffs)
a_matrix[1, :] -= A
a_matrix[2, :] = A
a_matrix[:, 1] -= A
a_matrix[:, 2] = A
end

return a_matrix, c, dt_opt
Expand All @@ -82,8 +82,6 @@ function compute_PairedExplicitRK2_butcher_tableau(num_stages,
a_matrix[1, :] = c[3:end]

if coeffs_max > 0
a_matrix[:, 1] = c[3:end]

path_monomial_coeffs = joinpath(base_path_monomial_coeffs,
"gamma_" * string(num_stages) * ".txt")

Expand Down

0 comments on commit 985dc5f

Please sign in to comment.