Alnæs, Martin S.8; Logg, Anders8; Ølgaard, Kristian Breum5; Rognes, Marie E.8; Wells, Garth N.9
1 Danish Centre for Risk and Safety Management, The Faculty of Engineering and Science, Aalborg University, VBN2 Division for Structures, Materials and Geotechnics, The Faculty of Engineering and Science, Aalborg University, VBN3 Esbjerg afdelingen, The Faculty of Engineering and Science, Aalborg University, VBN4 The Faculty of Engineering and Science (ENG), Aalborg University, VBN5 Department of Civil Engineering, The Faculty of Engineering and Science, Aalborg University, VBN6 Simula Research Laboratory7 University of Cambridge8 Simula Research Laboratory9 University of Cambridge
A domain-specific language for weak formulations of partial differential equations
We present the Unied Form Language (UFL), which is a domain-specic language for representing weak formulations of partial dierential equations with a view to numerical approximation. Features of UFL include support for variational forms and functionals, automatic dierentiation of forms and expressions, arbitrary function space hierarchies for multi-eld problems, general dierential operators and exible tensor algebra. With these features, UFL has been used to eortlessly express nite element methods for complex systems of partial dierential equations in near-mathematical notation, resulting in compact, intuitive and readable programs. We present in this work the language and its construction. An implementation of UFL is freely available as an open-source software library. The library generates abstract syntax tree representations of variational problems, which are used by other software libraries to generate concrete low-level implementations. Some application examples are presented and libraries that support UFL are highlighted.
A C M Transactions on Mathematical Software, 2014, Vol 40, Issue 2