Skip to content

Conversation

@pbrubeck
Copy link
Contributor

@pbrubeck pbrubeck commented Nov 4, 2025

Description

Fixes #4687

Depends on https://gitlab.com/petsc/petsc/-/merge_requests/8860 to trigger preconditioner update for a MatNest with more than one field on a block of the fieldsplit.

Also fixes fieldsplit for AssembledMatrix with bcs

Cleanup create_subdm in dmhooks.py

@pbrubeck pbrubeck force-pushed the pbrubeck/fix/nest-fieldsplit branch from 7c9dfcc to aaabace Compare November 4, 2025 17:24
@pbrubeck pbrubeck changed the title Fieldsplit: update MatNest Jacobian Fieldsplit: update MatNest Jacobian and support bcs on AssembledMatrix Nov 4, 2025
@pbrubeck pbrubeck force-pushed the pbrubeck/fix/nest-fieldsplit branch from abddfda to 4ab9490 Compare November 21, 2025 09:49
if bc_temp is not None:
bcs.append(bc_temp)

return AssembledMatrix(form or tuple(args), tuple(bcs), submat)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we know what form is then this should be a Matrix, not an AssembledMatrix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe we should have a dispatcher mechanism get_matrix that decides which subclass to return

@pbrubeck pbrubeck force-pushed the pbrubeck/fix/nest-fieldsplit branch from 9f34240 to 754750b Compare December 15, 2025 16:29
@pbrubeck pbrubeck force-pushed the pbrubeck/fix/nest-fieldsplit branch from 754750b to 0a3fa46 Compare December 16, 2025 09:33
elif isinstance(bc, EquationBCSplit):
row_field, col_field = argument_indices
bc_temp = bc.reconstruct(field=field, V=V, row_field=row_field, col_field=col_field, use_split=True)
bc_temp = None
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
bc_temp = None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants