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 rules for face integrals that occur in discontinuous Galerkin discretizations. The concept allows us to implement discontinuous Galerkin methods largely independent of spatial dimension and cell type. We demonstrate this by outlining how typical algorithmic tasks that arise in these implementations can be performed with our data structure. In computational tests we compare our approach with that of a classical implementation using pointers.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.