diff --git a/src/solvers/dgsem_tree/dg_2d.jl b/src/solvers/dgsem_tree/dg_2d.jl index 4beab11c31c..dfcd6551a41 100644 --- a/src/solvers/dgsem_tree/dg_2d.jl +++ b/src/solvers/dgsem_tree/dg_2d.jl @@ -47,9 +47,6 @@ end function create_cache(mesh::Union{TreeMesh{2}, StructuredMesh{2}, UnstructuredMesh2D, P4estMesh{2}, T8codeMesh{2}}, equations, volume_integral::VolumeIntegralShockCapturingHG, dg::DG, uEltype) - element_ids_dg = Int[] - element_ids_dgfv = Int[] - cache = create_cache(mesh, equations, VolumeIntegralFluxDifferencing(volume_integral.volume_flux_dg), dg, uEltype) @@ -66,7 +63,7 @@ function create_cache(mesh::Union{TreeMesh{2}, StructuredMesh{2}, UnstructuredMe fstar2_R_threaded = A3dp1_y[A3dp1_y(undef, nvariables(equations), nnodes(dg), nnodes(dg) + 1) for _ in 1:Threads.nthreads()] - return (; cache..., element_ids_dg, element_ids_dgfv, + return (; cache..., fstar1_L_threaded, fstar1_R_threaded, fstar2_L_threaded, fstar2_R_threaded) end @@ -338,39 +335,11 @@ function calc_volume_integral!(du, u, nonconservative_terms, equations, volume_integral::VolumeIntegralShockCapturingHG, dg::DGSEM, cache) - @unpack element_ids_dg, element_ids_dgfv = cache @unpack volume_flux_dg, volume_flux_fv, indicator = volume_integral # Calculate blending factors α: u = u_DG * (1 - α) + u_FV * α alpha = @trixi_timeit timer() "blending factors" indicator(u, mesh, equations, dg, cache) - #= - # Determine element ids for DG-only and blended DG-FV volume integral - pure_and_blended_element_ids!(element_ids_dg, element_ids_dgfv, alpha, dg, cache) - - # Loop over pure DG elements - @trixi_timeit timer() "pure DG" @threaded for idx_element in eachindex(element_ids_dg) - element = element_ids_dg[idx_element] - flux_differencing_kernel!(du, u, element, mesh, - nonconservative_terms, equations, - volume_flux_dg, dg, cache) - end - - # Loop over blended DG-FV elements - @trixi_timeit timer() "blended DG-FV" @threaded for idx_element in eachindex(element_ids_dgfv) - element = element_ids_dgfv[idx_element] - alpha_element = alpha[element] - - # Calculate DG volume integral contribution - flux_differencing_kernel!(du, u, element, mesh, - nonconservative_terms, equations, - volume_flux_dg, dg, cache, 1 - alpha_element) - - # Calculate FV volume integral contribution - fv_kernel!(du, u, mesh, nonconservative_terms, equations, volume_flux_fv, - dg, cache, element, alpha_element) - end - =# RealT = eltype(alpha) atol = max(100 * eps(RealT), eps(RealT)^convert(RealT, 0.75f0))