-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add numerical support of other real types (compressible_euler
)
#1947
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 #1947 +/- ##
==========================================
+ Coverage 96.14% 96.16% +0.02%
==========================================
Files 460 460
Lines 36926 36950 +24
==========================================
+ Hits 35499 35530 +31
+ Misses 1427 1420 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Why do CI tests seem so vulnerable here? CI tests could be easily passed locally https://github.com/huiyuxie/Trixi.jl/actions/runs/9135929568 and it seems like there is something wrong with the token in the upstream. |
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.
LGTM so far, thanks!
It's a Codecov issue for PRs from forks to open-source repositories, see #1905 and codecov/feedback#301 |
@ranocha Please check the new push in the first PR (sample test). The small amount of test data seems odd to me or maybe we can opt for a random data generator to feed the functions? I have tested the modified parts, but should I test all the functions even if they were not touched? BTW, the formatter looks bad to me, the code looks even worse after formatting - someone has to adjust the parameters for the current formatter. Could you please provide your benchmark results for |
That PR has too many comments so I comment here. |
It starts to become messy if we discuss stuff about another PR here, so take everything with a grain of salt since I may be confused.
I would like to avoid randomness (or at least print the values that are used for randomized testing so that debugging becomes possible).
At least the modified parts should be tested. You can also use a test-driven workflow and start adding new tests ( |
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. This looks good so far. I think it would be good to wait until the other PR is merged to get the infrastructure for unit tests
Hi @huiyuxie! Thanks for your contributions. We have merged your other PR setting up the testing infrastructure. Thus, you can go ahead and add tests in this PR as well. Please also add your name to our list of authors in https://github.com/trixi-framework/Trixi.jl/blob/main/AUTHORS.md |
Thanks for the review! Please wait as I am still busy with some other things these days ;) |
test/test_type.jl
Outdated
@test eltype(@inferred cons2prim(u, equations)) == RealT | ||
@test eltype(@inferred prim2cons(u, equations)) == RealT | ||
# TODO: There is a bug in the `entropy` function | ||
# @test eltype(@inferred entropy(u, equations)) == RealT |
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.
Trixi.jl/src/equations/compressible_euler_quasi_1d.jl
Lines 315 to 321 in 8665300
@inline function entropy(u, equations::CompressibleEulerEquationsQuasi1D) | |
a_rho, a_rho_v1, a_e, a = u | |
q = a * entropy(SVector(a_rho, a_rho_v1, a_e) / a, | |
CompressibleEulerEquations1D(equations.gamma)) | |
return SVector(q[1], q[2], q[3], a) | |
end |
The entropy
for CompressibleEulerEquations1D
does not return as a vector. Who was doing the code review?Seriously this is an apparent bug :(
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. Please find below some comments
Would it be good to open an issue for this #1947 (comment)? For later change it back to integer 0 |
@huiyuxie I am fairly busy this week and at a conference the next week. When do you need this review by? |
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 a lot! Could you please add your name to the list of authors?
I think there is no need for you to review this PR. |
@jlchan Good luck! |
Co-authored-by: Hendrik Ranocha <[email protected]>
Fine, overall it is not a big issue. Moving the whole process forward is much more important to me - this PR looks like holding up other PRs for a long time. I will fix the former check issues directly in this PR. |
Name added. Ready for final review and approval of merge @ranocha. |
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 a lot!
compressible_euler
)
Continue #1909.
Tasks: