Helmholtz Decomposition in n dimensions