In Dolfin, the nodes of your mesh and your degrees of freedom are decoupled (this is why you can have for instance a CG 2 interface on a linear triangle mesh).
This means that you should mark the facets (this can be done using subdomains).
You can also use the pointwise
method, see: Boundary conditions on edges or nodes - #6 by dokken