  The first paper of this series presents a discretely entropy stable
discontinuous Galerkin (DG) method for the resistive magnetohydrodynamics (MHD)
equations on three-dimensional curvilinear unstructured hexahedral meshes.
Compared to other fluid dynamics systems such as the shallow water equations or
the compressible Navier-Stokes equations, the resistive MHD equations need
special considerations because of the divergence-free constraint on the
magnetic field. For instance, it is well known that for the symmetrization of
the ideal MHD system as well as the continuous entropy analysis a
non-conservative term proportional to the divergence of the magnetic field,
typically referred to as the Powell term, must be included. As a consequence,
the mimicry of the continuous entropy analysis in the discrete sense demands a
suitable DG approximation of the non-conservative terms in addition to the
ideal MHD terms.
  This paper focuses on the resistive MHD equations: Our first contribution is
a proof that the resistive terms are symmetric and positive-definite when
formulated in entropy space as gradients of the entropy variables. This enables
us to show that the entropy inequality holds for the resistive MHD equations.
This continuous analysis is the key for our DG discretization and guides the
path for the construction of an approximation that discretely mimics the
entropy inequality, typically termed entropy stability. Our second contribution
is a detailed derivation and analysis of the discretization on
three-dimensional curvilinear meshes. The discrete analysis relies on the
summation-by-parts property, which is satisfied by the DG spectral element
method (DGSEM) with Legendre-Gauss-Lobatto (LGL) nodes. Although the
divergence-free constraint is included in the non-conservative terms, the
resulting method has no particular treatment of the magnetic field divergence
errors...
