Praveen Chandrashekar

Centre for Applicable Mathematics, TIFR, Bangalore

[ People | News | Codes | Talks | Teaching | Publications | Calendar | Hiking | Contact ]

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

  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).

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.

Other resources

  1. Parallel clusters and getting good performance
  2. Book on PETSc for PDEs, codes used in the book
  3. Lid-driven cavity