Optimized Code Generation for Finite Element Local Assembly Using Symbolic Manipulation
File(s)
Author(s)
Russell, FP
Kelly, PHJ
Type
Journal Article
Abstract
Automated code generators for finite element local assembly have facilitated the exploration of various alternative implementation strategies within the generated code. However, even with respect to a theoretical performance indicator such as operation count, an optimal strategy for performing local assembly is currently unknown. We explore a code generation strategy based on symbolic integration and polynomial common sub-expression elimination (CSE), designed to expose optimization opportunities. We present our implementation of a finite element assembly code generator using these techniques. We systematically evaluate our approach measuring operation count, execution time and numerical error using a benchmark suite of synthetic variational forms, comparing against the FEniCS Form Compiler (FFC). Our benchmark forms span complexities chosen to expose the performance characteristics of different code generation approaches. At additional computation cost in code generation, we show that it is possible to consistently achieve much of, and sometimes substantially exceed, the performance of other competing approaches without compromising numerical accuracy. Although the approach of using symbolic integration and CSE for optimizing finite element assembly is not new, we distinguish our work through our strategies for maintaining numerical precision and detecting common sub-expressions. We also discuss the benefits of the symbolic approach with respect to inferring numerical relationships for optimization. Finally we discuss the potential for further optimisations, and the relationship between this approach and other proposed techniques which also involve greater computational complexity than those utilized by FFC.
Date Issued
2013-08-01
Citation
ACM Transactions on Mathematical Software, 2013
ISSN
0098-3500
Publisher
ACM Press
Journal / Book Title
ACM Transactions on Mathematical Software
Volume
39
Issue
4
Copyright Statement
© ACM, 2013. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in ACM Transactions on Mathematical Software, 39(4), 2013. http://doi.acm.org/10.1145/2491491.2491496
Identifier
http://www.doc.ic.ac.uk/~fpr02/excafe/acm_toms_paper.pdf
Publication Status
Published
