Abstract. Adaptive multiscale methods are among the many effective techniques for the numerical solution of partial differential equations. Efficient grid management is an important task in these solvers. In this paper we focus on this problem for discontinuous Galerkin discretization methods in 2 and 3 spatial dimensions and present a data structure for handling adaptive grids of different cell types in a unified approach. Instead of tree-based techniques where connectivity is stored via pointers, we associate each cell that arises in the refinement hierarchy with a cell identifier and construct algorithms that establish hierarchical and spatial connectivity. By means of bitwise operations, the complexity of the connectivity algorithms can be bounded independent of the level. The grid is represented by a hash table which results in a low-memory data structure and ensures fast access to cell data. The spatial connectivity algorithm also supports the application of quadrature rule...