From 5ec5adee3d248bb255868a32b9790ea717a42c2f Mon Sep 17 00:00:00 2001 From: bennibolm Date: Wed, 13 Dec 2023 12:59:26 +0100 Subject: [PATCH] Implement suggestions --- src/solvers/dgsem_tree/subcell_limiters.jl | 4 ++-- src/solvers/dgsem_tree/subcell_limiters_2d.jl | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/solvers/dgsem_tree/subcell_limiters.jl b/src/solvers/dgsem_tree/subcell_limiters.jl index 86d70e3853a..fb52272e2e8 100644 --- a/src/solvers/dgsem_tree/subcell_limiters.jl +++ b/src/solvers/dgsem_tree/subcell_limiters.jl @@ -36,8 +36,8 @@ The bounds are calculated using the low-order FV solution. The positivity limite `positivity_correction_factor` such that `u^new >= positivity_correction_factor * u^FV`. The limiting of nonlinear variables uses a Newton-bisection method with a maximum of `max_iterations_newton` iterations, relative and absolute tolerances of `newton_tolerances` -and a gamma constant of `gamma_constant_newton` (`gamma_constant_newton>=2*d`, -where `d = #dimensions`). +and a provisional update constant `gamma_constant_newton` (`gamma_constant_newton>=2*d`, +where `d = #dimensions`). See equation (20) of Pazner (2020) and equation (30) of Rueda-Ramírez et al. (2022). !!! note This limiter and the correction callback [`SubcellLimiterIDPCorrection`](@ref) only work together. diff --git a/src/solvers/dgsem_tree/subcell_limiters_2d.jl b/src/solvers/dgsem_tree/subcell_limiters_2d.jl index 788d32344a7..98d2a3296cd 100644 --- a/src/solvers/dgsem_tree/subcell_limiters_2d.jl +++ b/src/solvers/dgsem_tree/subcell_limiters_2d.jl @@ -238,9 +238,12 @@ end @inline function idp_positivity!(alpha, limiter, u, dt, semi) # Conservative variables for variable in limiter.positivity_variables_cons - @trixi_timeit timer() "conservative variables" idp_positivity!(alpha, limiter, - u, dt, semi, - variable) + @trixi_timeit timer() "conservative variables" idp_positivity_conservative!(alpha, + limiter, + u, + dt, + semi, + variable) end # Nonlinear variables @@ -258,7 +261,7 @@ end ############################################################################### # Global positivity limiting of conservative variables -@inline function idp_positivity!(alpha, limiter, u, dt, semi, variable) +@inline function idp_positivity_conservative!(alpha, limiter, u, dt, semi, variable) mesh, equations, dg, cache = mesh_equations_solver_cache(semi) (; antidiffusive_flux1_L, antidiffusive_flux2_L, antidiffusive_flux1_R, antidiffusive_flux2_R) = cache.antidiffusive_fluxes (; inverse_weights) = dg.basis