The deal.II tutorial contains a collection of programs, each more or less built atop of previous ones, which demonstrate various aspects of the library. Each such example has the following structure follows:
The programs can be found at a path which is indicated at the beginning of the last section of each example. You can compile them by typing make in the respective directory, and run them using make run. The latter command also compiles the program if that has not already been done. The Makefiles in the different directories are based on the small program Makefile template described in in this section.
Below we will list the currently available tutorial programs twice, once in numerical order explaining what is new in each program and once listed by topic to facilitate searching for programs with a certain functionality.
Step-1 | Creating a grid. A simple way to write it to a file. |
Step-2 | Associate degrees of freedom to each vertex and compute the resulting sparsity pattern of matrices. Show that renumbering reduces the bandwidth of matrices significantly, i.e. clusters nonzero entries around the diagonal. |
Step-3 | Actually solve Laplace's problem. Object-orientation. Assembling matrices and vectors. Boundary values. |
Step-4 | This example is programmed in a way that it is independent of the dimension for which we want to solve Laplace's equation; we will solve the equation in 2D and 3D, although the program is exactly the same. Non-constant right hand side function. Non-homogeneous boundary values. |
Step-5 | Computations on successively refined grids. Reading a grid from disk. Some optimizations. Using assertions. Non-constant coefficient in the elliptic operator. Preconditioning the CG solver for the linear system of equations. |
Step-6 | Adaptive local refinement. Handling of hanging nodes. Higher order elements. Catching exceptions in the “main” function. |
Step-7 | Helmholtz equation. Non-homogeneous Neumann boundary conditions and boundary integrals. Verification of correctness of computed solutions. Computing the error between exact and numerical solution and output of the data in tables. Using counted pointers. |
Step-8 | The elastic equations will be solved instead of Laplace's equation. The solution is vector-valued and the equations form a system with as many equations as the dimension of the space in which it is posed. |
Step-9 | Transport equation, assembling the system of equations in parallel using multi-threading, implementing a refinement criterion based on a finite difference approximation of the gradient. |
Step-10 | Higher order mappings. Do not solve equations, but rather compute the value of pi to high accuracy. |
Step-11 | Solving a Laplace problem with higher order mappings. Using strange constraints and intermediate representations of sparsity patterns. |
Step-12 | General framework for discontinuous Galerkin methods. Use of Timer class. |
Step-13 | Software design questions and how to write a modular, extensible finite element program. |
Step-14 | Duality based error estimators, more strategies to write a modular, extensible finite element program. |
Step-15 | 1d problems, nonlinear solvers, transfering a solution across mesh refinement. |
Step-16 | Based on step 5, a multilevel preconditioner is implemented. |
Step-17 | Using PETSc for linear algebra; running in parallel on clusters of computers linked together by MPI. |
Step-18 | A time dependent problem; using a much simplified version of implementing elasticity; moving meshes; handling large scale output of parallel programs. |
Step-19 | Input parameter file handling. Merging output of a parallel program. |
Step-20 | Mixed finite elements. Using block matrices and block vectors to define more complicated solvers and preconditioners working on the Schur complement. |
Step-21 | The time dependent two-phase flow in porous media. Extensions of mixed Laplace discretizations. More complicated block solvers. Simple time stepping. |
Step-22 | Solving the Stokes equations of slow fluid flow on adaptive meshes. More on Schur complement solvers. Advanced use of the ConstraintMatrix class. |
Step-23 | Finally a "real" time dependent problem, the wave equation. |
Step-24 | A variant of step-23 with absorbing boundary conditions, and extracting practically useful data. |
Step-25 | The sine-Gordon soliton equation, which is a nonlinear variant of the time dependent wave equation covered in step-23 and step-24. |
Step-27 | hp finite element methods |
Step-28 | Multiple grids for solving a multigroup diffusion equation in nuclear physics simulating a nuclear reactor core |
Step-29 | Solving a complex-valued Helmholtz equation. Sparse direct solvers. Dealing with parameter files. |
Step-30 | Anisotropic refinement for DG finite element methods. |
Step-31 | Time-dependent Stokes flow driven by temperature differences in a fluid. Adaptive meshes that change between time steps. |
Step-33 | A nonlinear hyperbolic conservation law: The Euler equations of compressible gas dynamics. |
Step-34 | Boundary element methods (BEM) of low order: Exterior irrotational flow. The ParsedFunction class. |
Basic techniques | Step-1 | Creating a grid. A simple way to write it to a file |
Step-2 | Degrees of freedom | |
Step-3 | Solve the Laplace equation | |
Step-4 | Dimension independent programming, non-zero data | |
Step-5 | Computing on uniformly refined meshes | |
Step-6 | Adaptivity | |
Step-7 | Evaluating errors | |
Advanced techniques | Step-9, Step-28 | Multithreading |
Step-20, Step-21, Step-22, Step-31 | Block solvers and preconditioners | |
Step-17, Step-18, Step-19 | Parallelization via PETSc and MPI | |
Step-31, Step-33 | Using Trilinos | |
Step-19, Step-28, Step-29, Step-33, Step-34 | Input parameter handling | |
Step-10, Step-11 | Higher order mappings | |
Step-6, Step-9, Step-14 | Error indicators and estimators | |
Step-15, Step-28, Step-31, Step-33 | Transfering solutions across mesh refinement | |
Step-12 | Discontinuous Galerkin methods | |
Step-27 | hp finite elements | |
Step-30 | Anisotropic refinement for DG finite element methods. | |
Step-16 | Multilevel preconditioners | |
Step-33 | Computing Jacobians from residuals, automatic differentiation | |
Step-34 | Boundary element methods | |
Linear solver issues | Step-3 | Conjugate Gradient solver |
Step-5 | Preconditioned CG solver | |
Step-9 | BiCGStab | |
Step-16, Step-31 | Multilevel preconditioners | |
Step-17, Step-18 | Parallel solvers | |
Step-20, Step-21, Step-22, Step-31 | Block and Schur complement solvers | |
Step-33 | Linear Newton systems from nonlinear equations | |
Other equations | Step-7, Step-29 | Helmholtz equation |
Step-8 | Elasticity equations | |
Step-18 | Quasi-static elasticity equations | |
Step-9, Step-21, Step-31 | Transport (advection) equations | |
Step-33 | The nonlinear hyperbolic Euler system of compressible gas dynamics | |
Step-20 | Mixed Laplace | |
Step-21 | Porous media flow | |
Step-22, Step-31 | Incompressible Stokes flow | |
Step-23, Step-24, Step-25 | The wave equation, in linear and nonlinear variants | |
Step-28 | A multigroup diffusion problem in neutron transport | |
Step-34 | Irrotational flow | |
Vector problems | Step-8 | Elasticity equations |
Step-20 | Mixed Laplace | |
Step-21 | Mixed Laplace plus an advection equation | |
Step-22, Step-31 | Incompressible Stokes flow | |
Step-29 | A complex-valued Helmholtz problem | |
Step-33 | The Euler equations of compressible gas dynamics | |
Time-dependent problems | Step-18 | Quasi-static elasticity |
Step-21 | Porous media flow | |
Step-23, Step-24, Step-25 | The wave equation, in linear and nonlinear variants | |
Step-31 | Time dependent Stokes flow driven by buoyancy | |
Step-33 | The Euler equations of compressible gas dynamics |