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

Fix initialization of SolutionSavingCallback #456

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

efaulhaber
Copy link
Member

@efaulhaber efaulhaber commented Mar 10, 2024

Without the reset of latest_saved_iter, the SolutionSavingCallback can't be reused for a second simulation. Defining the callback in the REPL and passing it to trixi_include fails on main when running a second simulation with the same callback.

Also, there is no reason not to make this struct mutable, so we can get rid of the awkward "vector of size 1" approach.

@efaulhaber efaulhaber requested a review from LasNikas March 10, 2024 19:48
Copy link

codecov bot commented Mar 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 70.82%. Comparing base (fc108d6) to head (c3f2154).

Files Patch % Lines
src/callbacks/solution_saving.jl 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #456      +/-   ##
==========================================
- Coverage   70.84%   70.82%   -0.02%     
==========================================
  Files          66       66              
  Lines        3807     3808       +1     
==========================================
  Hits         2697     2697              
- Misses       1110     1111       +1     
Flag Coverage Δ
unit 70.82% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@efaulhaber efaulhaber added the bug Something isn't working label Mar 10, 2024
@efaulhaber efaulhaber added this to the 0.1 milestone Mar 10, 2024
@LasNikas LasNikas merged commit ba73913 into trixi-framework:main Mar 11, 2024
7 of 9 checks passed
@efaulhaber efaulhaber deleted the fix-reusing-saving-cb branch March 12, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants