Expression templates implementation of continuous and discontinuous Galerkin methods

Efficiency and flexibility are often mutually exclusive features in a code. This still prompts a large part of the Scientific Computing community to use traditional procedural languages. In the last years, however, new programming techniques have been introduced allowing for a high level of abstract...

Full description

Saved in:
Bibliographic Details
Published inComputing and visualization in science Vol. 12; no. 8; pp. 421 - 436
Main Authors Di Pietro, Daniele Antonio, Veneziani, Alessandro
Format Journal Article
LanguageEnglish
Published Berlin/Heidelberg Springer-Verlag 01.11.2009
Springer
Springer Verlag
Subjects
Online AccessGet full text

Cover

Loading…
More Information
Summary:Efficiency and flexibility are often mutually exclusive features in a code. This still prompts a large part of the Scientific Computing community to use traditional procedural languages. In the last years, however, new programming techniques have been introduced allowing for a high level of abstraction without loss of performance. In this paper we present an application of the Expression Templates technique introduced in (Veldhuizen in Expression templates. C++ Report magazine, vol 7, pp 26–31, 1995) to the assembly step of a finite element computation. We show that a suitable implementation, such that the compiler has the role of parsing abstract operations, allows for user-friendliness. Moreover, it gains in performance with respect to more traditional techniques for achieving this kind of abstraction. Both the cases of conforming and discontinuous Galerkin finite element discretization are considered. The proposed implementation is finally applied to a number of problems entailing different kind of complications.
ISSN:1432-9360
1433-0369
DOI:10.1007/s00791-008-0117-x