Please supply a minimal working example that illustrates what you would like to achieve.
Note that there are many examples on how to apply boundary conditions on the forum. See for instance: Transitioning from mesh.xml to mesh.xdmf, from dolfin-convert to meshio