On the other hand, it is impractical to resolve fine spatial features with a globally fine mesh, which leads to consideration of local mesh refinement. When local mesh refinement is combined with explicit or semi-implicit time stepping methods, new strategies, such as local time stepping, must be introduced. Depending on how much of the computational domain is covered by the finest mesh, the use of smaller time steps on the finest regions may dominate the cost of the calculation. Implicit methods allow a single global time step that is restricted only by the desired accuracy. The same physics-based preconditioner can still be used; however its implementation must now account for local refinement in order to remain competetive.
We describe our approach to combining implicit time stepping with local mesh refinement in a resistive magnetohydrodynamics model. The Newton-Krylov method and physics-based preconditioning remain at the heart of the scheme, but components of the preconditioner are now based on the Fast Adaptive Composite grid (FAC) method to explicitly account for local mesh refinement. Straightforward modifications to the discretization scheme that are needed at changes in mesh resolution will also be described. The parallel implementation uses SAMRAI to manage complex data structures associated with dynamic, locally refined meshes; solvers from PETSc to drive the solution process; and components built from Hypre's structured multigrid solvers to solve subproblems on the coarsest level. These various packages are coupled through a seamless interface that features the use of multiple data representations that allow the most natural implementation of different phases of the calculation while minimizing data copying.