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

  1. KSP: Methods for solving matrix equations, i.e., linear solvers
  2. SNES: Newton method for solving non-linear equations
  3. 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)


The location of the example source codes is


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


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