Skip to content

Commit 29025cb

Browse files
committed
Remove code with alpha1/2
1 parent 1b0d2f5 commit 29025cb

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

src/solvers/subcell_limiters.jl

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,12 @@ function (limiter::Trixi.SubcellLimiterIDP)(u::AbstractArray{<:Any, 4},
3333
semi)
3434
end
3535

36-
# Calculate alpha1 and alpha2
37-
@unpack alpha1, alpha2 = limiter.cache.subcell_limiter_coefficients
3836
Trixi.@threaded for element in eachelement(dg, semi.cache)
39-
for j in eachnode(dg), i in 2:nnodes(dg)
40-
alpha1[i, j, element] = max(alpha[i - 1, j, element], alpha[i, j, element])
41-
end
42-
for j in 2:nnodes(dg), i in eachnode(dg)
43-
alpha2[i, j, element] = max(alpha[i, j - 1, element], alpha[i, j, element])
44-
end
45-
4637
# Modification for wet/dry elements.
4738
# (Re-)set dummy variable for alpha_dry
4839
indicator_wet = 1
4940

50-
for j in eachnode(dg), i in 1:nnodes(dg)
41+
for j in eachnode(dg), i in eachnode(dg)
5142
h = waterheight(u[:, i, j, element], equations)
5243

5344
# Set indicator to FV if water height is below the threshold
@@ -58,15 +49,7 @@ function (limiter::Trixi.SubcellLimiterIDP)(u::AbstractArray{<:Any, 4},
5849

5950
if indicator_wet == 0 # element is dry
6051
alpha[:, :, element] .= one(eltype(alpha))
61-
alpha1[:, :, element] .= one(eltype(alpha1))
62-
alpha2[:, :, element] .= one(eltype(alpha2))
6352
end
64-
65-
# Use pure DG for interface fluxes
66-
alpha1[1, :, element] .= zero(eltype(alpha1))
67-
alpha1[nnodes(dg) + 1, :, element] .= zero(eltype(alpha1))
68-
alpha2[:, 1, element] .= zero(eltype(alpha2))
69-
alpha2[:, nnodes(dg) + 1, element] .= zero(eltype(alpha2))
7053
end
7154
return nothing
7255
end

0 commit comments

Comments
 (0)