I am currently trying to solve the following, vectorial Poisson equation using the FEM technique:
$$-\nabla^2 \vec{A}=\vec{J} \quad \forall x\in\Omega$$
Now I know in the case of the scalar Poisson equation $-\nabla^2 \varphi=\rho$ one can derive the weak form of the PDE by introducing a scalar test function $v$ which is multiplied with the PDE and integrated over $\Omega$ using integration by parts:
$$\int_{\Omega} (\nabla^2\varphi) v \mathrm{d}x=\int_{\partial\Omega} (\vec{\nabla}\varphi) v \mathrm{d}\vec{\omega}-\int_{\Omega} (\vec{\nabla}\varphi) \cdot(\vec{\nabla}v) \mathrm{d}x$$
My question is how this approach can be applied to the vectorial Poisson equation? In order to do so, one would have to integrate the following expression by parts (where $\vec{v}$ is a vectorial test function):
$$\int_{\Omega} (\nabla^2\vec{A})\cdot\vec{v} \mathrm{d}x$$
However, I am struggling to do this integration. I guess one would have to generalize the following identity for scalar functions $\varphi$
$$\vec{\nabla}\cdot(v\vec{\nabla}\varphi)=(\nabla^2\varphi) v+(\vec{\nabla}\varphi)\cdot(\vec{\nabla}v)$$
into an identity of the following form for vectorial functions $\vec{A}$
$$\vec{\nabla}\cdot(...)=(\nabla^2\vec{A})\vec{v}+(...)$$