Accelerating linear solvers for Stokes problems with C plus plus metaprogramming

Accelerating linear solvers for Stokes problems with C plus plus metaprogramming
复制标题

DOI:
10.1016/j.jocs.2020.101285
复制
发表时间:
2021-01-04
影响因子:
3.3
通讯作者:
Wang, Bin
Wang, Bin
中科院分区:
计算机科学3区
文献类型:
--
作者:
Demidov, Denis;Mu, Lin;Wang, Bin

文献摘要

被引文献

相似文献

大型稀疏鞍点系统的有效解在计算流体力学中具有十分重要的意义。不连续伽辽金有限元法在不可压缩流动问题中的应用越来越广泛,但由于计算成本高,其应用受到限制。我们描述了c++编程技术,这些技术可能有助于加速此类问题的线性求解。该方法基于基于策略的设计模式和部分模板专门化,并在开源AMGCL库中实现。以Stokes问题的不连续Galerkin有限元法加速迭代求解为例,说明了该方法的有效性。该实现允许通过调整模板参数来选择求解器的算法组件,而无需对代码库进行任何更改。可以将系统矩阵切换为使用静态大小的小块来存储非零值,或者使用混合精度解决方案,这将导致高达4倍的加速,并将算法的内存占用减少约40%。我们对3个基准问题评估了单片和复合预处理策略。将该方法与多线程直接Pardiso求解器和并行迭代PETSc求解器进行性能比较。
The efficient solution of large sparse saddle point systems is very important in computational fluid mechanics. The discontinuous Galerkin finite element methods have become increasingly popular for incompressible flow problems but their application is limited due to high computational cost. We describe C++ programming techniques that may help to accelerate linear solvers for such problems. The approach is based on the policy based design pattern and partial template specialization, and is implemented in the open source AMGCL library. The efficiency is demonstrated with the example of accelerating an iterative solver of a discontinuous Galerkin finite element method for the Stokes problem. The implementation allows selecting algorithmic components of the solver by adjusting template parameters without any changes to the codebase. It is possible to switch the system matrix to use small statically sized blocks to store the nonzero values, or use a mixed precision solution, which results in up to 4 times speedup, and reduces the memory footprint of the algorithm by about 40%. We evaluate both monolithic and composite preconditioning strategies for 3 benchmark problems. The performance of the proposed solution is compared with a multithreaded direct Pardiso solver and a parallel iterative PETSc solver.