-
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 flexibility to nonconservative BCs #2200
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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2200 +/- ##
==========================================
- Coverage 96.87% 96.87% -0.01%
==========================================
Files 490 490
Lines 39463 39485 +22
==========================================
+ Hits 38229 38248 +19
- Misses 1234 1237 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
According to the way this feature has been implemented, the functions |
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 tackling this @MarcoArtiano! The functionality works as discussed where it is on the user to put in the boundary conditions for the conservative and nonconservative terms and then combine them appropriately, i.e., scaling noncons
with 0.5f0
. This is the only aspect I am not a huge fan of, as it is related to how the nonconservative terms are implemented at interfaces and has nothing to do with boundary conditions.
Because of this, we should maybe document where this factor of 0.5f0
magically comes from in the new boundary condition routines (as it was documented beofre inside the compute boundary flux call).
What do you think @patrickersing ?
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 this! The only thing that I suggest is using the little more verbose noncons_flux
instead of noncons
.
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Patrick Ersing <114223904+patrickersing@users.noreply.github.com>
Co-authored-by: Patrick Ersing <114223904+patrickersing@users.noreply.github.com>
Co-authored-by: Patrick Ersing <114223904+patrickersing@users.noreply.github.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
Co-authored-by: Daniel Doehring <doehringd2@gmail.com>
What's the status of this PR? We will have a breaking release soon and it would be nice to include this improvement. |
I will review it again today, but the feature itself has converged quite well. We have mainly been making small adjustments to the comments. It should (more or less) be good to go. What do you think @patrickersing ? |
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!
I will add the docs today and commit the last few changes. After that everything should be fine, as already mentioned by @andrewwinters5000. |
Yes, there are only a few minor changes remaining. So from my end this is ready to merge, once these have been addressed. |
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
0e09a32
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
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.
Could you please also add a NEWS.md entry in the section of stuff that changed when updating to Trixi.jl v0.10?
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!
@inline function (::BoundaryConditionDoNothing)(u_inner, | ||
orientation_or_normal_direction, | ||
direction::Integer, x, t, | ||
surface_flux_functions::Tuple, | ||
equations) | ||
surface_flux_function, nonconservative_flux_function = surface_flux_functions | ||
return surface_flux_function(u_inner, u_inner, | ||
orientation_or_normal_direction, equations), | ||
nonconservative_flux_function(u_inner, u_inner, | ||
orientation_or_normal_direction, equations) | ||
end |
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.
codecov reports this function to be uncovered. Could you add a test for this, please?
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.
...oh, was already merged in the same second 😅
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.
Sorry, didn't see that. @MarcoArtiano Could you please create a new PR with this test?
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.
Oh sorry, yes, I'm gonna make a PR soon.
This PR allows to have more flexibility when defining the boundary conditions for a set of equations with nonconservative terms. This issues has been discussed in #2175. Now the user can define his own boundary condition, considering that the function accepts both surface flux and the nonconservative flux. An example can be found in elixir_mhd_reflective_wall