Getting started

You want to install and use Dune on your machine and you are a complete novice? Then this is the right place to start!

We will give a short introduction to Dune and guide you through the installation process.

What is Dune?

Dune is a software framework for the numerical solution of partial differential equations (PDEs) written in C++. This means that it provides a set of classes that help you to write your own PDE solver. It is not an application with a fancy graphical user interface that you can just run, type in your PDE and look at the result. Instead you write a C++ program that includes various pieces from the framework and glues them together to solve a particular PDE with a particular method. It is, however, quite flexible in letting you implement various different solution procedures. Dune does also provide Python bindings for a large part of its core features which can help with the rapid prototyping of new code or for pre- and postprocessing tasks.

Installing Dune

It is important to note that installation of Dune requires a computer system with a relatively recent operating system, either Linux or Apple MacOS. Windows is not officially supported, but installation can be done via virtualization, see installation on Windows. There are a number of different ways how to install and use Dune on your computer (click on the links to follow the instructions):

Dune C++ binary packages

This is the most convenient way to get started if you do not want to modify the Dune sources.

The details depend on the system you are using:

Python packages via PyPI

Installation of Dune from the Python Package Index (PyPi). This is another very convenient way to install Dune which does not require root access and works on a broad range of systems including MacOS for which binary packages might not be available.

Full installation from source

Sooner or later you will most likely want to use the latest Dune features or even add new features to the Dune code modules. This will require you to build Dune from source.

Running a first example

Your first example with C++

You can find a more detailed description of these first steps with some background in the first chapter of Oliver Sander’s Dune book. It describes installation from binary packages, installation from the source repository, how to create your own Dune module, and also how to solve a simple PDE with the Dune core modules.

Your first example with Python

You can test the installation by constructing a simple structured grid. Call python and then execute

from dune.grid import structuredGrid
grid = structuredGrid([0,0],[1,1],[10,10])
print( grid.size(0) ) # should return 100
grid.plot() # requires the installation of `matplotlib`

For a more detailed description of the Python bindings take a look at the section on the DUNE grid interface as part of the dune-fem tutorial.

Working with further Dune modules

dune-PDELab

Instructions for installing from the source. and using the tutorials.

Recordings of the virtual DUNE/PDELab course 2021 are available for self-study. The material can be found here.

dune-fem

Detailed instructions on how to install dune-fem and its Python bindings using pip..

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Mar 27, 23:25, 2024)

More info

… can be be found in the Dune book by Oliver Sander.

The chapter on How to get started with the C++ code can be read online.

Videos on different aspects of DUNE are available online.