Skip to content

Commit

Permalink
Implement suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Dec 13, 2023
1 parent 2702bb8 commit 5ec5ade
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/solvers/dgsem_tree/subcell_limiters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 7 additions & 4 deletions src/solvers/dgsem_tree/subcell_limiters_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5ec5ade

Please sign in to comment.