PETSc comes with a large number of example codes to illustrate usage. Here, we highlight a few, key ones:

Several examples are also included that represent the interoperability with other numerical software packages in the xSDK Toolkit. These packages can be automatically installed by PETSc by configuring with --download-trilinos, --download-hypre, and/or --download-superlu_dist.

Example 1: Linear Poisson equation on a 2D grid

WHAT THIS EXAMPLE DEMONSTRATES:

FURTHER DETAILS:

DO THE FOLLOWING:

Example 2: Nonlinear ODE arising from a time-dependent one dimensional PDE

WHAT THIS EXAMPLE DEMONSTRATES:

FURTHER DETAILS:

DO THE FOLLOWING:

Example 3: Nonlinear PDE on a structured grid

WHAT THIS EXAMPLE DEMONSTRATES:

FURTHER DETAILS:

DO THE FOLLOWING:

Example 4: Linear Stokes-type PDE on a structured grid

WHAT THIS EXAMPLE DEMONSTRATES:

FURTHER DETAILS:

DO THE FOLLOWING:

Example 5: Nonlinear time dependent PDE on Unstructured Grid

WHAT THIS EXAMPLE DEMONSTRATES:

FURTHER DETAILS:

DO THE FOLLOWING: