Skip to content

Commit

Permalink
Increase type stab, avoid allocs (#1642)
Browse files Browse the repository at this point in the history
* Increase type stab, avoid allocs

* format

* test seems no longer broken

* only essentials

Co-authored-by: Hendrik Ranocha <[email protected]>
  • Loading branch information
DanielDoehring and ranocha authored Sep 20, 2023
1 parent a64004d commit 7e22898
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
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

0 comments on commit 7e22898

Please sign in to comment.