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

Avoid PETSc segfaults due to DMCollection #468

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

sblauth
Copy link
Owner

@sblauth sblauth commented Jul 11, 2024

The PETScDMCollection can still be used with newer versions of PETSc / petsc4py.
However, using .createVecs or similar cannot be done on the transfer matrix. The matrix can, however, still be multiplied, which is all we need.

There, calling transfer_matrix.createVecs() was causing segfaults.
However, the matrix could still be used for multiplication, which works just fine

The call to createVecs was unnecessary, and thus removed.
Replace calls to `getVec...` with `createVec` for better petsc4py / PETSc match
Refactor the way the transfer matrix is used for the global deformation (createVec does not have to be called here)
@sblauth sblauth added bug Something isn't working development labels Jul 11, 2024
@sblauth sblauth self-assigned this Jul 11, 2024
@sblauth sblauth closed this Jul 11, 2024
@sblauth sblauth reopened this Jul 11, 2024
@sblauth sblauth changed the base branch from main to hotfix/2.1.4 July 11, 2024 09:28
@sblauth
Copy link
Owner Author

sblauth commented Jul 11, 2024

Note: Some tests will fail - this is due to the fact that we merge this onto v2.1.3.

@sblauth sblauth merged commit 94eaf8f into hotfix/2.1.4 Jul 11, 2024
36 of 38 checks passed
@sblauth sblauth deleted the fix/interpolation_matrix branch July 11, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant