Magnetic containment field