物理学 > 计算物理
[提交于 2026年3月5日]
标题:Tree codes and sort-and-sweep algorithms for neighborhood computation: A cache-conscious comparison
查看中文 PDF 查看原文 PDF EasyResearch 阅读摘要:Neighborhood algorithms may take a considerable percentage of computer time in discrete element methods (DEM). While the sort-and-sweep algorithm is ideal in some ways, as it only deal with particles whose relative positions change in one coordinate direction, the other directions must be processed too, for all particles. In contrast, tree-codes deal only with adjacent particles. We compare sort-and-sweep and tree-code neighborhood algorithms for two-dimensional DEM simulations of polygonal particles in a rotating drum with up to 12000 particles. We discuss the effects of system size and inlining on the performance with respect to the cache memory. For the tree code, the performance is slightly better, at the cost of significantly increased cyclomatic complexity. In particular, one benefit is improved possibilities for shared memory parallelization.
提交历史
来自:Dominik Krengel[v1] 2026年3月5日 星期四 05:24:48 UTC