Update Expression for DirichletBC

value is then multi-dimensional, as for instance shown in:

# Define velocity field
class uExactDef(UserExpression):
    def __init__(self, t, **kwargs):
        super().__init__(kwargs)
        self._t = t

    def eval_cell(self, value, x, ufc_cell):
        value[0] = -self._t(x) * np.sin(2 * np.pi * (1 - x[1]))
        value[1] = Constant(0.0)

    def value_shape(self):
        return (2,)

as shown in: Same time dependent temperature problem in two different ways: one works, one doesn't. Why?