Skip to content

Commit

Permalink
Remove unnecessary code; format
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Nov 27, 2023
1 parent 811fdbf commit ee2d331
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/solvers/dgsem_p4est/subcell_limiters_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,15 @@ function calc_bounds_twosided_interface!(var_min, var_max, variable, u, t, semi,

(; neighbor_ids, node_indices) = cache.interfaces
index_range = eachnode(dg)
index_end = last(index_range)

for interface in eachinterface(dg, cache)
# Get element and side index information on the primary element
primary_element = neighbor_ids[1, interface]
primary_indices = node_indices[1, interface]
primary_direction = indices2direction(primary_indices)

# Get element and side index information on the secondary element
secondary_element = neighbor_ids[2, interface]
secondary_indices = node_indices[2, interface]
secondary_direction = indices2direction(secondary_indices)

# Create the local i,j indexing
i_primary_start, i_primary_step = index_to_start_step_2d(primary_indices[1],
Expand Down
4 changes: 2 additions & 2 deletions src/solvers/dgsem_tree/dg_2d_subcell_limiters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,7 @@ end
normal_direction::AbstractVector,
direction, equations, dg, indices...)
factor = (normal_direction[1] * u_inner[2] + normal_direction[2] * u_inner[3])
u_normal = (factor / sum(normal_direction.^2)) * normal_direction
u_normal = (factor / sum(normal_direction .^ 2)) * normal_direction

return SVector(u_inner[1],
u_inner[2] - 2.0 * u_normal[1],
Expand Down Expand Up @@ -1888,7 +1888,7 @@ end
u_outer = boundary_condition.boundary_value_function(boundary_condition.outer_boundary_value_function,
u_inner,
normal_direction /
sum(normal_direction.^2),
sum(normal_direction .^ 2),
direction, x, t, equations)

return u_outer
Expand Down

0 comments on commit ee2d331

Please sign in to comment.