PETSc Tutorials — PETSc 3.17.4 documentation

# PETSc Tutorials

- In-person tutorials
  - Upcoming tutorials
  - Previous tutorials

PETSc has many tutorial examples, found in `tutorials/` directories throughout the `src/` tree. Since these do not have informative names and vary greatly in their complexity and level of internal documentation, this page provides guides to connect the tutorial examples to particular physics, discretizations, solvers, etc. that you might be interested in.

- Guide to PETSc Tutorial Examples, by Physics
  - Poisson
  - Elastostatics
  - Stokes
  - Euler
  - Heat equation
  - Navier-Stokes
- Guide to the Stokes Equations using Finite Elements in PETSc
  - Equation Definition
  - MMS Solutions
  - Dealing with Parameters
  - Investigating convergence
  - Bibliography
- Guide to the Meshing for Subsurface Flows in PETSc
  - Reading the ASCII Output
  - Refinement of Simplex Meshes
- Guide to PETSc Quick Start Tutorial on Time, Accuracy, Speed Analysis(TAS)
- Classic "Hands-on" tutorials
  - Example 1: Linear Poisson equation on a 2D grid
  - Example 2: Nonlinear ODE arising from a time-dependent one dimensional PDE
  - Example 3: Nonlinear PDE on a structured grid
  - Example 4: Linear Stokes-type PDE on a structured grid
  - Example 5: Nonlinear time dependent PDE on Unstructured Grid