# Interactive NGSolve Tutorial¶

## What are the i-tutorials ?¶

The i-tutorials are interactive tutorials to NGS-Py, the Python front-end to NGSolve. The i-tutorials are Jupyter notebooks which allow you to explore the features of NGS-Py.

The i-tutorials have been setup for the 2017 NGSolve user meeting. The authors of the sections are Jay Gopalakrishnan (Getting Started), Joachim Schöberl (Advanced Topics), Christoph Lehrenfeld (Time-dependent and non-linear problems), Christoph Wintersteiger (Geometric modeling and mesh generation). Big thanks to Matthias Hochsteger for integrating the Netgen-GUI into Jupyter.

Copyright: The i-tutorials are a part of NGSolve and are covered by the LGPL open source license. You may extend and modify them for your use, but you have to refer to the original source.

We acknowledge support from the TU Wien and by the Austrian Science Foundation FWF within project grant SFB65 Taming Complexity in Partial Differential Systems.

## Installation¶

To work through the i-tutorials, you first have to install

Netgen/NGSolve, see http://www.ngsolve.org/downloads

Jupyter from http://www.jupyter.org. You can use the pip package manager: "pip3 install jupyter"

download and unpack the i-tutorials from here.

To use the webgui visualization within jupyter you need

pip3 install ipywidgets

jupyter nbextension install --py widgetsnbextension

jupyter nbextension enable --py widgetsnbextension

jupyter nbextension install --user --py ngsolve

jupyter nbextension enable --user --py ngsolve

Some of the tutorials require packages from scipy and matplotlib, so it is a good idea to install them as well:

pip3 install scipy

pip3 install matplotlib

### i-tutorials on Youtube¶

We have recorded the tutorial sessions from the 3rd NGSolve Usermeeting in which most of these tutorial files were presented. You can watch the presentations on the NGSolve Youtube channel.

## Starting¶

You start with the interactive tutorial by opening a terminal, go to the main folder containing the i-tutorials, and start

```
jupyter-notebook index.ipynb
```

# Whetting the Appetite¶

# 1. Getting started¶

# 2. Advanced Topics¶

- 2.1.1 Preconditioners in NGSolve
- 2.1.2 Building blocks for programming preconditioners
- 2.1.3 Element-wise BDDC Preconditioner
- 2.2 Programming an eigenvalue solver
- 2.3
*H(curl)*and*H(div)*function spaces - 2.4 Maxwell’s Equations
- 2.4.1 Maxwell eigenvalue problem
- 2.5 Mixed formulation for second order equations
- 2.6 Stokes equation
- 2.7 Facet spaces and hybrid methods
- 2.8 Discontinuous Galerkin Methods
- 2.9 Fourth order equations
- 2.10 Dual basis functions
- 2.11 Matrix free operator application

# 3. Time-dependent and non-linear problems¶

- 3.1 Parabolic model problem
- 3.2 Incompressible Navier-Stokes equations
- 3.3 Discontinuous Galerkin Discretizations for linear transport
- 3.3.1 DG for the acoustic wave equation
- 3.4 A Nonlinear conservation law: shallow water equation in 2D
- 3.5 Scalar PDE on surfaces (with HDG)
- 3.6 DG/HDG splitting
- 3.7 Nonlinear problems
- 3.8 Nonlinear minimization problems

# 4. Geometric modeling and mesh generation¶

# 5. MPI - Parallelization¶

- 5.1 Basics of MPI-parallel NGSolve
- 5.2 FETI-DP in NGSolve I: Working with Point-Constraints
- 5.3 FETI-DP in NGSolve II: Point-Constraints in 3D
- 5.4 FETI-DP in NGSolve III: Using Non-Point Constraints
- 5.5 FETI-DP in NGSolve IV: Inexact FETI-DP
- Poisson Equation in Parallel
- Parallel dofs and Vector-types
- 5.3.1 Using PETSc
- 5.3.2 NGSolve - PETSc interface