On the use of the magnetic vector potential in the nodal and edge finite element analysis of 3D magnetostatic problems