diff --git a/src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl b/src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl index 070ee904be..e63c0cfbb3 100644 --- a/src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl +++ b/src/time_integration/paired_explicit_runge_kutta/methods_PERK2.jl @@ -55,7 +55,7 @@ function compute_PairedExplicitRK2_butcher_tableau(num_stages, eig_vals, tspan, dteps, eig_vals; verbose) - if coeffs_max > 0 + if num_coeffs_max > 0 monomial_coeffs = undo_normalization!(monomial_coeffs, consistency_order, num_stages) num_monomial_coeffs = length(monomial_coeffs) @@ -82,7 +82,7 @@ function compute_PairedExplicitRK2_butcher_tableau(num_stages, a_matrix = zeros(2, num_coeffs_max) a_matrix[1, :] = c[3:end] - if coeffs_max > 0 + if num_coeffs_max > 0 path_monomial_coeffs = joinpath(base_path_monomial_coeffs, "gamma_" * string(num_stages) * ".txt") @@ -90,7 +90,7 @@ function compute_PairedExplicitRK2_butcher_tableau(num_stages, monomial_coeffs = readdlm(path_monomial_coeffs, Float64) num_monomial_coeffs = size(monomial_coeffs, 1) - @assert num_monomial_coeffs == coeffs_max + @assert num_monomial_coeffs == num_coeffs_max A = compute_a_coeffs(num_stages, stage_scaling_factors, monomial_coeffs) a_matrix[1, :] -= A