Closed twmr closed 1 year ago
The point is that when you work with mixed spaces, and want to locate dofs using their dof coordinates (the geometrical method), you need to use a collapsed sub space: i.e.:
dofs = fem.locate_dofs_geometrical(
(V.sub(0), V.sub(0).collapse()[0]),
lambda x: np.isclose(x[0], 0.0) | np.isclose(x[0], 1.0),
)
print(dofs)
works.
How to reproduce the bug
When
locate_dofs_geometrical
is used for a function space that is a mixed-functionspace or a subspace of a mixed-functionspace, contradictory error messages are output.Minimal Example (Python)
Output (Python)
No response
Version
0.5.1
DOLFINx git commit
No response
Installation
No response
Additional information
No response