magnetic energies