Skip to content
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

Cleanup reinit() of PETSc/Trilinos BlockVector. #14476

Merged
merged 2 commits into from Nov 29, 2022

Conversation

marcfehling
Copy link
Member

@marcfehling marcfehling commented Nov 26, 2022

  • n_blocks() returns an unsigned int. I matched types in loops.
  • resize() does nothing when called with same size. We don't need to check for differing sizes beforehand.
  • collect_sizes() updates the BlockIndices object. Although we can omit this part in assignment or copy operations, it's better to keep it up-to-date and rather be safe than sorry.
  • block(i) returns the i-th component. Depending on the context, I found it easier to read to use either block(i) or component[i].

@tamiko tamiko merged commit 46e385c into dealii:master Nov 29, 2022
@marcfehling marcfehling deleted the blockreinit branch November 29, 2022 03:12
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.

None yet

3 participants