The Center for Applied Scientific Computing (CASC) at Lawrence Livermore National Laboratory is developing algorithms and software technology to enable the application of structured adaptive mesh refinement (SAMR) to large-scale multi-physics problems relevant to U.S. Department of Energy programs.
The SAMRAI (Structured Adaptive Mesh Refinement Application Infrastructure) library is the code base in CASC for exploring application, numerical, parallel computing, and software issues associated with SAMR. SAMRAI development has been funded primarily by the DOE Advanced Simulation and Computing (ASC) Program. This investment is complemented by collaborative efforts supported by the Laboratory-Directed Research and Development (LDRD) program.
Many important science and engineering simulation problems have localized fine-scale features or large gradients separated by relatively large smooth regions. Often, such problems are modeled using a system of partial differential equations (PDEs). The numerical solution of these governing equations involves a discrete domain (e.g., a mesh) and algebraic approximations of the equations on the domain. The mesh spacing determines the accuracy and cost of the computation. Fine meshes are typically required to resolve the local features while coarser meshes suffice elsewhere. Applying fine mesh everywhere may be inefficient or impractical. Moreover, the location and resolution of the mesh grid may not be known a priori, especially when the features are transient. Adaptive mesh refinement (AMR) is a methodology for placing fine spatial and temporal mesh resolution near key features where it is needed most. By dynamically focusing memory usage and computational effort, we can achieve an adequately resolved solution without incurring the cost of a globally fine mesh. AMR also provides a framework in which different numerical models may be applied in different regions and at different scales in a computation.
SAMR is a particular approach to adaptive mesh refinement in which the computational grid is implemented as a collection of structured grid components. See Figure 1.
Figure 1: SAMR allows one to focus mesh refinement and computational effort near features that require high resolution, such as shock fronts in this hydrodynamics calculation. Grid “patches” on the finest resolution level in the SAMR grid hierarchy are shown here with black borders.
The computational mesh consists of a hierarchy of levels of spatial and often temporal mesh refinement. Typically, each level in the hierarchy corresponds to a single uniform degree of mesh spacing. Within a SAMR hierarchy, levels are nested. The coarsest level covers the entire computational domain and each successively finer level covers a portion of the interior of the next coarser level. Computational cells on each level are clustered to form a set of logically-rectangular patch regions. Simulation data is stored on these patches in contiguous arrays (typically) that map directly to the mesh cells without excessive indirection.
SAMR solution methods share characteristics with uniform, non-adaptive structured mesh methods. In particular, the simulation code may be organized as a collection of numerical routines that operate on data defined over logically-rectangular regions and communication operations that pass information between those regions; for example, to fill “ghost cells”. Since an SAMR solution is constructed on a composite mesh, the numerical algorithms and approximations must treat internal mesh boundaries between coarse and fine levels properly to maintain a consistent solution state.