Magnets in an electric vehicle