From fd77c7c377b177808ae99b6770b26530a983cb28 Mon Sep 17 00:00:00 2001 From: Huiyu Xie Date: Mon, 30 Sep 2024 08:38:02 -1000 Subject: [PATCH] Fix the bad code with mixed use of variable scope (#2092) * fix * fix again --- examples/tree_1d_dgsem/elixir_burgers_rarefaction.jl | 5 +---- examples/tree_1d_dgsem/elixir_burgers_shock.jl | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/examples/tree_1d_dgsem/elixir_burgers_rarefaction.jl b/examples/tree_1d_dgsem/elixir_burgers_rarefaction.jl index d32b9d6f1f4..843d8a7aa4c 100644 --- a/examples/tree_1d_dgsem/elixir_burgers_rarefaction.jl +++ b/examples/tree_1d_dgsem/elixir_burgers_rarefaction.jl @@ -43,10 +43,7 @@ end ############################################################################### # Specify non-periodic boundary conditions -function inflow(x, t, equations::InviscidBurgersEquation1D) - return initial_condition_rarefaction(coordinate_min, t, equations) -end -boundary_condition_inflow = BoundaryConditionDirichlet(inflow) +boundary_condition_inflow = BoundaryConditionDirichlet(initial_condition_rarefaction) function boundary_condition_outflow(u_inner, orientation, normal_direction, x, t, surface_flux_function, diff --git a/examples/tree_1d_dgsem/elixir_burgers_shock.jl b/examples/tree_1d_dgsem/elixir_burgers_shock.jl index 1f0b0e7e042..09c6cee9f98 100644 --- a/examples/tree_1d_dgsem/elixir_burgers_shock.jl +++ b/examples/tree_1d_dgsem/elixir_burgers_shock.jl @@ -43,10 +43,7 @@ end ############################################################################### # Specify non-periodic boundary conditions -function inflow(x, t, equations::InviscidBurgersEquation1D) - return initial_condition_shock(coordinate_min, t, equations) -end -boundary_condition_inflow = BoundaryConditionDirichlet(inflow) +boundary_condition_inflow = BoundaryConditionDirichlet(initial_condition_shock) function boundary_condition_outflow(u_inner, orientation, normal_direction, x, t, surface_flux_function,