Preface

This book gives a concise and gentle introduction to finite element programming in Python based on the popular FEniCS software library. FEniCS can be programmed in both C++ and Python, but this tutorial focuses exclusively on Python programming, since this is the simplest and most effective approach for beginners. It will also deliver high performance since FEniCS automatically delegates compute-intensive tasks to C++ by help of code generation. After having digested the examples in this tutorial, the reader should be able to learn more from the FEniCS documentation, the numerous demo programs that come with the software, and the comprehensive FEniCS book Automated Solution of Differential Equations by the Finite element Method [Ref01]. This tutorial is a further development of the opening chapter in [Ref01].

We thank Johan Hake, Kent-Andre Mardal, and Kristian Valen-Sendstad for many helpful discussions during the preparation of the first version of this tutorial for the FEniCS book [Ref01]. We are particularly thankful to Professor Douglas Arnold for very valuable feedback on early versions of the text. Øystein Sørensen pointed out a lot of typos and contributed with many helpful comments. Many errors and typos were also reported by Mauricio Angeles, Ida Drøsdal, Miroslav Kuchta, Hans Ekkehard Plesser, Marie Rognes, and Hans Joachim Scroll. Ekkehard Ellmann as well as two anonymous reviewers provided a series of suggestions and improvements.

Special thank goes to Benjamin Kehlet for all his work with the mshr tool and for quickly implementing our requests in this tutorial.