PETSc for Partial Differential Equations is a book on using PETSc and Firedrake to solve partial differential equations by modern numerical methods.
Order a paper copy from SIAM Press, or the e-book from Google Play.
This repository contains the C and Python example programs upon which the book is based.
These example programs will remain here for the long term, and they are maintained/updated for the most-recent version of PETSc.
To compile and run the C examples, for Chapters 1 through 12, see the README.md in the c/ directory.
Chapters 13 and 14 use Firedrake, a Python finite element library based on PETSc. See MANAGING2.md for suggestions on using a second PETSc installation for Firedrake. See the README.md in the python/ directory to run the Firedrake examples.