From b5bc90c8795f2fb3b6ecb8fae26643a9329a455b Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Wed, 30 Oct 2024 14:21:35 +0100 Subject: [PATCH] optimize --- src/solvers/dgsem_tree/dg_2d.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/solvers/dgsem_tree/dg_2d.jl b/src/solvers/dgsem_tree/dg_2d.jl index dfcd6551a41..c498ceb5926 100644 --- a/src/solvers/dgsem_tree/dg_2d.jl +++ b/src/solvers/dgsem_tree/dg_2d.jl @@ -344,16 +344,15 @@ function calc_volume_integral!(du, u, RealT = eltype(alpha) atol = max(100 * eps(RealT), eps(RealT)^convert(RealT, 0.75f0)) @threaded for element in eachelement(dg, cache) + alpha_element = alpha[element] # Clip blending factor for values close to zero (-> pure DG) - dg_only = isapprox(alpha[element], 0, atol = atol) + dg_only = isapprox(alpha_element, 0, atol = atol) if dg_only flux_differencing_kernel!(du, u, element, mesh, nonconservative_terms, equations, volume_flux_dg, dg, cache) else - alpha_element = alpha[element] - # Calculate DG volume integral contribution flux_differencing_kernel!(du, u, element, mesh, nonconservative_terms, equations,