diff --git a/ext/TrixiConvexECOSExt.jl b/ext/TrixiConvexECOSExt.jl index 9b3cc568de..411cf31dfd 100644 --- a/ext/TrixiConvexECOSExt.jl +++ b/ext/TrixiConvexECOSExt.jl @@ -55,7 +55,8 @@ function stability_polynomials!(pnoms, consistency_order, # Contribution from free coefficients for k in (consistency_order + 1):num_stage_evals - pnoms += gamma[k - consistency_order] * normalized_powered_eigvals_scaled[:, k] + pnoms += gamma[k - consistency_order] * + view(normalized_powered_eigvals_scaled[:, k]) end # For optimization only the maximum is relevant @@ -94,8 +95,10 @@ function stability_polynomials_PERK4!(pnoms, num_stage_evals, # Contribution from free coefficients for k in 1:(num_stage_evals - 5) - pnoms += (k2 * dt^(k + 4) * view(normalized_powered_eigvals, :, k + 4) * gamma[k] + - k1 * dt^(k + 5) * view(normalized_powered_eigvals, :, k + 5) * gamma[k] * + pnoms += (k2 * dt^(k + 4) * view(normalized_powered_eigvals, :, k + 4) * + gamma[k] + + k1 * dt^(k + 5) * view(normalized_powered_eigvals, :, k + 5) * + gamma[k] * (k + 5)) end