Closed efaulhaber closed 1 week ago
This checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging.
NEWS.md
with its PR number.Created with :heart: by the Trixi.jl community.
Attention: Patch coverage is 95.55556%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 96.16%. Comparing base (
5398b22
) to head (6c92dd1
). Report is 3 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
src/time_integration/methods_2N.jl | 94.74% | 2 Missing :warning: |
src/time_integration/methods_3Sstar.jl | 95.24% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Looks fine to me now. Thanks for the fix.
We see a huge amount of allocations in CI:
Okay, so the version on main
is apparently allocation-free for simulations where all semidiscretizations have the same mesh, equations, solver and cache type. Then
mesh_other, equations_other, solver_other, cache_other = mesh_equations_solver_cache(other_semi_index,
1,
semi_coupled.semis...)
is type-stable, as the types of the return values will be the same over all values of other_semi_index
. In cases where we have different equations or mesh types for the semidiscretizations, this allocates and is very slow, as it allocates inside a performance-relevant function.
The version in this PR always allocates, but one level higher, where the type-instability is not as performance-relevant.
Okay, new version.
Now I store boundary_condition.other_semi_index
statically in the type of the BoundaryConditionCoupled
, removing all type instabilities and allocations.
This is unbelievably ugly but I believe that @efaulhaber needs this quickly for a teaching project. IMHO OK to merge if @ranocha signs off as well.
Just to be clear: Thanks a lot to @efaulhaber for taking the time and figuring out how to make this allocation free. Your help is really appreciated!
Before:
Now: