Refactor create_value_fenics for source and fluxes#750
Merged
RemDelaporteMathurin merged 8 commits intoApr 29, 2024
Merged
Conversation
10 tasks
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## fenicsx #750 +/- ##
===========================================
- Coverage 98.49% 98.42% -0.08%
===========================================
Files 28 28
Lines 1532 1519 -13
===========================================
- Hits 1509 1495 -14
- Misses 23 24 +1 ☔ View full report in Codecov by Sentry. |
create_value_fenics for source and fluxescreate_value_fenics for source and fluxes
jhdark
reviewed
Apr 27, 2024
jhdark
approved these changes
Apr 27, 2024
Collaborator
jhdark
left a comment
There was a problem hiding this comment.
We're going to be looking into how to replace all of these create_value_fenics into a simpler global function, but at least this cleans things up for now and theoretically should give us better errors since we're no longer interpolating onto further functions. It might be worth retesting some of the MMS tests to see if we can lower the L2 error threshold as a results of this.
Co-authored-by: James Dark <65899899+jhdark@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Based on a discussion I had with @jhdark we realised that we only needed to interpolate values onto a Function for dirichletBCs (and maybe InitialConditions). For fluxes and sources, since those are added into the formulation we can just put space-time dependent expressions as a ufl Expression, moreover it doesn't need to be updated in this case.
This is a first step towards #749
Types of changes
What types of changes does your code introduce to FESTIM?
Checklist