Magnetocaloric effect and its relation to shape-memory properties in ferromagnetic Heusler alloys