CT preserves :math:`\nabla \cdot B` to machine precision, but is slightly harder to use.

+ ====================== ==================== ===============

+ ====================== ==================== ===============

+ Splitting Unsplit, Runge Kutta Split (strang)

+ :math:`\nabla \cdot B` Few Percent Machine Noise

+ Difficulty Easy Less Easy

+ ====================== ==================== ===============

cleaner will largely eliminate any divergence, initialization an injection of

magnetic energy is straight forward.

+AMR is done in the same manner as other fluid quantities in Enzo.

+The method is described in `Dedner et al. 2002 JCP 175, 2, 645-673

+<http://adsabs.harvard.edu/abs/2002JCoPh.175..645D>`_

+The implementation and test problems can be found in `Wang & Abel 2009, ApJ 696 96 <http://adsabs.harvard.edu/abs/2009ApJ...696...96W>`_.

-Uses two filds: staggered field, "MagneticField" and Centered field,

-"CenteredB". Also uses an edge staggered field, "ElectricField".

+Use of MHD-CT (``HydroMethod = 6``) is complicated by the staggered nature of the magnetic field. This allows the

+field to be updated by the curl of an electric field, thus preserving

+:math:`\nabla \cdot B = 0` to machine precision, but requires some additional

+machinery to ensure consistency of the data structure.

-Energy Variable is in per-volume, not per-mass. This is a poor design decision

-from years ago, and I apologize.

+The primary references are:

+`Balsara & Spicer 1999, JCP, 149, 2, 270-292

+<http://adsabs.harvard.edu/abs/1999JCoPh.149..270B>`_

-Setting the Magnetic Field

-==========================

+`Gardiner & Stone 2005, JCP, 205, 2, 509-539

+<http://adsabs.harvard.edu/abs/2005JCoPh.205..509G>`_

-CenteredB should be considered a read-only quantity-- it is

-replaced with a centered spatial average of MagneticField

+`Balsara 2001 JCP, 174, 2, 614-648

+<http://adsabs.harvard.edu/abs/2001JCoPh.174..614B>`_

-"MagneticField" should only be modified in a manner that is definitely

-divergence free. For more general initialization, one can use The MHD_Curl

+Implementation and test problems:

+`Collins, Xu, Norman, Li & Li, ApJS 186, 2, 308

+<http://adsabs.harvard.edu/abs/2010ApJS..186..308C>`_.

+Enzo uses two representations of the magnetic field.

+Uses two filds: staggered field, ``MagneticField`` and Centered field,

+``CenteredB``. Also uses an edge staggered field, ``ElectricField``. ``MagneticField``, being stored on the faces of the

+zones, has one additional point along each component. For instance, if a ``grid`` had dimensions :math:`n_x, n_y, n_z` then

+ :math:`B_x` will have dimensions :math:`n_x+1, n_y, n_z`. ``ElectricField`` has additional points transverse to the direction

+of the component, so :math:`E_x` has dimensions :math:`n_x, n_y+1, n_z+1`.

+There are several helper variables, such as ``MagneticDims[3][3]``,

+``ElectricDims[3][3]``, ``MagneticSize[3]``, and ``ElectricSize[3]`` to describe

+Dealing with the Magnetic Field

+===============================

+``CenteredB`` should be considered a read-only quantity-- it is

+replaced with a centered spatial average of ``MagneticField`` as necessary.

+``MagneticField`` should only be modified in a manner that is definitely

+divergence free. For more general initialization, one can use the function ``MHD_Curl``

+for fields that can be represented by a vector potential.

+Interpolation must be done, obviously, in a divergence-free manner. Balsara

+2001 describes this method. Interpolation is done on all three components of

+``MagneticField`` at once. This method only allows ``RefineBy = 2``.

+One challenge of this method is that newly interpolated regions require

+knowledge of any fine-grid data at the same level that may share a face. Thus

+instead of simply interpolating from parent grids, then coping from old fine

+grids, MHDCT must use the magnetic information from the old fine grids. This is

+done by first computing interpolation derivatives (done in ``Grid_MHD_CID.C``

+and stored in ``DyBx``, etc) then communicating this information to the relevant

+parent grids (done in ``Grid_SendOldFineGrids.C``)