Skip to content

Properly compress initial pressure vector#6938

Merged
gassmoeller merged 1 commit into
geodynamics:mainfrom
gassmoeller:properly_compress_initial_pressure_solution
Apr 24, 2026
Merged

Properly compress initial pressure vector#6938
gassmoeller merged 1 commit into
geodynamics:mainfrom
gassmoeller:properly_compress_initial_pressure_solution

Conversation

@gassmoeller
Copy link
Copy Markdown
Member

Working through a few more issues discovered as part of #6910.

The function Utilities::project_cellwise writes into all Dofs of a solution vector, but does not call compress afterwards. 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, while TpetraWrappers::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?)

Copy link
Copy Markdown
Member

@tjhei tjhei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed!

@gassmoeller
Copy link
Copy Markdown
Member Author

/rebuild

@gassmoeller gassmoeller merged commit 197f84a into geodynamics:main Apr 24, 2026
13 of 14 checks passed
@gassmoeller gassmoeller deleted the properly_compress_initial_pressure_solution branch April 24, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants