The interface for functions in the dune-functions module
arXiv:1512.06136 · doi:10.11588/ans.2017.1.27683
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.
arXiv commentThe C++ source code of tests is attached to pdf file of the paper
Cited by in corpus (4)
- An accelerated staggered scheme for phase-field modeling of brittle fracture
- The gradient flow structures of thermo-poro-visco-elastic processes in porous media
- Dune-CurvedGrid -- A Dune module for surface parametrization
- The domain-of-dependence stabilization for cut-cell meshes is fully discretely stable