-
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
Subcell limiting: Revise order of bounds using a Dict
#1649
Subcell limiting: Revise order of bounds using a Dict
#1649
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 lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1649 +/- ##
===========================================
+ Coverage 79.30% 93.23% +13.93%
===========================================
Files 419 419
Lines 34165 34143 -22
===========================================
+ Hits 27093 31833 +4740
+ Misses 7072 2310 -4762
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
After @efaulhaber 's suggestion from above, I directly implemented the variable I will push the change to use |
In later PRs, the order of bounds in
variable_bounds
can be very confusing.For instance, in the branch with all subcell limiting features, there is this code to get the right position in
variable_bounds
(see here):This PR now revises the implementation using a
Dict
, reducing the linked code to 2 only lines:The reason why it was so complicated earlier was, that I only allocate the bound arrays for variables which are actually limited. Moreover, if a variable is limited with both the positivity limiter and the local limiter, only the more restrictive bound should be saved, but both limiter should be able to access the saved bound. Therefore, I had to check for every positivity variable, whether the same variable is limited locally. In both cases, the location of the bound in
variable_bounds
is different.