petsc4py.PETSc#

Portable, Extensible Toolkit for Scientific Computation.

Basic constants:

DECIDE

Use a default value for an int or float parameter.

DEFAULT

Use a default value for an int or float parameter.

DETERMINE

Compute a default value for an int or float parameter.

More constants:

INFINITY

Very large real value.

NINFINITY

Very large negative real value.

PINFINITY

Very large positive real value, same as INFINITY.

Classes

AO

Application ordering object.

Comm

Communicator object.

DM

An object describing a computational grid or mesh.

DMComposite

A DM object that is used to manage data for a collection of DMs.

DMDA

A DM object that is used to manage data for a structured grid.

DMInterpolation

Interpolation on a mesh.

DMLabel

An object representing a subset of mesh entities from a DM.

DMPlex

Encapsulate an unstructured mesh.

DMPlexTransform

DMPlexTransformType

DMShell

A shell DM object, used to manage user-defined problem data.

DMStag

A DM object representing a "staggered grid" or a structured cell complex.

DMSwarm

A DM object used to represent arrays of data (fields) of arbitrary type.

DS

Discrete System object.

Device

The device object.

DeviceContext

DeviceContext object.

DualSpace

Dual space to a linear space.

FE

A PETSc object that manages a finite element space.

IS

A collection of indices.

InsertMode

Insertion mode.

KSP

Abstract PETSc object that manages all Krylov methods.

LGMap

Mapping from an arbitrary local ordering from 0 to n-1 to a global PETSc ordering used by a vector or matrix.

Log

Logging support.

LogClass

LogEvent

LogStage

Logging support for different stages.

Mat

Matrix object.

MatPartitioning

Object for managing the partitioning of a matrix or graph.

NormType

Norm type.

NullSpace

Nullspace object.

Object

Options

Options(prefix=None)

PC

Preconditioners.

Partitioner

A graph partitioner.

Quad

Quadrature rule for integration.

Random

The random number generator object.

SF

Star Forest object for communication.

SNES

Nonlinear equations solver.

Scatter

Scatter object.

ScatterMode

Scatter mode.

Section

Mapping from integers in a range to unstructured set of integers.

Space

Linear space object.

Sys

System utilities.

TAO

Optimization solver.

TAOLineSearch

TAO Line Search.

TS

ODE integrator.

Vec

A vector object.

Viewer

Viewer object.

ViewerHDF5

Exceptions

Error

PETSc Error.

Functions

garbage_cleanup([comm])

Clean up unused PETSc objects.

garbage_view([comm])

Print summary of the garbage PETSc objects.

Attributes

DECIDE

Constant DECIDE of type int

DEFAULT

Constant DEFAULT of type int

DETERMINE

Constant DETERMINE of type int

INFINITY

Object INFINITY of type float

NINFINITY

Object NINFINITY of type float

PINFINITY

Object PINFINITY of type float

COMM_NULL

Object COMM_NULL of type Comm

COMM_SELF

Object COMM_SELF of type Comm

COMM_WORLD

Object COMM_WORLD of type Comm