Skip to content

Commit

Permalink
Avoid slicing (#1637)
Browse files Browse the repository at this point in the history
Co-authored-by: Hendrik Ranocha <[email protected]>
  • Loading branch information
DanielDoehring and ranocha authored Sep 13, 2023
1 parent bc67361 commit 547556d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion examples/p4est_2d_dgsem/elixir_navierstokes_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ end
initial_condition = initial_condition_navier_stokes_convergence_test

# BC types
velocity_bc_top_bottom = NoSlip((x, t, equations) -> initial_condition_navier_stokes_convergence_test(x, t, equations)[2:3])
velocity_bc_top_bottom = NoSlip() do x, t, equations
u = initial_condition_navier_stokes_convergence_test(x, t, equations)
return SVector(u[2], u[3])
end
heat_bc_top_bottom = Adiabatic((x, t, equations) -> 0.0)
boundary_condition_top_bottom = BoundaryConditionNavierStokesWall(velocity_bc_top_bottom, heat_bc_top_bottom)

Expand Down
5 changes: 4 additions & 1 deletion examples/p4est_3d_dgsem/elixir_navierstokes_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ end
initial_condition = initial_condition_navier_stokes_convergence_test

# BC types
velocity_bc_top_bottom = NoSlip((x, t, equations) -> initial_condition_navier_stokes_convergence_test(x, t, equations)[2:4])
velocity_bc_top_bottom = NoSlip() do x, t, equations
u = initial_condition_navier_stokes_convergence_test(x, t, equations)
return SVector(u[2], u[3], u[4])
end
heat_bc_top_bottom = Adiabatic((x, t, equations) -> 0.0)
boundary_condition_top_bottom = BoundaryConditionNavierStokesWall(velocity_bc_top_bottom, heat_bc_top_bottom)

Expand Down

0 comments on commit 547556d

Please sign in to comment.