Proceedings of the 3rd Dune User Meeting (2015)
Zitierempfehlung (Kapitel)

Engwer, Christian et al.: The interface for functions in the dune-functions module, in: Blatt, Markus, Flemisch, Bernd und Sander, Oliver (Hrsg.): Proceedings of the 3rd Dune User Meeting (2015): Archive of Numerical Software - Special Issue 2017, Heidelberg: heiBOOKS, 2017, p. 95-110. https://doi.org/10.11588/heibooks.280.c3281

Weitere Zitierweisen
Identifikatoren (Buch)
ISBN 978-3-946531-60-9 (PDF)
ISBN 978-3-946531-61-6 (Softcover)

Veröffentlicht am 24.07.2017.


Christian Engwer, Carsten Gräser, Steffen Müthing, Oliver Sander

The interface for functions in the dune-functions module

Abstract The dune-functions Dune module introduces a new programmer interface for discrete and non-discrete functions. Unlike the previous interfaces considered in the existing Dune modules, it is based on overloading operator(), and returning values by-value. This makes user code much more readable, and allows the incorporation of newer C++ features such as lambda expressions. Run-time polymorphism is implemented not by inheritance, but by type erasure, generalizing the ideas of the std::function class from the C++11 standard library. We describe the new interface, show its possibilities, and measure the performance impact of type erasure and return-by-value.