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

If-condition could cause performance issues with CurvedMesh #519

Open
Tracked by #720
efaulhaber opened this issue Apr 7, 2021 · 0 comments
Open
Tracked by #720

If-condition could cause performance issues with CurvedMesh #519

efaulhaber opened this issue Apr 7, 2021 · 0 comments
Labels
performance We are greedy

Comments

@efaulhaber
Copy link
Member

In #514, the code

if left_element <= 0 # left_element = 0 at boundaries
  return surface_flux_values
end

is introduced in solvers/dg_curved/dg_2d.jl.

This is quite a bit slower than without the condition for LSA, but for some reason a bit faster for compressible Euler.

This benchmark can be used to investigate the difference:

using Trixi
using BenchmarkTools
trixi_include("examples/2d/elixir_euler_source_terms_curved.jl")

u = Trixi.wrap_array(sol.u[begin], semi)

@benchmark Trixi.calc_interface_flux!($u, $mesh, $equations, $solver, $semi.cache)
@ranocha ranocha added the performance We are greedy label Apr 8, 2021
@ranocha ranocha mentioned this issue Aug 4, 2021
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance We are greedy
Projects
None yet
Development

No branches or pull requests

2 participants