Hysteresis in Shape-Memory Materials