In the electrical method of magnetisation, the polarity of the magnet depends on the