[FLASH-USERS] gid array format

Nathan Hearn nhearn at ucar.edu
Tue May 24 17:52:11 EDT 2011


Hi David,

    You have the right idea about the GID array format, but I think
the order is

<neighbor IDs> <parent ID> <child IDs>

There are also a few issues to be aware of.

    First, be sure to note that the block IDs used in the GID array
format correspond to Fortran (origin-one) array indexes, as opposed to
the zero-origin indexes used in C (and the HDF5 API).

    Second, as you probably surmised, the negative values have
meanings regarding the type of block (or boundary) that neighbors a
given block.

-1   -> denotes the absence of a neighbor block (or child, as I recall)
-10  -> Denotes no boundary
-20  -> "Paramesh" boundary
-31  -> Reflective boundary
-32  -> Outflow boundary
-33  -> Isolated boundary
-34  -> Hydrostatic boundary
-35  -> Periodic boundary
-38  -> User-defined boundary

    Third, if you are explicitly using uniform grids (rather than
Paramesh AMR) there are some subtle differences that arise.

    I don't have a recent version of the Flash User's Guide in front
of me right now, but there is a modicum of documentation in the
QuickFlash library (particularly, files
src_lib/quickflash_mesh_boundarydefs.cpp,
src_lib/quickflash_file_treeinfo.cpp, and
src_lib/quickflash_file_meshinfo.hpp).  An (admittedly ancient)
distribution of QuickFlash can be found at

http://sourceforge.net/projects/quickflash/files/quickflash/

    I hope this is helpful.


- Nathan


-- 
Nathan C. Hearn, Ph.D.
nhearn at ucar.edu

Project Scientist
Computational & Information Systems Laboratory
National Center for Atmospheric Research



On Tue, May 24, 2011 at 15:14, David Williamson
<david.john.williamson at gmail.com> wrote:
> Hi all,
>
> I am trying to read in the gid array from hdf5 data in Flash3.0 to work out the structure of the grid. The documentation implies that for 3d data this should be in the form of a 2D array of size gid[15][nb] (nb=number of boxes), where the [15] entries are the box IDs of the 6 neighbouring boxes, the 8 children, and the 1 parent.
>
> However, when I use the coordinates array to compare the locations of the boxes indicated by gid, they don't seem to match very well - they are generally *close* to the box, but they aren't on the faces. I also notice negative numbers (-1 and -32) appearing in the gid array.
>
> I can't find any documentation on the details of the gid array, so I'd like to check - am I looking at this right?
>
> Cheers,
> -David



More information about the flash-users mailing list