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.14"
Trixi = "0.15"
julia = "1.10"
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ HOHQMesh = "0.2"
Literate = "2.20"
OrdinaryDiffEqLowStorageRK = "1.3"
OrdinaryDiffEqSSPRK = "1.2"
Trixi = "0.14"
Trixi = "0.15"
Trixi2Vtk = "0.3.16"
TrixiBottomTopography = "0.1"
8 changes: 4 additions & 4 deletions docs/src/tutorials/elixir_shallowwater_monai_tsunami.jl
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,10 @@ end;
# are the default names provided by HOHQMesh. As per the problem definition,
# three of the domain boundaries are walls and the incident wave maker boundary condition
# implemented above is set at the `Left` domain
boundary_condition = Dict(:Bottom => boundary_condition_slip_wall,
:Top => boundary_condition_slip_wall,
:Right => boundary_condition_slip_wall,
:Left => boundary_condition_wave_maker);
boundary_condition = (; Bottom = boundary_condition_slip_wall,
Top = boundary_condition_slip_wall,
Right = boundary_condition_slip_wall,
Left = boundary_condition_wave_maker);

# For this application, we also need to model the bottom friction.
# Thus, we create a new source term, which adds a Manning friction term to the momentum equations.
Expand Down
5 changes: 3 additions & 2 deletions examples/dgmulti_1d/elixir_shallow_water_quasi_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ volume_flux = (flux_chan_etal, flux_nonconservative_chan_etal)
# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.
# Thus, we exchanged in PR#2458 of Trixi.jl the default wave speed used in the LLF flux and dissipation operator to `max_abs_speed`.
# To ensure that every example still runs we specify explicitly `DissipationLocalLaxFriedrichs(max_abs_speed_naive)`.
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# `StepsizeCallback` (CFL-Condition) and less diffusion.
surface_flux = (FluxPlusDissipation(flux_chan_etal,
DissipationLocalLaxFriedrichs(max_abs_speed_naive)),
Expand All @@ -31,7 +31,8 @@ mesh = DGMultiMesh(dg, cells_per_dimension,
coordinates_min = (0.0,), coordinates_max = (sqrt(2),),
periodicity = true)
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg;
source_terms = source_terms_convergence_test)
source_terms = source_terms_convergence_test,
boundary_conditions = boundary_condition_periodic)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
5 changes: 3 additions & 2 deletions examples/dgmulti_2d/elixir_shallowwater_source_terms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ volume_flux = (flux_wintermeyer_etal, flux_nonconservative_wintermeyer_etal)
# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.
# Thus, we exchanged in PR#2458 of Trixi.jl the default wave speed used in the LLF flux to `max_abs_speed`.
# To ensure that every example still runs we specify explicitly `FluxLaxFriedrichs(max_abs_speed_naive)`.
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# `StepsizeCallback` (CFL-Condition) and less diffusion.
surface_flux = (FluxLaxFriedrichs(max_abs_speed_naive), flux_nonconservative_fjordholm_etal)
dg = DGMulti(polydeg = 3, element_type = Quad(), approximation_type = SBP(),
Expand All @@ -28,7 +28,8 @@ mesh = DGMultiMesh(dg, cells_per_dimension,
periodicity = true)

semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg;
source_terms = source_terms_convergence_test)
source_terms = source_terms_convergence_test,
boundary_conditions = boundary_condition_periodic)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using Trixi
using TrixiShallowWater

###############################################################################
# Semidiscretization of the multilayer shallow water equations with a single layer and a bottom
# Semidiscretization of the multilayer shallow water equations with a single layer and a bottom
# topography function for a blast wave test with a wet/dry front with discontinuous initial conditions.
# This example combines the subcell limiter with a velocity desingularization callback to ensure
# robustness at wet/dry fronts.
Expand Down Expand Up @@ -36,10 +36,10 @@ end

initial_condition = initial_condition_blast_wave

boundary_condition = Dict(:x_neg => boundary_condition_slip_wall,
:y_neg => boundary_condition_slip_wall,
:x_pos => boundary_condition_slip_wall,
:y_pos => boundary_condition_slip_wall)
boundary_condition = (; x_neg = boundary_condition_slip_wall,
y_neg = boundary_condition_slip_wall,
x_pos = boundary_condition_slip_wall,
y_pos = boundary_condition_slip_wall)

###############################################################################
# Get the DG approximation space
Expand All @@ -66,7 +66,7 @@ solver = DGSEM(basis, surface_flux, volume_integral)
# Get the P4estMesh

coordinates_min = (0.0, 0.0) # minimum coordinates (min(x), min(y))
coordinates_max = (4.0, 4.0) # maximum coordinates (max(x), max(y))
coordinates_max = (4.0, 4.0) # maximum coordinates (max(x), max(y))

trees_per_dimension = (1, 1)

Expand Down Expand Up @@ -106,7 +106,7 @@ callbacks = CallbackSet(summary_callback, analysis_callback, alive_callback, sav

###############################################################################

# Setup the stage callbacks
# Setup the stage callbacks
stage_limiter! = VelocityDesingularization()
stage_callbacks = (SubcellLimiterIDPCorrection(), stage_limiter!)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ mesh = P4estMesh(trees_per_dimension, polydeg = 3,

# create the semi discretization object
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
source_terms = source_terms_convergence_test)
source_terms = source_terms_convergence_test,
boundary_conditions = boundary_condition_periodic)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ H_from_wave_maker(t::RealT) = spline_interpolation(h_spline_struct, t)
return flux, noncons_flux
end

boundary_condition = Dict(:Bottom => boundary_condition_slip_wall,
:Top => boundary_condition_slip_wall,
:Right => boundary_condition_slip_wall,
:Left => boundary_condition_wave_maker)
boundary_condition = (; Bottom = boundary_condition_slip_wall,
Top = boundary_condition_slip_wall,
Right = boundary_condition_slip_wall,
Left = boundary_condition_wave_maker)

# Manning friction source term
@inline function source_terms_manning_friction(u, x, t,
Expand Down Expand Up @@ -147,7 +147,7 @@ volume_flux = (flux_ersing_etal, flux_nonconservative_ersing_etal)
# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.
# Thus, we exchanged in PR#2458 of Trixi.jl the default wave speed used in the LLF flux and dissipation operator to `max_abs_speed`.
# To ensure that every example still runs we specify explicitly `DissipationLocalLaxFriedrichs(max_abs_speed_naive)`.
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# `StepsizeCallback` (CFL-Condition) and less diffusion.
surface_flux = (FluxHydrostaticReconstruction(FluxPlusDissipation(flux_ersing_etal,
DissipationLocalLaxFriedrichs(max_abs_speed_naive)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ end
initial_condition = initial_condition_perturbation

# Wall BCs
boundary_condition = Dict(:all => boundary_condition_slip_wall)
boundary_condition = (; all = boundary_condition_slip_wall)

###############################################################################
# Get the DG approximation space
Expand All @@ -60,7 +60,7 @@ volume_flux = (flux_ersing_etal, flux_nonconservative_ersing_etal)
# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.
# Thus, we exchanged in PR#2458 of Trixi.jl the default wave speed used in the LLF flux and dissipation operator to `max_abs_speed`.
# To ensure that every example still runs we specify explicitly `DissipationLocalLaxFriedrichs(max_abs_speed_naive)`.
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# `StepsizeCallback` (CFL-Condition) and less diffusion.
surface_flux = (FluxHydrostaticReconstruction(FluxPlusDissipation(flux_ersing_etal,
DissipationLocalLaxFriedrichs(max_abs_speed_naive)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ function boundary_condition_outflow(u_inner, normal_direction::AbstractVector, x
return flux, noncons_flux
end

boundary_conditions = Dict(:Bottom => boundary_condition_slip_wall,
:Top => boundary_condition_slip_wall,
:Right => boundary_condition_outflow,
:Left => boundary_condition_slip_wall)
boundary_conditions = (; Bottom = boundary_condition_slip_wall,
Top = boundary_condition_slip_wall,
Right = boundary_condition_outflow,
Left = boundary_condition_slip_wall)

###############################################################################
# Get the DG approximation space
Expand All @@ -95,7 +95,7 @@ volume_flux = (flux_ersing_etal, flux_nonconservative_ersing_etal)
# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.
# Thus, we exchanged in PR#2458 of Trixi.jl the default wave speed used in the LLF flux and dissipation operator to `max_abs_speed`.
# To ensure that every example still runs we specify explicitly `DissipationLocalLaxFriedrichs(max_abs_speed_naive)`.
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# `StepsizeCallback` (CFL-Condition) and less diffusion.
surface_flux = (FluxHydrostaticReconstruction(FluxPlusDissipation(flux_ersing_etal,
DissipationLocalLaxFriedrichs(max_abs_speed_naive)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ end

initial_condition = initial_condition_well_balancedness

boundary_condition = Dict(:all => boundary_condition_slip_wall)
boundary_condition = (; all = boundary_condition_slip_wall)

###############################################################################
# Get the DG approximation space
Expand All @@ -62,7 +62,7 @@ volume_flux = (flux_ersing_etal, flux_nonconservative_ersing_etal)
# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.
# Thus, we exchanged in PR#2458 of Trixi.jl the default wave speed used in the LLF flux and dissipation operator to `max_abs_speed`.
# To ensure that every example still runs we specify explicitly `DissipationLocalLaxFriedrichs(max_abs_speed_naive)`.
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# `StepsizeCallback` (CFL-Condition) and less diffusion.
surface_flux = (FluxHydrostaticReconstruction(FluxPlusDissipation(flux_ersing_etal,
DissipationLocalLaxFriedrichs(max_abs_speed_naive)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ end

initial_condition = initial_condition_perturbation

boundary_condition = Dict(:x_neg => boundary_condition_slip_wall,
:y_neg => boundary_condition_slip_wall,
:x_pos => boundary_condition_slip_wall,
:y_pos => boundary_condition_slip_wall)
boundary_condition = (; x_neg = boundary_condition_slip_wall,
y_neg = boundary_condition_slip_wall,
x_pos = boundary_condition_slip_wall,
y_pos = boundary_condition_slip_wall)

###############################################################################
# Get the DG approximation space
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ end
initial_condition = initial_condition_perturbation

# Wall BCs
boundary_condition = Dict(:all => boundary_condition_slip_wall)
boundary_condition = (; all = boundary_condition_slip_wall)

###############################################################################
# Get the DG approximation space
Expand Down
7 changes: 4 additions & 3 deletions examples/p4est_2d_dgsem/elixir_shallowwater_source_terms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ initial_condition = initial_condition_convergence_test # MMS EOC test
# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.
# Thus, we exchanged in PR#2458 of Trixi.jl the default wave speed used in the LLF flux to `max_abs_speed`.
# To ensure that every example still runs we specify explicitly `FluxLaxFriedrichs(max_abs_speed_naive)`.
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# `StepsizeCallback` (CFL-Condition) and less diffusion.
surface_flux = (FluxLaxFriedrichs(max_abs_speed_naive), flux_nonconservative_fjordholm_etal)
volume_flux = (flux_wintermeyer_etal, flux_nonconservative_wintermeyer_etal)
Expand All @@ -35,11 +35,12 @@ coordinates_max = (sqrt(2.0), sqrt(2.0)) # maximum coordinates (max(x), max(y))
trees_per_dimension = (8, 8)
mesh = P4estMesh(trees_per_dimension, polydeg = 3,
coordinates_min = coordinates_min, coordinates_max = coordinates_max,
initial_refinement_level = 1)
initial_refinement_level = 1, periodicity = true)

# A semidiscretization collects data structures and functions for the spatial discretization
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
source_terms = source_terms_convergence_test)
source_terms = source_terms_convergence_test,
boundary_conditions = boundary_condition_periodic)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ end

initial_condition = initial_condition_well_balancedness

boundary_condition = Dict(:all => boundary_condition_slip_wall)
boundary_condition = (; all = boundary_condition_slip_wall)

###############################################################################
# Get the DG approximation space
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ end

initial_condition = initial_condition_well_balancedness

boundary_condition = Dict(:all => boundary_condition_slip_wall)
boundary_condition = (; all = boundary_condition_slip_wall)

###############################################################################
# Get the DG approximation space
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ coordinates_max = (1.0, 1.0)

cells_per_dimension = (16, 16)

mesh = StructuredMesh(cells_per_dimension, coordinates_min, coordinates_max)
mesh = StructuredMesh(cells_per_dimension, coordinates_min, coordinates_max,
periodicity = true)

# Create the semi discretization object
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver)
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver;
boundary_conditions = boundary_condition_periodic)

###############################################################################
# ODE solver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ coordinates_max = (2.0, 2.0)

cells_per_dimension = (150, 150)

mesh = StructuredMesh(cells_per_dimension, coordinates_min, coordinates_max)
mesh = StructuredMesh(cells_per_dimension, coordinates_min, coordinates_max;
periodicity = true)

# create the semi discretization object
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver)
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver;
boundary_conditions = boundary_condition_periodic)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ initial_condition = initial_condition_convergence_test
# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.
# Thus, we exchanged in PR#2458 of Trixi.jl the default wave speed used in the LLF flux to `max_abs_speed`.
# To ensure that every example still runs we specify explicitly `FluxLaxFriedrichs(max_abs_speed_naive)`.
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# `StepsizeCallback` (CFL-Condition) and less diffusion.
surface_flux = (FluxLaxFriedrichs(max_abs_speed_naive), flux_nonconservative_fjordholm_etal)
volume_flux = (flux_wintermeyer_etal, flux_nonconservative_wintermeyer_etal)
Expand All @@ -28,10 +28,12 @@ coordinates_max = (sqrt(2.0), sqrt(2.0))

cells_per_dimension = (8, 8)

mesh = StructuredMesh(cells_per_dimension, coordinates_min, coordinates_max)
mesh = StructuredMesh(cells_per_dimension, coordinates_min, coordinates_max,
periodicity = true)

semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
source_terms = source_terms_convergence_test)
source_terms = source_terms_convergence_test,
boundary_conditions = boundary_condition_periodic)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
Loading