From 1044bac0a64c338764448f0c795b77c0b8f3176b Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Thu, 19 Dec 2024 10:11:37 +0100 Subject: [PATCH] view --- ext/TrixiConvexECOSExt.jl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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