Efficient Neighbor-Finding on Space-Filling Curves
David Holzmüller
备注:
This is a slightly modified version of my bachelor thesis in mathematics. The corresponding code can be found at https://github.com/dholzmueller/sfcpp . Changes in v2: Added e-mail address and links to github project, fixed footnote hyperlinks. Changes in v3: Minor changes, corrected statement of Corollary 4.2
Space-filling curves (SFC, also known as FASS-curves) are a useful tool in scientific computing and other areas of computer science to sequentialize multidimensional grids in a cache-efficient and parallelization-friendly way for storage in an array. Many algorithms, for example grid-based numerical PDE solvers, have to access all neighbor cells of each grid cell during a grid traversal. While the array indices of neighbors can be stored in a cell, they still have to be computed for initialization or when the grid is adaptively refined. A fast neighbor-finding algorithm can thus significantly improve the runtime of computations on multidimensional grids.
In this thesis, we show how neighbors on many regular grids ordered by space-filling curves can be found in an average-case time complexity of $O(1)$. In general, this assumes that the local orientation (i.e. a variable of a describing grammar) of the SFC inside the grid cell is known in advance, which can be efficiently realized during traversals. Supported SFCs include Hilbert, Peano and Sierpinski curves in arbitrary dimensions. We assume that integer arithmetic operations can be performed in $O(1)$, i.e. independent of the size of the integer. We do not deal with the case of adaptively refined grids here. However, it appears that a generalization of the algorithm to suitable adaptive grids is possible. To formulate the neighbor-finding algorithm and prove its correctness and runtime properties, a modeling framework is introduced. This framework extends the idea of vertex-labeling to a description using grammars and matrices. With the sfcpp library, we provide a C++ implementation to render SFCs generated by such models and automatically compute all lookup tables needed for the neighbor-finding algorithm. Furthermore, optimized neighbor-finding implementations for various SFCs are included for which we provide runtime measurements.
Recurrence for Pandimensional Space-Filling Functions
A space-filling function is a bijection from the unit line segment to the unit square, cube, or hypercube. The function from the unit line segment is continuous. The inverse function, while well-defined, is not continuous. Space-filling curves, the finite approximations to space-filling functions, have found application in global optimization, database indexing, and dimension reduction among others. For these applications the desired transforms are mapping a scalar to multidimensional coordinates and mapping multidimensional coordinates to a scalar. Presented are recurrences which produce spac…
A Morton-Type Space-Filling Curve for Pyramid Subdivision and Hybrid Adaptive Mesh Refinement
Universität zu Köln(科隆大学);Institute of Software Technology, German Aerospace Center (DLR)(德国航空航天中心软件技术研究所);Institut für Numerische Simulation (INS) and Hausdorff Center for Mathematics (HCM), Rheinische Friedrich-Wilhelms-Universität Bonn(波恩莱茵弗里德里希·威廉大学数值模拟研究所和豪斯多夫数学中心);Leibniz University Hannover, Institute of Applied Mathematics (IfAM)(汉诺威莱布尼茨大学应用数学研究所)