From e85504dc6edc3669f3c57673fcba24d5ad0b81c7 Mon Sep 17 00:00:00 2001 From: bennibolm Date: Tue, 27 Feb 2024 11:28:27 +0100 Subject: [PATCH] Implement suggestions --- src/solvers/dgsem_tree/subcell_limiters.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/solvers/dgsem_tree/subcell_limiters.jl b/src/solvers/dgsem_tree/subcell_limiters.jl index d9c88d59e84..56fa4a1aa46 100644 --- a/src/solvers/dgsem_tree/subcell_limiters.jl +++ b/src/solvers/dgsem_tree/subcell_limiters.jl @@ -38,7 +38,8 @@ To use these three limiting options use the following structure: For ***nonlinear variables***, the wanted variable functions are passed within a vector: To ensure positivity use a plain vector including the desired variables, e.g. `positivity_variables_nonlinear = [pressure]`. For local one-sided limiting pass the variable function combined with the requested bound -(`min` or `max`) as a tuple, e.g. `local_onesided_variables_nonlinear = [(Trixi.entropy_spec, min)]`. +(`min` or `max`) as a tuple. For instance, to impose a lower local bound on the specific entropy +use `local_onesided_variables_nonlinear = [(Trixi.entropy_spec, min)]`. The bounds are calculated using the low-order FV solution. The positivity limiter uses `positivity_correction_factor` such that `u^new >= positivity_correction_factor * u^FV`. @@ -103,6 +104,8 @@ function SubcellLimiterIDP(equations::AbstractEquations, basis; push!(local_onesided_variables_nonlinear_, tuple(variable, max)) elseif min_or_max === Base.min push!(local_onesided_variables_nonlinear_, tuple(variable, min)) + elseif min_or_max === Trixi.max || min_or_max === Trixi.min + push!(local_onesided_variables_nonlinear_, tuple(variable, min_or_max)) else error("Parameter $min_or_max is not a valid input. Use `max` or `min` instead.") end