-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
Interpolation to and from sub-meshes for co-dimension 0 #3114
Merged
Conversation
This file contains 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
Fixes for expression interpolation + tests
…lation of round-off errors
jhale
approved these changes
Mar 25, 2024
garth-wells
previously requested changes
Apr 8, 2024
Co-authored-by: Garth N. Wells <[email protected]>
@garth-wells i’ve tried to address your comments. |
jorgensd
commented
Apr 10, 2024
jhale
reviewed
Apr 22, 2024
jhale
reviewed
Apr 22, 2024
jhale
reviewed
Apr 22, 2024
jorgensd
changed the title
Interpolation to and from sub-meshes
Interpolation to and from sub-meshes for co-dimension 0
Apr 22, 2024
All tests now pass. I've tried to address all comments. |
jhale
dismissed
garth-wells’s stale review
April 23, 2024 08:00
All comments through two rounds of review have been addressed.
jhale
added a commit
that referenced
this pull request
Apr 24, 2024
* First attempt on submesh interpolation * ADd some more conversion * UPdate more interfaces * Expose python arrays of mappings to C++. Fixes for expression interpolation + tests * Add more asserts to please mypy * Fix C++ interface * Set some default zero-spans in C++ + fix hyperelasticity demo * Set atol depending on default floating type * Use exact solution on submesh when interpolating back to avoid accumulation of round-off errors * Use exact solution in mapping back due to same issue * Less strict tolerance * Apply suggestions from code review Co-authored-by: Garth N. Wells <[email protected]> * Add default arguments in C++ and add documentation to tests * Fix submesh C++ wrapping * Renaming + updating docstring * Fix conversion of u * More renaming * Fix documentation * Apply suggestions from code review Remove empty comment * Improve documentation Co-authored-by: Joe Dean <[email protected]> * Ruff format docstring * Try less strict atol * Modify test to avoid squaring functions * Ruff formatting * Scatter forward data * Modify test again * Try scaling down gradient * Fix test * clang-format --------- Co-authored-by: Garth N. Wells <[email protected]> Co-authored-by: Joe Dean <[email protected]> Co-authored-by: Jack S. Hale <[email protected]>
garth-wells
reviewed
Apr 26, 2024
|
||
# Map from parent to sub mesh | ||
|
||
u_sub.interpolate(parent_expr, expr_mesh=mesh, cell_map=sub_to_parent) |
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.
The CI deadlock https://github.com/FEniCS/dolfinx/actions/runs/8838261829 is triggered by this line.
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.
A feature that is quite neat for post-processing, as one often only wants to visualize on a sub mesh.
Can also be used to avoid mixed-assembly in cases of iterative schemes:
There is a slight API change in the C++ interface, as expressions need the associated mesh to be supplied.
In Python, the API only changes if you want to map between meshes.