Skip to content

Commit

Permalink
clean some comments, remove wave speed estimates
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickersing committed Jan 10, 2024
1 parent 64b9bf3 commit 6b585b9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 64 deletions.
1 change: 0 additions & 1 deletion src/equations/equations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

####################################################################################################
# Include files with actual implementations for different systems of equations.
# Numerical flux formulations that are independent of the specific system of equations

include("shallow_water_wet_dry_1d.jl")
end # @muladd
44 changes: 0 additions & 44 deletions src/equations/shallow_water_wet_dry_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -478,18 +478,6 @@ end
# return u_ll_star, u_rr_star
# end

# TODO: Probably can be removed. Since we dispatch to ShallowWaterEquations1D we don't need
# equation specific wave speed estimates.
# # Calculate maximum wave speed for local Lax-Friedrichs-type dissipation as the
# # maximum velocity magnitude plus the maximum speed of sound
# @inline function Trixi.max_abs_speed_naive(u_ll, u_rr, orientation::Integer,
# equations::ShallowWaterEquationsWetDry1D)
# return Trixi.max_abs_speed_naive(u_ll, u_rr, orientation,
# Trixi.ShallowWaterEquations1D(equations.gravity,
# equations.H0, eps(),
# eps()))
# end

# Specialized `DissipationLocalLaxFriedrichs` to avoid spurious dissipation in the bottom topography
@inline function (dissipation::Trixi.DissipationLocalLaxFriedrichs)(u_ll, u_rr,
orientation_or_normal_direction,
Expand All @@ -511,17 +499,6 @@ end
eps()))
end

# TODO: Probably can be removed. Since we dispatch to ShallowWaterEquations1D we don't need
# equation specific wave speed estimates.
# # Calculate estimate for minimum and maximum wave speeds for HLL-type fluxes
# @inline function Trixi.min_max_speed_naive(u_ll, u_rr, orientation::Integer,
# equations::ShallowWaterEquationsWetDry1D)
# return Trixi.min_max_speed_naive(u_ll, u_rr, orientation,
# Trixi.ShallowWaterEquations1D(equations.gravity,
# equations.H0, eps(),
# eps()))
# end

# TODO: This function is currently exported by Trixi.jl. Needs to be uncommented when removed from Trixi.jl
# """
# min_max_speed_chen_noelle(u_ll, u_rr, orientation::Integer,
Expand Down Expand Up @@ -555,27 +532,6 @@ end
# return λ_min, λ_max
# end

# TODO: Probably can be removed. Since we dispatch to ShallowWaterEquations1D we don't need
# equation specific wave speed estimates.
# More refined estimates for minimum and maximum wave speeds for HLL-type fluxes
# @inline function Trixi.min_max_speed_davis(u_ll, u_rr, orientation::Integer,
# equations::ShallowWaterEquationsWetDry1D)
# return Trixi.min_max_speed_davis(u_ll, u_rr, orientation,
# Trixi.ShallowWaterEquations1D(equations.gravity,
# equations.H0, eps(),
# eps()))
# end

# TODO: Probably can be removed. Since we dispatch to ShallowWaterEquations1D we don't need
# equation specific wave speed estimates.
# @inline function Trixi.min_max_speed_einfeldt(u_ll, u_rr, orientation::Integer,
# equations::ShallowWaterEquationsWetDry1D)
# return Trixi.min_max_speed_einfeldt(u_ll, u_rr, orientation,
# Trixi.ShallowWaterEquations1D(equations.gravity,
# equations.H0,
# eps(), eps()))
# end

@inline function Trixi.max_abs_speeds(u, equations::ShallowWaterEquationsWetDry1D)
return Trixi.max_abs_speeds(u,
Trixi.ShallowWaterEquations1D(equations.gravity,
Expand Down
19 changes: 0 additions & 19 deletions test/test_unit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,6 @@ isdir(outdir) && rm(outdir, recursive = true)
@test cons_vars Trixi.entropy2cons(entropy_vars, equations)
end
end

# TODO: Probably can be removed. Since we dispatch to ShallowWaterEquations1D we don't need
# equation specific wave speed estimates.
# @timed_testset "Connectivity with Trixi.jl" begin
# u = SVector(SVector(1, 0.5, 0.0))
# orientation = 1
# equations = ShallowWaterEquationsWetDry1D(gravity_constant = 9.81)
# equations_trixi = ShallowWaterEquations1D(gravity_constant = 9.81)

# # We only need to check equivalence between the equation systems. The functionality is tested in
# # Trixi.jl. We choose these specific ones to improve code coverage, as they are not tested in
# # any elixirs.
# @test min_max_speed_einfeldt(u, u, orientation, equations) ==
# min_max_speed_einfeldt(u, u, orientation, equations_trixi)
# @test min_max_speed_davis(u, u, orientation, equations) ==
# min_max_speed_davis(u, u, orientation, equations_trixi)
# @test max_abs_speed_naive(u, u, orientation, equations) ==
# max_abs_speed_naive(u, u, orientation, equations_trixi)
# end
end

end # module

0 comments on commit 6b585b9

Please sign in to comment.