  In the interior of neutron stars, the induction equation regulates the
long-term evolution of the magnetic fields by means of resistivity, Hall
dynamics and ambipolar diffusion. Despite the apparent simplicity and
compactness of the equation, the dynamics it describes is not trivial and its
understanding relies on accurate numerical simulations. While a few works in 2D
have reached a mature stage and a consensus on the general dynamics at least
for some simple initial data, only few attempts have been performed in 3D, due
to the computational costs and the need for a proper numerical treatment of the
intrinsic non-linearity of the equation. Here, we carefully analyze the general
induction equation, studying its characteristic structure, and we present a new
Cartesian 3D code, generated by the user-friendly, publicly available {\em
Simflowny} platform. The code uses high-order numerical schemes for the time
and spatial discretization, and relies on the highly-scalable {\em SAMRAI}
architecture for the adaptive mesh refinement. We present the application of
the code to several benchmark tests, showing the high order of convergence and
accuracy achieved and the capabilities in terms of magnetic shock resolution
and three-dimensionality. This paper paves the way for the applications to a
realistic, 3D long-term evolution of neutron stars interior and, possibly, of
other astrophysical sources.
