Spin configurations in circular and rectangular vertical quantum dots in a magnetic field : Three-dimensional self-consistent simulations