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 the 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 the 3 benchmark problems. The performance of the proposed solution is compared with a multithreaded direct Pardiso solver and a parallel iterative PETSc solver.
翻译:在计算流体力学中,大型稀疏马鞍点系统的有效解决方案非常重要。不连续的Galerkin定点元素方法对不可压缩流程问题越来越流行,但由于计算成本高,其应用有限。我们描述了C++编程技术,这些技术可能有助于加速这些问题的线性解答器。这种方法基于基于政策的设计模式和部分模板的专业化,在开放源的AMGCL库中实施。效率表现在加速一个不连续的Galerkin定点元素方法的迭代解答器,用于解决斯托克斯问题。实施允许通过调整模板参数来选择解析器的算法组成部分,而无需对代码库作任何修改。可以将系统矩阵转换为使用小型静态块存储非零值,或者使用混合的精确解决方案,其结果高达4倍的速度,并将算法的记忆足迹减少约40 ⁇ 。我们评估了3个基准问题的单一和复合先决条件战略。拟议解决方案的性能与多读直接帕迪索解答器和平行的代谢式定盘解算器比较。