Skip to content

Commit

Permalink
Dispatch check_bounds for dimension using u
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed May 24, 2024
1 parent 488b794 commit 60536e1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/callbacks_stage/subcell_bounds_check_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
@muladd begin
#! format: noindent

@inline function check_bounds(u, equations, solver, cache,
@inline function check_bounds(u::AbstractArray{<:Any, 4},
equations, solver, cache,
limiter::SubcellLimiterIDP)
(; local_twosided, positivity, local_onesided) = solver.volume_integral.limiter
(; variable_bounds) = limiter.cache.subcell_limiter_coefficients
Expand Down Expand Up @@ -145,7 +146,8 @@ end
return nothing
end

@inline function check_bounds(u, equations, solver, cache,
@inline function check_bounds(u::AbstractArray{<:Any, 4},
equations, solver, cache,
limiter::SubcellLimiterMCL)
(; var_min, var_max) = limiter.cache.subcell_limiter_coefficients
(; bar_states1, bar_states2, lambda1, lambda2) = limiter.cache.container_bar_states
Expand Down Expand Up @@ -632,7 +634,7 @@ end
n_vars = nvariables(equations)

# Print errors to output file
open("$output_directory/deviations.txt", "a") do f
open(joinpath(output_directory, "deviations.txt"), "a") do f
print(f, iter, ", ", time)
for v in eachvariable(equations)
print(f, ", ", mcl_bounds_delta_local[1, v], ", ",
Expand Down

0 comments on commit 60536e1

Please sign in to comment.