Skip to content

Commit

Permalink
Renamed DissipationEntropyStable to DissipationLaxFriedrichsEntropyVa…
Browse files Browse the repository at this point in the history
…riables
  • Loading branch information
amrueda committed Dec 17, 2024
1 parent 6d9dfec commit 3e5e2c2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion examples/tree_2d_dgsem/elixir_mhdmultiion_ec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ initial_condition = initial_condition_weak_blast_wave
volume_flux = (flux_ruedaramirez_etal, flux_nonconservative_ruedaramirez_etal)
surface_flux = (flux_ruedaramirez_etal, flux_nonconservative_ruedaramirez_etal)
# For provably entropy-stable surface fluxes, use
# surface_flux = (FluxPlusDissipation(flux_ruedaramirez_etal, DissipationEntropyStable()),
# surface_flux = (FluxPlusDissipation(flux_ruedaramirez_etal, DissipationLaxFriedrichsEntropyVariables()),
# flux_nonconservative_ruedaramirez_etal)
# For a standard local Lax-Friedrichs surface flux, use
# surface_flux = (flux_lax_friedrichs, flux_nonconservative_central)
Expand Down
2 changes: 1 addition & 1 deletion src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export flux, flux_central, flux_lax_friedrichs, flux_hll, flux_hllc, flux_hlle,
flux_chan_etal, flux_nonconservative_chan_etal, flux_winters_etal,
hydrostatic_reconstruction_audusse_etal, flux_nonconservative_audusse_etal,
FluxPlusDissipation, DissipationGlobalLaxFriedrichs, DissipationLocalLaxFriedrichs,
DissipationEntropyStable,
DissipationLaxFriedrichsEntropyVariables,
FluxLaxFriedrichs, max_abs_speed_naive,
FluxHLL, min_max_speed_naive, min_max_speed_davis, min_max_speed_einfeldt,
FluxLMARS,
Expand Down
8 changes: 4 additions & 4 deletions src/equations/ideal_glm_mhd_multiion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ end
return SVector(cons)
end

# Specialization of [`DissipationEntropyStable`](@ref) for the multi-ion GLM-MHD equations
# Specialization of [`DissipationLaxFriedrichsEntropyVariables`](@ref) for the multi-ion GLM-MHD equations
# For details on the multi-ion entropy Jacobian ``H`` see
# - A. Rueda-Ramírez, A. Sikstel, G. Gassner, An Entropy-Stable Discontinuous Galerkin Discretization
# of the Ideal Multi-Ion Magnetohydrodynamics System (2024). Journal of Computational Physics.
Expand All @@ -284,9 +284,9 @@ end
# The first three entries of the state vector `u[1:3]` are the magnetic field components. After that, we have chunks
# of 5 entries for the hydrodynamic quantities of each ion species. Finally, the last entry `u[end]` is the divergence
# cleaning field.
@inline function (dissipation::DissipationEntropyStable)(u_ll, u_rr,
orientation_or_normal_direction,
equations::AbstractIdealGlmMhdMultiIonEquations)
@inline function (dissipation::DissipationLaxFriedrichsEntropyVariables)(u_ll, u_rr,
orientation_or_normal_direction,
equations::AbstractIdealGlmMhdMultiIonEquations)
@unpack gammas = equations
λ = dissipation.max_abs_speed(u_ll, u_rr, orientation_or_normal_direction,
equations)
Expand Down
14 changes: 7 additions & 7 deletions src/equations/numerical_fluxes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ See [`FluxLaxFriedrichs`](@ref).
const flux_lax_friedrichs = FluxLaxFriedrichs()

"""
DissipationEntropyStable(max_abs_speed=max_abs_speed_naive)
DissipationLaxFriedrichsEntropyVariables(max_abs_speed=max_abs_speed_naive)
Create a local Lax-Friedrichs-type dissipation operator that is provably entropy stable. This operator
must be used together with an entropy-conservative two-point flux function (e.g., `flux_ec`) to yield
an entropy-stable surface flux. The surface flux function can be initialized as:
```
flux_es = FluxPlusDissipation(flux_ec, DissipationEntropyStable())
flux_es = FluxPlusDissipation(flux_ec, DissipationLaxFriedrichsEntropyVariables())
```
In particular, the numerical flux has the form
Expand All @@ -243,22 +243,22 @@ Ideally, ``H (w_r - w_l) = (u_r - u_l)``, such that the dissipation operator is
Lax-Friedrichs dissipation.
The entropy-stable dissipation operator is computed with the function
`function (dissipation::DissipationEntropyStable)(u_l, u_r, orientation_or_normal_direction, equations)`,
`function (dissipation::DissipationLaxFriedrichsEntropyVariables)(u_l, u_r, orientation_or_normal_direction, equations)`,
which must be specialized for each equation.
For the derivation of the dissipation matrix for the multi-ion GLM-MHD equations, see:
- A. Rueda-Ramírez, A. Sikstel, G. Gassner, An Entropy-Stable Discontinuous Galerkin Discretization
of the Ideal Multi-Ion Magnetohydrodynamics System (2024). Journal of Computational Physics.
[DOI: 10.1016/j.jcp.2024.113655](https://doi.org/10.1016/j.jcp.2024.113655).
"""
struct DissipationEntropyStable{MaxAbsSpeed}
struct DissipationLaxFriedrichsEntropyVariables{MaxAbsSpeed}
max_abs_speed::MaxAbsSpeed
end

DissipationEntropyStable() = DissipationEntropyStable(max_abs_speed_naive)
DissipationLaxFriedrichsEntropyVariables() = DissipationLaxFriedrichsEntropyVariables(max_abs_speed_naive)

function Base.show(io::IO, d::DissipationEntropyStable)
print(io, "DissipationEntropyStable(", d.max_abs_speed, ")")
function Base.show(io::IO, d::DissipationLaxFriedrichsEntropyVariables)
print(io, "DissipationLaxFriedrichsEntropyVariables(", d.max_abs_speed, ")")
end

"""
Expand Down
2 changes: 1 addition & 1 deletion test/test_tree_2d_mhdmultiion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ end
0.003287251595115295
],
surface_flux=(FluxPlusDissipation(flux_ruedaramirez_etal,
DissipationEntropyStable()),
DissipationLaxFriedrichsEntropyVariables()),
flux_nonconservative_ruedaramirez_etal))
# Ensure that we do not have excessive memory allocations
# (e.g., from type instabilities)
Expand Down
2 changes: 1 addition & 1 deletion test/test_type.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ isdir(outdir) && rm(outdir, recursive = true)
one(RealT),
one(RealT),
one(RealT))
dissipation_es = DissipationEntropyStable()
dissipation_es = DissipationLaxFriedrichsEntropyVariables()
orientations = [1, 2]

@test eltype(@inferred initial_condition_weak_blast_wave(x, t, equations)) ==
Expand Down

0 comments on commit 3e5e2c2

Please sign in to comment.