Variational Approach to Vector Field Decomposition