The melting of asteroids and the origin of meteorites