xref: /petsc/doc/overview/nutshell.md (revision 174dc0c8cee294b82b85e4dd3b331b29396264fc)
1# PETSc in a nutshell
2
3See {any}`handson` to immediately jump in and run PETSc code.
4
5PETSc/TAO is a tool for writing, analyzing, and optimizing large-scale numerical simulations.
6
7```{image} /images/manual/library_structure.svg
8:align: center
9:alt: PETSc Structure Diagram
10```
11
12## Algebraic objects
13
14- {any}`Vectors <ch_vectors>` - containers for simulation solutions, right-hand sides of linear systems, etc (`Vec`).
15
16- {any}`Matrices <ch_matrices>` - contain Jacobians and operators that define linear systems (`Mat`).
17
18  - {any}`Multiple sparse and dense matrix storage formats<doc_matrix>`,
19  - {any}`Limited memory variable metric representations<sec_matlmvm>`,
20  - {any}`block<sec_block_matrices>` and {any}`nested<sec_matnest>` representations,
21  - {any}`Easy, efficient matrix assembly and interface <sec_matcreate>`.
22
23- Indices - used to access portions of vectors and matrix, for example {1,2,4} or 1:10 (`IS`).
24
25## Solvers
26
27- {any}`Linear solvers<ch_ksp>` based on preconditioners (`PC`) and Krylov subspace methods (`KSP`).
28
29- {any}`Nonlinear solvers <ch_snes>` (`SNES`).
30
31- {any}`Time integrators <ch_ts>`, (ODE/PDE), explicit, implicit, IMEX, (`TS`)
32
33  - Local and global error estimators
34  - {any}`section_sa`.
35
36- {any}`Optimization <ch_tao>` with equality and inequality constraints, first and second order (Newton) methods (`Tao`).
37
38- {any}`PetscRegressor <ch_regressor>` for regression and classification problems (`PetscRegressor`).
39
40- Eigenvalue/Eigenvectors and related algorithms in the package [SLEPc](https://slepc.upv.es).
41
42## Model/Discretization Interfaces to Solvers
43
44- Simple structured grids, `DMDA`.
45- Staggered grids, {any}`ch_stag`, `DMSTAG`.
46- Unstructured grids, {any}`ch_unstructured`, `DMPLEX`.
47- Networks/graphs, for example the power grid, river networks, the nervous system, {any}`ch_network`, `DMNETWORK`.
48- Quad or octree grids, `DMFOREST`.
49- Particles, `DMSWARM`.
50
51:::{seealso}
52For full feature list see:
53
54- {ref}`Vector table <doc_vector>`
55- {ref}`Matrix table <doc_matrix>`
56- {ref}`Linear solvers table <doc_linsolve>`
57- {ref}`Nonlinear solvers table <doc_nonlinsolve>`
58- {ref}`ODE integrators table <integrator_table>`
59- {ref}`Optimizers table <doc_taosolve>`
60- {ref}`Model/discretization interfaces to solvers table <dm_table>`
61:::
62
63## Utilities for Simulations/Solvers
64
65Runtime
66
67- control of the simulation via {any}`runtime options <sec_options>`
68- visualization of the solvers and simulation via {any}`viewers <sec_viewers>`,
69- {any}`monitoring <sec_kspmonitor>` of solution progress,
70- {any}`profiling <ch_profiling>` of the performance,
71- robust {any}`error handling <sec_errors>`.
72