DirichletBC.dof_indices() are wrong for blocked spaces#3937
Conversation
|
Looks like |
It is being applied twice, but it also assumes that the initial dofs are unrolled, meaning that it captures too many degrees of freedom as owned. So there are two different things that can cause issues at the moment. |
|
Good catch. But what is |
It still returns the number of unrolled dofs, as it is multiplied by |
Ah right, missed the multiplication later somewhere in constructor... This is good to merge as a bugfix, but unrelated to this PR, returning an array and number of owned elements in the array is not a common dolfinx pattern, isn't it? We've always relied on user figuring this out. |
For blocked function spaces,
locate_dofs_topologicalandDirichletBCassumes blocked indices.However, the private functions
num_ownedassumes that the dofs are unrolled, which makes the number of owned indices returned byDirichletBC::dof_indiceswrong.