Nonadiabaticity in mirror machines