Validate BCs for distinct matrix spaces sharing a dofmap#4255
Conversation
c004515 to
00a158a
Compare
|
I narrowed the validation after CI showed that general different-degree and submesh Petrov-Galerkin assembly with BCs is supported and already covered by tests. The current check now targets only equivalent same-mesh spaces represented by distinct FunctionSpace objects, and it is bypassed for recursive MatNest sub-block assembly so existing block formulations are not rejected. |
00a158a to
bb8ae42
Compare
|
Fixed the CI issues: the BC validation helper now checks the C++ finite-element signature instead of calling the Python-only ufl_element(), and petsc.py has been formatted locally with Ruff. |
bb8ae42 to
59833d1
Compare
|
Updated again after the latest CI results. The validation is now limited to distinct spaces that share the same dofmap, which keeps the existing submesh and mixed-domain assembly tests valid. I also updated the mypy ignore for the private recursive MatNest call and verified Ruff plus the separate CI-style mypy commands locally. |
Reject Dirichlet boundary conditions for standalone matrix assembly when the test and trial spaces are distinct FunctionSpace objects but share the same dofmap, as produced by FunctionSpace.clone(). In this case BC row/column zeroing can happen without a diagonal insertion because diagonal handling currently depends on identical test and trial spaces.\n\nThe check is intentionally limited to shared-dofmap spaces so separately-created equivalent spaces and mixed-domain/submesh assemblies remain supported. It is skipped for recursive PETSc MatNest sub-block assembly so existing block and mixed formulations continue to work.\n\nAdds regression coverage for both MatrixCSR and PETSc assembly.\n\nSplit out from #4249 per maintainer request.