Skip to content

Commit

Permalink
Remove default routine for get_boundary_outer_state
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Nov 23, 2023
1 parent 1b2ce66 commit e2fd3a5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ initial_condition = initial_condition_mach3_flow
return flux
end

@inline function Trixi.get_boundary_outer_state(u_inner, cache, t,
boundary_condition::typeof(boundary_condition_supersonic_inflow),
normal_direction::AbstractVector, direction,
equations,
dg::DG, indices...)
x = Trixi.get_node_coords(cache.elements.node_coordinates, equations, dg, indices...)

return initial_condition(x, t, equations)
end

# Supersonic outflow boundary condition.
# Calculate the boundary flux entirely from the internal solution state. Analogous to supersonic inflow
# except all the solution state values are set from the internal solution as everything leaves the domain
Expand All @@ -59,6 +69,13 @@ end
return flux
end

@inline function Trixi.get_boundary_outer_state(u_inner, cache, t,
boundary_condition::typeof(boundary_condition_outflow),
orientation_or_normal, direction, equations,
dg, indices...)
return u_inner
end

# boundary_condition_inflow_outflow = BoundaryConditionCharacteristic(initial_condition)

# boundary_conditions = Dict(:Bottom => boundary_condition_slip_wall,
Expand Down
1 change: 1 addition & 0 deletions src/equations/compressible_euler_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ end
# Get inverse of density
srho = 1 / u_inner[1]

# Get normal velocity
vn = srho * (normal_direction[1] * u_inner[2] + normal_direction[2] * u_inner[3]) /
norm(normal_direction)

Expand Down
7 changes: 0 additions & 7 deletions src/solvers/dgsem_tree/dg_2d_subcell_limiters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1850,13 +1850,6 @@ end
u_inner[4])
end

# Default implementation of `get_boundary_outer_state` returns inner value.
@inline function get_boundary_outer_state(u_inner, cache, t, boundary_condition,
orientation_or_normal, direction, equations,
dg, indices...)
return u_inner
end

@inline function get_boundary_outer_state(u_inner, cache, t,
boundary_condition::BoundaryConditionDirichlet,
orientation_or_normal, direction, equations,
Expand Down

0 comments on commit e2fd3a5

Please sign in to comment.