-
Notifications
You must be signed in to change notification settings - Fork 120
Use variable name have_nonconservative_terms
everywhere
#2400
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
base: main
Are you sure you want to change the base?
Conversation
Review checklistThis 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. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2400 +/- ##
=======================================
Coverage 96.95% 96.95%
=======================================
Files 504 504
Lines 41721 41721
=======================================
Hits 40448 40448
Misses 1273 1273
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -26,12 +26,12 @@ isdir(outdir) && rm(outdir, recursive = true) | |||
GC.@preserve u_ode du_ode begin | |||
u = Trixi.wrap_array(u_ode, semi) | |||
du = Trixi.wrap_array(du_ode, semi) | |||
nonconservative_terms = Trixi.have_nonconservative_terms(semi.equations) | |||
have_nonconservative_terms = Trixi.have_nonconservative_terms(semi.equations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the reason why we chose another name: you cannot assign the result of have_nonconservative_terms(equations)
(as we write it in the main src
of Trixi.jl) to a variable with the same name as the function. Why do you want to change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out!
There was no specific reason, just search and replace.
I wonder why it worked though.
Anyways, I can just revert this change and similar ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works here since Trixi.have_nonconservative_terms(semi.equations)
is specified by module name explicitly. In contrast, have_nonconservative_terms = have_nonconservative_terms(semi.equations)
like we would write it in src
does not work.
We should keep the variable names consistent throughout our code base. I wouldn't change it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright!
Thanks for explaining!
Co-authored-by: Hendrik Ranocha <[email protected]>
resolves #2386