I have a 2D PDE of the form:
$$ \frac{\partial^2 A}{\partial y^2} + \frac{1}{y}\frac{\partial A}{\partial y} + \frac{\partial^2 A}{\partial x^2} = - J $$
And I would like to generate the vector function:
$$ \vec{B} = \frac{\partial (y A)}{\partial y} \hat{x} - \frac{\partial A}{\partial x} \hat{y}$$
I gather that I can find the components of the gradient of A by using "split"
grad_A = project(grad(A), VectorFunctionSpace(mesh, "Lagrange", degree)
grad_A_x, grad_A_y = grad_A.split(deepcopy=True)
But I am unsure of how to form the vector function B ...