Fenicsx method, which is equaivalent to dofmap().dofs() in fenics

See Get velocity field at a boundary - #2 by dokken

But please that real elements are not supported in DOLFINX yet