  We study of the collapse of a magnetized spherical star to a black hole in
general relativity theory. The matter and gravitational fields are described by
the exact Oppenheimer-Snyder solution for the collapse of a spherical,
homogeneous dust ball. We adopt a ``dynamical Cowling approximation'' whereby
the matter and the geometry (metric), while highly dynamical, are unaffected by
the electromagnetic fields. The matter is assumed to be perfectly conducting
and threaded by a dipole magnetic field at the onset of collapse. We determine
the subsequent evolution of the magnetic and electric fields without
approximation; the fields are determined analytically in the matter interior
and numerically in the vacuum exterior. We apply junction conditions to match
the electromagnetic fields across the stellar surface. We use this model to
experiment with several coordinate gauge choices for handling spacetime
evolution characterized by the formation of a black hole and the associated
appearance of singularities. These choices range from ``singularity avoiding''
time coordinates to ``horizon penetrating'' time coordinates accompanied by
black hole excision. The later choice enables us to integrate the
electromagnetic fields arbitrarily far into the future. At late times the
longitudinal magnetic field in the exterior has been transformed into a
transverse electromagnetic wave; part of the electromagnetic radiation is
captured by the hole and the rest propagates outward to large distances. The
solution we present for our simple scenario can be used to test codes designed
to treat more general evolutions of relativistic MHD fluids flowing in strong
gravitational fields in dynamical spacetimes.
