17f296bb3SBarry Smith# PETSc in a nutshell 27f296bb3SBarry Smith 37f296bb3SBarry SmithSee {any}`handson` to immediately jump in and run PETSc code. 47f296bb3SBarry Smith 57f296bb3SBarry SmithPETSc/TAO is a tool for writing, analyzing, and optimizing large-scale numerical simulations. 67f296bb3SBarry Smith 77f296bb3SBarry Smith```{image} /images/manual/library_structure.svg 87f296bb3SBarry Smith:align: center 97f296bb3SBarry Smith:alt: PETSc Structure Diagram 107f296bb3SBarry Smith``` 117f296bb3SBarry Smith 127f296bb3SBarry Smith## Algebraic objects 137f296bb3SBarry Smith 147f296bb3SBarry Smith- {any}`Vectors <ch_vectors>` - containers for simulation solutions, right-hand sides of linear systems, etc (`Vec`). 157f296bb3SBarry Smith 167f296bb3SBarry Smith- {any}`Matrices <ch_matrices>` - contain Jacobians and operators that define linear systems (`Mat`). 177f296bb3SBarry Smith 187f296bb3SBarry Smith - {any}`Multiple sparse and dense matrix storage formats<doc_matrix>`, 197f296bb3SBarry Smith - {any}`Limited memory variable metric representations<sec_matlmvm>`, 207f296bb3SBarry Smith - {any}`block<sec_block_matrices>` and {any}`nested<sec_matnest>` representations, 217f296bb3SBarry Smith - {any}`Easy, efficient matrix assembly and interface <sec_matcreate>`. 227f296bb3SBarry Smith 237f296bb3SBarry Smith- Indices - used to access portions of vectors and matrix, for example {1,2,4} or 1:10 (`IS`). 247f296bb3SBarry Smith 257f296bb3SBarry Smith## Solvers 267f296bb3SBarry Smith 277f296bb3SBarry Smith- {any}`Linear solvers<ch_ksp>` based on preconditioners (`PC`) and Krylov subspace methods (`KSP`). 287f296bb3SBarry Smith 297f296bb3SBarry Smith- {any}`Nonlinear solvers <ch_snes>` (`SNES`). 307f296bb3SBarry Smith 317f296bb3SBarry Smith- {any}`Time integrators <ch_ts>`, (ODE/PDE), explicit, implicit, IMEX, (`TS`) 327f296bb3SBarry Smith 337f296bb3SBarry Smith - Local and global error estimators 347f296bb3SBarry Smith - {any}`section_sa`. 357f296bb3SBarry Smith 367f296bb3SBarry Smith- {any}`Optimization <ch_tao>` with equality and inequality constraints, first and second order (Newton) methods (`Tao`). 377f296bb3SBarry Smith 38*34b254c5SRichard Tran Mills- {any}`PetscRegressor <ch_regressor>` for regression and classification problems (`PetscRegressor`). 39*34b254c5SRichard Tran Mills 407f296bb3SBarry Smith- Eigenvalue/Eigenvectors and related algorithms in the package [SLEPc](https://slepc.upv.es). 417f296bb3SBarry Smith 427f296bb3SBarry Smith## Model/Discretization Interfaces to Solvers 437f296bb3SBarry Smith 447f296bb3SBarry Smith- Simple structured grids, `DMDA`. 457f296bb3SBarry Smith- Staggered grids, {any}`ch_stag`, `DMSTAG`. 467f296bb3SBarry Smith- Unstructured grids, {any}`ch_unstructured`, `DMPLEX`. 477f296bb3SBarry Smith- Networks/graphs, for example the power grid, river networks, the nervous system, {any}`ch_network`, `DMNETWORK`. 487f296bb3SBarry Smith- Quad or octree grids, `DMFOREST`. 497f296bb3SBarry Smith- Particles, `DMSWARM`. 507f296bb3SBarry Smith 517f296bb3SBarry Smith:::{seealso} 527f296bb3SBarry SmithFor full feature list see: 537f296bb3SBarry Smith 547f296bb3SBarry Smith- {ref}`Vector table <doc_vector>` 557f296bb3SBarry Smith- {ref}`Matrix table <doc_matrix>` 567f296bb3SBarry Smith- {ref}`Linear solvers table <doc_linsolve>` 577f296bb3SBarry Smith- {ref}`Nonlinear solvers table <doc_nonlinsolve>` 587f296bb3SBarry Smith- {ref}`ODE integrators table <integrator_table>` 597f296bb3SBarry Smith- {ref}`Optimizers table <doc_taosolve>` 607f296bb3SBarry Smith- {ref}`Model/discretization interfaces to solvers table <dm_table>` 617f296bb3SBarry Smith::: 627f296bb3SBarry Smith 637f296bb3SBarry Smith## Utilities for Simulations/Solvers 647f296bb3SBarry Smith 657f296bb3SBarry SmithRuntime 667f296bb3SBarry Smith 677f296bb3SBarry Smith- control of the simulation via {any}`runtime options <sec_options>` 687f296bb3SBarry Smith- visualization of the solvers and simulation via {any}`viewers <sec_viewers>`, 697f296bb3SBarry Smith- {any}`monitoring <sec_kspmonitor>` of solution progress, 707f296bb3SBarry Smith- {any}`profiling <ch_profiling>` of the performance, 717f296bb3SBarry Smith- robust {any}`error handling <sec_errors>`. 72