, Volume 53, Issue 1, pp 111-152

A domain-specific embedded language in C++ for lowest-order discretizations of diffusive problems on general meshes

Rent the article at a discount

Rent now

* Final gross prices may vary according to local VAT.

Get Access

Abstract

In this work we propose an original implementation of a large family of lowest-order methods for diffusive problems including standard and hybrid finite volume methods, mimetic finite difference-type schemes, and cell centered Galerkin methods. The key idea is to regard the method at hand as a (Petrov–)Galerkin scheme based on possibly incomplete, broken affine spaces defined from a gradient reconstruction and a point value. The resulting unified framework serves as a basis for the development of a FreeFEM-like domain specific language targeted at defining discrete linear and bilinear forms. Both the back-end and the front-end of the language are extensively discussed, and several examples of applications are provided. The overhead of the language is evaluated with respect to a more traditional implementation. A benchmark including the comparison with more classical finite element methods on standard meshes is also proposed.

Communicated by Hans Petter Langtangen.