Adaptive Mesh Refinement (AMR)
Introduction to adaptive mesh refinement
The image above shows the grid structure of an AMR calculation of a shock impacting an inclined slope. Each of the boxes is a grid; the more boxes it is nested within, the higher the level of refinements. As the image shows, the algorithm uses high resolution grids only at the physical locations and times where they are required.
Taken from Wikipedia 
In a series of scientific papers, Marsha Berger, Joseph Oliger, and Phillip Colella developed an algorithm for dynamic gridding called local adaptive mesh refinement. The algorithm begins with the entire computational domain covered with a coarsely resolved base-level regular Cartesian Grid. As the calculation progresses, individual grid cells are tagged for refinement, using a criterion that can either be user-supplied (for example, mass per cell remains constant, hence higher density regions are more highly resolved) or based on Richardson extrapolation.
All tagged cells are then refined, meaning that a finer grid is overlaid on the coarse one. After refinement, individual grid patches on a single fixed level of refinement are passed off to an integrator that advances those cells in time. Finally, a correction procedure is implemented to correct the transfer along coarse-fine grid interfaces, to ensure that the amount of any conserved quantity leaving one cell exactly balances the amount entering the bordering cell. If at some point the level of refinement in a cell is greater than required, the high resolution grid may be removed and replaced with a coarser one.
This allows the user to solve problems that are completely intractable on a uniform grid; for example, astrophysicists have used AMR to model a collapsing giant molecular cloud core down to an effective resolution of 131,072 cells per initial cloud radius, corresponding to a resolution of 1015 cells on a uniform grid.
Benefits of Adaptive Mesh Refinement
As stated above, the primary benefit is in efficiency.
By first solving the problem on a coarse grid, a grid of significantly less resolution can be used. This means the simulation can run both faster and consume less memory. Once regions of interest are identified, they can be processed at a higher resolution. This leads to several benefits:
- By only refining small portions of the grid, these portions can be much further refined before memory limits become an issue. This leads to simulations that are much more accurate in the areas of interest.
- By using a very coarse grid in regions of no interest, fewer cycles are wasted simulating "blank space" of no interest.
- By using refinement criteria within the simulation to determine these areas to refine, no prior knowledge is necessary of the problem's results. This gives the researcher much more freedom to simply "set up the problem" without spending exhorbitant amounts of time "setting up the grid".
Problems with Adaptive Mesh Refinement
AMR is not without its problems. Most notable is the difficulty in managing the multi-block nature of the data.
- Because the areas to be refined overlap areas of higher (and possibly lower) refinement levels, there is the possibility of a single X,Y,Z location existing in the data set multiple times at multiple resolutions. While not a problem in itself, special effort must be made to make sure probes into XYZ space are performed at the greatest refinement level to provide accuracy.
- Efficient storage and allocation of the data structures are issues of great research, but usually overcome with hierarchical data structures of Rectilinear or Cartesian grids.
- Discontinuities at the edges of refined areas can introduce visible artifacts in extracted surfaces. These artifacts can be resolved, but special effort must be made to do so.