In the middle of my code I have something like
F = inner(grad(u)+(w1, w2), grad(v))*dx
where (w1, w2) is a vector field where w1 and and w2 are scalar functions of x, y, and u, with x and y defined as
x = Expression("x[0]")
y = Expression("x[1]").
I get the error "can't multiply sequence by non-int of type 'Sum' "
I've seen people define vector fields as
vf = Expression(('x[0]**2', 'x[1]**2'))
but how do I do that when I need to have something like
vf = Expression(('u*x[0]', 'u*x[1]'))?