Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase type stab, avoid allocs #1642

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/solvers/dgsem_unstructured/dg_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ function calc_boundary_flux_by_type!(cache, t, BCs::Tuple{}, BC_indices::Tuple{}
nothing
end

function calc_boundary_flux!(cache, t, boundary_condition, boundary_indexing,
function calc_boundary_flux!(cache, t, boundary_condition::BC, boundary_indexing,
mesh::UnstructuredMesh2D, equations,
surface_integral, dg::DG)
surface_integral, dg::DG) where {BC}
@unpack surface_flux_values = cache.elements
@unpack element_id, element_side_id = cache.boundaries

Expand Down
6 changes: 1 addition & 5 deletions test/test_threaded.jl
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,7 @@ Trixi.mpi_isroot() && isdir(outdir) && rm(outdir, recursive=true)
t = sol.t[end]
u_ode = sol.u[end]
du_ode = similar(u_ode)
if (Threads.nthreads() < 2) || (VERSION < v"1.9")
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 5000
else
@test_broken (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 5000
end
@test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 5000
end
end

Expand Down
Loading