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