Tokamak fusion reactors are actively studied as a means of realizing energy production from plasma fusion. However, due to the substantial cost and time required to construct fusion reactors and run physical experiments, numerical experiments are indispensable for understanding plasma physics inside tokamaks, supporting the design and engineering phase, and optimizing future reactor designs. Geometric multigrid methods are optimal solvers for many problems that arise from the discretization of partial differential equations. It has been shown that the multigrid solver GMGPolar solves the 2D gyrokinetic Poisson equation in linear complexity and with only small memory requirements compared to other state-of-the-art solvers. In this paper, we present a completely refactored and object-oriented version of GMGPolar which offers two different matrix-free implementations. Among other things, we leverage the Sherman-Morrison formula to solve cyclic tridiagonal systems from circular line solvers without additional fill-in and we apply reordering to optimize cache access of circular and radial smoothing operations. With the Give approach, memory requirements are further reduced and speedups of four to seven are obtained for usual test cases. For the Take approach, speedups of 16 to 18 can be attained. In an additionally experimental setup of using GMGPolar as a preconditioner for conjugate gradients, this speedup could even be increased to factors between 25 and 37.
翻译:托卡马克聚变反应堆作为实现等离子体聚变产能的途径正被广泛研究。然而,由于建造聚变反应堆和开展物理实验需要巨额成本与时间,数值实验对于理解托卡马克内部等离子体物理、支撑设计与工程阶段、以及优化未来反应堆设计具有不可替代的作用。几何多重网格方法是对偏微分方程离散化产生的诸多问题的最优求解器。已有研究表明,相较于其他先进求解器,多重网格求解器GMGPolar能以线性复杂度求解二维回旋动力学泊松方程,且仅需极小内存开销。本文提出完全重构的面向对象版本GMGPolar,其提供两种不同的无矩阵实现方案。我们特别利用Sherman-Morrison公式求解来自环形线求解器的循环三对角系统而无需额外填充,并应用重排序优化环形与径向平滑操作的缓存访问。通过Give方案,常规测试案例的内存需求进一步降低,并获得4至7倍的加速比。Take方案则可实现16至18倍的加速。在将GMGPolar作为共轭梯度法预处理器的附加实验设置中,加速比甚至可提升至25至37倍。