From a06333dd02ef176683edd5c05a12444ac59ad038 Mon Sep 17 00:00:00 2001 From: bennibolm Date: Fri, 20 Oct 2023 17:42:04 +0200 Subject: [PATCH] Fix 2 bugs + formatting --- src/callbacks_stage/subcell_bounds_check.jl | 4 ++-- src/callbacks_stage/subcell_bounds_check_2d.jl | 4 ++-- src/solvers/dgsem_tree/subcell_limiters.jl | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/callbacks_stage/subcell_bounds_check.jl b/src/callbacks_stage/subcell_bounds_check.jl index 0cd7a319f7b..c57c1f5db2b 100644 --- a/src/callbacks_stage/subcell_bounds_check.jl +++ b/src/callbacks_stage/subcell_bounds_check.jl @@ -138,8 +138,8 @@ end @inline function finalize_callback(callback::BoundsCheckCallback, semi, limiter::SubcellLimiterIDP) - @unpack local_minmax, positivity, spec_entropy, math_entropy = limiter - @unpack idp_bounds_delta = limiter.cache + (; local_minmax, positivity, spec_entropy, math_entropy) = limiter + (; idp_bounds_delta) = limiter.cache variables = varnames(cons2cons, semi.equations) println("─"^100) diff --git a/src/callbacks_stage/subcell_bounds_check_2d.jl b/src/callbacks_stage/subcell_bounds_check_2d.jl index f66f8b8b3aa..54f5d986711 100644 --- a/src/callbacks_stage/subcell_bounds_check_2d.jl +++ b/src/callbacks_stage/subcell_bounds_check_2d.jl @@ -138,7 +138,7 @@ end @inline function check_bounds(u, mesh::AbstractMesh{2}, equations, solver, cache, limiter::SubcellLimiterMCL, - time, iter, output_directory, save_errors, interval) + time, iter, output_directory, save_errors) @unpack var_min, var_max = limiter.cache.subcell_limiter_coefficients @unpack bar_states1, bar_states2, lambda1, lambda2 = limiter.cache.container_bar_states @unpack idp_bounds_delta = limiter.cache @@ -590,7 +590,7 @@ end deviation_min[n_vars + 1]) end - if !save_errors || (iter % interval != 0) + if !save_errors return nothing end open("$output_directory/deviations.txt", "a") do f diff --git a/src/solvers/dgsem_tree/subcell_limiters.jl b/src/solvers/dgsem_tree/subcell_limiters.jl index 7b416e4f587..6a10f92b891 100644 --- a/src/solvers/dgsem_tree/subcell_limiters.jl +++ b/src/solvers/dgsem_tree/subcell_limiters.jl @@ -112,7 +112,8 @@ function SubcellLimiterIDP(equations::AbstractEquations, basis; if local_minmax for v in local_minmax_variables_cons v_string = string(v) - bound_keys = (bound_keys..., Symbol(v_string, "_min"), Symbol(v_string, "_max")) + bound_keys = (bound_keys..., Symbol(v_string, "_min"), + Symbol(v_string, "_max")) end end if spec_entropy