I am working with an octree mesh where variables are stored in a collocated fashion at octant centers. I want to construct a lookup table for interpolation weights that may occur using only a cell and it's immediately adjacent neighbor leaf cells. There are a specific number of neighbor configurations since each neighbor is only allowed to be 1 level coarser or finer than the cell for which an interpolation is required, and I want to specify a unique table id for each configuration. Figure 4 in the paper below shows pretty clearly what I mean by surrounding cell configuration.
http://www.math.uh.edu/~molshan/ftp/pub/OctreeMAC.pdf
Is there an algorithm/accepted way to enumerate these cases?