I completely misrepresented my question earlier. I hope this is clear.
V = VectorFunctionSpace(mesh, "CG", 2)
Q = FunctionSpace(mesh, "CG", 1)
W = MixedFunctionSpace([V, Q])
v0 = Expression(('0.0', '0.0'))
# Set both components of V to zero
bc = DirichletBC(W.sub(0), v0, boundary)
My question:
Is it possible to set only first or second component to zero using DirichletBC ?
This is related to the question here: http://fenicsproject.org/qa/3412/constraint-component-vector-field-using-boundary-conditions