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