当前位置: X-MOL 学术arXiv.cs.MS › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Fast Evaluation of Finite Element Weak Forms Using Python Tensor Contraction Packages
arXiv - CS - Mathematical Software Pub Date : 2021-07-07 , DOI: arxiv-2107.04121
Robert Cimrman

In finite element calculations, the integral forms are usually evaluated using nested loops over elements, and over quadrature points. Many such forms (e.g. linear or multi-linear) can be expressed in a compact way, without the explicit loops, using a single tensor contraction expression by employing the Einstein summation convention. To automate this process and leverage existing high performance codes, we first introduce a notation allowing trivial differentiation of multi-linear finite element forms. Based on that we propose and describe a new transpiler from Einstein summation based expressions, augmented to allow defining multi-linear finite element weak forms, to regular tensor contraction expressions. The resulting expressions are compatible with a number of Python scientific computing packages, that implement, optimize and in some cases parallelize the general tensor contractions. We assess the performance of those packages, as well as the influence of operand memory layouts and tensor contraction paths optimizations on the elapsed time and memory requirements of the finite element form evaluations. We also compare the efficiency of the transpiled weak form implementations to the C-based functions available in the finite element package SfePy.

中文翻译:

使用 Python 张量收缩包快速评估有限元弱形式

在有限元计算中,积分形式通常使用元素上的嵌套循环和正交点上的嵌套循环来计算。许多这样的形式(例如线性或多重线性)可以通过采用爱因斯坦求和约定使用单个张量收缩表达式以紧凑的方式表达,无需显式循环。为了自动化这个过程并利用现有的高性能代码,我们首先引入了一种符号,允许对多线性有限元形式进行微分。在此基础上,我们提出并描述了一个新的转译器,从基于爱因斯坦求和的表达式,扩展到允许定义多线性有限元弱形式,到规则的张量收缩表达式。结果表达式与许多 Python 科学计算包兼容,这些包实现了,优化并在某些情况下并行化一般张量收缩。我们评估了这些包的性能,以及操作数内存布局和张量收缩路径优化对有限元形式评估的经过时间和内存要求的影响。我们还将转译的弱形式实现的效率与有限元包 SfePy 中可用的基于 C 的函数进行了比较。
更新日期:2021-07-12
down
wechat
bug