# PETSc

PETSc is a library for large scale numerical linear algebra but it also has support for finite elements, time stepping schemes, mesh management, etc. The three main methods for solving equations are

- KSP: Methods for solving matrix equations, i.e., linear solvers
- SNES: Newton method for solving non-linear equations
- TS: Time stepping schemes

You should subscribe to the mailing list if you want help, and the PETSc developers are incredibly helpful (of course, please do your homework first before asking questions).

## Tutorials and examples

If you download the PETSc source code and extract it to some place, you can access example codes which are well documented. You can access an index page that links to examples and documentation here (online version).

```
docs/index.html
```

The location of the example source codes is

```
src/ksp/ksp/examples/tutorials
src/snes/examples/tutorials
src/ts/examples/tutorials
```

It is easier to view the examples through the html index which gives better documentation, see

```
src/ksp/ksp/examples/tutorials/index.html
src/snes/examples/tutorials/index.html
src/ts/examples/tutorials/index.html
```

For a quick introduction to some of the methods, see the Hands on Exercises.