Skip to content

Commit

Permalink
Fix 2 bugs + formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Oct 20, 2023
1 parent aae5ad2 commit a06333d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/callbacks_stage/subcell_bounds_check.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/callbacks_stage/subcell_bounds_check_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/solvers/dgsem_tree/subcell_limiters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a06333d

Please sign in to comment.