Section author: Andreas Dedner <>, Robert Klöfkorn <robert dot klofkorn at math dot lu dot se>, Martin Nolte <>

Using C++ Code Snippets


link to developers.rst

In this section we demonstrate how it possible to use small piece of C++ code to either extend the existing functionality or improve the efficiency of the code by moving code from Python to C++. We have already seen how to define grid functions using C++ code snippets in the Grid Function section In the following we will move parts of an algorithm from Python to C++. The DUNE interfaces exported to Python are very close to their C++ counterpart so that rapid prototyping of new algorithms can be carried out using Python and then easily moved to C++. This will be demonstrated in the following examples: