An EXpression Capturing Finite Element Library


Excafé was a library developed during my PhD as a means to explore the benefits of using active library techniques for the performance optimisation of finite-element simulations. In particular active library techniques facilitate efficient implementations of domain specific languages.

Excafé only supports triangular meshes with Lagrange basis functions at present. Furthermore boundary integrals have not yet been implemented. However, the functionality present is more than sufficient to implement an incompressible Navier-Stokes solver, which is included in the distribution.

One topic that Excafé has been used to explore is the symbolic analysis of the expressions in finite element local assembly matrices. Excafé has access to run-time representations of variational forms and basis functions. It uses this to build symbolic representations of each entry of the local assembly matrix. Once it has these, it uses a common sub-expression elimination pass targeted at polynomial evaluation to find an evaluation strategy for these expressions that minimizes operation count.

The current implementation will compile the optimised local assembly code and dynamically link it back into the solver at run-time.

Some slides on this work, presented at FEniCS'11 can be found here.

Excafé Library

The Excafé source tarball contains the complete source of the Excafé library along with an incompressible Navier-Stokes solver, a heat solver and a generator for UFC-compliant assembly code for pre-multiplied Laplacian and mass matrices. Excafé has hard dependencies on:

The following packages are also required for a complete build:

These dependencies should be satisfiable on any reasonably modern Debian/Ubuntu install using standard packages. The Excafé source distribution can be found here.

Excafé is licensed under the GPLv2.

Excafé Local Assembly Benchmarks

The Excafé benchmark tarball contains the test harness used for benchmarking FFC and Excafé-generated local assembly implementations for a paper submitted to ACM Transaction on Mathematical Software. As long as a "make clean" is not issued there is no need to have working builds of Excafé or FFC available. The distribution already contains the FFC and Excafé-generated headers used for the ACM TOMS benchmarks. The Excafé benchmarks require:

Boost and APR dependencies are satisfiable from standard packages on any Debian/Ubuntu install. PAPI typically requires the creation of a local build. The Excafé benchmarks can be found here.