-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
separate boundary grad and value extrapolation, make grad default quadratic #4614
separate boundary grad and value extrapolation, make grad default quadratic #4614
Conversation
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 should probably also be listed under breaking changes in the changelog, even though it probably will not impact many users
agreed, will do |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4614 +/- ##
========================================
Coverage 99.21% 99.21%
========================================
Files 302 302
Lines 22857 22858 +1
========================================
+ Hits 22678 22679 +1
Misses 179 179 ☔ View full report in Codecov by Sentry. |
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.
Looks good, just a cosmetic suggestion in the CHANGELOG.
Co-authored-by: Ferran Brosa Planella <[email protected]>
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.
Re-approving after merging with the release branch
Description
Issue #4433 pointed out that the boundary gradient is only first-order accurate. This is by default true, though the option to make it quadratic exists. I ran into this doing something else.
I tried setting it to be default quadratic, but this caused many test failures, often related to the diffusivity becoming negative when extrapolated. I'm guessing users have tuned parameter sets to just barely work with linear extrapolation:
In any case, linear extrapolation for boundary values is less of a priority than for boundary gradients.
So, this pull request separates extrapolation methods for boundary gradient and boundary value, and sets the default to be quadratic for the gradient. This solves the issue discussed in #4433 while not breaking other parameter sets.
Here is the modified graph from #4433
Fixes #4433
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ pre-commit run
(or$ nox -s pre-commit
) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
(or$ nox -s tests
)$ python run-tests.py --doctest
(or$ nox -s doctests
)You can run integration tests, unit tests, and doctests together at once, using
$ python run-tests.py --quick
(or$ nox -s quick
).Further checks: