# FEniCS: separate boundary conditions in normal and tangential direction of mesh boundary

Given a vector-valued PDE, I'd like to enforce the boundary conditions $$\vec{n}\cdot u = g\\ \vec{n}\cdot \nabla (\vec{t}\cdot u) = 0$$ on the solution $\vec{u}$. If the boundary happens to align with one of the coordinate axes, I could use

bcs = DirichletBC(V.sub(0), g, 'on_boundary')


as Dirichlet condition. What to do for other geometries though?