Home

PETSc

PETSc (Portable, Extensible Toolkit for Scientific Computation) is a suite of data structures and routines for the scalable solution of scientific applications modeled by partial differential equations. It provides parallel linear and nonlinear solvers, time integrators, and miscellaneous components for discretization, mesh management, and preconditioning. PETSc is designed for high-performance computing on distributed-memory architectures using the Message Passing Interface (MPI). It aims to enable robust, scalable, and portable software for large-scale scientific computations.

The core library exposes a small set of abstract objects and modular components. Vec and Mat represent

PETSc emphasizes portability and performance, with support for various architectures, GPUs, and accelerators through backends and

global
vectors
and
sparse
matrices;
KSP
provides
Krylov
subspace
linear
solvers
with
a
hierarchy
of
preconditioners
(PC);
SNES
handles
nonlinear
solvers;
TS
offers
time-stepping
schemes;
DM
(data
management)
manages
problem-specific
grids
and
fields
(e.g.,
DMDA,
DMPLEX).
The
toolkit
supports
interfaces
to
Fortran,
C++,
and
scripting
languages
such
as
Python
(petsc4py).
Users
can
extend
PETSc
with
external
libraries
(e.g.,
HYPRE,
MUMPS,
METIS/ParMETIS,
and
SLEPc
for
eigenproblems).
plugins.
It
includes
extensive
documentation,
tutorials,
and
a
large
suite
of
example
programs
to
aid
development.
The
BSD-style
license
makes
it
freely
available
for
academic
and
commercial
work.
In
practice,
PETSc
is
widely
used
for
solving
linear
and
nonlinear
systems
arising
from
PDE
discretizations,
time-dependent
simulations,
optimization
problems,
and
multiphysics
applications,
often
in
conjunction
with
higher-level
frameworks
and
research
codes.