Skip to content

Draft: Introduce a new section for tutorials, and a first tutorial

Oliver Sander requested to merge introduce-examples-section into master

This commit introduces a first tutorial in a newly introduced new "tutorials" section. These tutorials are planned to explain how to solve particular PDE problems with particular sets of Dune modules.

The tutorials are implemented as pairs of a markdown file with a C++ or Python file. The markdown file contains the text, and includes parts of the source code that are marked by two specific keywords (START-SNIPPET and END-SNIPPET).

This first example explains how to solve the Poisson equation using Lagrange finite elements and the dune-functions module. The code is taken from the 'examples' section of dune-functions. The text consists of little more than placeholders at this point.

This MR is marked as Draft for a number of reasons:

  • There may be a better way to make hugo create the new 'tutorials' section.
  • I am not sure where to place the new files. What are the hugo rules?
  • I am not sure how to best organize the new section. I want tutorials for C++ and Python, and they could be organized by level-of-difficulty, field-of-application, top-level Dune modules, etc.
  • One would like to have automatic testing for the example code files, to prevent them from bitrotting. I have no idea how to achieve that, but it is beyond this MR.
  • I am not sure whether having the example code files in the dune-website repo at all is a good idea. Several Dune modules have examples directories already. Maybe we should add the markdown files there, and make Hugo import them (just as we do for README.md).

Merge request reports

Loading