Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ Printf = "1"
Roots = "2.1.6"
Static = "1.1.1"
StaticArrays = "1.9"
Trixi = "0.13"
Trixi = "0.13.9"
julia = "1.10"
21 changes: 2 additions & 19 deletions src/solvers/subcell_limiters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,13 @@ function (limiter::Trixi.SubcellLimiterIDP)(u::AbstractArray{<:Any, 4},
semi)
end

# Calculate alpha1 and alpha2
@unpack alpha1, alpha2 = limiter.cache.subcell_limiter_coefficients
Trixi.@threaded for element in eachelement(dg, semi.cache)
for j in eachnode(dg), i in 2:nnodes(dg)
alpha1[i, j, element] = max(alpha[i - 1, j, element], alpha[i, j, element])
end
for j in 2:nnodes(dg), i in eachnode(dg)
alpha2[i, j, element] = max(alpha[i, j - 1, element], alpha[i, j, element])
end

# Modification for wet/dry elements.
# (Re-)set dummy variable for alpha_dry
indicator_wet = 1

for j in eachnode(dg), i in 1:nnodes(dg)
h = waterheight(u[:, i, j, element], equations)
for j in eachnode(dg), i in eachnode(dg)
h = waterheight(get_node_vars(u, equations, dg, i, j, element), equations)

# Set indicator to FV if water height is below the threshold
if minimum(h) <= equations.threshold_partially_wet
Expand All @@ -58,15 +49,7 @@ function (limiter::Trixi.SubcellLimiterIDP)(u::AbstractArray{<:Any, 4},

if indicator_wet == 0 # element is dry
alpha[:, :, element] .= one(eltype(alpha))
alpha1[:, :, element] .= one(eltype(alpha1))
alpha2[:, :, element] .= one(eltype(alpha2))
end

# Use pure DG for interface fluxes
alpha1[1, :, element] .= zero(eltype(alpha1))
alpha1[nnodes(dg) + 1, :, element] .= zero(eltype(alpha1))
alpha2[:, 1, element] .= zero(eltype(alpha2))
alpha2[:, nnodes(dg) + 1, element] .= zero(eltype(alpha2))
end
return nothing
end
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ OrdinaryDiffEqSSPRK = "1.2"
Printf = "1"
Roots = "2.1.6"
Test = "1"
Trixi = "0.13"
Trixi = "0.13.9"
TrixiBottomTopography = "0.1"
TrixiTest = "0.1.4"
Loading