Fast Evaluation of Finite Element Weak Forms Using Python Tensor Contraction Packages

07/07/2021
by   Robert Cimrman, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/28/2020

De Rham Complexes for Weak Galerkin Finite Element Spaces

Two de Rham complex sequences of the finite element spaces are introduce...
research
05/10/2017

TSFC: a structure-preserving form compiler

A form compiler takes a high-level description of the weak form of parti...
research
07/01/2022

A Tensor-Product Finite Element Cochain Complex with Arbitrary Continuity

We develop tensor product finite element cochain complexes of arbitrary ...
research
04/27/2021

Bringing Trimmed Serendipity Methods to Computational Practice in Firedrake

We present an implementation of the trimmed serendipity finite element f...
research
02/21/2017

Automatic implementation of material laws: Jacobian calculation in a finite element code with TAPENADE

In an effort to increase the versatility of finite element codes, we exp...
research
11/13/2018

ATENSOR - REDUCE program for tensor simplification

The paper presents a REDUCE program for the simplification of tensor exp...

Please sign up or login with your details

Forgot password? Click here to reset