Skip to content

Commit

Permalink
reduce allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwinters5000 committed May 23, 2024
1 parent c39dc48 commit a807227
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/solvers/scratch_p4est.jl
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,12 @@ end
# solution state to recover the physical flux at this point because the surface flux
# has in-built mechanisms to avoid division by zero in dry regions whereas `Trixi.flux`
# does not have such mechanisms to desingularize the velocity computation.
flux_buffer[:, i] = surface_flux(cache.mortars.u[3, :, 1, i, mortar],
cache.mortars.u[3, :, 1, i, mortar],
flux_buffer[:, i] = surface_flux(view(cache.mortars.u, 3, :, 1, i, mortar),
view(cache.mortars.u, 3, :, 1, i, mortar),
normal_direction, equations)

noncons = nonconservative_flux(cache.mortars.u[3, :, 1, i, mortar],
cache.mortars.u[3, :, 1, i, mortar],
noncons = nonconservative_flux(view(cache.mortars.u, 3, :, 1, i, mortar),
view(cache.mortars.u, 3, :, 1, i, mortar),
normal_direction, normal_direction,
equations)

Expand Down

0 comments on commit a807227

Please sign in to comment.