QuickFlash Code Description
Code Description
The QuickFlash library is a collection of data access and analysis routines for Flash 2.5 and Flash 3 data files that use Paramesh adaptive mesh refinement. The design of these tools is focused on fast, direct access to simulation data with minimal memory requirements. The routines are written in ANSI standard C++ and use object-oriented methodologies that include encapsulation, inheritance, and generic programming to simplify the user interface and reduce the time required for development and debugging. The file I/O infrastructure provides on-demand loading of simulation data blocks and uses transparent read-ahead buffering and caches to enhance performance. Access to particle data in Flash 3 files is also provided, as well as Python wrappers (through the SWIG utility) for many of the essential QuickFlash classes.
QuickFlash uses a spatial "oct-tree" structure to organize the metadata for AMR blocks, following the block relationship information provided by Paramesh. The tree structure is used to provide efficient means of locating data by spatial coordinate. The user also has the ability to parse simulation data block-by-block and by traversing the tree; the iterators provided by QuickFlash allow programs to focus an specific subdomains by excluding unwanted branches of the tree.
Beyond data access routines, the QuickFlash library includes a number of high-level functions and utilities to facilitate program development. Flash datasets can be sliced along arbitrary planes; the user can process the slice data directly or write it to a file as raw data or an image. (Image output in QuickFlash is facilitated by built-in colormap routines and ImageMagick wrapper functions.) Isosurfaces can be generated by the method of Marching Tetrahedrons, yielding a set of triangular patches that describe the surface. Statistical functions, including classes for binning over 1D and 2D spaces, are also provided, along with support functions for parsing command line input of user programs.
The HDF5 library is the only required dependency for QuickFlash; with only HDF5, all of the functionality of the library is available except for the image output routines. The minimal requirements of QuickFlash, coupled with its low memory footprint, makes it compatible with a wide variety of computing platforms, including clusters and supercomputers that may not support graphical or interactive programs. Because of the on-demand file I/O, QuickFlash can also be used to efficiently analyze datasets that are much larger than available system memory. While QuickFlash does not contain parallel programming routines, it can easily be incorporated into parallel analysis programs; QuickFlash is not currently thread-safe, but has been designed with future threading capabilities in mind.
The QuickFlash distribution includes a number of programs for performing general analysis tasks, including slicing, isosurface generation, raytracing, boxcounting for fractal analysis, and lineouts. The source code for these applications demonstrate various ways to access the QuickFlash library, and can be used as starting points and templates for user code development.