Properly compress initial pressure vector#6938
Merged
gassmoeller merged 1 commit intoApr 24, 2026
Merged
Conversation
Member
Author
|
/rebuild |
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.
Working through a few more issues discovered as part of #6910.
The function
Utilities::project_cellwisewrites into all Dofs of a solution vector, but does not callcompressafterwards. Two of the three places using this function called compress manually afterwards, but a third did not (in initial_conditions.cc:549, setting the initial pressure only for discontinuous pressure elements). I could have added the call to compress in the third calling place, but it seemed safer to just call it inside the utilities functions. Since this function performs a loop over all cells, the compress call should not be too expensive, compared to the work the function does.We did not notice this earlier, because
TrilinosVector::operator=does not complain when a not compressed vector is assigned to another vector, whileTpetraWrappers::Vector::operator=does check and complain. (this seems like a bug in deal.II as well, but since TrilinosVector will perspectively be replaced by the Tpetra Vector I am not sure it is worth fixing?)