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

Reuse pretty_form_utf #151

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Reuse pretty_form_utf #151

merged 1 commit into from
Sep 11, 2024

Conversation

JoshuaLampert
Copy link
Owner

I noticed that we define the pretty printing of some functions twice: Once for the AnalysisCallback and once in visualization.jl (and forgot, e.g. ,energy_total_modified in visualization.jl). In visualization.jl we only have access to the Symbol and not the function since this is what is stored in integrals(analysis_callback), but we can translate it to the function using getfield(@__MODULE__, name). However, most errors ($L^2$, $L^\infty$ and the conservation error) don't have a corresponding function (the lake-at-rest error on the other hand has). Thus, for simplicity, I just kept the current approach for the errors and define a pretty form in visualization.jl for the errors (this means it is redefined for the lake-at-rest error), but reuse the pretty form from the AnalysisCallback for the integrals. This means pretty_form_utf dispatches a bit strangely on functions and Symbols. I am open for a better suggestion, @ranocha.

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.78%. Comparing base (6dffbd9) to head (0a8be27).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #151      +/-   ##
==========================================
+ Coverage   97.67%   97.78%   +0.10%     
==========================================
  Files          18       18              
  Lines        1676     1667       -9     
==========================================
- Hits         1637     1630       -7     
+ Misses         39       37       -2     

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

Copy link
Collaborator

@ranocha ranocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit unusual but ok 👍 Thanks

@JoshuaLampert JoshuaLampert merged commit 6ab2051 into main Sep 11, 2024
17 checks passed
@JoshuaLampert JoshuaLampert deleted the pretty_form_utf branch September 11, 2024 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants