See the links in: Marking the boundaries of a 2D mesh for a mixed function-space problem - #4 by dokken