# PETSc in a nutshell¶

PETSc/TAO is a tool for writing, analyzing, and optimizing properties of large-scale numerical simulations.

## Algebraic objects¶

• Vec - containers for simulation solutions, right hand sides of linear systems, etc.

• Mat - contain Jacobians and operators that define linear systems

• IS indices - used to access portions of vectors and matrix, for example {1,2,4} or 1:10

## Solvers¶

• PC preconditioners - approximate solvers to algebra systems without a history of previous iterations

• KSP Krylov Subspace methods - approximate solvers with a history of previous iterations

• SNES nolinear equation solvers

• TS time integrators (ODE/PDE), explicit, implicit, local and global error estimators

• TSAdjoint derivatives/sensitivities of functions of ODE/PDE integration solutions

• TAO - optimization, with equality and inequality constraints, first and second order (Newton) methods

## Connectors of continuum models, meshes, and discretizations to solvers and algebraic objects¶

• DMDA - for simulations computed on simple structured grids

• DMSTAG - for simulations computed on staggered grids

• DMPLEX - for simulation computed on unstructured meshes

• DMNETWORK - for simulations on networks or graphs, for example the power grid, river networks, the nervous system

• DMP4EST - for simulations on collections of quad or octree meshes

• DMSWARM - for simulations on particles

## Utilities¶

• PetscOptions - control of discretization and solution process

• PetscViewer - visualizing algebraic objects, solvers, connectors

• Monitor - monitoring of solution progress

• Profiling - profiling of the performance of the simulation solution process
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.76169753074646, "perplexity": 10286.478762097548}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-05/segments/1642320304749.63/warc/CC-MAIN-20220125005757-20220125035757-00648.warc.gz"}