PETSC4PY(3)

NAME
petsc4py - PETSc for Python

    Author
        Lisandro Dalcin

    Contact
        <dalcinl@gmail.com>

    Web Site
        <https://gitlab.com/petsc/petsc>

    Date
        Aug 24, 2026

  Abstract

This document describes petsc4py <#module-petsc4py>, a Python <https://www.python.org> wrapper to the PETSc <https://petsc.org> libraries.

PETSc <https://petsc.org> (the Portable, Extensible Toolkit for Scientific Computation) is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations. It employs the MPI <https://www.mpi-forum.org> standard for all message-passing communication.

This package provides an important subset of PETSc functionalities and uses NumPy <https://numpy.org> to efficiently manage input and output of array data.

A good friend of petsc4py is:

            •   mpi4py <https://github.com/mpi4py/mpi4py>: Python bindings for MPI <https://www.mpi-forum.org>, the Message Passing Interface.

Other projects depend on petsc4py:

            •   slepc4py <https://gitlab.com/slepc/slepc>: Python bindings for SLEPc <https://slepc.upv.es>, the Scalable Library for Eigenvalue Problem Computations.

PETSC OVERVIEW

PETSc <https://petsc.org> is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations. It employs the MPI <https://www.mpi-forum.org> standard for all message-passing communication.

PETSc is intended for use in large-scale application projects [petsc-efficient] <#petsc-efficient>, and several ongoing computational science projects are built around the PETSc libraries. With strict attention to component interoperability, PETSc facilitates the integration of independently developed application modules, which often most naturally employ different coding styles and data structures.

PETSc is easy to use for beginners [petsc-user-ref] <#petsc-user-ref>. Moreover, its careful design allows advanced users to have detailed control over the solution process. PETSc includes an expanding suite of parallel linear and nonlinear equation solvers that are easily used in application codes written in C, C++, and Fortran. PETSc provides many of the mechanisms needed within parallel application codes, such as simple parallel matrix and vector assembly routines that allow the overlap of communication and computation.

[petsc-user-ref]
    S. Balay, S. Abhyankar, M. Adams, S. Benson, J. Brown, P. Brune, K. Buschelman, E. Constantinescu, L. Dalcin, A. Dener, V. Eijkhout, J. Faibussowitsch, W. Gropp, V. Hapla, T. Isaac, P. Jolivet, D. Karpeyev, D. Kaushik, M. Knepley, F. Kong, S. Kruger, D. May, L. Curfman McInnes, R. Mills, L. Mitchell, T. Munson, J. Roman, K. Rupp, P. Sanan, J Sarich, B. Smith, H. Suh, S. Zampini, H. Zhang, and H. Zhang, J. Zhang, PETSc/TAO Users Manual, ANL-21/39 - Revision 3.25, 2026. <https://doi.org/10.2172/2998643>, <https://petsc.org/release/docs/manual/manual.pdf>

[petsc-efficient]
    Satish Balay, Victor Eijkhout, William D. Gropp, Lois Curfman McInnes and Barry F. Smith. Efficient Management of Parallelism in Object Oriented Numerical Software Libraries. Modern Software Tools in Scientific Computing. E. Arge, A. M. Bruaset and H. P. Langtangen, editors. 163--202. Birkhauser Press. 1997.

  Components

PETSc is designed with an object-oriented style. Almost all user-visible types are abstract interfaces with implementations that may be chosen at runtime. Those objects are managed through handles to opaque data structures which are created, accessed and destroyed by calling appropriate library routines.

PETSc consists of a variety of components. Each component manipulates a particular family of objects and the operations one would like to perform on these objects. These components provide the functionality required for many parallel solutions of PDEs.

    Vec Provides the vector operations required for setting up and solving large-scale linear and nonlinear problems. Includes easy-to-use parallel scatter and gather operations, as well as special-purpose code for handling ghost points for regular data structures.

    Mat A large suite of data structures and code for the manipulation of parallel sparse matrices. Includes several different parallel matrix data structures, each appropriate for a different class of problems.

    PC  A collection of sequential and parallel preconditioners, including (sequential) ILU(k), LU, and (both sequential and parallel) block Jacobi, overlapping additive Schwarz methods.

    KSP Parallel implementations of many popular Krylov subspace iterative methods, including GMRES, CG, CGS, Bi-CG-Stab, two variants of TFQMR, CR, and LSQR. All are coded so that they are immediately usable with any preconditioners and any matrix data structures, including matrix-free methods.

    SNES
        Data-structure-neutral implementations of Newton-like methods for nonlinear systems. Includes both line search and trust region techniques with a single interface. Employs by default the above data structures and linear solvers. Users can set custom monitoring routines, convergence criteria, etc.

    TS  Code for the time evolution of solutions of PDEs. In addition, provides pseudo-transient continuation techniques for computing steady-state solutions.

INSTALLATION

  Install from PyPI using pip

You can use pip to install petsc4py <#module-petsc4py> and its dependencies:

            $ python -m pip install petsc petsc4py

  Install from the PETSc source tree

First build PETSc <https://petsc.org/release/install/index.html#doc-install>. Next cd to the top of the PETSc source tree and set the PETSC_DIR <https://petsc.org/release/install/multibuild.html#doc-multi> and PETSC_ARCH <https://petsc.org/release/install/multibuild.html#doc-multi> environment variables. Run:

            $ python -m pip install src/binding/petsc4py

The installation of petsc4py <#module-petsc4py> supports multiple PETSC_ARCH <https://petsc.org/release/install/multibuild.html#doc-multi> in the form of colon separated list:

            $ PETSC_ARCH='arch-0:...:arch-N' python -m pip install src/binding/petsc4py

If you are cross-compiling, and the numpy <https://numpy.org/doc/stable/reference/index.html#module-numpy> module cannot be loaded on your build host, then before invoking pip, set the NUMPY_INCLUDE environment variable to the path that would be returned by import numpy; numpy.get_include():

            $ export NUMPY_INCLUDE=/usr/lib/pythonX/site-packages/numpy/core/include

  Running the testing suite

When installing from source, the petsc4py complete testsuite can be run as:

            $ cd src/binding/petsc4py
            $ python test/runtests.py

or via the makefile rule test:

            $ make test -C src/binding/petsc4py

Specific tests can be run using the command-line option -k, e.g.:

            $ python test/runtests.py -k test_optdb

to run all the tests provided in tests/test_optdb.py.

For other command-line options, run:

            $ python test/runtests.py --help

If not otherwise specified, all tests will be run in sequential mode. To run all the tests with the same number of MPI processes, for example 4, run:

            $ mpiexec -n 4 python test/runtests.py

or:

            $ make test-4 -C src/binding/petsc4py

  Building the documentation

Install the documentation dependencies:

            $ python -m pip install -r src/binding/petsc4py/conf/requirements-docs.txt

Then:

            $ cd src/binding/petsc4py/docs/source
            $ make html

The resulting HTML files will be in _build/html.

Note:
        Building the documentation requires Python 3.11 or later.

CONTRIBUTING

Contributions from the user community are welcome. See the PETSc developers <https://petsc.org/release/developers/index.html#ind-developers> documentation for general information on contributions.

New contributions to petsc4py must adhere with the coding standards. We use cython-lint <https://github.com/MarcoGorelli/cython-lint> for Cython and ruff <https://docs.astral.sh/ruff> for Python source codes. These can be installed using:

            $ python -m pip install -r src/binding/petsc4py/conf/requirements-lint.txt

If you are contributing Cython code, you can check compliance with:

            $ make cython-lint -C src/binding/petsc4py

For Python code, run:

            $ make ruff-lint -C src/binding/petsc4py

Python code can be auto-formatted using:

            $ make ruff-lint RUFF_OPTS='format' -C src/binding/petsc4py

New contributions to petsc4py must be tested. Tests are located in the src/binding/petsc4py/test folder. To add a new test, either add a new test_xxx.py or modify a pre-existing file according to the unittest <https://docs.python.org/3/library/unittest.html> specifications.

If you add a new test_xxx.py, you can run the tests using:

            $ cd src/binding/petsc4py
            $ python test/runtests.py -k test_xxx

If instead you are modifying an existing test_xxx.py, you can test your additions by using the fully qualified name of the Python class or method you are modifying, e.g.:

            $ python test/runtests.py -k test_xxx.class_name.method_name

All new code must include documentation in accordance with the documentation standard <>. To check for compliance, run:

            $ make html SPHINXOPTS='--fail-on-warning' -C src/binding/petsc4py/docs/source

Warning:
        The docstrings must not cause Sphinx warnings.

CITATIONS

If PETSc for Python has been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project.

    •   L. Dalcin, P. Kler, R. Paz, and A. Cosimo, Parallel Distributed Computing using Python, Advances in Water Resources, 34(9):1124-1139, 2011. <https://doi.org/10.1016/j.advwatres.2011.04.013>

    •   S. Balay, S. Abhyankar, M. Adams, S. Benson, J. Brown, P. Brune, K. Buschelman, E. Constantinescu, L. Dalcin, A. Dener, V. Eijkhout, J. Faibussowitsch, W. Gropp, V. Hapla, T. Isaac, P. Jolivet, D. Karpeyev, D. Kaushik, M. Knepley, F. Kong, S. Kruger, D. May, L. Curfman McInnes, R. Mills, L. Mitchell, T. Munson, J. Roman, K. Rupp, P. Sanan, J Sarich, B. Smith, H. Suh, S. Zampini, H. Zhang, and H. Zhang, J. Zhang, PETSc/TAO Users Manual, ANL-21/39 - Revision 3.25, 2026. <https://doi.org/10.2172/2998643>, <https://petsc.org/release/docs/manual/manual.pdf>

REFERENCE
petsc4py <#module-petsc4py> | The PETSc for Python package.
petsc4py.typing <#module-petsc4py.typing> | Typing support.
petsc4py.PETSc <#module-petsc4py.PETSc> | Portable, Extensible Toolkit for Scientific Computation.

  petsc4py

The PETSc for Python package.

This package is an interface to PETSc libraries.

PETSc <https://petsc.org> (the Portable, Extensible Toolkit for Scientific Computation) is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations. It employs the MPI <https://www.mpi-forum.org> standard for all message-passing communications.

Functions
get_config <#petsc4py.get_config>() | Return a dictionary with information about PETSc.
get_include <#petsc4py.get_include>() | Return the directory in the package that contains header files.
init <#petsc4py.init>([args, arch, comm]) | Initialize PETSc.

  petsc4py.get_config

    petsc4py.get_config()
        Return a dictionary with information about PETSc.

        Return type
            dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, str <https://docs.python.org/3/library/stdtypes.html#str>]

  petsc4py.get_include

    petsc4py.get_include()
        Return the directory in the package that contains header files.

        Extension modules that need to compile against petsc4py should use this function to locate the appropriate include directory.

        Example

        Using Python distutils or NumPy distutils:

                import petsc4py
                Extension('extension_name', ...
                          include_dirs=[..., petsc4py.get_include()])

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

  petsc4py.init

    petsc4py.init(args=None, arch=None, comm=None)
        Initialize PETSc.

        Parameters

            •   args (str <https://docs.python.org/3/library/stdtypes.html#str> | list <https://docs.python.org/3/library/stdtypes.html#list>[str <https://docs.python.org/3/library/stdtypes.html#str>] | None <https://docs.python.org/3/library/constants.html#None>) -- Command-line arguments, usually the sys.argv <https://docs.python.org/3/library/sys.html#sys.argv> list

            •   arch (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- Specific configuration to use

            •   comm (Intracomm <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Intracomm.html#mpi4py.MPI.Intracomm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI commmunicator

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    This function should be called only once, typically at the very beginning of the bootstrap script of an application.

  petsc4py.typing

Typing support.

Attributes
Scalar <#petsc4py.typing.Scalar> | Scalar type.
ArrayBool <#petsc4py.typing.ArrayBool> | Array of bool <https://docs.python.org/3/library/functions.html#bool>.
ArrayInt <#petsc4py.typing.ArrayInt> | Array of int <https://docs.python.org/3/library/functions.html#int>.
ArrayReal <#petsc4py.typing.ArrayReal> | Array of float <https://docs.python.org/3/library/functions.html#float>.
ArrayComplex <#petsc4py.typing.ArrayComplex> | Array of complex <https://docs.python.org/3/library/functions.html#complex>.
ArrayScalar <#petsc4py.typing.ArrayScalar> | Array of Scalar <#petsc4py.typing.Scalar> numbers.
DimsSpec <#petsc4py.typing.DimsSpec> | Dimensions specification.
AccessModeSpec <#petsc4py.typing.AccessModeSpec> | Access mode specification.
InsertModeSpec <#petsc4py.typing.InsertModeSpec> | Insertion mode specification.
ScatterModeSpec <#petsc4py.typing.ScatterModeSpec> | Scatter mode specification.
LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec> | int <https://docs.python.org/3/library/functions.html#int> or 2-tuple <https://docs.python.org/3/library/stdtypes.html#tuple> of int <https://docs.python.org/3/library/functions.html#int> describing the layout sizes.
NormTypeSpec <#petsc4py.typing.NormTypeSpec> | Norm type specification.
PetscOptionsHandlerFunction <#petsc4py.typing.PetscOptionsHandlerFunction> | Callback for processing extra options.
MatAssemblySpec <#petsc4py.typing.MatAssemblySpec> | Matrix assembly specification.
MatSizeSpec <#petsc4py.typing.MatSizeSpec> | int <https://docs.python.org/3/library/functions.html#int> or (nested) tuple <https://docs.python.org/3/library/stdtypes.html#tuple> of int <https://docs.python.org/3/library/functions.html#int> describing the matrix sizes.
MatBlockSizeSpec <#petsc4py.typing.MatBlockSizeSpec> | The row and column block sizes.
CSRIndicesSpec <#petsc4py.typing.CSRIndicesSpec> | CSR indices format specification.
CSRSpec <#petsc4py.typing.CSRSpec> | CSR format specification.
NNZSpec <#petsc4py.typing.NNZSpec> | Nonzero pattern specification.
MatNullFunction <#petsc4py.typing.MatNullFunction> | PETSc.NullSpace <#petsc4py.PETSc.NullSpace> callback.
MatHtoolKernelFunction <#petsc4py.typing.MatHtoolKernelFunction> | PETSc.Mat <#petsc4py.PETSc.Mat> Mat.Type.HTOOL <#petsc4py.PETSc.Mat.Type.HTOOL> kernel callback.
DMCoarsenHookFunction <#petsc4py.typing.DMCoarsenHookFunction> | PETSc.DM <#petsc4py.PETSc.DM> coarsening hook callback.
DMRestrictHookFunction <#petsc4py.typing.DMRestrictHookFunction> | PETSc.DM <#petsc4py.PETSc.DM> restriction hook callback.
KSPRHSFunction <#petsc4py.typing.KSPRHSFunction> | PETSc.KSP <#petsc4py.PETSc.KSP> right-hand side function callback.
KSPOperatorsFunction <#petsc4py.typing.KSPOperatorsFunction> | PETSc.KSP <#petsc4py.PETSc.KSP> operators function callback.
KSPConvergenceTestFunction <#petsc4py.typing.KSPConvergenceTestFunction> | PETSc.KSP <#petsc4py.PETSc.KSP> convergence test callback.
KSPMonitorFunction <#petsc4py.typing.KSPMonitorFunction> | PETSc.KSP <#petsc4py.PETSc.KSP> monitor callback.
KSPPreSolveFunction <#petsc4py.typing.KSPPreSolveFunction> | PETSc.KSP <#petsc4py.PETSc.KSP> pre solve callback.
KSPPostSolveFunction <#petsc4py.typing.KSPPostSolveFunction> | PETSc.KSP <#petsc4py.PETSc.KSP> post solve callback.
SNESMonitorFunction <#petsc4py.typing.SNESMonitorFunction> | SNES <#petsc4py.PETSc.SNES> monitor callback.
SNESObjFunction <#petsc4py.typing.SNESObjFunction> | SNES <#petsc4py.PETSc.SNES> objective function callback.
SNESFunction <#petsc4py.typing.SNESFunction> | SNES <#petsc4py.PETSc.SNES> residual function callback.
SNESJacobianFunction <#petsc4py.typing.SNESJacobianFunction> | SNES <#petsc4py.PETSc.SNES> Jacobian callback.
SNESGuessFunction <#petsc4py.typing.SNESGuessFunction> | SNES <#petsc4py.PETSc.SNES> initial guess callback.
SNESUpdateFunction <#petsc4py.typing.SNESUpdateFunction> | SNES <#petsc4py.PETSc.SNES> step update callback.
SNESLSPreFunction <#petsc4py.typing.SNESLSPreFunction> | SNES <#petsc4py.PETSc.SNES> linesearch pre-check update callback.
SNESNGSFunction <#petsc4py.typing.SNESNGSFunction> | SNES <#petsc4py.PETSc.SNES> nonlinear Gauss-Seidel callback.
SNESConvergedFunction <#petsc4py.typing.SNESConvergedFunction> | SNES <#petsc4py.PETSc.SNES> convergence test callback.
TSRHSFunction <#petsc4py.typing.TSRHSFunction> | TS <#petsc4py.PETSc.TS> right-hand side function callback.
TSRHSJacobian <#petsc4py.typing.TSRHSJacobian> | TS <#petsc4py.PETSc.TS> right-hand side Jacobian callback.
TSRHSJacobianP <#petsc4py.typing.TSRHSJacobianP> | TS <#petsc4py.PETSc.TS> right-hand side parameter Jacobian callback.
TSIFunction <#petsc4py.typing.TSIFunction> | TS <#petsc4py.PETSc.TS> implicit function callback.
TSIJacobian <#petsc4py.typing.TSIJacobian> | TS <#petsc4py.PETSc.TS> implicit Jacobian callback.
TSIJacobianP <#petsc4py.typing.TSIJacobianP> | TS <#petsc4py.PETSc.TS> implicit parameter Jacobian callback.
TSI2Function <#petsc4py.typing.TSI2Function> | TS <#petsc4py.PETSc.TS> implicit 2nd order function callback.
TSI2Jacobian <#petsc4py.typing.TSI2Jacobian> | TS <#petsc4py.PETSc.TS> implicit 2nd order Jacobian callback.
TSI2JacobianP <#petsc4py.typing.TSI2JacobianP> | TS <#petsc4py.PETSc.TS> implicit 2nd order parameter Jacobian callback.
TSMonitorFunction <#petsc4py.typing.TSMonitorFunction> | TS <#petsc4py.PETSc.TS> monitor callback.
TSPreStepFunction <#petsc4py.typing.TSPreStepFunction> | TS <#petsc4py.PETSc.TS> pre-step callback.
TSPostStepFunction <#petsc4py.typing.TSPostStepFunction> | TS <#petsc4py.PETSc.TS> post-step callback.
TSIndicatorFunction <#petsc4py.typing.TSIndicatorFunction> | TS <#petsc4py.PETSc.TS> event indicator callback.
TSPostEventFunction <#petsc4py.typing.TSPostEventFunction> | TS <#petsc4py.PETSc.TS> post-event callback.
TAOObjectiveFunction <#petsc4py.typing.TAOObjectiveFunction> | TAO <#petsc4py.PETSc.TAO> objective function callback.
TAOGradientFunction <#petsc4py.typing.TAOGradientFunction> | TAO <#petsc4py.PETSc.TAO> objective gradient callback.
TAOObjectiveGradientFunction <#petsc4py.typing.TAOObjectiveGradientFunction> | TAO <#petsc4py.PETSc.TAO> objective function and gradient callback.
TAOHessianFunction <#petsc4py.typing.TAOHessianFunction> | TAO <#petsc4py.PETSc.TAO> objective Hessian callback.
TAOUpdateFunction <#petsc4py.typing.TAOUpdateFunction> | TAO <#petsc4py.PETSc.TAO> update callback.
TAOMonitorFunction <#petsc4py.typing.TAOMonitorFunction> | TAO <#petsc4py.PETSc.TAO> monitor callback.
TAOConvergedFunction <#petsc4py.typing.TAOConvergedFunction> | TAO <#petsc4py.PETSc.TAO> convergence test callback.
TAOJacobianFunction <#petsc4py.typing.TAOJacobianFunction> | TAO <#petsc4py.PETSc.TAO> Jacobian callback.
TAOResidualFunction <#petsc4py.typing.TAOResidualFunction> | TAO <#petsc4py.PETSc.TAO> residual callback.
TAOJacobianResidualFunction <#petsc4py.typing.TAOJacobianResidualFunction> | TAO <#petsc4py.PETSc.TAO> Jacobian residual callback.
TAOVariableBoundsFunction <#petsc4py.typing.TAOVariableBoundsFunction> | TAO <#petsc4py.PETSc.TAO> variable bounds callback.
TAOConstraintsFunction <#petsc4py.typing.TAOConstraintsFunction> | TAO <#petsc4py.PETSc.TAO> constraints callback.
TAOConstraintsJacobianFunction <#petsc4py.typing.TAOConstraintsJacobianFunction> | TAO <#petsc4py.PETSc.TAO> constraints Jacobian callback.
TAOLSObjectiveFunction <#petsc4py.typing.TAOLSObjectiveFunction> | TAOLineSearch <#petsc4py.PETSc.TAOLineSearch> objective function callback.
TAOLSGradientFunction <#petsc4py.typing.TAOLSGradientFunction> | TAOLineSearch <#petsc4py.PETSc.TAOLineSearch> objective gradient callback.
TAOLSObjectiveGradientFunction <#petsc4py.typing.TAOLSObjectiveGradientFunction> | TAOLineSearch <#petsc4py.PETSc.TAOLineSearch> objective function and gradient callback.

  petsc4py.typing.Scalar

    petsc4py.typing.Scalar = float | complex
        Scalar type.

        Scalars can be either float <https://docs.python.org/3/library/functions.html#float> or complex <https://docs.python.org/3/library/functions.html#complex> (but not both) depending on how PETSc was configured (./configure --with-scalar-type=real|complex).

  petsc4py.typing.ArrayBool

    petsc4py.typing.ArrayBool
        Array of bool <https://docs.python.org/3/library/functions.html#bool>.

        alias of ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[bool <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool>]]

  petsc4py.typing.ArrayInt

    petsc4py.typing.ArrayInt
        Array of int <https://docs.python.org/3/library/functions.html#int>.

        alias of ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[integer <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.integer>]]

  petsc4py.typing.ArrayReal

    petsc4py.typing.ArrayReal
        Array of float <https://docs.python.org/3/library/functions.html#float>.

        alias of ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[floating <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.floating>]]

  petsc4py.typing.ArrayComplex

    petsc4py.typing.ArrayComplex
        Array of complex <https://docs.python.org/3/library/functions.html#complex>.

        alias of ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[complexfloating <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.complexfloating>]]

  petsc4py.typing.ArrayScalar

    petsc4py.typing.ArrayScalar
        Array of Scalar <#petsc4py.typing.Scalar> numbers.

        alias of ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[floating <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.floating> | complexfloating <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.complexfloating>]]

  petsc4py.typing.DimsSpec

    petsc4py.typing.DimsSpec
        Dimensions specification.

        N-tuples indicates N-dimensional grid sizes.

        alias of tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]

  petsc4py.typing.AccessModeSpec

    petsc4py.typing.AccessModeSpec = typing.Literal['rw', 'r', 'w'] | None
        Access mode specification.

        Possible values are:

            •   'rw' Read-Write mode.

            •   'r' Read-only mode.

            •   'w' Write-only mode.

            •   None <https://docs.python.org/3/library/constants.html#None> as 'rw'.

  petsc4py.typing.InsertModeSpec

    petsc4py.typing.InsertModeSpec: TypeAlias <https://docs.python.org/3/library/typing.html#typing.TypeAlias> = petsc4py.PETSc.InsertMode | bool | None
        Insertion mode specification.

        Possible values are:

            •   InsertMode.ADD_VALUES <#petsc4py.PETSc.InsertMode.ADD_VALUES> Add new value to existing one.

            •   InsertMode.INSERT_VALUES <#petsc4py.PETSc.InsertMode.INSERT_VALUES> Replace existing entry with new value.

            •   None <https://docs.python.org/3/library/constants.html#None> as InsertMode.INSERT_VALUES <#petsc4py.PETSc.InsertMode.INSERT_VALUES>.

            •   False <https://docs.python.org/3/library/constants.html#False> as InsertMode.INSERT_VALUES <#petsc4py.PETSc.InsertMode.INSERT_VALUES>.

            •   True <https://docs.python.org/3/library/constants.html#True> as InsertMode.ADD_VALUES <#petsc4py.PETSc.InsertMode.ADD_VALUES>.

    See also:
            InsertMode <#petsc4py.PETSc.InsertMode>

  petsc4py.typing.ScatterModeSpec

    petsc4py.typing.ScatterModeSpec: TypeAlias <https://docs.python.org/3/library/typing.html#typing.TypeAlias> = petsc4py.PETSc.ScatterMode | bool | str | None
        Scatter mode specification.

        Possible values are:

            •   ScatterMode.FORWARD <#petsc4py.PETSc.ScatterMode.FORWARD> Forward mode.

            •   ScatterMode.REVERSE <#petsc4py.PETSc.ScatterMode.REVERSE> Reverse mode.

            •   None <https://docs.python.org/3/library/constants.html#None> as ScatterMode.FORWARD <#petsc4py.PETSc.ScatterMode.FORWARD>.

            •   False <https://docs.python.org/3/library/constants.html#False> as ScatterMode.FORWARD <#petsc4py.PETSc.ScatterMode.FORWARD>.

            •   True <https://docs.python.org/3/library/constants.html#True> as ScatterMode.REVERSE <#petsc4py.PETSc.ScatterMode.REVERSE>.

            •   'forward' as ScatterMode.FORWARD <#petsc4py.PETSc.ScatterMode.FORWARD>.

            •   'reverse' as ScatterMode.REVERSE <#petsc4py.PETSc.ScatterMode.REVERSE>.

    See also:
            ScatterMode <#petsc4py.PETSc.ScatterMode>

  petsc4py.typing.LayoutSizeSpec

    petsc4py.typing.LayoutSizeSpec: TypeAlias <https://docs.python.org/3/library/typing.html#typing.TypeAlias> = int | tuple[int, int]
        int <https://docs.python.org/3/library/functions.html#int> or 2-tuple <https://docs.python.org/3/library/stdtypes.html#tuple> of int <https://docs.python.org/3/library/functions.html#int> describing the layout sizes.

        A single int <https://docs.python.org/3/library/functions.html#int> indicates global size. A tuple <https://docs.python.org/3/library/stdtypes.html#tuple> of int <https://docs.python.org/3/library/functions.html#int> indicates (local_size, global_size).

        See also:
            Sys.splitOwnership <#petsc4py.PETSc.Sys.splitOwnership>

  petsc4py.typing.NormTypeSpec

    petsc4py.typing.NormTypeSpec: TypeAlias <https://docs.python.org/3/library/typing.html#typing.TypeAlias> = petsc4py.PETSc.NormType | None
        Norm type specification.

        Possible values include:

        •   NormType.NORM_1 <#petsc4py.PETSc.NormType.NORM_1> The 1-norm: Σₙ abs(xₙ) for vectors, maxₙ (Σᵢ abs(xₙᵢ)) for matrices.

        •   NormType.NORM_2 <#petsc4py.PETSc.NormType.NORM_2> The 2-norm: √(Σₙ xₙ²) for vectors, largest singular values for matrices.

        •   NormType.NORM_INFINITY <#petsc4py.PETSc.NormType.NORM_INFINITY> The ∞-norm: maxₙ abs(xₙ) for vectors, maxᵢ (Σₙ abs(xₙᵢ)) for matrices.

        •   NormType.NORM_FROBENIUS <#petsc4py.PETSc.NormType.NORM_FROBENIUS> The Frobenius norm: same as 2-norm for vectors, √(Σₙᵢ xₙᵢ²) for matrices.

        •   NormType.NORM_1_AND_2 <#petsc4py.PETSc.NormType.NORM_1_AND_2> Compute both NormType.NORM_1 <#petsc4py.PETSc.NormType.NORM_1> and NormType.NORM_2 <#petsc4py.PETSc.NormType.NORM_2>.

        •   None <https://docs.python.org/3/library/constants.html#None> as NormType.NORM_2 <#petsc4py.PETSc.NormType.NORM_2> for vectors, NormType.NORM_FROBENIUS <#petsc4py.PETSc.NormType.NORM_FROBENIUS> for matrices.

    See also:
            PETSc.NormType <#petsc4py.PETSc.NormType>, NormType <https://petsc.org/release/manualpages/Vec/NormType.html>

  petsc4py.typing.PetscOptionsHandlerFunction

    petsc4py.typing.PetscOptionsHandlerFunction
        Callback for processing extra options.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[Object <#petsc4py.PETSc.Object>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.MatAssemblySpec

    petsc4py.typing.MatAssemblySpec: TypeAlias <https://docs.python.org/3/library/typing.html#typing.TypeAlias> = petsc4py.PETSc.Mat.AssemblyType | bool | None
        Matrix assembly specification.

        Possible values are:

            •   Mat.AssemblyType.FINAL <#petsc4py.PETSc.Mat.AssemblyType.FINAL>

            •   Mat.AssemblyType.FLUSH <#petsc4py.PETSc.Mat.AssemblyType.FLUSH>

            •   None <https://docs.python.org/3/library/constants.html#None> as Mat.AssemblyType.FINAL <#petsc4py.PETSc.Mat.AssemblyType.FINAL>

            •   False <https://docs.python.org/3/library/constants.html#False> as Mat.AssemblyType.FINAL <#petsc4py.PETSc.Mat.AssemblyType.FINAL>

            •   True <https://docs.python.org/3/library/constants.html#True> as Mat.AssemblyType.FLUSH <#petsc4py.PETSc.Mat.AssemblyType.FLUSH>

    See also:
            MatAssemblyType <https://petsc.org/release/manualpages/Mat/MatAssemblyType.html>

  petsc4py.typing.MatSizeSpec

    petsc4py.typing.MatSizeSpec: TypeAlias <https://docs.python.org/3/library/typing.html#typing.TypeAlias> = int | tuple[int, int] | tuple[tuple[int, int], tuple[int, int]]
        int <https://docs.python.org/3/library/functions.html#int> or (nested) tuple <https://docs.python.org/3/library/stdtypes.html#tuple> of int <https://docs.python.org/3/library/functions.html#int> describing the matrix sizes.

        If int <https://docs.python.org/3/library/functions.html#int> then rows = columns. A single tuple <https://docs.python.org/3/library/stdtypes.html#tuple> of int <https://docs.python.org/3/library/functions.html#int> indicates (rows, columns). A nested tuple <https://docs.python.org/3/library/stdtypes.html#tuple> of int <https://docs.python.org/3/library/functions.html#int> indicates ((local_rows, rows), (local_columns, columns)).

        See also:
            Sys.splitOwnership <#petsc4py.PETSc.Sys.splitOwnership>

  petsc4py.typing.MatBlockSizeSpec

    petsc4py.typing.MatBlockSizeSpec: TypeAlias <https://docs.python.org/3/library/typing.html#typing.TypeAlias> = int | tuple[int, int]
        The row and column block sizes.

        If a single int <https://docs.python.org/3/library/functions.html#int> is provided then rows and columns share the same block size.

  petsc4py.typing.CSRIndicesSpec

    petsc4py.typing.CSRIndicesSpec
        CSR indices format specification.

        A 2-tuple carrying the (row_start, col_indices) information.

        alias of tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>], Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]]

  petsc4py.typing.CSRSpec

    petsc4py.typing.CSRSpec
        CSR format specification.

        A 3-tuple carrying the (row_start, col_indices, values) information.

        alias of tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>], Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>], Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>]]

  petsc4py.typing.NNZSpec

    petsc4py.typing.NNZSpec: TypeAlias <https://docs.python.org/3/library/typing.html#typing.TypeAlias> = int | typing.Sequence[int] | tuple[typing.Sequence[int], typing.Sequence[int]]
        Nonzero pattern specification.

        A single int <https://docs.python.org/3/library/functions.html#int> corresponds to fixed number of non-zeros per row. A Sequence <https://docs.python.org/3/glossary.html#term-sequence> of int <https://docs.python.org/3/library/functions.html#int> indicates different non-zeros per row. If a 2-tuple <https://docs.python.org/3/library/stdtypes.html#tuple> is used, the elements of the tuple corresponds to the on-process and off-process parts of the matrix.

        See also:
            MatSeqAIJSetPreallocation <https://petsc.org/release/manualpages/Mat/MatSeqAIJSetPreallocation.html>, MatMPIAIJSetPreallocation <https://petsc.org/release/manualpages/Mat/MatMPIAIJSetPreallocation.html>

  petsc4py.typing.MatNullFunction

    petsc4py.typing.MatNullFunction
        PETSc.NullSpace <#petsc4py.PETSc.NullSpace> callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[NullSpace <#petsc4py.PETSc.NullSpace>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.MatHtoolKernelFunction

    petsc4py.typing.MatHtoolKernelFunction
        PETSc.Mat <#petsc4py.PETSc.Mat> Mat.Type.HTOOL <#petsc4py.PETSc.Mat.Type.HTOOL> kernel callback.

        Callable with signature kernel(sdim, M, N, rows, cols, v, ctx):

        •   sdim — spatial dimension of the coordinate space

        •   M — number of target (row) indices

        •   N — number of source (column) indices

        •   rows — target global indices, shape (M,)

        •   cols — source global indices, shape (N,)

        •   v — output submatrix, shape (M, N) in column-major order, to be filled by the callable

        •   ctx — user-defined context passed to Mat.createHtoolFromKernel <#petsc4py.PETSc.Mat.createHtoolFromKernel>

    alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[integer <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.integer>]], ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[integer <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.integer>]], ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[floating <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.floating> | complexfloating <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.complexfloating>]], Any <https://docs.python.org/3/library/typing.html#typing.Any>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.DMCoarsenHookFunction

    petsc4py.typing.DMCoarsenHookFunction
        PETSc.DM <#petsc4py.PETSc.DM> coarsening hook callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, DM <#petsc4py.PETSc.DM>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.DMRestrictHookFunction

    petsc4py.typing.DMRestrictHookFunction
        PETSc.DM <#petsc4py.PETSc.DM> restriction hook callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, Mat <#petsc4py.PETSc.Mat>, Vec <#petsc4py.PETSc.Vec>, Mat <#petsc4py.PETSc.Mat>, DM <#petsc4py.PETSc.DM>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.KSPRHSFunction

    petsc4py.typing.KSPRHSFunction
        PETSc.KSP <#petsc4py.PETSc.KSP> right-hand side function callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[KSP <#petsc4py.PETSc.KSP>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.KSPOperatorsFunction

    petsc4py.typing.KSPOperatorsFunction
        PETSc.KSP <#petsc4py.PETSc.KSP> operators function callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[KSP <#petsc4py.PETSc.KSP>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.KSPConvergenceTestFunction

    petsc4py.typing.KSPConvergenceTestFunction
        PETSc.KSP <#petsc4py.PETSc.KSP> convergence test callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[KSP <#petsc4py.PETSc.KSP>, int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>], ConvergedReason <#petsc4py.PETSc.KSP.ConvergedReason>]

  petsc4py.typing.KSPMonitorFunction

    petsc4py.typing.KSPMonitorFunction
        PETSc.KSP <#petsc4py.PETSc.KSP> monitor callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[KSP <#petsc4py.PETSc.KSP>, int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.KSPPreSolveFunction

    petsc4py.typing.KSPPreSolveFunction
        PETSc.KSP <#petsc4py.PETSc.KSP> pre solve callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[KSP <#petsc4py.PETSc.KSP>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.KSPPostSolveFunction

    petsc4py.typing.KSPPostSolveFunction
        PETSc.KSP <#petsc4py.PETSc.KSP> post solve callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[KSP <#petsc4py.PETSc.KSP>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.SNESMonitorFunction

    petsc4py.typing.SNESMonitorFunction
        SNES <#petsc4py.PETSc.SNES> monitor callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[SNES <#petsc4py.PETSc.SNES>, int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.SNESObjFunction

    petsc4py.typing.SNESObjFunction
        SNES <#petsc4py.PETSc.SNES> objective function callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[SNES <#petsc4py.PETSc.SNES>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.SNESFunction

    petsc4py.typing.SNESFunction
        SNES <#petsc4py.PETSc.SNES> residual function callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[SNES <#petsc4py.PETSc.SNES>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.SNESJacobianFunction

    petsc4py.typing.SNESJacobianFunction
        SNES <#petsc4py.PETSc.SNES> Jacobian callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[SNES <#petsc4py.PETSc.SNES>, Vec <#petsc4py.PETSc.Vec>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.SNESGuessFunction

    petsc4py.typing.SNESGuessFunction
        SNES <#petsc4py.PETSc.SNES> initial guess callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[SNES <#petsc4py.PETSc.SNES>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.SNESUpdateFunction

    petsc4py.typing.SNESUpdateFunction
        SNES <#petsc4py.PETSc.SNES> step update callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[SNES <#petsc4py.PETSc.SNES>, int <https://docs.python.org/3/library/functions.html#int>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.SNESLSPreFunction

    petsc4py.typing.SNESLSPreFunction
        SNES <#petsc4py.PETSc.SNES> linesearch pre-check update callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.SNESNGSFunction

    petsc4py.typing.SNESNGSFunction
        SNES <#petsc4py.PETSc.SNES> nonlinear Gauss-Seidel callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[SNES <#petsc4py.PETSc.SNES>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.SNESConvergedFunction

    petsc4py.typing.SNESConvergedFunction
        SNES <#petsc4py.PETSc.SNES> convergence test callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[SNES <#petsc4py.PETSc.SNES>, int <https://docs.python.org/3/library/functions.html#int>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]], ConvergedReason <#petsc4py.PETSc.SNES.ConvergedReason>]

  petsc4py.typing.TSRHSFunction

    petsc4py.typing.TSRHSFunction
        TS <#petsc4py.PETSc.TS> right-hand side function callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSRHSJacobian

    petsc4py.typing.TSRHSJacobian
        TS <#petsc4py.PETSc.TS> right-hand side Jacobian callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSRHSJacobianP

    petsc4py.typing.TSRHSJacobianP
        TS <#petsc4py.PETSc.TS> right-hand side parameter Jacobian callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSIFunction

    petsc4py.typing.TSIFunction
        TS <#petsc4py.PETSc.TS> implicit function callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSIJacobian

    petsc4py.typing.TSIJacobian
        TS <#petsc4py.PETSc.TS> implicit Jacobian callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>, float <https://docs.python.org/3/library/functions.html#float>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSIJacobianP

    petsc4py.typing.TSIJacobianP
        TS <#petsc4py.PETSc.TS> implicit parameter Jacobian callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>, float <https://docs.python.org/3/library/functions.html#float>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSI2Function

    petsc4py.typing.TSI2Function
        TS <#petsc4py.PETSc.TS> implicit 2nd order function callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSI2Jacobian

    petsc4py.typing.TSI2Jacobian
        TS <#petsc4py.PETSc.TS> implicit 2nd order Jacobian callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSI2JacobianP

    petsc4py.typing.TSI2JacobianP
        TS <#petsc4py.PETSc.TS> implicit 2nd order parameter Jacobian callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSMonitorFunction

    petsc4py.typing.TSMonitorFunction
        TS <#petsc4py.PETSc.TS> monitor callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSPreStepFunction

    petsc4py.typing.TSPreStepFunction
        TS <#petsc4py.PETSc.TS> pre-step callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSPostStepFunction

    petsc4py.typing.TSPostStepFunction
        TS <#petsc4py.PETSc.TS> post-step callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSIndicatorFunction

    petsc4py.typing.TSIndicatorFunction
        TS <#petsc4py.PETSc.TS> event indicator callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>, ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[floating <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.floating>]]], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TSPostEventFunction

    petsc4py.typing.TSPostEventFunction
        TS <#petsc4py.PETSc.TS> post-event callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TS <#petsc4py.PETSc.TS>, ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[integer <https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.integer>]], float <https://docs.python.org/3/library/functions.html#float>, Vec <#petsc4py.PETSc.Vec>, bool <https://docs.python.org/3/library/functions.html#bool>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOObjectiveFunction

    petsc4py.typing.TAOObjectiveFunction
        TAO <#petsc4py.PETSc.TAO> objective function callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>, Vec <#petsc4py.PETSc.Vec>], float <https://docs.python.org/3/library/functions.html#float>]

  petsc4py.typing.TAOGradientFunction

    petsc4py.typing.TAOGradientFunction
        TAO <#petsc4py.PETSc.TAO> objective gradient callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOObjectiveGradientFunction

    petsc4py.typing.TAOObjectiveGradientFunction
        TAO <#petsc4py.PETSc.TAO> objective function and gradient callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], float <https://docs.python.org/3/library/functions.html#float>]

  petsc4py.typing.TAOHessianFunction

    petsc4py.typing.TAOHessianFunction
        TAO <#petsc4py.PETSc.TAO> objective Hessian callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>, Vec <#petsc4py.PETSc.Vec>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOUpdateFunction

    petsc4py.typing.TAOUpdateFunction
        TAO <#petsc4py.PETSc.TAO> update callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>, int <https://docs.python.org/3/library/functions.html#int>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOMonitorFunction

    petsc4py.typing.TAOMonitorFunction
        TAO <#petsc4py.PETSc.TAO> monitor callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOConvergedFunction

    petsc4py.typing.TAOConvergedFunction
        TAO <#petsc4py.PETSc.TAO> convergence test callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOJacobianFunction

    petsc4py.typing.TAOJacobianFunction
        TAO <#petsc4py.PETSc.TAO> Jacobian callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>, Vec <#petsc4py.PETSc.Vec>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOResidualFunction

    petsc4py.typing.TAOResidualFunction
        TAO <#petsc4py.PETSc.TAO> residual callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOJacobianResidualFunction

    petsc4py.typing.TAOJacobianResidualFunction
        TAO <#petsc4py.PETSc.TAO> Jacobian residual callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>, Vec <#petsc4py.PETSc.Vec>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOVariableBoundsFunction

    petsc4py.typing.TAOVariableBoundsFunction
        TAO <#petsc4py.PETSc.TAO> variable bounds callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOConstraintsFunction

    petsc4py.typing.TAOConstraintsFunction
        TAO <#petsc4py.PETSc.TAO> constraints callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOConstraintsJacobianFunction

    petsc4py.typing.TAOConstraintsJacobianFunction
        TAO <#petsc4py.PETSc.TAO> constraints Jacobian callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAO <#petsc4py.PETSc.TAO>, Vec <#petsc4py.PETSc.Vec>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOLSObjectiveFunction

    petsc4py.typing.TAOLSObjectiveFunction
        TAOLineSearch <#petsc4py.PETSc.TAOLineSearch> objective function callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAOLineSearch <#petsc4py.PETSc.TAOLineSearch>, Vec <#petsc4py.PETSc.Vec>], float <https://docs.python.org/3/library/functions.html#float>]

  petsc4py.typing.TAOLSGradientFunction

    petsc4py.typing.TAOLSGradientFunction
        TAOLineSearch <#petsc4py.PETSc.TAOLineSearch> objective gradient callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAOLineSearch <#petsc4py.PETSc.TAOLineSearch>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>]

  petsc4py.typing.TAOLSObjectiveGradientFunction

    petsc4py.typing.TAOLSObjectiveGradientFunction
        TAOLineSearch <#petsc4py.PETSc.TAOLineSearch> objective function and gradient callback.

        alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[TAOLineSearch <#petsc4py.PETSc.TAOLineSearch>, Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>], float <https://docs.python.org/3/library/functions.html#float>]

  petsc4py.PETSc

Portable, Extensible Toolkit for Scientific Computation.

Basic constants:

    DECIDE <#petsc4py.PETSc.DECIDE>
        Use a default value for an int <https://docs.python.org/3/library/functions.html#int> or float <https://docs.python.org/3/library/functions.html#float> parameter.

    DEFAULT <#petsc4py.PETSc.DEFAULT>
        Use a default value chosen by PETSc.

    DETERMINE <#petsc4py.PETSc.DETERMINE>
        Compute a default value for an int <https://docs.python.org/3/library/functions.html#int> or float <https://docs.python.org/3/library/functions.html#float> parameter. For tolerances this uses the default value from when the object's type was set.

    CURRENT <#petsc4py.PETSc.CURRENT>
        Do not change the current value that is set.

    UNLIMITED <#petsc4py.PETSc.UNLIMITED>
        For a parameter that is a bound, such as the maximum number of iterations, do not bound the value.

More constants:

    INFINITY <#petsc4py.PETSc.INFINITY>
        Very large real value.

    NINFINITY <#petsc4py.PETSc.NINFINITY>
        Very large negative real value.

    PINFINITY <#petsc4py.PETSc.PINFINITY>
        Very large positive real value, same as INFINITY <#petsc4py.PETSc.INFINITY>.

Classes
AO <#petsc4py.PETSc.AO> | Application ordering object.
CellDM <#petsc4py.PETSc.CellDM> | CellDM object.
Comm <#petsc4py.PETSc.Comm> | Communicator object.
DM <#petsc4py.PETSc.DM> | An object describing a computational grid or mesh.
DMComposite <#petsc4py.PETSc.DMComposite> | A DM object that is used to manage data for a collection of DMs.
DMDA <#petsc4py.PETSc.DMDA> | A DM object that is used to manage data for a structured grid.
DMInterpolation <#petsc4py.PETSc.DMInterpolation> | Interpolation on a mesh.
DMLabel <#petsc4py.PETSc.DMLabel> | An object representing a subset of mesh entities from a DM <#petsc4py.PETSc.DM>.
DMPlex <#petsc4py.PETSc.DMPlex> | Encapsulate an unstructured mesh.
DMPlexTransform <#petsc4py.PETSc.DMPlexTransform> | Mesh transformations.
DMPlexTransformType <#petsc4py.PETSc.DMPlexTransformType> | Transformation types.
DMShell <#petsc4py.PETSc.DMShell> | A shell DM object, used to manage user-defined problem data.
DMStag <#petsc4py.PETSc.DMStag> | A DM object representing a "staggered grid" or a structured cell complex.
DMSwarm <#petsc4py.PETSc.DMSwarm> | A DM <#petsc4py.PETSc.DM> object used to represent arrays of data (fields) of arbitrary type.
DS <#petsc4py.PETSc.DS> | Discrete System object.
Device <#petsc4py.PETSc.Device> | The device object.
DeviceContext <#petsc4py.PETSc.DeviceContext> | DeviceContext object.
DualSpace <#petsc4py.PETSc.DualSpace> | Dual space to a linear space.
FE <#petsc4py.PETSc.FE> | A PETSc object that manages a finite element space.
IS <#petsc4py.PETSc.IS> | A collection of indices.
InsertMode <#petsc4py.PETSc.InsertMode> | Insertion mode.
KSP <#petsc4py.PETSc.KSP> | Abstract PETSc object that manages all Krylov methods.
KSPDMActive <#petsc4py.PETSc.KSPDMActive> | Argument to KSPSetDMActive().
LGMap <#petsc4py.PETSc.LGMap> | Mapping from a local to a global ordering.
Log <#petsc4py.PETSc.Log> | Logging support.
LogClass <#petsc4py.PETSc.LogClass> | Logging support.
LogEvent <#petsc4py.PETSc.LogEvent> | Logging support.
LogStage <#petsc4py.PETSc.LogStage> | Logging support for different stages.
Mat <#petsc4py.PETSc.Mat> | Matrix object.
MatPartitioning <#petsc4py.PETSc.MatPartitioning> | Object for managing the partitioning of a matrix or graph.
NormType <#petsc4py.PETSc.NormType> | Norm type.
NullSpace <#petsc4py.PETSc.NullSpace> | Nullspace object.
Object <#petsc4py.PETSc.Object> | Base class wrapping a PETSc object.
Options <#petsc4py.PETSc.Options> | The options database object.
PC <#petsc4py.PETSc.PC> | Preconditioners.
Partitioner <#petsc4py.PETSc.Partitioner> | A graph partitioner.
Quad <#petsc4py.PETSc.Quad> | Quadrature rule for integration.
Random <#petsc4py.PETSc.Random> | The random number generator object.
Regressor <#petsc4py.PETSc.Regressor> | Regression solver.
RegressorLinearType <#petsc4py.PETSc.RegressorLinearType> | Linear regressor type.
SF <#petsc4py.PETSc.SF> | Star Forest object for communication.
SNES <#petsc4py.PETSc.SNES> | Nonlinear equations solver.
SNESLineSearch <#petsc4py.PETSc.SNESLineSearch> | Linesearch object used by SNES solvers.
Scatter <#petsc4py.PETSc.Scatter> | Scatter object.
ScatterMode <#petsc4py.PETSc.ScatterMode> | Scatter mode.
Section <#petsc4py.PETSc.Section> | Mapping from integers in a range to unstructured set of integers.
Space <#petsc4py.PETSc.Space> | Function space object.
Sys <#petsc4py.PETSc.Sys> | System utilities.
TAO <#petsc4py.PETSc.TAO> | Optimization solver.
TAOLineSearch <#petsc4py.PETSc.TAOLineSearch> | TAO Line Search.
TAOTerm <#petsc4py.PETSc.TAOTerm> | TAO Term.
TS <#petsc4py.PETSc.TS> | ODE integrator.
Vec <#petsc4py.PETSc.Vec> | A vector object.
Viewer <#petsc4py.PETSc.Viewer> | Viewer object.
ViewerHDF5 <#petsc4py.PETSc.ViewerHDF5> | Viewer object for HDF5 file formats.

  petsc4py.PETSc.AO

    class petsc4py.PETSc.AO
        Bases: Object <#petsc4py.PETSc.Object>

        Application ordering object.

        Enumerations
        Type <#petsc4py.PETSc.AO.Type> | The application ordering types.

  petsc4py.PETSc.AO.Type

    class petsc4py.PETSc.AO.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The application ordering types.

        Attributes Summary
        ADVANCED | Object ADVANCED of type str <https://docs.python.org/3/library/stdtypes.html#str>
        BASIC | Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MAPPING | Object MAPPING of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MEMORYSCALABLE | Object MEMORYSCALABLE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        ADVANCED: str <https://docs.python.org/3/library/stdtypes.html#str> = ADVANCED
            Object ADVANCED of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BASIC: str <https://docs.python.org/3/library/stdtypes.html#str> = BASIC
            Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MAPPING: str <https://docs.python.org/3/library/stdtypes.html#str> = MAPPING
            Object MAPPING of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MEMORYSCALABLE: str <https://docs.python.org/3/library/stdtypes.html#str> = MEMORYSCALABLE
            Object MEMORYSCALABLE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
app2petsc(indices) | Map an application-defined ordering to the PETSc ordering.
createBasic(app[, petsc, comm]) | Return a basic application ordering using two orderings.
createMapping(app[, petsc, comm]) | Return an application mapping using two orderings.
createMemoryScalable(app[, petsc, comm]) | Return a memory scalable application ordering using two orderings.
destroy() | Destroy the application ordering.
getType() | Return the application ordering type.
petsc2app(indices) | Map a PETSc ordering to the application-defined ordering.
view([viewer]) | Display the application ordering.

Methods Documentation

    app2petsc(indices)
        Map an application-defined ordering to the PETSc ordering.

        Collective.

        Any integers in indices that are negative are left unchanged. This allows one to convert, for example, neighbor lists that use negative entries to indicate nonexistent neighbors due to boundary conditions, etc.

        Integers that are out of range are mapped to -1.

        If IS is used, it cannot be of type stride or block.

        Parameters
            indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | IS <#petsc4py.PETSc.IS>) -- The indices; to be replaced with their mapped values.

        Return type
            Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | IS <#petsc4py.PETSc.IS>

    See also:
            petsc2app, AOApplicationToPetscIS <https://petsc.org/release/manualpages/AO/AOApplicationToPetscIS.html>, AOApplicationToPetsc <https://petsc.org/release/manualpages/AO/AOApplicationToPetsc.html>

    Source code at petsc4py/PETSc/AO.pyx:214 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/AO.pyx#L214>

    createBasic(app, petsc=None, comm=None)
        Return a basic application ordering using two orderings.

        Collective.

        The arrays/indices app and petsc must contain all the integers 0 to len(app)-1 with no duplicates; that is there cannot be any "holes" in the indices. Use createMapping if you wish to have "holes" in the indices.

        Parameters

            •   app (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | IS <#petsc4py.PETSc.IS>) -- The application ordering.

            •   petsc (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>) -- Another ordering (may be None <https://docs.python.org/3/library/constants.html#None> to indicate the natural ordering, that is 0, 1, 2, 3, ...).

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createMemoryScalable, createMapping, AOCreateBasicIS <https://petsc.org/release/manualpages/AO/AOCreateBasicIS.html>, AOCreateBasic <https://petsc.org/release/manualpages/AO/AOCreateBasic.html>

    Source code at petsc4py/PETSc/AO.pyx:53 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/AO.pyx#L53>

    createMapping(app, petsc=None, comm=None)
        Return an application mapping using two orderings.

        Collective.

        The arrays app and petsc need NOT contain all the integers 0 to len(app)-1, that is there CAN be "holes" in the indices. Use createBasic if they do not have holes for better performance.

        Parameters

            •   app (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | IS <#petsc4py.PETSc.IS>) -- The application ordering.

            •   petsc (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>) -- Another ordering. May be None <https://docs.python.org/3/library/constants.html#None> to indicate the identity ordering.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createBasic, AOCreateMappingIS <https://petsc.org/release/manualpages/AO/AOCreateMappingIS.html>, AOCreateMapping <https://petsc.org/release/manualpages/AO/AOCreateMapping.html>

    Source code at petsc4py/PETSc/AO.pyx:154 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/AO.pyx#L154>

    createMemoryScalable(app, petsc=None, comm=None)
        Return a memory scalable application ordering using two orderings.

        Collective.

        The arrays/indices app and petsc must contain all the integers 0 to len(app)-1 with no duplicates; that is there cannot be any "holes" in the indices. Use createMapping if you wish to have "holes" in the indices.

        Comparing with createBasic, this routine trades memory with message communication.

        Parameters

            •   app (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | IS <#petsc4py.PETSc.IS>) -- The application ordering.

            •   petsc (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>) -- Another ordering (may be None <https://docs.python.org/3/library/constants.html#None> to indicate the natural ordering, that is 0, 1, 2, 3, ...).

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createBasic, createMapping, AOCreateMemoryScalableIS <https://petsc.org/release/manualpages/AO/AOCreateMemoryScalableIS.html>, AOCreateMemoryScalable <https://petsc.org/release/manualpages/AO/AOCreateMemoryScalable.html>

    Source code at petsc4py/PETSc/AO.pyx:102 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/AO.pyx#L102>

    destroy()
        Destroy the application ordering.

        Collective.

        See also:
            AODestroy <https://petsc.org/release/manualpages/AO/AODestroy.html>

    Source code at petsc4py/PETSc/AO.pyx:40 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/AO.pyx#L40>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getType()
        Return the application ordering type.

        Not collective.

        See also:
            AOGetType <https://petsc.org/release/manualpages/AO/AOGetType.html>

    Source code at petsc4py/PETSc/AO.pyx:200 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/AO.pyx#L200>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    petsc2app(indices)
        Map a PETSc ordering to the application-defined ordering.

        Collective.

        Any integers in indices that are negative are left unchanged. This allows one to convert, for example, neighbor lists that use negative entries to indicate nonexistent neighbors due to boundary conditions, etc.

        Integers that are out of range are mapped to -1.

        If IS is used, it cannot be of type stride or block.

        Parameters
            indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | IS <#petsc4py.PETSc.IS>) -- The indices; to be replaced with their mapped values.

        Return type
            Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | IS <#petsc4py.PETSc.IS>

    See also:
            app2petsc, AOPetscToApplicationIS <https://petsc.org/release/manualpages/AO/AOPetscToApplicationIS.html>, AOPetscToApplication <https://petsc.org/release/manualpages/AO/AOPetscToApplication.html>

    Source code at petsc4py/PETSc/AO.pyx:248 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/AO.pyx#L248>

    view(viewer=None)
        Display the application ordering.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> to display the ordering.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            AOView <https://petsc.org/release/manualpages/AO/AOView.html>

    Source code at petsc4py/PETSc/AO.pyx:21 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/AO.pyx#L21>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.CellDM

    class petsc4py.PETSc.CellDM
        Bases: Object <#petsc4py.PETSc.Object>

        CellDM object.

        See also:
            DMSwarmCellDM <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCellDM.html>

    Methods Summary
    create(dm, fields, coords) | Create the cell DM.
    destroy() | Destroy the cell DM.
    getBlockSize(sw) | Return the block size for this cell DM.
    getCellID() | Return the cellid field for this cell DM.
    getCoordinateFields() | Return the swarm fields used as coordinates on this cell DM.
    getDM() | Return the underlying DM.
    getFields() | Return the swarm fields defined on this cell DM.
    view([viewer]) | View the cell DM.

    Methods Documentation

        create(dm, fields, coords)
            Create the cell DM.

            Collective.

            Parameters

                •   dm (DM <#petsc4py.PETSc.DM>) -- The underlying DM on which to place particles

                •   fields (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[str <https://docs.python.org/3/library/stdtypes.html#str>]) -- The swarm fields represented on the DM

                •   coords (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[str <https://docs.python.org/3/library/stdtypes.html#str>]) -- The swarm fields to use as coordinates in the DM

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                destroy, DMSwarmCellDMCreate <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCellDMCreate.html>

        Source code at petsc4py/PETSc/DMSwarm.pyx:1122 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L1122>

        destroy()
            Destroy the cell DM.

            Collective.

            See also:
                create, DMSwarmCellDMDestroy <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCellDMDestroy.html>

        Source code at petsc4py/PETSc/DMSwarm.pyx:1109 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L1109>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        getBlockSize(sw)
            Return the block size for this cell DM.

            Not collective.

            Parameters
                sw (DM <#petsc4py.PETSc.DM>) -- The DMSwarm <#petsc4py.PETSc.DMSwarm> object

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                DMSwarmCellDMGetBlockSize <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCellDMGetBlockSize.html>

        Source code at petsc4py/PETSc/DMSwarm.pyx:1196 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L1196>

        getCellID()
            Return the cellid field for this cell DM.

            Not collective.

            See also:
                DMSwarmCellDMGetCellID <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCellDMGetCellID.html>

        Source code at petsc4py/PETSc/DMSwarm.pyx:1182 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L1182>

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        getCoordinateFields()
            Return the swarm fields used as coordinates on this cell DM.

            Not collective.

            See also:
                DMSwarmCellDMGetCoordinateFields <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCellDMGetCoordinateFields.html>

        Source code at petsc4py/PETSc/DMSwarm.pyx:1233 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L1233>

            Return type
                list <https://docs.python.org/3/library/stdtypes.html#list>[str <https://docs.python.org/3/library/stdtypes.html#str>]

        getDM()
            Return the underlying DM.

            Not collective.

            See also:
                DMSwarmCellDMGetDM <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCellDMGetDM.html>

        Source code at petsc4py/PETSc/DMSwarm.pyx:1165 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L1165>

            Return type
                DM <#petsc4py.PETSc.DM>

        getFields()
            Return the swarm fields defined on this cell DM.

            Not collective.

            See also:
                DMSwarmCellDMGetFields <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCellDMGetFields.html>

        Source code at petsc4py/PETSc/DMSwarm.pyx:1215 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L1215>

            Return type
                list <https://docs.python.org/3/library/stdtypes.html#list>[str <https://docs.python.org/3/library/stdtypes.html#str>]

        view(viewer=None)
            View the cell DM.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                Viewer <#petsc4py.PETSc.Viewer>, DMSwarmCellDMView <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCellDMView.html>

        Source code at petsc4py/PETSc/DMSwarm.pyx:1090 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L1090>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Comm

    class petsc4py.PETSc.Comm
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Communicator object.

        Predefined instances:

        COMM_NULL <#petsc4py.PETSc.COMM_NULL>
            The null (or invalid) communicator.

        COMM_SELF <#petsc4py.PETSc.COMM_SELF>
            The self communicator.

        COMM_WORLD <#petsc4py.PETSc.COMM_WORLD>
            The world communicator.

    See also:
            Sys.setDefaultComm <#petsc4py.PETSc.Sys.setDefaultComm>, Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>

    Methods Summary
    barrier() | Barrier synchronization.
    destroy() | Destroy the communicator.
    duplicate() | Duplicate the communicator.
    getRank() | Return the rank of the calling processes in the communicator.
    getSize() | Return the number of processes in the communicator.
    tompi4py() | Convert communicator to mpi4py <https://mpi4py.readthedocs.io/en/stable/mpi4py.html#module-mpi4py>.

    Attributes Summary
    fortran | Fortran handle.
    rank | Communicator rank.
    size | Communicator size.

    Methods Documentation

        barrier()
            Barrier synchronization.

            Collective.

            Source code at petsc4py/PETSc/Comm.pyx:123 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Comm.pyx#L123>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        destroy()
            Destroy the communicator.

            Collective.

            See also:
                PetscCommDestroy <https://petsc.org/release/manualpages/Sys/PetscCommDestroy.html>

        Source code at petsc4py/PETSc/Comm.pyx:61 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Comm.pyx#L61>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        duplicate()
            Duplicate the communicator.

            Collective.

            See also:
                PetscCommDuplicate <https://petsc.org/release/manualpages/Sys/PetscCommDuplicate.html>

        Source code at petsc4py/PETSc/Comm.pyx:79 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Comm.pyx#L79>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        getRank()
            Return the rank of the calling processes in the communicator.

            Not collective.

            Source code at petsc4py/PETSc/Comm.pyx:111 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Comm.pyx#L111>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getSize()
            Return the number of processes in the communicator.

            Not collective.

            Source code at petsc4py/PETSc/Comm.pyx:99 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Comm.pyx#L99>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        tompi4py()
            Convert communicator to mpi4py <https://mpi4py.readthedocs.io/en/stable/mpi4py.html#module-mpi4py>.

            Not collective.

            See also:
                mpi4py.MPI.Comm <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Comm.html#mpi4py.MPI.Comm>, mpi4py.MPI.Intracomm <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Intracomm.html#mpi4py.MPI.Intracomm>

        Source code at petsc4py/PETSc/Comm.pyx:155 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Comm.pyx#L155>

            Return type
                Intracomm <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Intracomm.html#mpi4py.MPI.Intracomm>

    Attributes Documentation

        fortran
            Fortran handle.

            Source code at petsc4py/PETSc/Comm.pyx:147 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Comm.pyx#L147>

        rank
            Communicator rank.

            Source code at petsc4py/PETSc/Comm.pyx:140 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Comm.pyx#L140>

        size
            Communicator size.

            Source code at petsc4py/PETSc/Comm.pyx:135 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Comm.pyx#L135>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DM

    class petsc4py.PETSc.DM
        Bases: Object <#petsc4py.PETSc.Object>

        An object describing a computational grid or mesh.

        Enumerations
        BoundaryType <#petsc4py.PETSc.DM.BoundaryType> | DM Boundary types.
        PolytopeType <#petsc4py.PETSc.DM.PolytopeType> | The DM cell types.
        ReorderDefaultFlag <#petsc4py.PETSc.DM.ReorderDefaultFlag> | The DM reordering default flags.
        Type <#petsc4py.PETSc.DM.Type> | DM types.

  petsc4py.PETSc.DM.BoundaryType

    class petsc4py.PETSc.DM.BoundaryType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        DM <#petsc4py.PETSc.DM> Boundary types.

        Attributes Summary
        GHOSTED | Constant GHOSTED of type int <https://docs.python.org/3/library/functions.html#int>
        MIRROR | Constant MIRROR of type int <https://docs.python.org/3/library/functions.html#int>
        NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>
        PERIODIC | Constant PERIODIC of type int <https://docs.python.org/3/library/functions.html#int>
        TWIST | Constant TWIST of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        GHOSTED: int <https://docs.python.org/3/library/functions.html#int> = GHOSTED
            Constant GHOSTED of type int <https://docs.python.org/3/library/functions.html#int>

        MIRROR: int <https://docs.python.org/3/library/functions.html#int> = MIRROR
            Constant MIRROR of type int <https://docs.python.org/3/library/functions.html#int>

        NONE: int <https://docs.python.org/3/library/functions.html#int> = NONE
            Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>

        PERIODIC: int <https://docs.python.org/3/library/functions.html#int> = PERIODIC
            Constant PERIODIC of type int <https://docs.python.org/3/library/functions.html#int>

        TWIST: int <https://docs.python.org/3/library/functions.html#int> = TWIST
            Constant TWIST of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DM.PolytopeType

    class petsc4py.PETSc.DM.PolytopeType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The DM <#petsc4py.PETSc.DM> cell types.

        Attributes Summary
        FV_GHOST | Constant FV_GHOST of type int <https://docs.python.org/3/library/functions.html#int>
        HEXAHEDRON | Constant HEXAHEDRON of type int <https://docs.python.org/3/library/functions.html#int>
        INTERIOR_GHOST | Constant INTERIOR_GHOST of type int <https://docs.python.org/3/library/functions.html#int>
        POINT | Constant POINT of type int <https://docs.python.org/3/library/functions.html#int>
        POINT_PRISM_TENSOR | Constant POINT_PRISM_TENSOR of type int <https://docs.python.org/3/library/functions.html#int>
        PYRAMID | Constant PYRAMID of type int <https://docs.python.org/3/library/functions.html#int>
        QUADRILATERAL | Constant QUADRILATERAL of type int <https://docs.python.org/3/library/functions.html#int>
        QUAD_PRISM_TENSOR | Constant QUAD_PRISM_TENSOR of type int <https://docs.python.org/3/library/functions.html#int>
        SEGMENT | Constant SEGMENT of type int <https://docs.python.org/3/library/functions.html#int>
        SEG_PRISM_TENSOR | Constant SEG_PRISM_TENSOR of type int <https://docs.python.org/3/library/functions.html#int>
        TETRAHEDRON | Constant TETRAHEDRON of type int <https://docs.python.org/3/library/functions.html#int>
        TRIANGLE | Constant TRIANGLE of type int <https://docs.python.org/3/library/functions.html#int>
        TRI_PRISM | Constant TRI_PRISM of type int <https://docs.python.org/3/library/functions.html#int>
        TRI_PRISM_TENSOR | Constant TRI_PRISM_TENSOR of type int <https://docs.python.org/3/library/functions.html#int>
        UNKNOWN | Constant UNKNOWN of type int <https://docs.python.org/3/library/functions.html#int>
        UNKNOWN_CELL | Constant UNKNOWN_CELL of type int <https://docs.python.org/3/library/functions.html#int>
        UNKNOWN_FACE | Constant UNKNOWN_FACE of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        FV_GHOST: int <https://docs.python.org/3/library/functions.html#int> = FV_GHOST
            Constant FV_GHOST of type int <https://docs.python.org/3/library/functions.html#int>

        HEXAHEDRON: int <https://docs.python.org/3/library/functions.html#int> = HEXAHEDRON
            Constant HEXAHEDRON of type int <https://docs.python.org/3/library/functions.html#int>

        INTERIOR_GHOST: int <https://docs.python.org/3/library/functions.html#int> = INTERIOR_GHOST
            Constant INTERIOR_GHOST of type int <https://docs.python.org/3/library/functions.html#int>

        POINT: int <https://docs.python.org/3/library/functions.html#int> = POINT
            Constant POINT of type int <https://docs.python.org/3/library/functions.html#int>

        POINT_PRISM_TENSOR: int <https://docs.python.org/3/library/functions.html#int> = POINT_PRISM_TENSOR
            Constant POINT_PRISM_TENSOR of type int <https://docs.python.org/3/library/functions.html#int>

        PYRAMID: int <https://docs.python.org/3/library/functions.html#int> = PYRAMID
            Constant PYRAMID of type int <https://docs.python.org/3/library/functions.html#int>

        QUADRILATERAL: int <https://docs.python.org/3/library/functions.html#int> = QUADRILATERAL
            Constant QUADRILATERAL of type int <https://docs.python.org/3/library/functions.html#int>

        QUAD_PRISM_TENSOR: int <https://docs.python.org/3/library/functions.html#int> = QUAD_PRISM_TENSOR
            Constant QUAD_PRISM_TENSOR of type int <https://docs.python.org/3/library/functions.html#int>

        SEGMENT: int <https://docs.python.org/3/library/functions.html#int> = SEGMENT
            Constant SEGMENT of type int <https://docs.python.org/3/library/functions.html#int>

        SEG_PRISM_TENSOR: int <https://docs.python.org/3/library/functions.html#int> = SEG_PRISM_TENSOR
            Constant SEG_PRISM_TENSOR of type int <https://docs.python.org/3/library/functions.html#int>

        TETRAHEDRON: int <https://docs.python.org/3/library/functions.html#int> = TETRAHEDRON
            Constant TETRAHEDRON of type int <https://docs.python.org/3/library/functions.html#int>

        TRIANGLE: int <https://docs.python.org/3/library/functions.html#int> = TRIANGLE
            Constant TRIANGLE of type int <https://docs.python.org/3/library/functions.html#int>

        TRI_PRISM: int <https://docs.python.org/3/library/functions.html#int> = TRI_PRISM
            Constant TRI_PRISM of type int <https://docs.python.org/3/library/functions.html#int>

        TRI_PRISM_TENSOR: int <https://docs.python.org/3/library/functions.html#int> = TRI_PRISM_TENSOR
            Constant TRI_PRISM_TENSOR of type int <https://docs.python.org/3/library/functions.html#int>

        UNKNOWN: int <https://docs.python.org/3/library/functions.html#int> = UNKNOWN
            Constant UNKNOWN of type int <https://docs.python.org/3/library/functions.html#int>

        UNKNOWN_CELL: int <https://docs.python.org/3/library/functions.html#int> = UNKNOWN_CELL
            Constant UNKNOWN_CELL of type int <https://docs.python.org/3/library/functions.html#int>

        UNKNOWN_FACE: int <https://docs.python.org/3/library/functions.html#int> = UNKNOWN_FACE
            Constant UNKNOWN_FACE of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DM.ReorderDefaultFlag

    class petsc4py.PETSc.DM.ReorderDefaultFlag
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The DM <#petsc4py.PETSc.DM> reordering default flags.

        Attributes Summary
        FALSE | Constant FALSE of type int <https://docs.python.org/3/library/functions.html#int>
        NOTSET | Constant NOTSET of type int <https://docs.python.org/3/library/functions.html#int>
        TRUE | Constant TRUE of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        FALSE: int <https://docs.python.org/3/library/functions.html#int> = FALSE
            Constant FALSE of type int <https://docs.python.org/3/library/functions.html#int>

        NOTSET: int <https://docs.python.org/3/library/functions.html#int> = NOTSET
            Constant NOTSET of type int <https://docs.python.org/3/library/functions.html#int>

        TRUE: int <https://docs.python.org/3/library/functions.html#int> = TRUE
            Constant TRUE of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DM.Type

    class petsc4py.PETSc.DM.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        DM <#petsc4py.PETSc.DM> types.

        Attributes Summary
        COMPOSITE | Object COMPOSITE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DA | Object DA of type str <https://docs.python.org/3/library/stdtypes.html#str>
        FOREST | Object FOREST of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MOAB | Object MOAB of type str <https://docs.python.org/3/library/stdtypes.html#str>
        NETWORK | Object NETWORK of type str <https://docs.python.org/3/library/stdtypes.html#str>
        P4EST | Object P4EST of type str <https://docs.python.org/3/library/stdtypes.html#str>
        P8EST | Object P8EST of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PATCH | Object PATCH of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PLEX | Object PLEX of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PRODUCT | Object PRODUCT of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REDUNDANT | Object REDUNDANT of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SHELL | Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SLICED | Object SLICED of type str <https://docs.python.org/3/library/stdtypes.html#str>
        STAG | Object STAG of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SWARM | Object SWARM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        COMPOSITE: str <https://docs.python.org/3/library/stdtypes.html#str> = COMPOSITE
            Object COMPOSITE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DA: str <https://docs.python.org/3/library/stdtypes.html#str> = DA
            Object DA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        FOREST: str <https://docs.python.org/3/library/stdtypes.html#str> = FOREST
            Object FOREST of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MOAB: str <https://docs.python.org/3/library/stdtypes.html#str> = MOAB
            Object MOAB of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NETWORK: str <https://docs.python.org/3/library/stdtypes.html#str> = NETWORK
            Object NETWORK of type str <https://docs.python.org/3/library/stdtypes.html#str>

        P4EST: str <https://docs.python.org/3/library/stdtypes.html#str> = P4EST
            Object P4EST of type str <https://docs.python.org/3/library/stdtypes.html#str>

        P8EST: str <https://docs.python.org/3/library/stdtypes.html#str> = P8EST
            Object P8EST of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PATCH: str <https://docs.python.org/3/library/stdtypes.html#str> = PATCH
            Object PATCH of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PLEX: str <https://docs.python.org/3/library/stdtypes.html#str> = PLEX
            Object PLEX of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PRODUCT: str <https://docs.python.org/3/library/stdtypes.html#str> = PRODUCT
            Object PRODUCT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REDUNDANT: str <https://docs.python.org/3/library/stdtypes.html#str> = REDUNDANT
            Object REDUNDANT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SHELL: str <https://docs.python.org/3/library/stdtypes.html#str> = SHELL
            Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SLICED: str <https://docs.python.org/3/library/stdtypes.html#str> = SLICED
            Object SLICED of type str <https://docs.python.org/3/library/stdtypes.html#str>

        STAG: str <https://docs.python.org/3/library/stdtypes.html#str> = STAG
            Object STAG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SWARM: str <https://docs.python.org/3/library/stdtypes.html#str> = SWARM
            Object SWARM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
adaptLabel(label) | Adapt a DM based on a DMLabel <#petsc4py.PETSc.DMLabel>.
adaptMetric(metric[, bdLabel, rgLabel]) | Return a mesh adapted to the specified metric field.
addCoarsenHook(coarsenhook, restricthook[, ...]) | Add a callback to be executed when restricting to a coarser grid.
addField(field[, label]) | Add a field to a DM object.
appendOptionsPrefix(prefix) | Append to the prefix used for searching for options in the database.
clearDS() | Remove all discrete systems from the DM.
clearFields() | Remove all fields from the DM.
clearLabelStratum(name, value) | Remove all points from a stratum.
clearLabelValue(name, point, value) | Remove a point from a DMLabel <#petsc4py.PETSc.DMLabel> with given value.
clone() | Return the cloned DM .
coarsen([comm]) | Return a coarsened DM object.
coarsenHierarchy(nlevels) | Coarsen this DM and return the coarsened DM hierarchy.
convert(dm_type) | Return a DM converted to another DM.
copyDS(dm[, minDegree, maxDegree]) | Copy the discrete systems for this DM into another DM.
copyDisc(dm) | Copy fields and discrete systems of a DM into another DM.
copyFields(dm[, minDegree, maxDegree]) | Copy the discretizations of this DM into another DM.
create([comm]) | Return an empty DM.
createDS() | Create discrete systems.
createFieldDecomposition() | Return field splitting information.
createGlobalVec() | Return a global vector.
createInjection(dm) | Return the injection matrix into a finer DM.
createInterpolation(dm) | Return the interpolation matrix to a finer DM.
createLabel(name) | Create a label of the given name if it does not already exist.
createLocalVec() | Return a local vector.
createMassMatrix(dmf) | Return the mass matrix between this DM and the given DM.
createMat() | Return an empty matrix.
createRestriction(dm) | Return the restriction matrix between this DM and the given DM.
createSectionSF(localsec, globalsec) | Create the SF <#petsc4py.PETSc.SF> encoding the parallel DOF overlap for the DM.
createSubDM(fields) | Return IS <#petsc4py.PETSc.IS> and DM encapsulating a subproblem.
destroy() | Destroy the object.
getAppCtx() | Return the application context.
getAuxiliaryVec([label, value, part]) | Return an auxiliary vector for region.
getBasicAdjacency() | Return the flags for determining variable influence.
getBlockSize() | Return the inherent block size associated with a DM.
getBoundingBox() | Return the dimension of embedding space for coordinates values.
getCellCoordinateDM() | Return the cell coordinate DM.
getCellCoordinateSection() | Return the cell coordinate layout over the DM.
getCellCoordinates() | Return a global vector with the cellwise coordinates.
getCellCoordinatesLocal() | Return a local vector with the cellwise coordinates.
getCoarseDM() | Return the coarse DM.
getCoarsenLevel() | Return the number of coarsenings.
getCoordinateDM() | Return the coordinate DM.
getCoordinateDim() | Return the dimension of embedding space for coordinates values.
getCoordinateSection() | Return coordinate values layout over the mesh.
getCoordinates() | Return a global vector with the coordinates associated.
getCoordinatesLocal() | Return a local vector with the coordinates associated.
getCoordinatesLocalized() | Check if the coordinates have been localized for cells.
getDS() | Return default DS <#petsc4py.PETSc.DS>.
getDimension() | Return the topological dimension of the DM.
getField(index) | Return the discretization object for a given DM field.
getFieldAdjacency(field) | Return the flags for determining variable influence.
getGlobalSection() | Return the Section <#petsc4py.PETSc.Section> encoding the global data layout for the DM.
getGlobalVec([name]) | Return a global vector.
getLGMap() | Return local mapping to global mapping.
getLabel(name) | Return the label of a given name.
getLabelIdIS(name) | Return an IS <#petsc4py.PETSc.IS> of all values that the DMLabel <#petsc4py.PETSc.DMLabel> takes.
getLabelName(index) | Return the name of nth label.
getLabelOutput(name) | Return the output flag for a given label.
getLabelSize(name) | Return the number of values that the DMLabel <#petsc4py.PETSc.DMLabel> takes.
getLabelValue(name, point) | Return the value in DMLabel <#petsc4py.PETSc.DMLabel> for the given point.
getLocalBoundingBox() | Return the bounding box for the piece of the DM.
getLocalSection() | Return the Section <#petsc4py.PETSc.Section> encoding the local data layout for the DM.
getLocalVec([name]) | Return a local vector.
getNumFields() | Return the number of fields in the DM.
getNumLabels() | Return the number of labels defined by on the DM.
getOptionsPrefix() | Return the prefix used for searching for options in the database.
getPeriodicity() | Set the description of mesh periodicity.
getPointSF() | Return the SF <#petsc4py.PETSc.SF> encoding the parallel DOF overlap for the DM.
getRefineLevel() | Return the refinement level.
getSectionSF() | Return the Section <#petsc4py.PETSc.Section> encoding the parallel DOF overlap.
getSparseLocalize() | Return if coordinates should only be localized at the boundary.
getStratumIS(name, value) | Return the points in a label stratum.
getStratumSize(name, value) | Return the number of points in a label stratum.
getType() | Return the DM type name.
getUseNatural() | Get the flag for constructing a global-to-natural map.
globalToLocal(vg, vl[, addv]) | Update local vectors from global vector.
hasLabel(name) | Determine whether the DM has a label.
load(viewer) | Return a DM stored in binary.
localToGlobal(vl, vg[, addv]) | Update global vectors from local vector.
localToLocal(vl, vlg[, addv]) | Map the values from a local vector to another local vector.
localizeCoordinates() | Create local coordinates for cells having periodic faces.
refine([comm]) | Return a refined DM object.
refineHierarchy(nlevels) | Refine this DM and return the refined DM hierarchy.
removeLabel(name) | Remove and destroy the label by name.
restoreGlobalVec(vg[, name]) | Restore a global vector obtained with getGlobalVec.
restoreLocalVec(vl[, name]) | Restore a local vector obtained with getLocalVec.
setAppCtx(appctx) | Set the application context.
setAuxiliaryVec(aux, label[, value, part]) | Set an auxiliary vector for a specific region.
setBasicAdjacency(useCone, useClosure) | Set the flags for determining variable influence.
setCellCoordinateDM(dm) | Set the cell coordinate DM.
setCellCoordinateSection(dim, sec) | Set the cell coordinate layout over the DM.
setCellCoordinates(c) | Set a global vector with the cellwise coordinates.
setCellCoordinatesLocal(c) | Set a local vector with the cellwise coordinates.
setCoarseDM(dm) | Set the coarse DM.
setCoordinateDim(dim) | Set the dimension of embedding space for coordinates values.
setCoordinateDisc(disc, localized, project) | Project coordinates to a different space.
setCoordinates(c) | Set a global vector that holds the coordinates.
setCoordinatesLocal(c) | Set a local vector with the ghost point holding the coordinates.
setDimension(dim) | Set the topological dimension of the DM.
setField(index, field[, label]) | Set the discretization object for a given DM field.
setFieldAdjacency(field, useCone, useClosure) | Set the flags for determining variable influence.
setFromOptions() | Configure the object from the options database.
setGlobalSection(sec) | Set the Section <#petsc4py.PETSc.Section> encoding the global data layout for the DM.
setKSPComputeOperators(operators[, args, kargs]) | Matrix associated with the linear system.
setLabelOutput(name, output) | Set if a given label should be saved to a view.
setLabelValue(name, point, value) | Set a point to a DMLabel <#petsc4py.PETSc.DMLabel> with a given value.
setLocalSection(sec) | Set the Section <#petsc4py.PETSc.Section> encoding the local data layout for the DM.
setMatType(mat_type) | Set matrix type to be used by DM.createMat.
setNumFields(numFields) | Set the number of fields in the DM.
setOptionsPrefix(prefix) | Set the prefix used for searching for options in the database.
setPeriodicity(maxCell, Lstart, L) | Set the description of mesh periodicity.
setPointSF(sf) | Set the SF <#petsc4py.PETSc.SF> encoding the parallel DOF overlap for the DM.
setRefineLevel(level) | Set the number of refinements.
setSNESFunction(function[, args, kargs]) | Set SNES <#petsc4py.PETSc.SNES> residual evaluation function.
setSNESJacobian(jacobian[, args, kargs]) | Set the SNES <#petsc4py.PETSc.SNES> Jacobian evaluation function.
setSectionSF(sf) | Set the Section <#petsc4py.PETSc.Section> encoding the parallel DOF overlap for the DM.
setSparseLocalize(flag) | Set if coordinates should be only localized at the boundary.
setType(dm_type) | Build a DM.
setUp() | Return the data structure.
setUseNatural(useNatural) | Set the flag for constructing a global-to-natural map.
setVecType(vec_type) | Set the type of vector.
view([viewer]) | View the DM.

Attributes Summary
appctx | Application context.
ds | Discrete space.

Methods Documentation

    adaptLabel(label)
        Adapt a DM based on a DMLabel <#petsc4py.PETSc.DMLabel>.

        Collective.

        Parameters
            label (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The name of the DMLabel <#petsc4py.PETSc.DMLabel>.

        Return type
            DM <#petsc4py.PETSc.DM>

    See also:
            DMAdaptLabel <https://petsc.org/release/manualpages/DM/DMAdaptLabel.html>

    Source code at petsc4py/PETSc/DM.pyx:1783 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1783>

    adaptMetric(metric, bdLabel=None, rgLabel=None)
        Return a mesh adapted to the specified metric field.

        Collective.

        Parameters

            •   metric (Vec <#petsc4py.PETSc.Vec>) -- The metric to which the mesh is adapted, defined vertex-wise.

            •   bdLabel (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- Label for boundary tags.

            •   rgLabel (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- Label for cell tag.

        Return type
            DM <#petsc4py.PETSc.DM>

    See also:
            DMAdaptMetric <https://petsc.org/release/manualpages/DM/DMAdaptMetric.html>

    Source code at petsc4py/PETSc/DM.pyx:1806 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1806>

    addCoarsenHook(coarsenhook, restricthook, args=None, kargs=None)
        Add a callback to be executed when restricting to a coarser grid.

        Logically collective.

        Parameters

            •   coarsenhook (DMCoarsenHookFunction <#petsc4py.typing.DMCoarsenHookFunction>) -- The coarsen hook function.

            •   restricthook (DMRestrictHookFunction <#petsc4py.typing.DMRestrictHookFunction>) -- The restrict hook function.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the hooks.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the hooks.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMCoarsenHookAdd <https://petsc.org/release/manualpages/DM/DMCoarsenHookAdd.html>

    Source code at petsc4py/PETSc/DM.pyx:2470 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2470>

    addField(field, label=None)
        Add a field to a DM object.

        Logically collective.

        Parameters

            •   field (Object <#petsc4py.PETSc.Object>) -- The discretization object.

            •   label (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The name of the label indicating the support of the field, or None <https://docs.python.org/3/library/constants.html#None> for the entire mesh.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMAddField <https://petsc.org/release/manualpages/DM/DMAddField.html>

    Source code at petsc4py/PETSc/DM.pyx:648 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L648>

    appendOptionsPrefix(prefix)
        Append to the prefix used for searching for options in the database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, setOptionsPrefix, DMAppendOptionsPrefix <https://petsc.org/release/manualpages/DM/DMAppendOptionsPrefix.html>

    Source code at petsc4py/PETSc/DM.pyx:298 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L298>

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    clearDS()
        Remove all discrete systems from the DM.

        Logically collective.

        See also:
            DMClearDS <https://petsc.org/release/manualpages/DM/DMClearDS.html>

    Source code at petsc4py/PETSc/DM.pyx:728 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L728>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    clearFields()
        Remove all fields from the DM.

        Logically collective.

        See also:
            DMClearFields <https://petsc.org/release/manualpages/DM/DMClearFields.html>

    Source code at petsc4py/PETSc/DM.pyx:671 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L671>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    clearLabelStratum(name, value)
        Remove all points from a stratum.

        Not collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

            •   value (int <https://docs.python.org/3/library/functions.html#int>) -- The stratum value.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMClearLabelStratum <https://petsc.org/release/manualpages/DM/DMClearLabelStratum.html>

    Source code at petsc4py/PETSc/DM.pyx:2262 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2262>

    clearLabelValue(name, point, value)
        Remove a point from a DMLabel <#petsc4py.PETSc.DMLabel> with given value.

        Not collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

            •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The mesh point.

            •   value (int <https://docs.python.org/3/library/functions.html#int>) -- The label value for the point.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMClearLabelValue <https://petsc.org/release/manualpages/DM/DMClearLabelValue.html>

    Source code at petsc4py/PETSc/DM.pyx:2148 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2148>

    clone()
        Return the cloned DM .

        Collective.

        See also:
            DMClone <https://petsc.org/release/manualpages/DM/DMClone.html>

    Source code at petsc4py/PETSc/DM.pyx:155 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L155>

        Return type
            DM <#petsc4py.PETSc.DM>

    coarsen(comm=None)
        Return a coarsened DM object.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            DM <#petsc4py.PETSc.DM>

    See also:
            DMCoarsen <https://petsc.org/release/manualpages/DM/DMCoarsen.html>

    Source code at petsc4py/PETSc/DM.pyx:1657 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1657>

    coarsenHierarchy(nlevels)
        Coarsen this DM and return the coarsened DM hierarchy.

        Collective.

        Parameters
            nlevels (int <https://docs.python.org/3/library/functions.html#int>) -- The number of levels of coarsening.

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>

    See also:
            DMCoarsenHierarchy <https://petsc.org/release/manualpages/DM/DMCoarsenHierarchy.html>

    Source code at petsc4py/PETSc/DM.pyx:1708 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1708>

    convert(dm_type)
        Return a DM converted to another DM.

        Collective.

        Parameters
            dm_type (Type <#petsc4py.PETSc.DM.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The new DM.Type <#petsc4py.PETSc.DM.Type>, use “same” for the same type.

        Return type
            DM <#petsc4py.PETSc.DM>

    See also:
            DM.Type <#petsc4py.PETSc.DM.Type>, DMConvert <https://petsc.org/release/manualpages/DM/DMConvert.html>

    Source code at petsc4py/PETSc/DM.pyx:1610 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1610>

    copyDS(dm, minDegree=None, maxDegree=None)
        Copy the discrete systems for this DM into another DM.

        Collective.

        Parameters

            •   dm (DM <#petsc4py.PETSc.DM>) -- The DM that the discrete fields are copied into.

            •   minDegree -- The minimum polynommial degree for the discretization, or None <https://docs.python.org/3/library/constants.html#None> for no limit

            •   maxDegree -- The maximum polynommial degree for the discretization, or None <https://docs.python.org/3/library/constants.html#None> for no limit

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMCopyDS <https://petsc.org/release/manualpages/DM/DMCopyDS.html>

    Source code at petsc4py/PETSc/DM.pyx:755 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L755>

    copyDisc(dm)
        Copy fields and discrete systems of a DM into another DM.

        Collective.

        Parameters
            dm (DM <#petsc4py.PETSc.DM>) -- The DM that the fields and discrete systems are copied into.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMCopyDisc <https://petsc.org/release/manualpages/DM/DMCopyDisc.html>

    Source code at petsc4py/PETSc/DM.pyx:788 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L788>

    copyFields(dm, minDegree=None, maxDegree=None)
        Copy the discretizations of this DM into another DM.

        Collective.

        Parameters

            •   dm (DM <#petsc4py.PETSc.DM>) -- The DM that the fields are copied into.

            •   minDegree -- The minimum polynommial degree for the discretization, or None <https://docs.python.org/3/library/constants.html#None> for no limit

            •   maxDegree -- The maximum polynommial degree for the discretization, or None <https://docs.python.org/3/library/constants.html#None> for no limit

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMCopyFields <https://petsc.org/release/manualpages/DM/DMCopyFields.html>

    Source code at petsc4py/PETSc/DM.pyx:683 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L683>

    create(comm=None)
        Return an empty DM.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            DMCreate <https://petsc.org/release/manualpages/DM/DMCreate.html>

    Source code at petsc4py/PETSc/DM.pyx:134 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L134>

    createDS()
        Create discrete systems.

        Collective.

        See also:
            DMCreateDS <https://petsc.org/release/manualpages/DM/DMCreateDS.html>

    Source code at petsc4py/PETSc/DM.pyx:716 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L716>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    createFieldDecomposition()
        Return field splitting information.

        Collective.

        See also:
            DMCreateFieldDecomposition <https://petsc.org/release/manualpages/DM/DMCreateFieldDecomposition.html>

    Source code at petsc4py/PETSc/DM.pyx:2360 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2360>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[list <https://docs.python.org/3/library/stdtypes.html#list>, list <https://docs.python.org/3/library/stdtypes.html#list>, list <https://docs.python.org/3/library/stdtypes.html#list>]

    createGlobalVec()
        Return a global vector.

        Collective.

        See also:
            DMCreateGlobalVector <https://petsc.org/release/manualpages/DM/DMCreateGlobalVector.html>

    Source code at petsc4py/PETSc/DM.pyx:835 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L835>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    createInjection(dm)
        Return the injection matrix into a finer DM.

        Collective.

        Parameters
            dm (DM <#petsc4py.PETSc.DM>) -- The second, finer DM object.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            DMCreateInjection <https://petsc.org/release/manualpages/DM/DMCreateInjection.html>

    Source code at petsc4py/PETSc/DM.pyx:1572 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1572>

    createInterpolation(dm)
        Return the interpolation matrix to a finer DM.

        Collective.

        Parameters
            dm (DM <#petsc4py.PETSc.DM>) -- The second, finer DM.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Vec <#petsc4py.PETSc.Vec>]

    See also:
            DMCreateInterpolation <https://petsc.org/release/manualpages/DM/DMCreateInterpolation.html>

    Source code at petsc4py/PETSc/DM.pyx:1551 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1551>

    createLabel(name)
        Create a label of the given name if it does not already exist.

        Not collective.

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMCreateLabel <https://petsc.org/release/manualpages/DM/DMCreateLabel.html>

    Source code at petsc4py/PETSc/DM.pyx:2060 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2060>

    createLocalVec()
        Return a local vector.

        Not collective.

        See also:
            DMCreateLocalVector <https://petsc.org/release/manualpages/DM/DMCreateLocalVector.html>

    Source code at petsc4py/PETSc/DM.pyx:849 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L849>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    createMassMatrix(dmf)
        Return the mass matrix between this DM and the given DM.

        Collective.

        Parameters
            dmf (DM <#petsc4py.PETSc.DM>) -- The second DM.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            DMCreateMassMatrix <https://petsc.org/release/manualpages/DM/DMCreateMassMatrix.html>

    Source code at petsc4py/PETSc/DM.pyx:1532 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1532>

    createMat()
        Return an empty matrix.

        Collective.

        See also:
            DMCreateMatrix <https://petsc.org/release/manualpages/DM/DMCreateMatrix.html>

    Source code at petsc4py/PETSc/DM.pyx:1518 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1518>

        Return type
            Mat <#petsc4py.PETSc.Mat>

    createRestriction(dm)
        Return the restriction matrix between this DM and the given DM.

        Collective.

        Parameters
            dm (DM <#petsc4py.PETSc.DM>) -- The second, finer DM object.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            DMCreateRestriction <https://petsc.org/release/manualpages/DM/DMCreateRestriction.html>

    Source code at petsc4py/PETSc/DM.pyx:1591 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1591>

    createSectionSF(localsec, globalsec)
        Create the SF <#petsc4py.PETSc.SF> encoding the parallel DOF overlap for the DM.

        Collective.

        Parameters

            •   localsec (Section <#petsc4py.PETSc.Section>) -- Describe the local data layout.

            •   globalsec (Section <#petsc4py.PETSc.Section>) -- Describe the global data layout.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    Encoding based on the Section <#petsc4py.PETSc.Section> describing the data layout.

    See also:
            DM.getSectionSF, DMCreateSectionSF <https://petsc.org/release/manualpages/DM/DMCreateSectionSF.html>

    Source code at petsc4py/PETSc/DM.pyx:1924 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1924>

    createSubDM(fields)
        Return IS <#petsc4py.PETSc.IS> and DM encapsulating a subproblem.

        Not collective.

        Returns

            •   iset (IS <#petsc4py.PETSc.IS>) -- The global indices for all the degrees of freedom.

            •   subdm (DM) -- The DM for the subproblem.

        Parameters
            fields (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>])

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[IS <#petsc4py.PETSc.IS>, DM <#petsc4py.PETSc.DM>]

    See also:
            DMCreateSubDM <https://petsc.org/release/manualpages/DM/DMCreateSubDM.html>

    Source code at petsc4py/PETSc/DM.pyx:483 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L483>

    destroy()
        Destroy the object.

        Collective.

        See also:
            DMDestroy <https://petsc.org/release/manualpages/DM/DMDestroy.html>

    Source code at petsc4py/PETSc/DM.pyx:121 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L121>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getAppCtx()
        Return the application context.

        Source code at petsc4py/PETSc/DM.pyx:343 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L343>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getAuxiliaryVec(label=None, value=0, part=0)
        Return an auxiliary vector for region.

        Not collective.

        Parameters

            •   label (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The name of the DMLabel <#petsc4py.PETSc.DMLabel>.

            •   value (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Indicate the region.

            •   part (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The equation part, or 0 is unused.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            DM.getLabel, DMGetAuxiliaryVec <https://petsc.org/release/manualpages/DM/DMGetAuxiliaryVec.html>

    Source code at petsc4py/PETSc/DM.pyx:540 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L540>

    getBasicAdjacency()
        Return the flags for determining variable influence.

        Not collective.

        Returns

            •   useCone (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether adjacency uses cone information.

            •   useClosure (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether adjacency is computed using full closure information.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[bool <https://docs.python.org/3/library/functions.html#bool>, bool <https://docs.python.org/3/library/functions.html#bool>]

    See also:
            DMGetBasicAdjacency <https://petsc.org/release/manualpages/DM/DMGetBasicAdjacency.html>

    Source code at petsc4py/PETSc/DM.pyx:407 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L407>

    getBlockSize()
        Return the inherent block size associated with a DM.

        Not collective.

        See also:
            DMGetBlockSize <https://petsc.org/release/manualpages/DM/DMGetBlockSize.html>

    Source code at petsc4py/PETSc/DM.pyx:807 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L807>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getBoundingBox()
        Return the dimension of embedding space for coordinates values.

        Not collective.

        See also:
            DMGetBoundingBox <https://petsc.org/release/manualpages/DM/DMGetBoundingBox.html>

    Source code at petsc4py/PETSc/DM.pyx:1381 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1381>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>], ...]

    getCellCoordinateDM()
        Return the cell coordinate DM.

        Collective.

        See also:
            DMGetCellCoordinateDM <https://petsc.org/release/manualpages/DM/DMGetCellCoordinateDM.html>

    Source code at petsc4py/PETSc/DM.pyx:1196 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1196>

        Return type
            DM <#petsc4py.PETSc.DM>

    getCellCoordinateSection()
        Return the cell coordinate layout over the DM.

        Collective.

        See also:
            DMGetCellCoordinateSection <https://petsc.org/release/manualpages/DM/DMGetCellCoordinateSection.html>

    Source code at petsc4py/PETSc/DM.pyx:1231 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1231>

        Return type
            Section <#petsc4py.PETSc.Section>

    getCellCoordinates()
        Return a global vector with the cellwise coordinates.

        Collective.

        See also:
            DMGetCellCoordinates <https://petsc.org/release/manualpages/DM/DMGetCellCoordinates.html>

    Source code at petsc4py/PETSc/DM.pyx:1263 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1263>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getCellCoordinatesLocal()
        Return a local vector with the cellwise coordinates.

        Collective.

        See also:
            DMGetCellCoordinatesLocal <https://petsc.org/release/manualpages/DM/DMGetCellCoordinatesLocal.html>

    Source code at petsc4py/PETSc/DM.pyx:1295 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1295>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getCoarseDM()
        Return the coarse DM.

        Collective.

        See also:
            DMGetCoarseDM <https://petsc.org/release/manualpages/DM/DMGetCoarseDM.html>

    Source code at petsc4py/PETSc/DM.pyx:1057 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1057>

        Return type
            DM <#petsc4py.PETSc.DM>

    getCoarsenLevel()
        Return the number of coarsenings.

        Not collective.

        See also:
            DMGetCoarsenLevel <https://petsc.org/release/manualpages/DM/DMGetCoarsenLevel.html>

    Source code at petsc4py/PETSc/DM.pyx:1767 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1767>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getCoordinateDM()
        Return the coordinate DM.

        Collective.

        See also:
            DMGetCoordinateDM <https://petsc.org/release/manualpages/DM/DMGetCoordinateDM.html>

    Source code at petsc4py/PETSc/DM.pyx:1085 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1085>

        Return type
            DM <#petsc4py.PETSc.DM>

    getCoordinateDim()
        Return the dimension of embedding space for coordinates values.

        Not collective.

        See also:
            DMGetCoordinateDim <https://petsc.org/release/manualpages/DM/DMGetCoordinateDim.html>

    Source code at petsc4py/PETSc/DM.pyx:238 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L238>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getCoordinateSection()
        Return coordinate values layout over the mesh.

        Collective.

        See also:
            DMGetCoordinateSection <https://petsc.org/release/manualpages/DM/DMGetCoordinateSection.html>

    Source code at petsc4py/PETSc/DM.pyx:1100 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1100>

        Return type
            Section <#petsc4py.PETSc.Section>

    getCoordinates()
        Return a global vector with the coordinates associated.

        Collective.

        See also:
            DMGetCoordinates <https://petsc.org/release/manualpages/DM/DMGetCoordinates.html>

    Source code at petsc4py/PETSc/DM.pyx:1132 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1132>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getCoordinatesLocal()
        Return a local vector with the coordinates associated.

        Collective the first time it is called.

        See also:
            DMGetCoordinatesLocal <https://petsc.org/release/manualpages/DM/DMGetCoordinatesLocal.html>

    Source code at petsc4py/PETSc/DM.pyx:1164 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1164>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getCoordinatesLocalized()
        Check if the coordinates have been localized for cells.

        Not collective.

        See also:
            DMGetCoordinatesLocalized <https://petsc.org/release/manualpages/DM/DMGetCoordinatesLocalized.html>

    Source code at petsc4py/PETSc/DM.pyx:1334 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1334>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getDS()
        Return default DS <#petsc4py.PETSc.DS>.

        Not collective.

        See also:
            DMGetDS <https://petsc.org/release/manualpages/DM/DMGetDS.html>

    Source code at petsc4py/PETSc/DM.pyx:740 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L740>

        Return type
            DS <#petsc4py.PETSc.DS>

    getDimension()
        Return the topological dimension of the DM.

        Not collective.

        See also:
            DMGetDimension <https://petsc.org/release/manualpages/DM/DMGetDimension.html>

    Source code at petsc4py/PETSc/DM.pyx:206 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L206>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getField(index)
        Return the discretization object for a given DM field.

        Not collective.

        Parameters
            index (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Object <#petsc4py.PETSc.Object>, None <https://docs.python.org/3/library/constants.html#None>]

    See also:
            DMGetField <https://petsc.org/release/manualpages/DM/DMGetField.html>

    Source code at petsc4py/PETSc/DM.pyx:623 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L623>

    getFieldAdjacency(field)
        Return the flags for determining variable influence.

        Not collective.

        Parameters
            field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

        Returns

            •   useCone (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether adjacency uses cone information.

            •   useClosure (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether adjacency is computed using full closure information.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[bool <https://docs.python.org/3/library/functions.html#bool>, bool <https://docs.python.org/3/library/functions.html#bool>]

    See also:
            DMGetAdjacency <https://petsc.org/release/manualpages/DM/DMGetAdjacency.html>

    Source code at petsc4py/PETSc/DM.pyx:453 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L453>

    getGlobalSection()
        Return the Section <#petsc4py.PETSc.Section> encoding the global data layout for the DM.

        Collective the first time it is called.

        See also:
            DMGetGlobalSection <https://petsc.org/release/manualpages/DM/DMGetGlobalSection.html>

    Source code at petsc4py/PETSc/DM.pyx:1900 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1900>

        Return type
            Section <#petsc4py.PETSc.Section>

    getGlobalVec(name=None)
        Return a global vector.

        Collective.

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional name to retrieve a persistent vector.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    Notes

    When done with the vector, it must be restored using restoreGlobalVec.

    See also:
            restoreGlobalVec, DMGetGlobalVector <https://petsc.org/release/manualpages/DM/DMGetGlobalVector.html>, DMGetNamedGlobalVector <https://petsc.org/release/manualpages/DM/DMGetNamedGlobalVector.html>

    Source code at petsc4py/PETSc/DM.pyx:863 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L863>

    getLGMap()
        Return local mapping to global mapping.

        Collective.

        See also:
            DMGetLocalToGlobalMapping <https://petsc.org/release/manualpages/DM/DMGetLocalToGlobalMapping.html>

    Source code at petsc4py/PETSc/DM.pyx:1040 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1040>

        Return type
            LGMap <#petsc4py.PETSc.LGMap>

    getLabel(name)
        Return the label of a given name.

        Not collective.

        See also:
            DMGetLabel <https://petsc.org/release/manualpages/DM/DMGetLabel.html>

    Source code at petsc4py/PETSc/DM.pyx:1842 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1842>

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            DMLabel <#petsc4py.PETSc.DMLabel>

    getLabelIdIS(name)
        Return an IS <#petsc4py.PETSc.IS> of all values that the DMLabel <#petsc4py.PETSc.DMLabel> takes.

        Not collective.

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

        Return type
            IS <#petsc4py.PETSc.IS>

    See also:
            DMLabelGetValueIS <https://petsc.org/release/manualpages/DMLabel/DMLabelGetValueIS.html>, DMGetLabelIdIS <https://petsc.org/release/manualpages/DM/DMGetLabelIdIS.html>

    Source code at petsc4py/PETSc/DM.pyx:2193 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2193>

    getLabelName(index)
        Return the name of nth label.

        Not collective.

        Parameters
            index (int <https://docs.python.org/3/library/functions.html#int>) -- The label number.

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    See also:
            DMGetLabelName <https://petsc.org/release/manualpages/DM/DMGetLabelName.html>

    Source code at petsc4py/PETSc/DM.pyx:2019 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2019>

    getLabelOutput(name)
        Return the output flag for a given label.

        Not collective.

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    See also:
            DMGetLabelOutput <https://petsc.org/release/manualpages/DM/DMGetLabelOutput.html>

    Source code at petsc4py/PETSc/DM.pyx:2306 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2306>

    getLabelSize(name)
        Return the number of values that the DMLabel <#petsc4py.PETSc.DMLabel> takes.

        Not collective.

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            DMLabelGetNumValues <https://petsc.org/release/manualpages/DMLabel/DMLabelGetNumValues.html>, DMGetLabelSize <https://petsc.org/release/manualpages/DM/DMGetLabelSize.html>

    Source code at petsc4py/PETSc/DM.pyx:2172 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2172>

    getLabelValue(name, point)
        Return the value in DMLabel <#petsc4py.PETSc.DMLabel> for the given point.

        Not collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

            •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The mesh point

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            DMGetLabelValue <https://petsc.org/release/manualpages/DM/DMGetLabelValue.html>

    Source code at petsc4py/PETSc/DM.pyx:2101 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2101>

    getLocalBoundingBox()
        Return the bounding box for the piece of the DM.

        Not collective.

        See also:
            DMGetLocalBoundingBox <https://petsc.org/release/manualpages/DM/DMGetLocalBoundingBox.html>

    Source code at petsc4py/PETSc/DM.pyx:1398 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1398>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>], ...]

    getLocalSection()
        Return the Section <#petsc4py.PETSc.Section> encoding the local data layout for the DM.

        Not collective.

        See also:
            DMGetGlobalSection <https://petsc.org/release/manualpages/DM/DMGetGlobalSection.html>

    Source code at petsc4py/PETSc/DM.pyx:1873 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1873>

        Return type
            Section <#petsc4py.PETSc.Section>

    getLocalVec(name=None)
        Return a local vector.

        Not collective.

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional name to retrieve a persistent vector.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    Notes

    When done with the vector, it must be restored using restoreLocalVec.

    See also:
            restoreLocalVec, DMGetLocalVector <https://petsc.org/release/manualpages/DM/DMGetLocalVector.html>, DMGetNamedLocalVector <https://petsc.org/release/manualpages/DM/DMGetNamedLocalVector.html>

    Source code at petsc4py/PETSc/DM.pyx:917 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L917>

    getNumFields()
        Return the number of fields in the DM.

        Not collective.

        See also:
            DMGetNumFields <https://petsc.org/release/manualpages/DM/DMGetNumFields.html>

    Source code at petsc4py/PETSc/DM.pyx:583 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L583>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getNumLabels()
        Return the number of labels defined by on the DM.

        Not collective.

        See also:
            DMGetNumLabels <https://petsc.org/release/manualpages/DM/DMGetNumLabels.html>

    Source code at petsc4py/PETSc/DM.pyx:2005 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2005>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getOptionsPrefix()
        Return the prefix used for searching for options in the database.

        Not collective.

        See also:
            Working with PETSc options <#petsc-options>, setOptionsPrefix, DMGetOptionsPrefix <https://petsc.org/release/manualpages/DM/DMGetOptionsPrefix.html>

    Source code at petsc4py/PETSc/DM.pyx:284 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L284>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getPeriodicity()
        Set the description of mesh periodicity.

        Not collective.

        Parameters

            •   maxCell -- The longest allowable cell dimension in each direction.

            •   Lstart -- The start of each coordinate direction, usually [0, 0, 0]

            •   L -- The periodic length of each coordinate direction, or -1 for non-periodic

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayReal <#petsc4py.typing.ArrayReal>, ArrayReal <#petsc4py.typing.ArrayReal>, ArrayReal <#petsc4py.typing.ArrayReal>]

    See also:
            DMSetPeriodicity <https://petsc.org/release/manualpages/DM/DMSetPeriodicity.html>

    Source code at petsc4py/PETSc/DM.pyx:1432 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1432>

    getPointSF()
        Return the SF <#petsc4py.PETSc.SF> encoding the parallel DOF overlap for the DM.

        Not collective.

        See also:
            DMGetPointSF <https://petsc.org/release/manualpages/DM/DMGetPointSF.html>

    Source code at petsc4py/PETSc/DM.pyx:1978 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1978>

        Return type
            SF <#petsc4py.PETSc.SF>

    getRefineLevel()
        Return the refinement level.

        Not collective.

        See also:
            DMGetRefineLevel <https://petsc.org/release/manualpages/DM/DMGetRefineLevel.html>

    Source code at petsc4py/PETSc/DM.pyx:1735 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1735>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getSectionSF()
        Return the Section <#petsc4py.PETSc.Section> encoding the parallel DOF overlap.

        Collective the first time it is called.

        See also:
            DMGetSectionSF <https://petsc.org/release/manualpages/DM/DMGetSectionSF.html>

    Source code at petsc4py/PETSc/DM.pyx:1947 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1947>

        Return type
            SF <#petsc4py.PETSc.SF>

    getSparseLocalize()
        Return if coordinates should only be localized at the boundary.

        Not collective.

        See also:
            DM.setSparseLocalize, DMGetSparseLocalize <https://petsc.org/release/manualpages/DM/DMGetSparseLocalize.html>

    Source code at petsc4py/PETSc/DM.pyx:1348 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1348>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getStratumIS(name, value)
        Return the points in a label stratum.

        Not collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

            •   value (int <https://docs.python.org/3/library/functions.html#int>) -- The stratum value.

        Return type
            IS <#petsc4py.PETSc.IS>

    See also:
            DMGetStratumIS <https://petsc.org/release/manualpages/DM/DMGetStratumIS.html>

    Source code at petsc4py/PETSc/DM.pyx:2238 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2238>

    getStratumSize(name, value)
        Return the number of points in a label stratum.

        Not collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

            •   value (int <https://docs.python.org/3/library/functions.html#int>) -- The stratum value.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            DMGetStratumSize <https://petsc.org/release/manualpages/DM/DMGetStratumSize.html>

    Source code at petsc4py/PETSc/DM.pyx:2214 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2214>

    getType()
        Return the DM type name.

        Not collective.

        See also:
            DMGetType <https://petsc.org/release/manualpages/DM/DMGetType.html>

    Source code at petsc4py/PETSc/DM.pyx:192 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L192>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getUseNatural()
        Get the flag for constructing a global-to-natural map.

        Not collective.

        Returns
            useNatural -- Whether a global-to-natural map is created.

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    See also:
            DMGetUseNatural <https://petsc.org/release/manualpages/DM/DMGetUseNatural.html>

    Source code at petsc4py/PETSc/DM.pyx:349 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L349>

    globalToLocal(vg, vl, addv=None)
        Update local vectors from global vector.

        Neighborwise collective.

        Parameters

            •   vg (Vec <#petsc4py.PETSc.Vec>) -- The global vector.

            •   vl (Vec <#petsc4py.PETSc.Vec>) -- The local vector.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMGlobalToLocalBegin <https://petsc.org/release/manualpages/DM/DMGlobalToLocalBegin.html>, DMGlobalToLocalEnd <https://petsc.org/release/manualpages/DM/DMGlobalToLocalEnd.html>

    Source code at petsc4py/PETSc/DM.pyx:971 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L971>

    hasLabel(name)
        Determine whether the DM has a label.

        Not collective.

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    See also:
            DMHasLabel <https://petsc.org/release/manualpages/DM/DMHasLabel.html>

    Source code at petsc4py/PETSc/DM.pyx:2039 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2039>

    load(viewer)
        Return a DM stored in binary.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer>) -- Viewer used to store the DM, like Viewer.Type.BINARY <#petsc4py.PETSc.Viewer.Type.BINARY> or Viewer.Type.HDF5 <#petsc4py.PETSc.Viewer.Type.HDF5>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Notes

    When using Viewer.Type.HDF5 <#petsc4py.PETSc.Viewer.Type.HDF5> format, one can save multiple DMPlex <#petsc4py.PETSc.DMPlex> meshes in a single HDF5 files. This in turn requires one to name the DMPlex <#petsc4py.PETSc.DMPlex> object with Object.setName <#petsc4py.PETSc.Object.setName> before saving it with DM.view and before loading it with DM.load for identification of the mesh object.

    See also:
            DM.view, DM.load, Object.setName <#petsc4py.PETSc.Object.setName>, DMLoad <https://petsc.org/release/manualpages/DM/DMLoad.html>

    Source code at petsc4py/PETSc/DM.pyx:95 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L95>

    localToGlobal(vl, vg, addv=None)
        Update global vectors from local vector.

        Neighborwise collective.

        Parameters

            •   vl (Vec <#petsc4py.PETSc.Vec>) -- The local vector.

            •   vg (Vec <#petsc4py.PETSc.Vec>) -- The global vector.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMLocalToGlobalBegin <https://petsc.org/release/manualpages/DM/DMLocalToGlobalBegin.html>, DMLocalToGlobalEnd <https://petsc.org/release/manualpages/DM/DMLocalToGlobalEnd.html>

    Source code at petsc4py/PETSc/DM.pyx:994 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L994>

    localToLocal(vl, vlg, addv=None)
        Map the values from a local vector to another local vector.

        Neighborwise collective.

        Parameters

            •   vl (Vec <#petsc4py.PETSc.Vec>) -- The local vector.

            •   vlg (Vec <#petsc4py.PETSc.Vec>) -- The global vector.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMLocalToLocalBegin <https://petsc.org/release/manualpages/DM/DMLocalToLocalBegin.html>, DMLocalToLocalEnd <https://petsc.org/release/manualpages/DM/DMLocalToLocalEnd.html>

    Source code at petsc4py/PETSc/DM.pyx:1017 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1017>

    localizeCoordinates()
        Create local coordinates for cells having periodic faces.

        Collective.

        Notes

        Used if the mesh is periodic.

        See also:
            DMLocalizeCoordinates <https://petsc.org/release/manualpages/DM/DMLocalizeCoordinates.html>

    Source code at petsc4py/PETSc/DM.pyx:1415 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1415>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    refine(comm=None)
        Return a refined DM object.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            DM <#petsc4py.PETSc.DM>

    See also:
            DMRefine <https://petsc.org/release/manualpages/DM/DMRefine.html>

    Source code at petsc4py/PETSc/DM.pyx:1633 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1633>

    refineHierarchy(nlevels)
        Refine this DM and return the refined DM hierarchy.

        Collective.

        Parameters
            nlevels (int <https://docs.python.org/3/library/functions.html#int>) -- The number of levels of refinement.

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>

    See also:
            DMRefineHierarchy <https://petsc.org/release/manualpages/DM/DMRefineHierarchy.html>

    Source code at petsc4py/PETSc/DM.pyx:1681 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1681>

    removeLabel(name)
        Remove and destroy the label by name.

        Not collective.

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMRemoveLabel <https://petsc.org/release/manualpages/DM/DMRemoveLabel.html>

    Source code at petsc4py/PETSc/DM.pyx:2079 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2079>

    restoreGlobalVec(vg, name=None)
        Restore a global vector obtained with getGlobalVec.

        Logically collective.

        Parameters

            •   vg (Vec <#petsc4py.PETSc.Vec>) -- The global vector.

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The name used to retrieve the persistent vector, if any.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getGlobalVec, DMRestoreGlobalVector <https://petsc.org/release/manualpages/DM/DMRestoreGlobalVector.html>, DMRestoreNamedGlobalVector <https://petsc.org/release/manualpages/DM/DMRestoreNamedGlobalVector.html>

    Source code at petsc4py/PETSc/DM.pyx:892 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L892>

    restoreLocalVec(vl, name=None)
        Restore a local vector obtained with getLocalVec.

        Not collective.

        Parameters

            •   vl (Vec <#petsc4py.PETSc.Vec>) -- The local vector.

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The name used to retrieve the persistent vector, if any.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getLocalVec, DMRestoreLocalVector <https://petsc.org/release/manualpages/DM/DMRestoreLocalVector.html>, DMRestoreNamedLocalVector <https://petsc.org/release/manualpages/DM/DMRestoreNamedLocalVector.html>

    Source code at petsc4py/PETSc/DM.pyx:946 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L946>

    setAppCtx(appctx)
        Set the application context.

        Source code at petsc4py/PETSc/DM.pyx:339 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L339>

        Parameters
            appctx (Any <https://docs.python.org/3/library/typing.html#typing.Any>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setAuxiliaryVec(aux, label, value=0, part=0)
        Set an auxiliary vector for a specific region.

        Not collective.

        Parameters

            •   aux (Vec <#petsc4py.PETSc.Vec>) -- The auxiliary vector.

            •   label (DMLabel <#petsc4py.PETSc.DMLabel> | None <https://docs.python.org/3/library/constants.html#None>) -- The name of the DMLabel <#petsc4py.PETSc.DMLabel>.

            •   value -- Indicate the region.

            •   part -- The equation part, or 0 is unused.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMGetLabel <https://petsc.org/release/manualpages/DM/DMGetLabel.html>, DMSetAuxiliaryVec <https://petsc.org/release/manualpages/DM/DMSetAuxiliaryVec.html>

    Source code at petsc4py/PETSc/DM.pyx:510 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L510>

    setBasicAdjacency(useCone, useClosure)
        Set the flags for determining variable influence.

        Not collective.

        Parameters

            •   useCone (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether adjacency uses cone information.

            •   useClosure (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether adjacency is computed using full closure information.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetBasicAdjacency <https://petsc.org/release/manualpages/DM/DMSetBasicAdjacency.html>

    Source code at petsc4py/PETSc/DM.pyx:386 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L386>

    setCellCoordinateDM(dm)
        Set the cell coordinate DM.

        Collective.

        Parameters
            dm (DM <#petsc4py.PETSc.DM>) -- The cell coordinate DM.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetCellCoordinateDM <https://petsc.org/release/manualpages/DM/DMSetCellCoordinateDM.html>

    Source code at petsc4py/PETSc/DM.pyx:1179 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1179>

    setCellCoordinateSection(dim, sec)
        Set the cell coordinate layout over the DM.

        Collective.

        Parameters

            •   dim (int <https://docs.python.org/3/library/functions.html#int>) -- The embedding dimension, or DETERMINE <#petsc4py.PETSc.DETERMINE>.

            •   sec (Section <#petsc4py.PETSc.Section>) -- The cell coordinate Section <#petsc4py.PETSc.Section>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetCellCoordinateSection <https://petsc.org/release/manualpages/DM/DMSetCellCoordinateSection.html>

    Source code at petsc4py/PETSc/DM.pyx:1211 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1211>

    setCellCoordinates(c)
        Set a global vector with the cellwise coordinates.

        Collective.

        Parameters
            c (Vec <#petsc4py.PETSc.Vec>) -- The global cell coordinate vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetCellCoordinates <https://petsc.org/release/manualpages/DM/DMSetCellCoordinates.html>

    Source code at petsc4py/PETSc/DM.pyx:1246 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1246>

    setCellCoordinatesLocal(c)
        Set a local vector with the cellwise coordinates.

        Not collective.

        Parameters
            c (Vec <#petsc4py.PETSc.Vec>) -- The local cell coordinate vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetCellCoordinatesLocal <https://petsc.org/release/manualpages/DM/DMSetCellCoordinatesLocal.html>

    Source code at petsc4py/PETSc/DM.pyx:1278 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1278>

    setCoarseDM(dm)
        Set the coarse DM.

        Collective.

        See also:
            DMSetCoarseDM <https://petsc.org/release/manualpages/DM/DMSetCoarseDM.html>

    Source code at petsc4py/PETSc/DM.pyx:1072 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1072>

        Parameters
            dm (DM <#petsc4py.PETSc.DM>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setCoordinateDim(dim)
        Set the dimension of embedding space for coordinates values.

        Not collective.

        Parameters
            dim (int <https://docs.python.org/3/library/functions.html#int>) -- The embedding dimension.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetCoordinateDim <https://petsc.org/release/manualpages/DM/DMSetCoordinateDim.html>

    Source code at petsc4py/PETSc/DM.pyx:252 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L252>

    setCoordinateDisc(disc, localized, project)
        Project coordinates to a different space.

        Collective.

        Parameters

            •   disc (FE <#petsc4py.PETSc.FE>) -- The new coordinates discretization.

            •   localized (bool <https://docs.python.org/3/library/functions.html#bool>) -- Set a localized (DG) coordinate space

            •   project (bool <https://docs.python.org/3/library/functions.html#bool>) -- Project coordinates to new discretization

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            DMSetCoordinateDisc <https://petsc.org/release/manualpages/DM/DMSetCoordinateDisc.html>

    Source code at petsc4py/PETSc/DM.pyx:1310 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1310>

    setCoordinates(c)
        Set a global vector that holds the coordinates.

        Collective.

        Parameters
            c (Vec <#petsc4py.PETSc.Vec>) -- Coordinate Vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetCoordinates <https://petsc.org/release/manualpages/DM/DMSetCoordinates.html>

    Source code at petsc4py/PETSc/DM.pyx:1115 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1115>

    setCoordinatesLocal(c)
        Set a local vector with the ghost point holding the coordinates.

        Not collective.

        Parameters
            c (Vec <#petsc4py.PETSc.Vec>) -- Coordinate Vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetCoordinatesLocal <https://petsc.org/release/manualpages/DM/DMSetCoordinatesLocal.html>

    Source code at petsc4py/PETSc/DM.pyx:1147 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1147>

    setDimension(dim)
        Set the topological dimension of the DM.

        Collective.

        Parameters
            dim (int <https://docs.python.org/3/library/functions.html#int>) -- Topological dimension.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetDimension <https://petsc.org/release/manualpages/DM/DMSetDimension.html>

    Source code at petsc4py/PETSc/DM.pyx:220 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L220>

    setField(index, field, label=None)
        Set the discretization object for a given DM field.

        Logically collective.

        Parameters

            •   index (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

            •   field (Object <#petsc4py.PETSc.Object>) -- The discretization object.

            •   label (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The name of the label indicating the support of the field, or None <https://docs.python.org/3/library/constants.html#None> for the entire mesh.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetField <https://petsc.org/release/manualpages/DM/DMSetField.html>

    Source code at petsc4py/PETSc/DM.pyx:597 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L597>

    setFieldAdjacency(field, useCone, useClosure)
        Set the flags for determining variable influence.

        Not collective.

        Parameters

            •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

            •   useCone (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether adjacency uses cone information.

            •   useClosure (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether adjacency is computed using full closure information.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetAdjacency <https://petsc.org/release/manualpages/DM/DMSetAdjacency.html>

    Source code at petsc4py/PETSc/DM.pyx:429 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L429>

    setFromOptions()
        Configure the object from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, DMSetFromOptions <https://petsc.org/release/manualpages/DM/DMSetFromOptions.html>

    Source code at petsc4py/PETSc/DM.pyx:312 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L312>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setGlobalSection(sec)
        Set the Section <#petsc4py.PETSc.Section> encoding the global data layout for the DM.

        Collective.

        See also:
            DMSetGlobalSection <https://petsc.org/release/manualpages/DM/DMSetGlobalSection.html>

    Source code at petsc4py/PETSc/DM.pyx:1888 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1888>

        Parameters
            sec (Section <#petsc4py.PETSc.Section>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setKSPComputeOperators(operators, args=None, kargs=None)
        Matrix associated with the linear system.

        Collective.

        Parameters

            •   operator -- Callback function to compute the operators.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMKSPSetComputeOperators <https://petsc.org/release/manualpages/KSP/DMKSPSetComputeOperators.html>

    Source code at petsc4py/PETSc/DM.pyx:2332 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2332>

    setLabelOutput(name, output)
        Set if a given label should be saved to a view.

        Not collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

            •   output (bool <https://docs.python.org/3/library/functions.html#bool>) -- If True <https://docs.python.org/3/library/constants.html#True>, the label is saved to the viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetLabelOutput <https://petsc.org/release/manualpages/DM/DMSetLabelOutput.html>

    Source code at petsc4py/PETSc/DM.pyx:2284 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2284>

    setLabelValue(name, point, value)
        Set a point to a DMLabel <#petsc4py.PETSc.DMLabel> with a given value.

        Not collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

            •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The mesh point.

            •   value (int <https://docs.python.org/3/library/functions.html#int>) -- The label value for the point.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetLabelValue <https://petsc.org/release/manualpages/DM/DMSetLabelValue.html>

    Source code at petsc4py/PETSc/DM.pyx:2124 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2124>

    setLocalSection(sec)
        Set the Section <#petsc4py.PETSc.Section> encoding the local data layout for the DM.

        Collective.

        See also:
            DMSetLocalSection <https://petsc.org/release/manualpages/DM/DMSetLocalSection.html>

    Source code at petsc4py/PETSc/DM.pyx:1861 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1861>

        Parameters
            sec (Section <#petsc4py.PETSc.Section>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setMatType(mat_type)
        Set matrix type to be used by DM.createMat.

        Logically collective.

        Parameters
            mat_type (Type <#petsc4py.PETSc.Mat.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The matrix type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    The option -dm_mat_type is used to set the matrix type.

    See also:
            Working with PETSc options <#petsc-options>, DMSetMatType <https://petsc.org/release/manualpages/DM/DMSetMatType.html>

    Source code at petsc4py/PETSc/DM.pyx:1495 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1495>

    setNumFields(numFields)
        Set the number of fields in the DM.

        Logically collective.

        See also:
            DMSetNumFields <https://petsc.org/release/manualpages/DM/DMSetNumFields.html>

    Source code at petsc4py/PETSc/DM.pyx:570 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L570>

        Parameters
            numFields (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setOptionsPrefix(prefix)
        Set the prefix used for searching for options in the database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, getOptionsPrefix, DMSetOptionsPrefix <https://petsc.org/release/manualpages/DM/DMSetOptionsPrefix.html>

    Source code at petsc4py/PETSc/DM.pyx:270 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L270>

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPeriodicity(maxCell, Lstart, L)
        Set the description of mesh periodicity.

        Logically collective.

        Parameters

            •   maxCell (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) -- The longest allowable cell dimension in each direction.

            •   Lstart (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) -- The start of each coordinate direction, usually [0, 0, 0]

            •   L (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) -- The periodic length of each coordinate direction, or -1 for non-periodic

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetPeriodicity <https://petsc.org/release/manualpages/DM/DMSetPeriodicity.html>

    Source code at petsc4py/PETSc/DM.pyx:1468 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1468>

    setPointSF(sf)
        Set the SF <#petsc4py.PETSc.SF> encoding the parallel DOF overlap for the DM.

        Logically collective.

        See also:
            DMSetPointSF <https://petsc.org/release/manualpages/DM/DMSetPointSF.html>

    Source code at petsc4py/PETSc/DM.pyx:1993 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1993>

        Parameters
            sf (SF <#petsc4py.PETSc.SF>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setRefineLevel(level)
        Set the number of refinements.

        Not collective.

        Parameters

            •   nlevels -- The number of refinement.

            •   level (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetRefineLevel <https://petsc.org/release/manualpages/DM/DMSetRefineLevel.html>

    Source code at petsc4py/PETSc/DM.pyx:1749 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1749>

    setSNESFunction(function, args=None, kargs=None)
        Set SNES <#petsc4py.PETSc.SNES> residual evaluation function.

        Not collective.

        Parameters

            •   function (SNESFunction <#petsc4py.typing.SNESFunction>) -- The callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            SNES.setFunction <#petsc4py.PETSc.SNES.setFunction>, DMSNESSetFunction <https://petsc.org/release/manualpages/SNES/DMSNESSetFunction.html>

    Source code at petsc4py/PETSc/DM.pyx:2407 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2407>

    setSNESJacobian(jacobian, args=None, kargs=None)
        Set the SNES <#petsc4py.PETSc.SNES> Jacobian evaluation function.

        Not collective.

        Parameters

            •   jacobian (SNESJacobianFunction <#petsc4py.typing.SNESJacobianFunction>) -- The Jacobian callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            SNES.setJacobian <#petsc4py.PETSc.SNES.setJacobian>, DMSNESSetJacobian <https://petsc.org/release/manualpages/SNES/DMSNESSetJacobian.html>

    Source code at petsc4py/PETSc/DM.pyx:2439 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2439>

    setSectionSF(sf)
        Set the Section <#petsc4py.PETSc.Section> encoding the parallel DOF overlap for the DM.

        Logically collective.

        See also:
            DMSetSectionSF <https://petsc.org/release/manualpages/DM/DMSetSectionSF.html>

    Source code at petsc4py/PETSc/DM.pyx:1962 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1962>

        Parameters
            sf (SF <#petsc4py.PETSc.SF>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setSparseLocalize(flag)
        Set if coordinates should be only localized at the boundary.

        Collective.

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether the coordinates should only be localized at the boundary.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DM.getSparseLocalize, DMSetSparseLocalize <https://petsc.org/release/manualpages/DM/DMSetSparseLocalize.html>

    Source code at petsc4py/PETSc/DM.pyx:1362 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L1362>

    setType(dm_type)
        Build a DM.

        Collective.

        Parameters
            dm_type (Type <#petsc4py.PETSc.DM.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of DM.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    DM types are available in DM.Type <#petsc4py.PETSc.DM.Type> class.

    See also:
            DM.Type <#petsc4py.PETSc.DM.Type>, DMSetType <https://petsc.org/release/manualpages/DM/DMSetType.html>

    Source code at petsc4py/PETSc/DM.pyx:169 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L169>

    setUp()
        Return the data structure.

        Collective.

        See also:
            DMSetUp <https://petsc.org/release/manualpages/DM/DMSetUp.html>

    Source code at petsc4py/PETSc/DM.pyx:324 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L324>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    setUseNatural(useNatural)
        Set the flag for constructing a global-to-natural map.

        Not collective.

        Parameters
            useNatural (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether a global-to-natural map is created.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSetUseNatural <https://petsc.org/release/manualpages/DM/DMSetUseNatural.html>

    Source code at petsc4py/PETSc/DM.pyx:368 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L368>

    setVecType(vec_type)
        Set the type of vector.

        Logically collective.

        See also:
            Vec.Type <#petsc4py.PETSc.Vec.Type>, DMSetVecType <https://petsc.org/release/manualpages/DM/DMSetVecType.html>

    Source code at petsc4py/PETSc/DM.pyx:821 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L821>

        Parameters
            vec_type (Type <#petsc4py.PETSc.Vec.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        View the DM.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- The DM viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMView <https://petsc.org/release/manualpages/DM/DMView.html>

    Source code at petsc4py/PETSc/DM.pyx:76 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L76>

Attributes Documentation

    appctx
        Application context.

        Source code at petsc4py/PETSc/DM.pyx:2523 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2523>

    ds  Discrete space.

        Source code at petsc4py/PETSc/DM.pyx:2533 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DM.pyx#L2533>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMComposite

    class petsc4py.PETSc.DMComposite
        Bases: DM <#petsc4py.PETSc.DM>

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

        Methods Summary
        addDM(dm, *args) | Add a DM vector to the composite.
        create([comm]) | Create a composite object.
        gather(gvec, imode, lvecs) | Gather split local vectors into a coupled global vector.
        getAccess(gvec[, locs]) | Get access to the individual vectors from the global vector.
        getEntries() | Return sub-DMs contained in the composite.
        getGlobalISs() | Return the index sets for each composed object in the composite.
        getLGMaps() | Return a local-to-global mapping for each DM in the composite.
        getLocalISs() | Return index sets for each component of a composite local vector.
        getNumber() | Get number of sub-DMs contained in the composite.
        scatter(gvec, lvecs) | Scatter coupled global vector into split local vectors.

        Methods Documentation

        addDM(dm, *args)
            Add a DM vector to the composite.

            Collective.

            Parameters

                •   dm (DM <#petsc4py.PETSc.DM>) -- The DM object.

                •   *args (DM <#petsc4py.PETSc.DM>) -- Additional DM objects.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMCompositeAddDM <https://petsc.org/release/manualpages/DMComposite/DMCompositeAddDM.html>

        Source code at petsc4py/PETSc/DMComposite.pyx:28 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMComposite.pyx#L28>

        create(comm=None)
            Create a composite object.

            Collective.

            Parameters
                comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DMCompositeCreate <https://petsc.org/release/manualpages/DMComposite/DMCompositeCreate.html>

        Source code at petsc4py/PETSc/DMComposite.pyx:6 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMComposite.pyx#L6>

        gather(gvec, imode, lvecs)
            Gather split local vectors into a coupled global vector.

            Collective.

            Parameters

                •   gvec (Vec <#petsc4py.PETSc.Vec>) -- The global vector.

                •   imode (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- The insertion mode.

                •   lvecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- The individual sequential vectors.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                scatter, DMCompositeGatherArray <https://petsc.org/release/manualpages/DMComposite/DMCompositeGatherArray.html>

        Source code at petsc4py/PETSc/DMComposite.pyx:115 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMComposite.pyx#L115>

        getAccess(gvec, locs=None)
            Get access to the individual vectors from the global vector.

            Not collective.

            Use via The with statement <https://docs.python.org/3/reference/compound_stmts.html#with> context manager (PEP 343).

            Parameters

                •   gvec (Vec <#petsc4py.PETSc.Vec>) -- The global vector.

                •   locs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- Indices of vectors wanted, or None <https://docs.python.org/3/library/constants.html#None> to get all vectors.

            Return type
                Any <https://docs.python.org/3/library/typing.html#typing.Any>

        Source code at petsc4py/PETSc/DMComposite.pyx:219 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMComposite.pyx#L219>

        getEntries()
            Return sub-DMs contained in the composite.

            Not collective.

            See also:
                DMCompositeGetEntriesArray <https://petsc.org/release/manualpages/DMComposite/DMCompositeGetEntriesArray.html>

        Source code at petsc4py/PETSc/DMComposite.pyx:66 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMComposite.pyx#L66>

            Return type
                list <https://docs.python.org/3/library/stdtypes.html#list>[DM <#petsc4py.PETSc.DM>]

        getGlobalISs()
            Return the index sets for each composed object in the composite.

            Collective.

            These could be used to extract a subset of vector entries for a "multi-physics" preconditioner.

            Use getLocalISs for index sets in the packed local numbering, and getLGMaps for to map local sub-DM (including ghost) indices to packed global indices.

            See also:
                DMCompositeGetGlobalISs <https://petsc.org/release/manualpages/DMComposite/DMCompositeGetGlobalISs.html>

        Source code at petsc4py/PETSc/DMComposite.pyx:143 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMComposite.pyx#L143>

            Return type
                list <https://docs.python.org/3/library/stdtypes.html#list>[IS <#petsc4py.PETSc.IS>]

        getLGMaps()
            Return a local-to-global mapping for each DM in the composite.

            Collective.

            Note that this includes all the ghost points that individual ghosted DMDA may have.

            See also:
                DMCompositeGetISLocalToGlobalMappings <https://petsc.org/release/manualpages/DMComposite/DMCompositeGetISLocalToGlobalMappings.html>

        Source code at petsc4py/PETSc/DMComposite.pyx:196 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMComposite.pyx#L196>

            Return type
                list <https://docs.python.org/3/library/stdtypes.html#list>[LGMap <#petsc4py.PETSc.LGMap>]

        getLocalISs()
            Return index sets for each component of a composite local vector.

            Not collective.

            To get the composite global indices at all local points (including ghosts), use getLGMaps.

            To get index sets for pieces of the composite global vector, use getGlobalISs.

            See also:
                DMCompositeGetLocalISs <https://petsc.org/release/manualpages/DMComposite/DMCompositeGetLocalISs.html>

        Source code at petsc4py/PETSc/DMComposite.pyx:170 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMComposite.pyx#L170>

            Return type
                list <https://docs.python.org/3/library/stdtypes.html#list>[IS <#petsc4py.PETSc.IS>]

        getNumber()
            Get number of sub-DMs contained in the composite.

            Not collective.

            See also:
                DMCompositeGetNumberDM <https://petsc.org/release/manualpages/DMComposite/DMCompositeGetNumberDM.html>

        Source code at petsc4py/PETSc/DMComposite.pyx:51 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMComposite.pyx#L51>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        scatter(gvec, lvecs)
            Scatter coupled global vector into split local vectors.

            Collective.

            Parameters

                •   gvec (Vec <#petsc4py.PETSc.Vec>) -- The global vector.

                •   lvecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- Array of local vectors.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                gather, DMCompositeScatterArray <https://petsc.org/release/manualpages/DMComposite/DMCompositeScatterArray.html>

        Source code at petsc4py/PETSc/DMComposite.pyx:90 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMComposite.pyx#L90>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMDA

    class petsc4py.PETSc.DMDA
        Bases: DM <#petsc4py.PETSc.DM>

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

        Enumerations
        ElementType <#petsc4py.PETSc.DMDA.ElementType> | Element types.
        InterpolationType <#petsc4py.PETSc.DMDA.InterpolationType> | Interpolation types.
        StencilType <#petsc4py.PETSc.DMDA.StencilType> | Stencil types.

  petsc4py.PETSc.DMDA.ElementType

    class petsc4py.PETSc.DMDA.ElementType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Element types.

        Attributes Summary
        P1 | Constant P1 of type int <https://docs.python.org/3/library/functions.html#int>
        Q1 | Constant Q1 of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        P1: int <https://docs.python.org/3/library/functions.html#int> = P1
            Constant P1 of type int <https://docs.python.org/3/library/functions.html#int>

        Q1: int <https://docs.python.org/3/library/functions.html#int> = Q1
            Constant Q1 of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMDA.InterpolationType

    class petsc4py.PETSc.DMDA.InterpolationType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Interpolation types.

        Attributes Summary
        Q0 | Constant Q0 of type int <https://docs.python.org/3/library/functions.html#int>
        Q1 | Constant Q1 of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        Q0: int <https://docs.python.org/3/library/functions.html#int> = Q0
            Constant Q0 of type int <https://docs.python.org/3/library/functions.html#int>

        Q1: int <https://docs.python.org/3/library/functions.html#int> = Q1
            Constant Q1 of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMDA.StencilType

    class petsc4py.PETSc.DMDA.StencilType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Stencil types.

        Attributes Summary
        BOX | Constant BOX of type int <https://docs.python.org/3/library/functions.html#int>
        STAR | Constant STAR of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        BOX: int <https://docs.python.org/3/library/functions.html#int> = BOX
            Constant BOX of type int <https://docs.python.org/3/library/functions.html#int>

        STAR: int <https://docs.python.org/3/library/functions.html#int> = STAR
            Constant STAR of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
create([dim, dof, sizes, proc_sizes, ...]) | Create a DMDA object.
createNaturalVec() | Create a vector that will hold values in the natural numbering.
duplicate([dof, boundary_type, ...]) | Duplicate a DMDA.
getAO() | Return the application ordering context for a distributed array.
getBoundaryType() | Return the type of ghost nodes at boundary in each dimension.
getCoordinateName(index) | Return the name of a coordinate dimension.
getCorners() | Return the lower left corner and the sizes of the owned local region.
getDim() | Return the topological dimension.
getDof() | Return the number of degrees of freedom per node.
getElementType() | Return the element type to be returned by getElements.
getElements([elem_type]) | Return an array containing the indices of all the local elements.
getFieldName(field) | Return the name of an individual field component.
getGhostCorners() | Return the lower left corner and the size of the ghosted local region.
getGhostRanges() | Return the ranges of the local region in each dimension, including ghost nodes.
getInterpolationType() | Return the type of interpolation.
getOwnershipRanges() | Return the ranges of indices in each dimension owned by each process.
getProcSizes() | Return the number of processes in each dimension.
getRanges() | Return the ranges of the owned local region in each dimension.
getRefinementFactor() | Return the ratios that the DMDA grid is refined in each dimension.
getScatter() | Return the global-to-local, and local-to-local scatter contexts.
getSizes() | Return the number of grid points in each dimension.
getStencil() | Return the stencil type and width.
getStencilType() | Return the stencil type.
getStencilWidth() | Return the stencil width.
getVecArray(vec[, readonly]) | Get access to the vector as laid out on a N-d grid.
globalToNatural(vg, vn[, addv]) | Map values to the "natural" grid ordering.
naturalToGlobal(vn, vg[, addv]) | Map values the to grid ordering.
setBoundaryType(boundary_type) | Set the type of ghost nodes on domain boundaries.
setCoordinateName(index, name) | Set the name of the coordinate dimension.
setDim(dim) | Set the topological dimension.
setDof(dof) | Set the number of degrees of freedom per vertex.
setElementType(elem_type) | Set the element type to be returned by getElements.
setFieldName(field, name) | Set the name of individual field components.
setInterpolationType(interp_type) | Set the type of interpolation.
setProcSizes(proc_sizes) | Set the number of processes in each dimension.
setRefinementFactor([refine_x, refine_y, ...]) | Set the ratios for the DMDA grid refinement.
setSizes(sizes) | Set the number of grid points in each dimension.
setStencil(stencil_type, stencil_width) | Set the stencil type and width.
setStencilType(stencil_type) | Set the stencil type.
setStencilWidth(stencil_width) | Set the stencil width.
setUniformCoordinates([xmin, xmax, ymin, ...]) | Set the DMDA coordinates to be a uniform grid.

Attributes Summary
boundary_type | Boundary types in each dimension.
corners | The lower left corner and size of local region in each dimension.
dim | The grid dimension.
dof | The number of DOFs associated with each stratum of the grid.
ghost_corners | The lower left corner and size of local region in each dimension.
ghost_ranges | Ranges of local region, including ghost nodes.
proc_sizes | The number of processes in each dimension in the global decomposition.
ranges | Ranges of the local region in each dimension.
sizes | The global dimension.
stencil | Stencil type and width.
stencil_type | Stencil type.
stencil_width | Elementwise stencil width.

Methods Documentation

    create(dim=None, dof=None, sizes=None, proc_sizes=None, boundary_type=None, stencil_type=None, stencil_width=None, setup=True, ownership_ranges=None, comm=None)
        Create a DMDA object.

        Collective.

        This routine performs the following steps of the C API: - petsc.DMDACreate - petsc.DMSetDimension - petsc.DMDASetDof - petsc.DMDASetSizes - petsc.DMDASetNumProcs - petsc.DMDASetOwnershipRanges - petsc.DMDASetBoundaryType - petsc.DMDASetStencilType - petsc.DMDASetStencilWidth - petsc.DMSetUp (optionally)

        Parameters

            •   dim (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The number of dimensions.

            •   dof (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The number of degrees of freedom.

            •   sizes (DimsSpec <#petsc4py.typing.DimsSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- The number of elements in each dimension.

            •   proc_sizes (DimsSpec <#petsc4py.typing.DimsSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- The number of processes in x, y, z dimensions.

            •   boundary_type (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[DM.BoundaryType <#petsc4py.PETSc.DM.BoundaryType> | int <https://docs.python.org/3/library/functions.html#int> | str <https://docs.python.org/3/library/stdtypes.html#str> | bool <https://docs.python.org/3/library/functions.html#bool>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- The boundary types.

            •   stencil_type (StencilType <#petsc4py.PETSc.DMDA.StencilType> | None <https://docs.python.org/3/library/constants.html#None>) -- The ghost/halo stencil type.

            •   stencil_width (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The width of the ghost/halo region.

            •   setup (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether to call the setup routine after creating the object.

            •   ownership_ranges (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Sequence[int <https://docs.python.org/3/library/functions.html#int>], ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Local x, y, z element counts, of length equal to proc_sizes, summing to sizes.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self

    See also:
            DMDACreate <https://petsc.org/release/manualpages/DMDA/DMDACreate.html>, DMSetDimension <https://petsc.org/release/manualpages/DM/DMSetDimension.html>, DMDASetDof <https://petsc.org/release/manualpages/DMDA/DMDASetDof.html>, DMDASetSizes <https://petsc.org/release/manualpages/DMDA/DMDASetSizes.html>, DMDASetNumProcs <https://petsc.org/release/manualpages/DMDA/DMDASetNumProcs.html>, DMDASetOwnershipRanges <https://petsc.org/release/manualpages/DMDA/DMDASetOwnershipRanges.html>, DMDASetBoundaryType <https://petsc.org/release/manualpages/DMDA/DMDASetBoundaryType.html>, DMDASetStencilType <https://petsc.org/release/manualpages/DMDA/DMDASetStencilType.html>, DMDASetStencilWidth <https://petsc.org/release/manualpages/DMDA/DMDASetStencilWidth.html>, DMSetUp <https://petsc.org/release/manualpages/DM/DMSetUp.html>

    Source code at petsc4py/PETSc/DMDA.pyx:32 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L32>

    createNaturalVec()
        Create a vector that will hold values in the natural numbering.

        Collective.

        The number of local entries in the vector on each process is the same as in a vector created with DM.createGlobalVec <#petsc4py.PETSc.DM.createGlobalVec>.

        See also:
            DMDACreateNaturalVector <https://petsc.org/release/manualpages/DMDA/DMDACreateNaturalVector.html>

    Source code at petsc4py/PETSc/DMDA.pyx:832 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L832>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    duplicate(dof=None, boundary_type=None, stencil_type=None, stencil_width=None)
        Duplicate a DMDA.

        Collective.

        This routine retrieves the information from the DMDA and recreates it. Parameters dof, boundary_type, stencil_type, stencil_width will be overwritten, if provided.

        Parameters

            •   dof (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The number of degrees of freedom.

            •   boundary_type (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[DM.BoundaryType <#petsc4py.PETSc.DM.BoundaryType> | int <https://docs.python.org/3/library/functions.html#int> | str <https://docs.python.org/3/library/stdtypes.html#str> | bool <https://docs.python.org/3/library/functions.html#bool>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Boundary types.

            •   stencil_type (StencilType <#petsc4py.PETSc.DMDA.StencilType> | None <https://docs.python.org/3/library/constants.html#None>) -- The ghost/halo stencil type.

            •   stencil_width (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The width of the ghost/halo region.

        Return type
            DMDA <#petsc4py.PETSc.DMDA>

    See also:
            create, DMDAGetInfo <https://petsc.org/release/manualpages/DMDA/DMDAGetInfo.html>, DMSetUp <https://petsc.org/release/manualpages/DM/DMSetUp.html>

    Source code at petsc4py/PETSc/DMDA.pyx:148 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L148>

    getAO()
        Return the application ordering context for a distributed array.

        Collective.

        The returned AO <#petsc4py.PETSc.AO> maps to the natural grid ordering that would be used for the DMDA if only 1 processor were employed (ordering most rapidly in the x-dimension, then y, then z). Multiple degrees of freedom are numbered for each node (rather than 1 component for the whole grid, then the next component, etc.).

        See also:
            DMDAGetAO <https://petsc.org/release/manualpages/DMDA/DMDAGetAO.html>

    Source code at petsc4py/PETSc/DMDA.pyx:909 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L909>

        Return type
            AO <#petsc4py.PETSc.AO>

    getBoundaryType()
        Return the type of ghost nodes at boundary in each dimension.

        Not collective.

        See also:
            setBoundaryType

    Source code at petsc4py/PETSc/DMDA.pyx:407 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L407>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[BoundaryType <#petsc4py.PETSc.DM.BoundaryType>, ...]

    getCoordinateName(index)
        Return the name of a coordinate dimension.

        Not collective.

        Parameters
            index (int <https://docs.python.org/3/library/functions.html#int>) -- The coordinate number for the DMDA (0, 1, ..., dim-1).

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    See also:
            setCoordinateName, DMDAGetCoordinateName <https://petsc.org/release/manualpages/DMDA/DMDAGetCoordinateName.html>

    Source code at petsc4py/PETSc/DMDA.pyx:810 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L810>

    getCorners()
        Return the lower left corner and the sizes of the owned local region.

        Not collective.

        Returns the global (x,y,z) indices of the lower left corner (first tuple) and size of the local region (second tuple).

        Excluding ghost points.

        The corner information is independent of the number of degrees of freedom per node. Thus the returned values can be thought of as coordinates on a logical grid, where each grid point has (potentially) several degrees of freedom.

        See also:
            getRanges, getGhostRanges, getOwnershipRanges, getGhostCorners, DMDAGetCorners <https://petsc.org/release/manualpages/DMDA/DMDAGetCorners.html>

    Source code at petsc4py/PETSc/DMDA.pyx:622 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L622>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...], tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]]

    getDim()
        Return the topological dimension.

        Not collective.

        See also:
            setDim, DMGetDimension <https://petsc.org/release/manualpages/DM/DMGetDimension.html>

    Source code at petsc4py/PETSc/DMDA.pyx:234 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L234>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getDof()
        Return the number of degrees of freedom per node.

        Not collective.

        See also:
            setDof, DMDAGetInfo <https://petsc.org/release/manualpages/DMDA/DMDAGetInfo.html>

    Source code at petsc4py/PETSc/DMDA.pyx:264 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L264>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getElementType()
        Return the element type to be returned by getElements.

        Not collective.

        See also:
            setElementType, DMDAGetElementType <https://petsc.org/release/manualpages/DMDA/DMDAGetElementType.html>

    Source code at petsc4py/PETSc/DMDA.pyx:1050 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1050>

        Return type
            ElementType <#petsc4py.PETSc.DMDA.ElementType>

    getElements(elem_type=None)
        Return an array containing the indices of all the local elements.

        Not collective.

        The elements are in local coordinates.

        Each process uniquely owns a subset of the elements. That is, no element is owned by two or more processes.

        Parameters
            elem_type (ElementType <#petsc4py.PETSc.DMDA.ElementType> | None <https://docs.python.org/3/library/constants.html#None>) -- The element type.

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    See also:
            DMDAGetElements <https://petsc.org/release/manualpages/DMDA/DMDAGetElements.html>

    Source code at petsc4py/PETSc/DMDA.pyx:1064 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1064>

    getFieldName(field)
        Return the name of an individual field component.

        Not collective.

        Parameters
            field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number for the DMDA (0, 1, ..., dof-1), where dof indicates the number of degrees of freedom per node within the DMDA.

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    See also:
            setFieldName, DMDAGetFieldName <https://petsc.org/release/manualpages/DMDA/DMDAGetFieldName.html>

    Source code at petsc4py/PETSc/DMDA.pyx:699 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L699>

    getGhostCorners()
        Return the lower left corner and the size of the ghosted local region.

        Not collective.

        Returns the global (x,y,z) indices of the lower left corner (first tuple) and size of the local region (second tuple).

        See also:
            getRanges, getGhostRanges, getOwnershipRanges, getCorners, DMDAGetGhostCorners <https://petsc.org/release/manualpages/DMDA/DMDAGetGhostCorners.html>

    Source code at petsc4py/PETSc/DMDA.pyx:651 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L651>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...], tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]]

    getGhostRanges()
        Return the ranges of the local region in each dimension, including ghost nodes.

        Not collective.

        See also:
            getRanges, getOwnershipRanges, getCorners, getGhostCorners, DMDAGetGhostCorners <https://petsc.org/release/manualpages/DMDA/DMDAGetGhostCorners.html>

    Source code at petsc4py/PETSc/DMDA.pyx:577 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L577>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>], ...]

    getInterpolationType()
        Return the type of interpolation.

        Not collective.

        See also:
            setInterpolationType, DMDAGetInterpolationType <https://petsc.org/release/manualpages/DMDA/DMDAGetInterpolationType.html>

    Source code at petsc4py/PETSc/DMDA.pyx:1020 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1020>

        Return type
            InterpolationType <#petsc4py.PETSc.DMDA.InterpolationType>

    getOwnershipRanges()
        Return the ranges of indices in each dimension owned by each process.

        Not collective.

        These numbers are not multiplied by the number of DOFs per node.

        See also:
            getRanges, getGhostRanges, getCorners, getGhostCorners, DMDAGetOwnershipRanges <https://petsc.org/release/manualpages/DMDA/DMDAGetOwnershipRanges.html>

    Source code at petsc4py/PETSc/DMDA.pyx:597 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L597>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayInt <#petsc4py.typing.ArrayInt>, ...]

    getProcSizes()
        Return the number of processes in each dimension.

        Not collective.

        See also:
            setProcSizes, DMDAGetInfo <https://petsc.org/release/manualpages/DMDA/DMDAGetInfo.html>

    Source code at petsc4py/PETSc/DMDA.pyx:361 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L361>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]

    getRanges()
        Return the ranges of the owned local region in each dimension.

        Not collective.

        Excluding ghost nodes.

        See also:
            getGhostRanges, getOwnershipRanges, getCorners, getGhostCorners, DMDAGetCorners <https://petsc.org/release/manualpages/DMDA/DMDAGetCorners.html>

    Source code at petsc4py/PETSc/DMDA.pyx:555 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L555>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>], ...]

    getRefinementFactor()
        Return the ratios that the DMDA grid is refined in each dimension.

        Not collective.

        See also:
            setRefinementFactor, DMDAGetRefinementFactor <https://petsc.org/release/manualpages/DMDA/DMDAGetRefinementFactor.html>

    Source code at petsc4py/PETSc/DMDA.pyx:981 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L981>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]

    getScatter()
        Return the global-to-local, and local-to-local scatter contexts.

        Collective.

        See also:
            DMDAGetScatter <https://petsc.org/release/manualpages/DMDA/DMDAGetScatter.html>

    Source code at petsc4py/PETSc/DMDA.pyx:930 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L930>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Scatter <#petsc4py.PETSc.Scatter>, Scatter <#petsc4py.PETSc.Scatter>]

    getSizes()
        Return the number of grid points in each dimension.

        Not collective.

        See also:
            setSizes, DMDAGetInfo <https://petsc.org/release/manualpages/DMDA/DMDAGetInfo.html>

    Source code at petsc4py/PETSc/DMDA.pyx:311 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L311>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]

    getStencil()
        Return the stencil type and width.

        Not collective.

        See also:
            getStencilType, getStencilWidth

    Source code at petsc4py/PETSc/DMDA.pyx:532 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L532>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[StencilType <#petsc4py.PETSc.DMDA.StencilType>, int <https://docs.python.org/3/library/functions.html#int>]

    getStencilType()
        Return the stencil type.

        Not collective.

        See also:
            setStencilType, DMDAGetInfo <https://petsc.org/release/manualpages/DMDA/DMDAGetInfo.html>

    Source code at petsc4py/PETSc/DMDA.pyx:448 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L448>

        Return type
            StencilType <#petsc4py.PETSc.DMDA.StencilType>

    getStencilWidth()
        Return the stencil width.

        Not collective.

        See also:
            setStencilWidth

    Source code at petsc4py/PETSc/DMDA.pyx:486 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L486>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getVecArray(vec, readonly=False)
        Get access to the vector as laid out on a N-d grid.

        Logically collective.

        Parameters

            •   vec (Vec <#petsc4py.PETSc.Vec>) -- The vector to which access is being requested.

            •   readonly (bool <https://docs.python.org/3/library/functions.html#bool>) -- Request read-only access.

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    See also:
            Vec.getArray <#petsc4py.PETSc.Vec.getArray>, DMDAVecGetArray <https://petsc.org/release/manualpages/DMDA/DMDAVecGetArray.html>, DMDAVecGetArrayDOF <https://petsc.org/release/manualpages/DMDA/DMDAVecGetArrayDOF.html>

    Source code at petsc4py/PETSc/DMDA.pyx:723 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L723>

    globalToNatural(vg, vn, addv=None)
        Map values to the "natural" grid ordering.

        Neighborwise collective.

        You must call createNaturalVec before using this routine.

        Parameters

            •   vg (Vec <#petsc4py.PETSc.Vec>) -- The global vector in a grid ordering.

            •   vn (Vec <#petsc4py.PETSc.Vec>) -- The global vector in a "natural" ordering.

            •   addv (InsertMode <#petsc4py.PETSc.InsertMode> | None <https://docs.python.org/3/library/constants.html#None>) -- The insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            naturalToGlobal, DMDAGlobalToNaturalBegin <https://petsc.org/release/manualpages/DMDA/DMDAGlobalToNaturalBegin.html>, DMDAGlobalToNaturalEnd <https://petsc.org/release/manualpages/DMDA/DMDAGlobalToNaturalEnd.html>

    Source code at petsc4py/PETSc/DMDA.pyx:849 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L849>

    naturalToGlobal(vn, vg, addv=None)
        Map values the to grid ordering.

        Neighborwise collective.

        Parameters

            •   vn (Vec <#petsc4py.PETSc.Vec>) -- The global vector in a natural ordering.

            •   vg (Vec <#petsc4py.PETSc.Vec>) -- the global vector in a grid ordering.

            •   addv (InsertMode <#petsc4py.PETSc.InsertMode> | None <https://docs.python.org/3/library/constants.html#None>) -- The insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            globalToNatural, DMDANaturalToGlobalBegin <https://petsc.org/release/manualpages/DMDA/DMDANaturalToGlobalBegin.html>, DMDANaturalToGlobalEnd <https://petsc.org/release/manualpages/DMDA/DMDANaturalToGlobalEnd.html>

    Source code at petsc4py/PETSc/DMDA.pyx:879 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L879>

    setBoundaryType(boundary_type)
        Set the type of ghost nodes on domain boundaries.

        Not collective.

        Parameters
            boundary_type (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[BoundaryType <#petsc4py.PETSc.DM.BoundaryType> | int <https://docs.python.org/3/library/functions.html#int> | str <https://docs.python.org/3/library/stdtypes.html#str> | bool <https://docs.python.org/3/library/functions.html#bool>, ...]) -- The boundary type in (x), (x, y), or (x, y, z) dimensions.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getBoundaryType, DMDASetBoundaryType <https://petsc.org/release/manualpages/DMDA/DMDASetBoundaryType.html>

    Source code at petsc4py/PETSc/DMDA.pyx:384 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L384>

    setCoordinateName(index, name)
        Set the name of the coordinate dimension.

        Logically collective.

        Parameters

            •   index (int <https://docs.python.org/3/library/functions.html#int>) -- The coordinate number for the DMDA (0, 1, ..., dim-1).

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The name of the coordinate.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getCoordinateName, DMDASetCoordinateName <https://petsc.org/release/manualpages/DMDA/DMDASetCoordinateName.html>

    Source code at petsc4py/PETSc/DMDA.pyx:788 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L788>

    setDim(dim)
        Set the topological dimension.

        Collective.

        Parameters
            dim (int <https://docs.python.org/3/library/functions.html#int>) -- Topological dimension.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getDim, DMSetDimension <https://petsc.org/release/manualpages/DM/DMSetDimension.html>

    Source code at petsc4py/PETSc/DMDA.pyx:217 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L217>

    setDof(dof)
        Set the number of degrees of freedom per vertex.

        Not collective.

        Parameters
            dof (int <https://docs.python.org/3/library/functions.html#int>) -- The number of degrees of freedom.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getDof, DMDASetDof <https://petsc.org/release/manualpages/DMDA/DMDASetDof.html>

    Source code at petsc4py/PETSc/DMDA.pyx:246 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L246>

    setElementType(elem_type)
        Set the element type to be returned by getElements.

        Not collective.

        See also:
            getElementType, DMDASetElementType <https://petsc.org/release/manualpages/DMDA/DMDASetElementType.html>

    Source code at petsc4py/PETSc/DMDA.pyx:1036 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1036>

        Parameters
            elem_type (ElementType <#petsc4py.PETSc.DMDA.ElementType> | str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFieldName(field, name)
        Set the name of individual field components.

        Logically collective.

        Parameters

            •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number for the DMDA (0, 1, ..., dof-1), where dof indicates the number of degrees of freedom per node within the DMDA.

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The name of the field (component).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getFieldName, DMDASetFieldName <https://petsc.org/release/manualpages/DMDA/DMDASetFieldName.html>

    Source code at petsc4py/PETSc/DMDA.pyx:675 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L675>

    setInterpolationType(interp_type)
        Set the type of interpolation.

        Logically collective.

        You should call this on the coarser of the two DMDAs you pass to DM.createInterpolation <#petsc4py.PETSc.DM.createInterpolation>.

        Parameters
            interp_type (InterpolationType <#petsc4py.PETSc.DMDA.InterpolationType>) -- The interpolation type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getInterpolationType, DMDASetInterpolationType <https://petsc.org/release/manualpages/DMDA/DMDASetInterpolationType.html>

    Source code at petsc4py/PETSc/DMDA.pyx:999 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L999>

    setProcSizes(proc_sizes)
        Set the number of processes in each dimension.

        Logically collective.

        Parameters
            proc_sizes (DimsSpec <#petsc4py.typing.DimsSpec>) -- The number of processes in (x,), (x, y), or (x, y, z) dimensions.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getProcSizes, DMDASetNumProcs <https://petsc.org/release/manualpages/DMDA/DMDASetNumProcs.html>

    Source code at petsc4py/PETSc/DMDA.pyx:334 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L334>

    setRefinementFactor(refine_x=2, refine_y=2, refine_z=2)
        Set the ratios for the DMDA grid refinement.

        Logically collective.

        Parameters

            •   refine_x (int <https://docs.python.org/3/library/functions.html#int>) -- Ratio of fine grid to coarse in x dimension.

            •   refine_y (int <https://docs.python.org/3/library/functions.html#int>) -- Ratio of fine grid to coarse in y dimension.

            •   refine_z (int <https://docs.python.org/3/library/functions.html#int>) -- Ratio of fine grid to coarse in z dimension.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getRefinementFactor, DMDASetRefinementFactor <https://petsc.org/release/manualpages/DMDA/DMDASetRefinementFactor.html>

    Source code at petsc4py/PETSc/DMDA.pyx:949 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L949>

    setSizes(sizes)
        Set the number of grid points in each dimension.

        Logically collective.

        Parameters
            sizes (DimsSpec <#petsc4py.typing.DimsSpec>) -- The global (x,), (x, y), or (x, y, z) size.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getSizes, DMDASetSizes <https://petsc.org/release/manualpages/DMDA/DMDASetSizes.html>

    Source code at petsc4py/PETSc/DMDA.pyx:284 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L284>

    setStencil(stencil_type, stencil_width)
        Set the stencil type and width.

        Not collective.

        Parameters

            •   stencil_type (StencilType <#petsc4py.PETSc.DMDA.StencilType>) -- The stencil type.

            •   stencil_width (int <https://docs.python.org/3/library/functions.html#int>) -- The stencil width.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setStencilWidth, setStencilType, DMDASetStencilType <https://petsc.org/release/manualpages/DMDA/DMDASetStencilType.html>, DMDASetStencilWidth <https://petsc.org/release/manualpages/DMDA/DMDASetStencilWidth.html>

    Source code at petsc4py/PETSc/DMDA.pyx:506 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L506>

    setStencilType(stencil_type)
        Set the stencil type.

        Logically collective.

        Parameters

            •   stype -- The stencil type.

            •   stencil_type (StencilType <#petsc4py.PETSc.DMDA.StencilType>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getStencilType, setStencil, DMDASetStencilType <https://petsc.org/release/manualpages/DMDA/DMDASetStencilType.html>

    Source code at petsc4py/PETSc/DMDA.pyx:430 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L430>

    setStencilWidth(stencil_width)
        Set the stencil width.

        Logically collective.

        Parameters
            stencil_width (int <https://docs.python.org/3/library/functions.html#int>) -- The stencil width.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getStencilWidth, setStencil, DMDASetStencilWidth <https://petsc.org/release/manualpages/DMDA/DMDASetStencilWidth.html>

    Source code at petsc4py/PETSc/DMDA.pyx:468 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L468>

    setUniformCoordinates(xmin=0, xmax=1, ymin=0, ymax=1, zmin=0, zmax=1)
        Set the DMDA coordinates to be a uniform grid.

        Collective.

        Parameters

            •   xmin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum in the x dimension.

            •   xmax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum in the x dimension.

            •   ymin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum in the y dimension (value ignored for 1 dimensional problems).

            •   ymax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum in the y dimension (value ignored for 1 dimensional problems).

            •   zmin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum in the z dimension (value ignored for 1 or 2 dimensional problems).

            •   zmax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum in the z dimension (value ignored for 1 or 2 dimensional problems).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMDASetUniformCoordinates <https://petsc.org/release/manualpages/DMDA/DMDASetUniformCoordinates.html>

    Source code at petsc4py/PETSc/DMDA.pyx:744 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L744>

Attributes Documentation

    boundary_type
        Boundary types in each dimension.

        Source code at petsc4py/PETSc/DMDA.pyx:1123 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1123>

    corners
        The lower left corner and size of local region in each dimension.

        Source code at petsc4py/PETSc/DMDA.pyx:1153 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1153>

    dim The grid dimension.

        Source code at petsc4py/PETSc/DMDA.pyx:1103 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1103>

    dof The number of DOFs associated with each stratum of the grid.

        Source code at petsc4py/PETSc/DMDA.pyx:1108 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1108>

    ghost_corners
        The lower left corner and size of local region in each dimension.

        Source code at petsc4py/PETSc/DMDA.pyx:1158 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1158>

    ghost_ranges
        Ranges of local region, including ghost nodes.

        Source code at petsc4py/PETSc/DMDA.pyx:1148 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1148>

    proc_sizes
        The number of processes in each dimension in the global decomposition.

        Source code at petsc4py/PETSc/DMDA.pyx:1118 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1118>

    ranges
        Ranges of the local region in each dimension.

        Source code at petsc4py/PETSc/DMDA.pyx:1143 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1143>

    sizes
        The global dimension.

        Source code at petsc4py/PETSc/DMDA.pyx:1113 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1113>

    stencil
        Stencil type and width.

        Source code at petsc4py/PETSc/DMDA.pyx:1128 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1128>

    stencil_type
        Stencil type.

        Source code at petsc4py/PETSc/DMDA.pyx:1133 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1133>

    stencil_width
        Elementwise stencil width.

        Source code at petsc4py/PETSc/DMDA.pyx:1138 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMDA.pyx#L1138>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMInterpolation

    class petsc4py.PETSc.DMInterpolation
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Interpolation on a mesh.

        Methods Summary
        create([comm]) | Create a DMInterpolation context.
        destroy() | Destroy the DMInterpolation context.
        evaluate(dm, x[, v]) | Calculate interpolated field values at the interpolation points.
        getCoordinates() | Return the coordinates of each interpolation point.
        getDim() | Return the spatial dimension of the interpolation context.
        getDof() | Return the number of fields interpolated at a point.
        getVector() | Return a Vec <#petsc4py.PETSc.Vec> which can hold all the interpolated field values.
        restoreVector(vec) | Restore a Vec which can hold all the interpolated field values.
        setDim(dim) | Set the spatial dimension for the interpolation context.
        setDof(dof) | Set the number of fields interpolated at a point.
        setUp(dm[, redundantPoints, ignoreOutsideDomain]) | Compute spatial indices for point location during interpolation.

        Methods Documentation

        create(comm=None)
            Create a DMInterpolation context.

            Collective.

            Parameters
                comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to COMM_SELF <#petsc4py.PETSc.COMM_SELF>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                destroy, DMInterpolationCreate <https://petsc.org/release/manualpages/DM/DMInterpolationCreate.html>

        Source code at petsc4py/PETSc/DMUtils.pyx:13 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMUtils.pyx#L13>

        destroy()
            Destroy the DMInterpolation context.

            Collective.

            See also:
                create, DMInterpolationDestroy <https://petsc.org/release/manualpages/DM/DMInterpolationDestroy.html>

        Source code at petsc4py/PETSc/DMUtils.pyx:35 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMUtils.pyx#L35>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        evaluate(dm, x, v=None)
            Calculate interpolated field values at the interpolation points.

            Collective.

            Parameters

                •   dm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM>.

                •   x (Vec <#petsc4py.PETSc.Vec>) -- The local vector containing the field to be interpolated.

                •   v (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- A vector capable of holding the interpolated field values.

            Return type
                Vec <#petsc4py.PETSc.Vec>

        See also:
                DMInterpolationEvaluate <https://petsc.org/release/manualpages/DM/DMInterpolationEvaluate.html>

        Source code at petsc4py/PETSc/DMUtils.pyx:48 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMUtils.pyx#L48>

        getCoordinates()
            Return the coordinates of each interpolation point.

            Collective.

            The local vector entries correspond to interpolation points lying on this process, according to the associated DM.

            See also:
                DMInterpolationGetCoordinates <https://petsc.org/release/manualpages/DM/DMInterpolationGetCoordinates.html>

        Source code at petsc4py/PETSc/DMUtils.pyx:74 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMUtils.pyx#L74>

            Return type
                Vec <#petsc4py.PETSc.Vec>

        getDim()
            Return the spatial dimension of the interpolation context.

            Not collective.

            See also:
                setDim, DMInterpolationGetDim <https://petsc.org/release/manualpages/DM/DMInterpolationGetDim.html>

        Source code at petsc4py/PETSc/DMUtils.pyx:92 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMUtils.pyx#L92>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getDof()
            Return the number of fields interpolated at a point.

            Not collective.

            See also:
                setDof, DMInterpolationGetDof <https://petsc.org/release/manualpages/DM/DMInterpolationGetDof.html>

        Source code at petsc4py/PETSc/DMUtils.pyx:106 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMUtils.pyx#L106>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getVector()
            Return a Vec <#petsc4py.PETSc.Vec> which can hold all the interpolated field values.

            Collective.

            This vector should be returned using restoreVector.

            See also:
                restoreVector, DMInterpolationGetVector <https://petsc.org/release/manualpages/DM/DMInterpolationGetVector.html>

        Source code at petsc4py/PETSc/DMUtils.pyx:185 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMUtils.pyx#L185>

            Return type
                Vec <#petsc4py.PETSc.Vec>

        restoreVector(vec)
            Restore a Vec which can hold all the interpolated field values.

            Collective.

            Parameters
                vec (Vec <#petsc4py.PETSc.Vec>) -- A vector capable of holding the interpolated field values.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getVector, DMInterpolationRestoreVector <https://petsc.org/release/manualpages/DM/DMInterpolationRestoreVector.html>

        Source code at petsc4py/PETSc/DMUtils.pyx:201 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMUtils.pyx#L201>

        setDim(dim)
            Set the spatial dimension for the interpolation context.

            Not collective.

            Parameters
                dim (int <https://docs.python.org/3/library/functions.html#int>) -- The spatial dimension.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getDim, DMInterpolationSetDim <https://petsc.org/release/manualpages/DM/DMInterpolationSetDim.html>

        Source code at petsc4py/PETSc/DMUtils.pyx:120 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMUtils.pyx#L120>

        setDof(dof)
            Set the number of fields interpolated at a point.

            Not collective.

            Parameters
                dof (int <https://docs.python.org/3/library/functions.html#int>) -- The number of fields.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getDof, DMInterpolationSetDof <https://petsc.org/release/manualpages/DM/DMInterpolationSetDof.html>

        Source code at petsc4py/PETSc/DMUtils.pyx:138 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMUtils.pyx#L138>

        setUp(dm, redundantPoints=False, ignoreOutsideDomain=False)
            Compute spatial indices for point location during interpolation.

            Collective.

            Parameters

                •   dm (DM <#petsc4py.PETSc.DM>) -- The DM for the function space used for interpolation.

                •   redundantPoints (bool <https://docs.python.org/3/library/functions.html#bool>) -- If True <https://docs.python.org/3/library/constants.html#True>, all processes are passing in the same array of points. Otherwise, points need to be communicated among processes.

                •   ignoreOutsideDomain (bool <https://docs.python.org/3/library/functions.html#bool>) -- Ignore points outside of the domain if True <https://docs.python.org/3/library/constants.html#True>; otherwise, return an error.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMInterpolationSetUp <https://petsc.org/release/manualpages/DM/DMInterpolationSetUp.html>

        Source code at petsc4py/PETSc/DMUtils.pyx:156 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMUtils.pyx#L156>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMLabel

    class petsc4py.PETSc.DMLabel
        Bases: Object <#petsc4py.PETSc.Object>

        An object representing a subset of mesh entities from a DM <#petsc4py.PETSc.DM>.

        Methods Summary
        addStrata(strata) | Add new stratum values in a DMLabel.
        addStrataIS(iset) | Add new stratum values in a DMLabel.
        addStratum(value) | Add a new stratum value in a DMLabel.
        clearStratum(stratum) | Remove a stratum.
        clearValue(point, value) | Clear the value a label assigns to a point.
        computeIndex() | Create an index structure for membership determination.
        convertToSection() | Return a Section <#petsc4py.PETSc.Section> and IS <#petsc4py.PETSc.IS> that encode the label.
        create(name[, comm]) | Create a DMLabel object, which is a multimap.
        createIndex(pStart, pEnd) | Create an index structure for membership determination.
        destroy() | Destroy the label.
        destroyIndex() | Destroy the index structure.
        distribute(sf) | Create a new label pushed forward over the SF <#petsc4py.PETSc.SF>.
        duplicate() | Duplicate the DMLabel.
        filter(start, end) | Remove all points outside of [start, end).
        gather(sf) | Gather all label values from leaves into roots.
        getBounds() | Return the smallest and largest point in the label.
        getDefaultValue() | Return the default value returned by getValue.
        getNonEmptyStratumValuesIS() | Return an IS <#petsc4py.PETSc.IS> of all values that the DMLabel takes.
        getNumValues() | Return the number of values that the DMLabel takes.
        getStratumIS(stratum) | Return an IS <#petsc4py.PETSc.IS> with the stratum points.
        getStratumSize(stratum) | Return the size of a stratum.
        getValue(point) | Return the value a label assigns to a point.
        getValueIS() | Return an IS <#petsc4py.PETSc.IS> of all values that the DMLabel takes.
        hasPoint(point) | Determine whether the label contains a point.
        hasStratum(value) | Determine whether points exist with the given value.
        hasValue(value) | Determine whether a label assigns the value to any point.
        insertIS(iset, value) | Set all points in the IS <#petsc4py.PETSc.IS> to a value.
        permute(permutation) | Create a new label with permuted points.
        reset() | Destroy internal data structures in the DMLabel.
        setDefaultValue(value) | Set the default value returned by getValue.
        setStratumIS(stratum, iset) | Set the stratum points using an IS <#petsc4py.PETSc.IS>.
        setValue(point, value) | Set the value a label assigns to a point.
        stratumHasPoint(value, point) | Return whether the stratum contains a point.
        view([viewer]) | View the label.

        Methods Documentation

        addStrata(strata)
            Add new stratum values in a DMLabel.

            Not collective.

            Parameters
                strata (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- The stratum values.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                addStrataIS, addStratum, DMLabelAddStrata <https://petsc.org/release/manualpages/DMLabel/DMLabelAddStrata.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:238 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L238>

        addStrataIS(iset)
            Add new stratum values in a DMLabel.

            Not collective.

            Parameters
                iset (IS <#petsc4py.PETSc.IS>) -- Index set with stratum values.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                addStrata, addStratum, DMLabelAddStrataIS <https://petsc.org/release/manualpages/DMLabel/DMLabelAddStrataIS.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:258 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L258>

        addStratum(value)
            Add a new stratum value in a DMLabel.

            Not collective.

            Parameters
                value (int <https://docs.python.org/3/library/functions.html#int>) -- The stratum value.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                addStrata, addStrataIS, DMLabelAddStratum <https://petsc.org/release/manualpages/DMLabel/DMLabelAddStratum.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:220 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L220>

        clearStratum(stratum)
            Remove a stratum.

            Not collective.

            Parameters
                stratum (int <https://docs.python.org/3/library/functions.html#int>) -- The stratum value.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMLabelClearStratum <https://petsc.org/release/manualpages/DMLabel/DMLabelClearStratum.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:406 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L406>

        clearValue(point, value)
            Clear the value a label assigns to a point.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   value (int <https://docs.python.org/3/library/functions.html#int>) -- The point value.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMLabelClearValue <https://petsc.org/release/manualpages/DMLabel/DMLabelClearValue.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:199 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L199>

        computeIndex()
            Create an index structure for membership determination.

            Not collective.

            Automatically determines the bounds.

            See also:
                DMLabelComputeIndex <https://petsc.org/release/manualpages/DMLabel/DMLabelComputeIndex.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:424 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L424>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        convertToSection()
            Return a Section <#petsc4py.PETSc.Section> and IS <#petsc4py.PETSc.IS> that encode the label.

            Not collective.

            See also:
                DMLabelConvertToSection <https://petsc.org/release/manualpages/DMLabel/DMLabelConvertToSection.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:607 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L607>

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Section <#petsc4py.PETSc.Section>, IS <#petsc4py.PETSc.IS>]

        create(name, comm=None)
            Create a DMLabel object, which is a multimap.

            Collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The label name.

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to COMM_SELF <#petsc4py.PETSc.COMM_SELF>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DMLabelCreate <https://petsc.org/release/manualpages/DMLabel/DMLabelCreate.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:40 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L40>

        createIndex(pStart, pEnd)
            Create an index structure for membership determination.

            Not collective.

            Parameters

                •   pStart (int <https://docs.python.org/3/library/functions.html#int>) -- The smallest point.

                •   pEnd (int <https://docs.python.org/3/library/functions.html#int>) -- The largest point + 1.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                destroyIndex, DMLabelCreateIndex <https://petsc.org/release/manualpages/DMLabel/DMLabelCreateIndex.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:438 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L438>

        destroy()
            Destroy the label.

            Collective.

            See also:
                DMLabelDestroy <https://petsc.org/release/manualpages/DMLabel/DMLabelDestroy.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:8 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L8>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        destroyIndex()
            Destroy the index structure.

            Not collective.

            See also:
                createIndex, DMLabelDestroyIndex <https://petsc.org/release/manualpages/DMLabel/DMLabelDestroyIndex.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:458 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L458>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        distribute(sf)
            Create a new label pushed forward over the SF <#petsc4py.PETSc.SF>.

            Collective.

            Parameters
                sf (SF <#petsc4py.PETSc.SF>) -- The map from old to new distribution.

            Return type
                DMLabel <#petsc4py.PETSc.DMLabel>

        See also:
                gather, DMLabelDistribute <https://petsc.org/release/manualpages/DMLabel/DMLabelDistribute.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:567 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L567>

        duplicate()
            Duplicate the DMLabel.

            Collective.

            See also:
                DMLabelDuplicate <https://petsc.org/release/manualpages/DMLabel/DMLabelDuplicate.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:65 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L65>

            Return type
                DMLabel <#petsc4py.PETSc.DMLabel>

        filter(start, end)
            Remove all points outside of [start, end).

            Not collective.

            Parameters

                •   start (int <https://docs.python.org/3/library/functions.html#int>) -- The first point kept.

                •   end (int <https://docs.python.org/3/library/functions.html#int>) -- One more than the last point kept.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMLabelFilter <https://petsc.org/release/manualpages/DMLabel/DMLabelFilter.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:528 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L528>

        gather(sf)
            Gather all label values from leaves into roots.

            Collective.

            This is the inverse operation to distribute.

            Parameters
                sf (SF <#petsc4py.PETSc.SF>) -- The SF <#petsc4py.PETSc.SF> communication map.

            Return type
                DMLabel <#petsc4py.PETSc.DMLabel>

        See also:
                distribute, DMLabelGather <https://petsc.org/release/manualpages/DMLabel/DMLabelGather.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:586 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L586>

        getBounds()
            Return the smallest and largest point in the label.

            Not collective.

            The returned values are the smallest point and the largest point + 1.

            See also:
                DMLabelGetBounds <https://petsc.org/release/manualpages/DMLabel/DMLabelGetBounds.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:512 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L512>

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        getDefaultValue()
            Return the default value returned by getValue.

            Not collective.

            The default value is returned if a point has not been explicitly given a value. When a label is created, it is initialized to -1.

            See also:
                setDefaultValue, DMLabelGetDefaultValue <https://petsc.org/release/manualpages/DMLabel/DMLabelGetDefaultValue.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:161 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L161>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getNonEmptyStratumValuesIS()
            Return an IS <#petsc4py.PETSc.IS> of all values that the DMLabel takes.

            Not collective.

            See also:
                DMLabelGetNonEmptyStratumValuesIS <https://petsc.org/release/manualpages/DMLabel/DMLabelGetNonEmptyStratumValuesIS.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:622 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L622>

            Return type
                IS <#petsc4py.PETSc.IS>

        getNumValues()
            Return the number of values that the DMLabel takes.

            Not collective.

            See also:
                DMLabelGetNumValues <https://petsc.org/release/manualpages/DMLabel/DMLabelGetNumValues.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:275 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L275>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getStratumIS(stratum)
            Return an IS <#petsc4py.PETSc.IS> with the stratum points.

            Not collective.

            Parameters
                stratum (int <https://docs.python.org/3/library/functions.html#int>) -- The stratum value.

            Return type
                IS <#petsc4py.PETSc.IS>

        See also:
                setStratumIS, DMLabelGetStratumIS <https://petsc.org/release/manualpages/DMLabel/DMLabelGetStratumIS.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:366 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L366>

        getStratumSize(stratum)
            Return the size of a stratum.

            Not collective.

            Parameters
                stratum (int <https://docs.python.org/3/library/functions.html#int>) -- The stratum value.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                DMLabelGetStratumSize <https://petsc.org/release/manualpages/DMLabel/DMLabelGetStratumSize.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:346 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L346>

        getValue(point)
            Return the value a label assigns to a point.

            Not collective.

            If no value was assigned, a default value will be returned The default value, initially -1, can be changed with setDefaultValue.

            Parameters
                point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                setValue, setDefaultValue, DMLabelGetValue <https://petsc.org/release/manualpages/DMLabel/DMLabelGetValue.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:137 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L137>

        getValueIS()
            Return an IS <#petsc4py.PETSc.IS> of all values that the DMLabel takes.

            Not collective.

            See also:
                DMLabelGetValueIS <https://petsc.org/release/manualpages/DMLabel/DMLabelGetValueIS.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:289 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L289>

            Return type
                IS <#petsc4py.PETSc.IS>

        hasPoint(point)
            Determine whether the label contains a point.

            Not collective.

            The user must call createIndex before this function.

            Parameters
                point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        See also:
                hasValue, DMLabelHasPoint <https://petsc.org/release/manualpages/DMLabel/DMLabelHasPoint.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:490 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L490>

        hasStratum(value)
            Determine whether points exist with the given value.

            Not collective.

            Parameters
                value (int <https://docs.python.org/3/library/functions.html#int>) -- The stratum value.

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        See also:
                DMLabelHasStratum <https://petsc.org/release/manualpages/DMLabel/DMLabelHasStratum.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:326 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L326>

        hasValue(value)
            Determine whether a label assigns the value to any point.

            Not collective.

            Parameters
                value (int <https://docs.python.org/3/library/functions.html#int>) -- The value.

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        See also:
                hasPoint, DMLabelHasValue <https://petsc.org/release/manualpages/DMLabel/DMLabelHasValue.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:470 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L470>

        insertIS(iset, value)
            Set all points in the IS <#petsc4py.PETSc.IS> to a value.

            Not collective.

            Parameters

                •   iset (IS <#petsc4py.PETSc.IS>) -- The point IS.

                •   value (int <https://docs.python.org/3/library/functions.html#int>) -- The point value.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DMLabelInsertIS <https://petsc.org/release/manualpages/DMLabel/DMLabelInsertIS.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:91 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L91>

        permute(permutation)
            Create a new label with permuted points.

            Not collective.

            Parameters
                permutation (IS <#petsc4py.PETSc.IS>) -- The point permutation.

            Return type
                DMLabel <#petsc4py.PETSc.DMLabel>

        See also:
                DMLabelPermute <https://petsc.org/release/manualpages/DMLabel/DMLabelPermute.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:548 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L548>

        reset()
            Destroy internal data structures in the DMLabel.

            Not collective.

            See also:
                DMLabelReset <https://petsc.org/release/manualpages/DMLabel/DMLabelReset.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:79 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L79>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setDefaultValue(value)
            Set the default value returned by getValue.

            Not collective.

            The value is used if a point has not been explicitly given a value. When a label is created, the default value is initialized to -1.

            Parameters
                value (int <https://docs.python.org/3/library/functions.html#int>) -- The default value.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getDefaultValue, DMLabelSetDefaultValue <https://petsc.org/release/manualpages/DMLabel/DMLabelSetDefaultValue.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:178 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L178>

        setStratumIS(stratum, iset)
            Set the stratum points using an IS <#petsc4py.PETSc.IS>.

            Not collective.

            Parameters

                •   stratum (int <https://docs.python.org/3/library/functions.html#int>) -- The stratum value.

                •   iset (IS <#petsc4py.PETSc.IS>) -- The stratum points.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getStratumIS, DMLabelSetStratumIS <https://petsc.org/release/manualpages/DMLabel/DMLabelSetStratumIS.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:386 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L386>

        setValue(point, value)
            Set the value a label assigns to a point.

            Not collective.

            If the value is the same as the label's default value (which is initially -1, and can be changed with setDefaultValue), this function will do nothing.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   value (int <https://docs.python.org/3/library/functions.html#int>) -- The point value.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getValue, setDefaultValue, DMLabelSetValue <https://petsc.org/release/manualpages/DMLabel/DMLabelSetValue.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:112 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L112>

        stratumHasPoint(value, point)
            Return whether the stratum contains a point.

            Not collective.

            Parameters

                •   value (int <https://docs.python.org/3/library/functions.html#int>) -- The stratum value.

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        See also:
                DMLabelStratumHasPoint <https://petsc.org/release/manualpages/DMLabel/DMLabelStratumHasPoint.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:303 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L303>

        view(viewer=None)
            View the label.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> to display the graph.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMLabelView <https://petsc.org/release/manualpages/DMLabel/DMLabelView.html>

        Source code at petsc4py/PETSc/DMLabel.pyx:21 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMLabel.pyx#L21>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMPlex

    class petsc4py.PETSc.DMPlex
        Bases: DM <#petsc4py.PETSc.DM>

        Encapsulate an unstructured mesh.

        DMPlex encapsulates both topology and geometry. It is capable of parallel refinement and coarsening (using Pragmatic or ParMmg) and parallel redistribution for load balancing.

        Methods Summary
        computeCellGeometryFVM(cell) | Compute the volume for a given cell.
        computeGradientClementInterpolant(locX, locC) | Return the L2 projection of the cellwise gradient of a function onto P1.
        constructGhostCells([labelName]) | Construct ghost cells which connect to every boundary face.
        coordinatesLoad(viewer, sfxc) | Load coordinates into this DMPlex object.
        coordinatesView(viewer) | Save DMPlex coordinates into a file.
        create([comm]) | Create a DMPlex object, which encapsulates an unstructured mesh.
        createBoxMesh(faces[, lower, upper, ...]) | Create a mesh on the tensor product of intervals.
        createBoxSurfaceMesh(faces[, lower, upper, ...]) | Create a mesh on the surface of a box mesh using tensor cells.
        createCGNS(cgid[, interpolate, comm]) | Create a DMPlex mesh from a CGNS file.
        createCGNSFromFile(filename[, interpolate, comm]) | "Create a DMPlex mesh from a CGNS file.
        createClosureIndex(sec) | Calculate an index for sec for the closure operation.
        createCoarsePointIS() | Create an IS <#petsc4py.PETSc.IS> covering the coarse DMPlex chart with the fine points as data.
        createCohesiveSubmesh(hasLagrange, value) | Extract the hypersurface defined by one face of the cohesive cells.
        createColoring([depth, distance]) | Return the coloring of the connectivity graph of entities in the DMPlex.
        createCoordinateSpace(degree, localized, project) | Create a finite element space for the coordinates.
        createExodus(exoid[, interpolate, comm]) | Create a DMPlex mesh from an ExodusII file ID.
        createExodusFromFile(filename[, ...]) | Create a DMPlex mesh from an ExodusII file.
        createFromCellList(dim, cells, coords[, ...]) | Create a DMPlex from a list of vertices for each cell on process 0.
        createFromFile(filename[, plexname, ...]) | Create DMPlex from a file.
        createGlobalToNaturalSF(section, sfMigration) | Create the SF <#petsc4py.PETSc.SF> for mapping Global Vec <#petsc4py.PETSc.Vec> to the Natural Vec <#petsc4py.PETSc.Vec>.
        createGmsh(viewer[, interpolate, comm]) | Create a DMPlex mesh from a Gmsh file viewer.
        createNaturalVec() | Return a natural vector.
        createPointNumbering() | Create a global numbering for all points.
        createSection(numComp, numDof[, bcField, ...]) | Create a Section <#petsc4py.PETSc.Section> based upon the DOF layout specification provided.
        distribute([overlap]) | Distribute the mesh and any associated sections.
        distributeField(sf, sec, vec[, newsec, newvec]) | Distribute field data with a with a given SF <#petsc4py.PETSc.SF>.
        distributeGetDefault() | Return a flag indicating whether the DM <#petsc4py.PETSc.DM> should be distributed by default.
        distributeOverlap([overlap]) | Add partition overlap to a distributed non-overlapping DMPlex.
        distributeSetDefault(flag) | Set flag indicating whether the DMPlex should be distributed by default.
        distributionGetName() | Retrieve the name of the specific parallel distribution.
        distributionSetName(name) | Set the name of the specific parallel distribution.
        filter([label, value, ignoreHalo, ...]) | Extract a subset of mesh cells defined by a label as a separate mesh.
        generate(boundary[, name, interpolate]) | Generate a mesh.
        getAdjacency(p) | Return all points adjacent to the given point.
        getAdjacencyUseAnchors() | Query whether adjacency in the mesh uses the point-to-point constraints.
        getCellNumbering() | Return a global cell numbering for all cells on this process.
        getCellType(p) | Return the polytope type of a given cell.
        getCellTypeLabel() | Return the DMLabel <#petsc4py.PETSc.DMLabel> recording the polytope type of each cell.
        getChart() | Return the interval for all mesh points [pStart, pEnd).
        getCone(p) | Return the points on the in-edges for this point in the DAG.
        getConeOrientation(p) | Return the orientations on the in-edges for this point in the DAG.
        getConeSize(p) | Return the number of in-edges for this point in the DAG.
        getDepth() | Return the depth of the DAG representing this mesh.
        getDepthStratum(svalue) | Return the bounds [start, end) for all points at a certain depth.
        getFullJoin(points) | Return an array for the join of the set of points.
        getHeightStratum(svalue) | Return the bounds [start, end) for all points at a certain height.
        getJoin(points) | Return an array for the join of the set of points.
        getMaxSizes() | Return the maximum number of in-edges and out-edges of the DAG.
        getMeet(points) | Return an array for the meet of the set of points.
        getMigrationSF() | Get the SF <#petsc4py.PETSc.SF> for migrating from a parent DM <#petsc4py.PETSc.DM> into this DM <#petsc4py.PETSc.DM>.
        getMinRadius() | Return the minimum distance from any cell centroid to a face.
        getOrdering(otype) | Calculate a reordering of the mesh.
        getPartitioner() | Return the mesh partitioner.
        getPointDepth(point) | Return the depth of a given point.
        getPointGlobal(point) | Return location of point data in global Vec <#petsc4py.PETSc.Vec>.
        getPointGlobalField(point, field) | Return location of point field data in global Vec <#petsc4py.PETSc.Vec>.
        getPointHeight(point) | Return the height of a given point.
        getPointLocal(point) | Return location of point data in local Vec <#petsc4py.PETSc.Vec>.
        getPointLocalField(point, field) | Return location of point field data in local Vec <#petsc4py.PETSc.Vec>.
        getRefinementLimit() | Retrieve the maximum cell volume for refinement.
        getRefinementUniform() | Retrieve the flag for uniform refinement.
        getSubpointIS() | Return an IS <#petsc4py.PETSc.IS> covering the entire subdm chart.
        getSubpointMap() | Return a DMLabel <#petsc4py.PETSc.DMLabel> with point dimension as values.
        getSupport(p) | Return the points on the out-edges for this point in the DAG.
        getSupportSize(p) | Return the number of out-edges for this point in the DAG.
        getTransitiveClosure(p[, useCone]) | Return the points and orientations on the transitive closure of this point.
        getVecClosure(sec, vec, point) | Return an array of the values on the closure of a point.
        getVertexNumbering() | Return a global vertex numbering for all vertices on this process.
        globalToNaturalBegin(gv, nv) | Rearrange a Vec <#petsc4py.PETSc.Vec> in the Global order to the natural order.
        globalToNaturalEnd(gv, nv) | Rearrange a Vec <#petsc4py.PETSc.Vec> in the Global order to the natural order.
        globalVectorLoad(viewer, sectiondm, sf, vec) | Load on-disk vector data into a global vector.
        globalVectorView(viewer, sectiondm, vec) | Save a global vector.
        insertCone(p, conePos, conePoint) | DMPlexInsertCone - Insert a point into the in-edges for the point p in the DAG.
        insertConeOrientation(p, conePos, ...) | Insert a point orientation for the in-edge for the point p in the DAG.
        interpolate() | Convert to a mesh with all intermediate faces, edges, etc.
        isDistributed() | Return the flag indicating if the mesh is distributed.
        isSimplex() | Return the flag indicating if the first cell is a simplex.
        labelCohesiveComplete(label, bdlabel, ...) | Add all other mesh pieces to complete the surface.
        labelComplete(label) | Add the transitive closure to the surface.
        labelsLoad(viewer, sfxc) | Load labels into this DMPlex object.
        labelsView(viewer) | Save DMPlex labels into a file.
        localVectorLoad(viewer, sectiondm, sf, vec) | Load on-disk vector data into a local vector.
        localVectorView(viewer, sectiondm, vec) | Save a local vector.
        markBoundaryFaces(label[, value]) | Mark all faces on the boundary.
        metricAverage2(metric1, metric2, metricAvg) | Compute and return the unweighted average of two metrics.
        metricAverage3(metric1, metric2, metric3, ...) | Compute and return the unweighted average of three metrics.
        metricCreate([field]) | Create a Riemannian metric field.
        metricCreateIsotropic(indicator[, field]) | Construct an isotropic metric from an error indicator.
        metricCreateUniform(alpha[, field]) | Construct a uniform isotropic metric.
        metricDeterminantCreate([field]) | Create the determinant field for a Riemannian metric.
        metricEnforceSPD(metric, ometric, determinant) | Enforce symmetric positive-definiteness of a metric.
        metricGetGradationFactor() | Return the metric gradation factor.
        metricGetHausdorffNumber() | Return the metric Hausdorff number.
        metricGetMaximumAnisotropy() | Return the maximum tolerated metric anisotropy.
        metricGetMaximumMagnitude() | Return the maximum tolerated metric magnitude.
        metricGetMinimumMagnitude() | Return the minimum tolerated metric magnitude.
        metricGetNormalizationOrder() | Return the order p for L-p normalization.
        metricGetNumIterations() | Return the number of parallel adaptation iterations.
        metricGetTargetComplexity() | Return the target metric complexity.
        metricGetVerbosity() | Return the verbosity of the mesh adaptation package.
        metricIntersection2(metric1, metric2, metricInt) | Compute and return the intersection of two metrics.
        metricIntersection3(metric1, metric2, ...) | Compute the intersection of three metrics.
        metricIsIsotropic() | Return the flag indicating whether the metric is isotropic or not.
        metricIsUniform() | Return the flag indicating whether the metric is uniform or not.
        metricNoInsertion() | Return the flag indicating whether node insertion and deletion are turned off.
        metricNoMovement() | Return the flag indicating whether node movement is turned off.
        metricNoSurf() | Return the flag indicating whether surface modification is turned off.
        metricNoSwapping() | Return the flag indicating whether facet swapping is turned off.
        metricNormalize(metric, ometric, determinant) | Apply L-p normalization to a metric.
        metricRestrictAnisotropyFirst() | Return true if anisotropy is restricted before normalization.
        metricSetFromOptions() | Configure the object from the options database.
        metricSetGradationFactor(beta) | Set the metric gradation factor.
        metricSetHausdorffNumber(hausd) | Set the metric Hausdorff number.
        metricSetIsotropic(isotropic) | Record whether the metric is isotropic or not.
        metricSetMaximumAnisotropy(a_max) | Set the maximum tolerated metric anisotropy.
        metricSetMaximumMagnitude(h_max) | Set the maximum tolerated metric magnitude.
        metricSetMinimumMagnitude(h_min) | Set the minimum tolerated metric magnitude.
        metricSetNoInsertion(noInsert) | Set the flag indicating whether node insertion should be turned off.
        metricSetNoMovement(noMove) | Set the flag indicating whether node movement should be turned off.
        metricSetNoSurf(noSurf) | Set the flag indicating whether surface modification should be turned off.
        metricSetNoSwapping(noSwap) | Set the flag indicating whether facet swapping should be turned off.
        metricSetNormalizationOrder(p) | Set the order p for L-p normalization.
        metricSetNumIterations(numIter) | Set the number of parallel adaptation iterations.
        metricSetRestrictAnisotropyFirst(...) | Record whether anisotropy is be restricted before normalization or after.
        metricSetTargetComplexity(targetComplexity) | Set the target metric complexity.
        metricSetUniform(uniform) | Record whether the metric is uniform or not.
        metricSetVerbosity(verbosity) | Set the verbosity of the mesh adaptation package.
        migrateGlobalToNaturalSF(dmOld, ...) | Create the SF <#petsc4py.PETSc.SF> for mapping Global Vec <#petsc4py.PETSc.Vec> to the Natural Vec <#petsc4py.PETSc.Vec> in the new DM <#petsc4py.PETSc.DM>.
        naturalToGlobalBegin(nv, gv) | Rearrange a Vec <#petsc4py.PETSc.Vec> in the natural order to the Global order.
        naturalToGlobalEnd(nv, gv) | Rearrange a Vec <#petsc4py.PETSc.Vec> in the natural order to the Global order.
        orient() | Give a consistent orientation to the input mesh.
        orientLabel(label) | Give a consistent orientation to the hypersurface marked by a label.
        orientPoint(p, o) | Act with the given orientation on this mesh point.
        permute(perm) | Reorder the mesh according to the input permutation.
        rebalanceSharedPoints([entityDepth, ...]) | Redistribute shared points in order to achieve better balancing.
        reorderGetDefault() | Return flag indicating whether the DMPlex should be reordered by default.
        reorderSetDefault(flag) | Set flag indicating whether the DM should be reordered by default.
        sectionLoad(viewer, sectiondm, sfxc) | Load section into a DM <#petsc4py.PETSc.DM>.
        sectionView(viewer, sectiondm) | Save a section associated with a DMPlex.
        setAdjacencyUseAnchors([useAnchors]) | Define adjacency in the mesh using the point-to-point constraints.
        setCellType(p, ctype) | Set the polytope type of a given cell.
        setChart(pStart, pEnd) | Set the interval for all mesh points [pStart, pEnd).
        setCone(p, cone[, orientation]) | Set the points on the in-edges for this point in the DAG.
        setConeOrientation(p, orientation) | Set the orientations on the in-edges for this point in the DAG.
        setConeSize(p, size) | Set the number of in-edges for this point in the DAG.
        setMatClosure(sec, gsec, mat, point, values) | Set an array of the values on the closure of point.
        setMigrationSF(sf) | Set the SF <#petsc4py.PETSc.SF> for migrating from a parent DM <#petsc4py.PETSc.DM> into this DM <#petsc4py.PETSc.DM>.
        setPartitioner(part) | Set the mesh partitioner.
        setRefinementLimit(refinementLimit) | Set the maximum cell volume for refinement.
        setRefinementUniform([refinementUniform]) | Set the flag for uniform refinement.
        setSupport(p, supp) | Set the points on the out-edges for this point in the DAG.
        setSupportSize(p, size) | Set the number of out-edges for this point in the DAG.
        setTetGenOptions(opts) | Set the options used for the Tetgen mesh generator.
        setTriangleOptions(opts) | Set the options used for the Triangle mesh generator.
        setVecClosure(sec, vec, point, values[, addv]) | Set an array of the values on the closure of point.
        stratify() | Calculate the strata of DAG.
        symmetrize() | Create support (out-edge) information from cone (in-edge) information.
        topologyLoad(viewer) | Load a topology into this DMPlex object.
        topologyView(viewer) | Save a DMPlex topology into a file.
        uninterpolate() | Convert to a mesh with only cells and vertices.
        vecGetClosure(sec, vec, p) | Return an array of values on the closure of p.

        Methods Documentation

        computeCellGeometryFVM(cell)
            Compute the volume for a given cell.

            Not collective.

            Parameters
                cell (int <https://docs.python.org/3/library/functions.html#int>) -- The cell.

            Returns

                •   volume (float <https://docs.python.org/3/library/functions.html#float>) -- The cell volume.

                •   centroid (ArrayReal <#petsc4py.typing.ArrayReal>) -- The cell centroid.

                •   normal (ArrayReal <#petsc4py.typing.ArrayReal>) -- The cell normal, if appropriate.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, ArrayReal <#petsc4py.typing.ArrayReal>, ArrayReal <#petsc4py.typing.ArrayReal>]

        See also:
                DMPlex, DM.getCoordinateSection <#petsc4py.PETSc.DM.getCoordinateSection>, DM.getCoordinates <#petsc4py.PETSc.DM.getCoordinates>, DMPlexComputeCellGeometryFVM <https://petsc.org/release/manualpages/DMPlex/DMPlexComputeCellGeometryFVM.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2350 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2350>

        computeGradientClementInterpolant(locX, locC)
            Return the L2 projection of the cellwise gradient of a function onto P1.

            Collective.

            Parameters

                •   locX (Vec <#petsc4py.PETSc.Vec>) -- The coefficient vector of the function.

                •   locC (Vec <#petsc4py.PETSc.Vec>) -- The output Vec <#petsc4py.PETSc.Vec> which holds the Clement interpolant of the gradient.

            Return type
                Vec <#petsc4py.PETSc.Vec>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlexComputeGradientClementInterpolant <https://petsc.org/release/manualpages/DMPlex/DMPlexComputeGradientClementInterpolant.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3284 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3284>

        constructGhostCells(labelName=None)
            Construct ghost cells which connect to every boundary face.

            Collective.

            Parameters
                labelName (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The name of the label specifying the boundary faces. Defaults to "Face Sets".

            Returns
                numGhostCells -- The number of ghost cells added to the DMPlex.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.create <#petsc4py.PETSc.DM.create>, DMPlexConstructGhostCells <https://petsc.org/release/manualpages/DMPlex/DMPlexConstructGhostCells.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2382 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2382>

        coordinatesLoad(viewer, sfxc)
            Load coordinates into this DMPlex object.

            Collective.

            Parameters

                •   viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> for the saved coordinates.

                •   sfxc (SF <#petsc4py.PETSc.SF>) -- The SF <#petsc4py.PETSc.SF> returned by topologyLoad.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.load <#petsc4py.PETSc.DM.load>, DMPlex.topologyLoad, DMPlex.labelsLoad, DM.view <#petsc4py.PETSc.DM.view>, SF <#petsc4py.PETSc.SF>, Viewer <#petsc4py.PETSc.Viewer>, DMPlexCoordinatesLoad <https://petsc.org/release/manualpages/DMPlex/DMPlexCoordinatesLoad.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3457 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3457>

        coordinatesView(viewer)
            Save DMPlex coordinates into a file.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> for saving.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.view <#petsc4py.PETSc.DM.view>, DMPlex.topologyView, DMPlex.labelsView, DMPlex.coordinatesLoad, Viewer <#petsc4py.PETSc.Viewer>, DMPlexCoordinatesView <https://petsc.org/release/manualpages/DMPlex/DMPlexCoordinatesView.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3324 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3324>

        create(comm=None)
            Create a DMPlex object, which encapsulates an unstructured mesh.

            Collective.

            Parameters
                comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.create <#petsc4py.PETSc.DM.create>, DM.setType <#petsc4py.PETSc.DM.setType>, DMPlexCreate <https://petsc.org/release/manualpages/DMPlex/DMPlexCreate.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:14 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L14>

        createBoxMesh(faces, lower=(0, 0, 0), upper=(1, 1, 1), simplex=True, periodic=False, interpolate=True, localizationHeight=0, sparseLocalize=True, comm=None)
            Create a mesh on the tensor product of intervals.

            Collective.

            Parameters

                •   faces (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Number of faces per dimension, or None <https://docs.python.org/3/library/constants.html#None> for the default.

                •   lower (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>] | None <https://docs.python.org/3/library/constants.html#None>) -- The lower left corner.

                •   upper (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>] | None <https://docs.python.org/3/library/constants.html#None>) -- The upper right corner.

                •   simplex (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- True <https://docs.python.org/3/library/constants.html#True> for simplices, False <https://docs.python.org/3/library/constants.html#False> for tensor cells.

                •   periodic (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence> | str <https://docs.python.org/3/library/stdtypes.html#str> | int <https://docs.python.org/3/library/functions.html#int> | bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- The boundary type for the X, Y, Z direction, or None <https://docs.python.org/3/library/constants.html#None> for DM.BoundaryType.NONE <#petsc4py.PETSc.DM.BoundaryType.NONE>.

                •   interpolate (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag to create intermediate mesh entities (edges, faces).

                •   localizationHeight (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag to localize edges and faces in addition to cells; only significant for periodic meshes.

                •   sparseLocalize (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag to localize coordinates only for cells near the periodic boundary; only significant for periodic meshes.

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.setFromOptions <#petsc4py.PETSc.DM.setFromOptions>, DMPlex.createFromFile, DM.setType <#petsc4py.PETSc.DM.setType>, DM.create <#petsc4py.PETSc.DM.create>, DMPlexCreateBoxMesh <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateBoxMesh.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:90 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L90>

        createBoxSurfaceMesh(faces, lower=(0, 0, 0), upper=(1, 1, 1), interpolate=True, comm=None)
            Create a mesh on the surface of a box mesh using tensor cells.

            Collective.

            Parameters

                •   faces (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Number of faces per dimension, or None <https://docs.python.org/3/library/constants.html#None> for the default.

                •   lower (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>] | None <https://docs.python.org/3/library/constants.html#None>) -- The lower left corner.

                •   upper (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>] | None <https://docs.python.org/3/library/constants.html#None>) -- The upper right corner.

                •   interpolate (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag to create intermediate mesh pieces (edges, faces).

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.setFromOptions <#petsc4py.PETSc.DM.setFromOptions>, DMPlex.createBoxMesh, DMPlex.createFromFile, DM.setType <#petsc4py.PETSc.DM.setType>, DM.create <#petsc4py.PETSc.DM.create>, DMPlexCreateBoxSurfaceMesh <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateBoxSurfaceMesh.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:149 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L149>

        createCGNS(cgid, interpolate=True, comm=None)
            Create a DMPlex mesh from a CGNS file.

            Collective.

            Parameters

                •   cgid (int <https://docs.python.org/3/library/functions.html#int>) -- The CG id associated with a file and obtained using cg_open.

                •   interpolate (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Create faces and edges in the mesh.

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.createCGNSFromFile, DMPlex.createExodus, DMPlexCreateCGNS <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateCGNS.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:226 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L226>

        createCGNSFromFile(filename, interpolate=True, comm=None)
            "Create a DMPlex mesh from a CGNS file.

            Collective.

            Parameters

                •   filename (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The name of the CGNS file.

                •   interpolate (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Create faces and edges in the mesh.

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.createCGNS, DMPlex.createExodus, DMPlexCreateCGNS <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateCGNS.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:254 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L254>

        createClosureIndex(sec)
            Calculate an index for sec for the closure operation.

            Not collective.

            Parameters
                sec (Section <#petsc4py.PETSc.Section>) -- The Section <#petsc4py.PETSc.Section> describing the layout in the local vector, or None <https://docs.python.org/3/library/constants.html#None> to use the default section.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, Section <#petsc4py.PETSc.Section>, DMPlex.vecGetClosure, DMPlexCreateClosureIndex <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateClosureIndex.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2164 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2164>

        createCoarsePointIS()
            Create an IS <#petsc4py.PETSc.IS> covering the coarse DMPlex chart with the fine points as data.

            Collective.

            Returns
                fpointIS -- The IS <#petsc4py.PETSc.IS> of all the fine points which exist in the original coarse mesh.

            Return type
                IS <#petsc4py.PETSc.IS>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, IS <#petsc4py.PETSc.IS>, DM.refine <#petsc4py.PETSc.DM.refine>, DMPlex.setRefinementUniform, DMPlexCreateCoarsePointIS <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateCoarsePointIS.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1950 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1950>

        createCohesiveSubmesh(hasLagrange, value)
            Extract the hypersurface defined by one face of the cohesive cells.

            Collective.

            Parameters

                •   hasLagrange (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating whether the mesh has Lagrange dofs in the cohesive cells.

                •   value (int <https://docs.python.org/3/library/functions.html#int>) -- A label value.

            Return type
                DMPlex <#petsc4py.PETSc.DMPlex>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlexCreateCohesiveSubmesh <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateCohesiveSubmesh.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:401 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L401>

        createColoring(depth=0, distance=1)
            Return the coloring of the connectivity graph of entities in the DMPlex.

            Collective.

            Parameters

                •   depth (int <https://docs.python.org/3/library/functions.html#int>) -- The entity dimension of nodes in the connectivity graph.

                •   distance (int <https://docs.python.org/3/library/functions.html#int>) -- The distance of the coloring (either 1 or 2).

            Return type
                list <https://docs.python.org/3/library/stdtypes.html#list>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlexCreateColoring <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateColoring.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:424 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L424>

        createCoordinateSpace(degree, localized, project)
            Create a finite element space for the coordinates.

            Collective.

            Parameters

                •   degree (int <https://docs.python.org/3/library/functions.html#int>) -- The degree of the finite element.

                •   localized (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag to create a localized (DG) coordinate space.

                •   project (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag to project current coordinates into the space.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlexCreateCoordinateSpace <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateCoordinateSpace.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:377 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L377>

        createExodus(exoid, interpolate=True, comm=None)
            Create a DMPlex mesh from an ExodusII file ID.

            Collective.

            Parameters

                •   exoid (int <https://docs.python.org/3/library/functions.html#int>) -- The ExodusII id associated with a file obtained using ex_open.

                •   interpolate (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Create faces and edges in the mesh,

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.create <#petsc4py.PETSc.DM.create>, DMPlexCreateExodus <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateExodus.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:312 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L312>

        createExodusFromFile(filename, interpolate=True, comm=None)
            Create a DMPlex mesh from an ExodusII file.

            Collective.

            Parameters

                •   filename (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The name of the ExodusII file.

                •   interpolate (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Create faces and edges in the mesh.

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.create <#petsc4py.PETSc.DM.create>, DMPlex.createExodus, DMPlexCreateExodusFromFile <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateExodusFromFile.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:283 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L283>

        createFromCellList(dim, cells, coords, interpolate=True, comm=None)
            Create a DMPlex from a list of vertices for each cell on process 0.

            Collective.

            Parameters

                •   dim (int <https://docs.python.org/3/library/functions.html#int>) -- The topological dimension of the mesh.

                •   cells (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- An array of number of cells times number of vertices on each cell.

                •   coords (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) -- An array of number of vertices times spatial dimension for coordinates.

                •   interpolate (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag to interpolate the mesh.

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.interpolate, DMPlexCreateFromCellListPetsc <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateFromCellListPetsc.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:35 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L35>

        createFromFile(filename, plexname='unnamed', interpolate=True, comm=None)
            Create DMPlex from a file.

            Collective.

            Parameters

                •   filename (str <https://docs.python.org/3/library/stdtypes.html#str>) -- A file name.

                •   plexname (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The name of the resulting DMPlex, also used for intra-datafile lookup by some formats.

                •   interpolate (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag to create intermediate mesh pieces (edges, faces).

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.createFromCellList, DMPlex.create, Object.setName <#petsc4py.PETSc.Object.setName>, DM.view <#petsc4py.PETSc.DM.view>, DM.load <#petsc4py.PETSc.DM.load>, Working with PETSc options <#petsc-options>, DMPlexCreateFromFile <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateFromFile.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:192 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L192>

        createGlobalToNaturalSF(section, sfMigration)
            Create the SF <#petsc4py.PETSc.SF> for mapping Global Vec <#petsc4py.PETSc.Vec> to the Natural Vec <#petsc4py.PETSc.Vec>.

            Collective.

            See also:
                DMPlexCreateGlobalToNaturalSF <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateGlobalToNaturalSF.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3673 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3673>

            Parameters

                •   section (Section <#petsc4py.PETSc.Section>)

                •   sfMigration (SF <#petsc4py.PETSc.SF>)

            Return type
                SF <#petsc4py.PETSc.SF>

        createGmsh(viewer, interpolate=True, comm=None)
            Create a DMPlex mesh from a Gmsh file viewer.

            Collective.

            Parameters

                •   viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> associated with a Gmsh file.

                •   interpolate (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Create faces and edges in the mesh.

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        Notes

        -dm_plex_gmsh_hybrid forces triangular prisms to use tensor order.

        -dm_plex_gmsh_periodic allows for reading Gmsh periodic section.

        -dm_plex_gmsh_highorder allows for generating high-order coordinates.

        -dm_plex_gmsh_project projects high-order coordinates to a different space, use the prefix -dm_plex_gmsh_project_ to define the space.

        -dm_plex_gmsh_use_regions generates labels with region names.

        -dm_plex_gmsh_mark_vertices adds vertices to generated labels.

        -dm_plex_gmsh_multiple_tags allows multiple tags for default labels.

        -dm_plex_gmsh_spacedim <d> embedding space dimension.

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.create <#petsc4py.PETSc.DM.create>, Working with PETSc options <#petsc-options>, DMPlexCreateGmsh <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateGmsh.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:339 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L339>

        createNaturalVec()
            Return a natural vector.

            Collective.

            See also:
                DMPlexCreateNaturalVector <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateNaturalVector.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3584 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3584>

            Return type
                Vec <#petsc4py.PETSc.Vec>

        createPointNumbering()
            Create a global numbering for all points.

            Collective.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getCellNumbering, DMPlexCreatePointNumbering <https://petsc.org/release/manualpages/DMPlex/DMPlexCreatePointNumbering.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1048 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1048>

            Return type
                IS <#petsc4py.PETSc.IS>

        createSection(numComp, numDof, bcField=None, bcComps=None, bcPoints=None, perm=None)
            Create a Section <#petsc4py.PETSc.Section> based upon the DOF layout specification provided.

            Not collective.

            Parameters

                •   numComp (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- An array of size numFields holding the number of components per field.

                •   numDof (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- An array of size numFields*(dim+1) holding the number of DOFs per field on a mesh piece of dimension dim.

                •   bcField (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- An array of size numBC giving the field number for each boundary condition, where numBC is the number of boundary conditions.

                •   bcComps (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>) -- An array of size numBC giving an IS <#petsc4py.PETSc.IS> holding the field components to which each boundary condition applies.

                •   bcPoints (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>) -- An array of size numBC giving an IS <#petsc4py.PETSc.IS> holding the DMPlex points to which each boundary condition applies.

                •   perm (IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>) -- Permutation of the chart.

            Return type
                Section <#petsc4py.PETSc.Section>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, Section.create <#petsc4py.PETSc.Section.create>, Section.setPermutation <#petsc4py.PETSc.Section.setPermutation>, DMPlexCreateSection <https://petsc.org/release/manualpages/DMPlex/DMPlexCreateSection.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1970 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1970>

        distribute(overlap=0)
            Distribute the mesh and any associated sections.

            Collective.

            Parameters
                overlap (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The overlap of partitions.

            Returns
                sf -- The SF <#petsc4py.PETSc.SF> used for point distribution, or None <https://docs.python.org/3/library/constants.html#None> if not distributed.

            Return type
                SF <#petsc4py.PETSc.SF> or None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlexDistribute <https://petsc.org/release/manualpages/DMPlex/DMPlexDistribute.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1694 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1694>

        distributeField(sf, sec, vec, newsec=None, newvec=None)
            Distribute field data with a with a given SF <#petsc4py.PETSc.SF>.

            Collective.

            Parameters

                •   sf (SF <#petsc4py.PETSc.SF>) -- The SF <#petsc4py.PETSc.SF> describing the communication pattern.

                •   sec (Section <#petsc4py.PETSc.Section>) -- The Section <#petsc4py.PETSc.Section> for existing data layout.

                •   vec (Vec <#petsc4py.PETSc.Vec>) -- The existing data in a local vector.

                •   newsec (Section <#petsc4py.PETSc.Section> | None <https://docs.python.org/3/library/constants.html#None>) -- The SF <#petsc4py.PETSc.SF> describing the new data layout.

                •   newvec (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The new data in a local vector.

            Returns

                •   newSection (Section <#petsc4py.PETSc.Section>) -- The SF <#petsc4py.PETSc.SF> describing the new data layout.

                •   newVec (Vec <#petsc4py.PETSc.Vec>) -- The new data in a local vector.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Section <#petsc4py.PETSc.Section>, Vec <#petsc4py.PETSc.Vec>]

        See also:
                DMPlex, DMPlex.distribute, DMPlexDistributeField <https://petsc.org/release/manualpages/DMPlex/DMPlexDistributeField.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1891 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1891>

        distributeGetDefault()
            Return a flag indicating whether the DM <#petsc4py.PETSc.DM> should be distributed by default.

            Not collective.

            Returns
                dist -- Flag indicating whether the DMPlex should be distributed by default.

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.distributeSetDefault, DMPlex.distribute, DMPlexDistributeGetDefault <https://petsc.org/release/manualpages/DMPlex/DMPlexDistributeGetDefault.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1780 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1780>

        distributeOverlap(overlap=0)
            Add partition overlap to a distributed non-overlapping DMPlex.

            Collective.

            Parameters
                overlap (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The overlap of partitions (the same on all ranks).

            Returns
                sf -- The SF <#petsc4py.PETSc.SF> used for point distribution.

            Return type
                SF <#petsc4py.PETSc.SF>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, SF <#petsc4py.PETSc.SF>, DMPlex.create, DMPlex.distribute, DMPlexDistributeOverlap <https://petsc.org/release/manualpages/DMPlex/DMPlexDistributeOverlap.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1722 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1722>

        distributeSetDefault(flag)
            Set flag indicating whether the DMPlex should be distributed by default.

            Logically collective.

            Parameters
                flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating whether the DMPlex should be distributed by default.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex, DMPlex.distributeGetDefault, DMPlex.distribute, DMPlexDistributeSetDefault <https://petsc.org/release/manualpages/DMPlex/DMPlexDistributeSetDefault.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1800 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1800>

        distributionGetName()
            Retrieve the name of the specific parallel distribution.

            Not collective.

            Returns
                name -- The name of the specific parallel distribution.

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        See also:
                DMPlex, DMPlex.distributionSetName, DMPlex.topologyView, DMPlex.topologyLoad, DMPlexDistributionGetName <https://petsc.org/release/manualpages/DMPlex/DMPlexDistributionGetName.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1841 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1841>

        distributionSetName(name)
            Set the name of the specific parallel distribution.

            Logically collective.

            Parameters
                name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The name of the specific parallel distribution.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex, DMPlex.distributionGetName, DMPlex.topologyView, DMPlex.topologyLoad, DMPlexDistributionSetName <https://petsc.org/release/manualpages/DMPlex/DMPlexDistributionSetName.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1820 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1820>

        filter(label=None, value=None, ignoreHalo=False, sanitizeSubMesh=False, comm=None)
            Extract a subset of mesh cells defined by a label as a separate mesh.

            Collective.

            Parameters

                •   cellLabel -- label marking cells to be contained in the new mesh

                •   value (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- label value to use

                •   ignoreHalo (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating if labeled points that are in the halo are ignored

                •   sanitizeSubmesh -- Flag indicating if a subpoint is forced to be owned by a rank that owns a subcell that contains that point in its closure

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- The communicator you want the mesh on

                •   label (DMLabel <#petsc4py.PETSc.DMLabel> | None <https://docs.python.org/3/library/constants.html#None>)

                •   sanitizeSubMesh (bool <https://docs.python.org/3/library/functions.html#bool>)

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[DMPlex <#petsc4py.PETSc.DMPlex>, SF <#petsc4py.PETSc.SF>]

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlexFilter <https://petsc.org/release/manualpages/DMPlex/DMPlexFilter.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:453 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L453>

        generate(boundary, name=None, interpolate=True)
            Generate a mesh.

            Not collective.

            Parameters

                •   boundary (DMPlex <#petsc4py.PETSc.DMPlex>) -- The DMPlex boundary object.

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The mesh generation package name.

                •   interpolate (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag to create intermediate mesh elements.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DM.refine <#petsc4py.PETSc.DM.refine>, Working with PETSc options <#petsc-options>, DMPlexGenerate <https://petsc.org/release/manualpages/DMPlex/DMPlexGenerate.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1417 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1417>

        getAdjacency(p)
            Return all points adjacent to the given point.

            Not collective.

            Parameters
                p (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

            Return type
                ArrayInt <#petsc4py.typing.ArrayInt>

        See also:
                DMPlex, DMPlex.distribute, DMPlexGetAdjacency <https://petsc.org/release/manualpages/DMPlex/DMPlexGetAdjacency.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1600 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1600>

        getAdjacencyUseAnchors()
            Query whether adjacency in the mesh uses the point-to-point constraints.

            Not collective.

            See also:
                DMPlex, DMPlex.getAdjacency, DMPlex.distribute, DMPlexGetAdjacencyUseAnchors <https://petsc.org/release/manualpages/DMPlex/DMPlexGetAdjacencyUseAnchors.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1585 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1585>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        getCellNumbering()
            Return a global cell numbering for all cells on this process.

            Collective the first time it is called.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getVertexNumbering, DMPlexGetCellNumbering <https://petsc.org/release/manualpages/DMPlex/DMPlexGetCellNumbering.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1018 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1018>

            Return type
                IS <#petsc4py.PETSc.IS>

        getCellType(p)
            Return the polytope type of a given cell.

            Not collective.

            Parameters
                p (int <https://docs.python.org/3/library/functions.html#int>) -- The cell.

            Return type
                PolytopeType <#petsc4py.PETSc.DM.PolytopeType>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.PolytopeType <#petsc4py.PETSc.DM.PolytopeType>, DMPlex.getCellTypeLabel, DMPlex.getDepth, DMPlexGetCellType <https://petsc.org/release/manualpages/DMPlex/DMPlexGetCellType.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:780 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L780>

        getCellTypeLabel()
            Return the DMLabel <#petsc4py.PETSc.DMLabel> recording the polytope type of each cell.

            Not collective.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getCellType, DM.createLabel <#petsc4py.PETSc.DM.createLabel>, DMPlexGetCellTypeLabel <https://petsc.org/release/manualpages/DMPlex/DMPlexGetCellTypeLabel.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:801 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L801>

            Return type
                DMLabel <#petsc4py.PETSc.DMLabel>

        getChart()
            Return the interval for all mesh points [pStart, pEnd).

            Not collective.

            Returns

                •   pStart (int <https://docs.python.org/3/library/functions.html#int>) -- The first mesh point.

                •   pEnd (int <https://docs.python.org/3/library/functions.html#int>) -- The upper bound for mesh points.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.setChart, DMPlexGetChart <https://petsc.org/release/manualpages/DMPlex/DMPlexGetChart.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:495 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L495>

        getCone(p)
            Return the points on the in-edges for this point in the DAG.

            Not collective.

            Parameters
                p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart.

            Return type
                ArrayInt <#petsc4py.typing.ArrayInt>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getConeSize, DMPlex.setCone, DMPlex.setChart, DMPlexGetCone <https://petsc.org/release/manualpages/DMPlex/DMPlexGetCone.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:586 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L586>

        getConeOrientation(p)
            Return the orientations on the in-edges for this point in the DAG.

            Not collective.

            Parameters
                p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart.

            Return type
                ArrayInt <#petsc4py.typing.ArrayInt>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.getCone, DMPlex.setCone, DMPlex.setChart, DMPlexGetConeOrientation <https://petsc.org/release/manualpages/DMPlex/DMPlexGetConeOrientation.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:701 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L701>

        getConeSize(p)
            Return the number of in-edges for this point in the DAG.

            Not collective.

            Parameters
                p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.setConeSize, DMPlex.setChart, DMPlexGetConeSize <https://petsc.org/release/manualpages/DMPlex/DMPlexGetConeSize.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:537 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L537>

        getDepth()
            Return the depth of the DAG representing this mesh.

            Not collective.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getDepthStratum, DMPlex.symmetrize, DMPlexGetDepth <https://petsc.org/release/manualpages/DMPlex/DMPlexGetDepth.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1062 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1062>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getDepthStratum(svalue)
            Return the bounds [start, end) for all points at a certain depth.

            Not collective.

            Parameters
                svalue (int <https://docs.python.org/3/library/functions.html#int>) -- The requested depth.

            Returns

                •   pStart (int <https://docs.python.org/3/library/functions.html#int>) -- The first stratum point.

                •   pEnd (int <https://docs.python.org/3/library/functions.html#int>) -- The upper bound for stratum points.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getHeightStratum, DMPlex.getDepth, DMPlex.symmetrize, DMPlex.interpolate, DMPlexGetDepthStratum <https://petsc.org/release/manualpages/DMPlex/DMPlexGetDepthStratum.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1077 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1077>

        getFullJoin(points)
            Return an array for the join of the set of points.

            Not collective.

            Parameters
                points (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- The input points.

            Return type
                ArrayInt <#petsc4py.typing.ArrayInt>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getJoin, DMPlex.getMeet, DMPlexGetFullJoin <https://petsc.org/release/manualpages/DMPlex/DMPlexGetFullJoin.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1225 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1225>

        getHeightStratum(svalue)
            Return the bounds [start, end) for all points at a certain height.

            Not collective.

            Parameters
                svalue (int <https://docs.python.org/3/library/functions.html#int>) -- The requested height.

            Returns

                •   pStart (int <https://docs.python.org/3/library/functions.html#int>) -- The first stratum point.

                •   pEnd (int <https://docs.python.org/3/library/functions.html#int>) -- The upper bound for stratum points.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getDepthStratum, DMPlex.getDepth, DMPlexGetHeightStratum <https://petsc.org/release/manualpages/DMPlex/DMPlexGetHeightStratum.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1104 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1104>

        getJoin(points)
            Return an array for the join of the set of points.

            Not collective.

            Parameters
                points (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- The input points.

            Return type
                ArrayInt <#petsc4py.typing.ArrayInt>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getMeet, DMPlexGetJoin <https://petsc.org/release/manualpages/DMPlex/DMPlexGetJoin.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1199 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1199>

        getMaxSizes()
            Return the maximum number of in-edges and out-edges of the DAG.

            Not collective.

            Returns

                •   maxConeSize (int <https://docs.python.org/3/library/functions.html#int>) -- The maximum number of in-edges.

                •   maxSupportSize (int <https://docs.python.org/3/library/functions.html#int>) -- The maximum number of out-edges.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.setConeSize, DMPlex.setChart, DMPlexGetMaxSizes <https://petsc.org/release/manualpages/DMPlex/DMPlexGetMaxSizes.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:921 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L921>

        getMeet(points)
            Return an array for the meet of the set of points.

            Not collective.

            Parameters
                points (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- The input points.

            Return type
                ArrayInt <#petsc4py.typing.ArrayInt>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getJoin, DMPlexGetMeet <https://petsc.org/release/manualpages/DMPlex/DMPlexGetMeet.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1173 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1173>

        getMigrationSF()
            Get the SF <#petsc4py.PETSc.SF> for migrating from a parent DM <#petsc4py.PETSc.DM> into this DM <#petsc4py.PETSc.DM>.

            Not collective.

            See also:
                DMPlexGetMigrationSF <https://petsc.org/release/manualpages/DMPlex/DMPlexGetMigrationSF.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3658 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3658>

            Return type
                SF <#petsc4py.PETSc.SF>

        getMinRadius()
            Return the minimum distance from any cell centroid to a face.

            Not collective.

            See also:
                DMPlex, DM.getCoordinates <#petsc4py.PETSc.DM.getCoordinates>, DMPlexGetMinRadius <https://petsc.org/release/manualpages/DMPlex/DMPlexGetMinRadius.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1936 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1936>

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        getOrdering(otype)
            Calculate a reordering of the mesh.

            Collective.

            Parameters
                otype (OrderingType <#petsc4py.PETSc.Mat.OrderingType>) -- Type of reordering, see Mat.OrderingType <#petsc4py.PETSc.Mat.OrderingType>.

            Returns
                perm -- The point permutation.

            Return type
                IS <#petsc4py.PETSc.IS>

        See also:
                DMPlex, DMPlex.permute, Mat.OrderingType <#petsc4py.PETSc.Mat.OrderingType>, Mat.getOrdering <#petsc4py.PETSc.Mat.getOrdering>, DMPlexGetOrdering <https://petsc.org/release/manualpages/DMPlex/DMPlexGetOrdering.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2263 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2263>

        getPartitioner()
            Return the mesh partitioner.

            Not collective.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, Partitioner <#petsc4py.PETSc.Partitioner>, Section <#petsc4py.PETSc.Section>, DMPlex.distribute, DMPlex.setPartitioner, Partitioner.create <#petsc4py.PETSc.Partitioner.create>, PetscPartitionerDMPlexPartition <https://petsc.org/release/manualpages/DMPlex/PetscPartitionerDMPlexPartition.html>, DMPlexGetPartitioner <https://petsc.org/release/manualpages/DMPlex/DMPlexGetPartitioner.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1643 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1643>

            Return type
                Partitioner <#petsc4py.PETSc.Partitioner>

        getPointDepth(point)
            Return the depth of a given point.

            Not collective.

            Parameters
                point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getDepthStratum, DMPlex.getDepth, DMPlexGetPointDepth <https://petsc.org/release/manualpages/DMPlex/DMPlexGetPointDepth.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1131 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1131>

        getPointGlobal(point)
            Return location of point data in global Vec <#petsc4py.PETSc.Vec>.

            Not collective.

            Parameters
                point (int <https://docs.python.org/3/library/functions.html#int>) -- The topological point.

            Returns

                •   start (int <https://docs.python.org/3/library/functions.html#int>) -- Start of point data; returns -(globalStart+1) if point is not owned.

                •   end (int <https://docs.python.org/3/library/functions.html#int>) -- End of point data; returns -(globalEnd+1) if point is not owned.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getPointGlobalField, Section.getOffset <#petsc4py.PETSc.Section.getOffset>, Section.getDof <#petsc4py.PETSc.Section.getDof>, DMPlex.getPointLocal, DMPlexGetPointGlobal <https://petsc.org/release/manualpages/DMPlex/DMPlexGetPointGlobal.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2105 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2105>

        getPointGlobalField(point, field)
            Return location of point field data in global Vec <#petsc4py.PETSc.Vec>.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The topological point.

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

            Returns

                •   start (int <https://docs.python.org/3/library/functions.html#int>) -- Start of point data; returns -(globalStart+1) if point is not owned.

                •   end (int <https://docs.python.org/3/library/functions.html#int>) -- End of point data; returns -(globalEnd+1) if point is not owned.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getPointGlobal, Section.getOffset <#petsc4py.PETSc.Section.getOffset>, Section.getDof <#petsc4py.PETSc.Section.getDof>, DMPlex.getPointLocal, DMPlexGetPointGlobalField <https://petsc.org/release/manualpages/DMPlex/DMPlexGetPointGlobalField.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2133 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2133>

        getPointHeight(point)
            Return the height of a given point.

            Not collective.

            Parameters
                point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getHeightStratum, DMPlexGetPointHeight <https://petsc.org/release/manualpages/DMPlex/DMPlexGetPointHeight.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1152 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1152>

        getPointLocal(point)
            Return location of point data in local Vec <#petsc4py.PETSc.Vec>.

            Not collective.

            Parameters
                point (int <https://docs.python.org/3/library/functions.html#int>) -- The topological point.

            Returns

                •   start (int <https://docs.python.org/3/library/functions.html#int>) -- Start of point data.

                •   end (int <https://docs.python.org/3/library/functions.html#int>) -- End of point data.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getPointLocalField, Section.getOffset <#petsc4py.PETSc.Section.getOffset>, Section.getDof <#petsc4py.PETSc.Section.getDof>, DMPlexGetPointLocal <https://petsc.org/release/manualpages/DMPlex/DMPlexGetPointLocal.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2046 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2046>

        getPointLocalField(point, field)
            Return location of point field data in local Vec <#petsc4py.PETSc.Vec>.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The topological point.

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

            Returns

                •   start (int <https://docs.python.org/3/library/functions.html#int>) -- Start of point data.

                •   end (int <https://docs.python.org/3/library/functions.html#int>) -- End of point data.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getPointLocal, Section.getOffset <#petsc4py.PETSc.Section.getOffset>, DMPlexGetPointLocalField <https://petsc.org/release/manualpages/DMPlex/DMPlexGetPointLocalField.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2074 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2074>

        getRefinementLimit()
            Retrieve the maximum cell volume for refinement.

            Not collective.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.refine <#petsc4py.PETSc.DM.refine>, DMPlex.setRefinementLimit, DMPlex.getRefinementUniform, DMPlex.setRefinementUniform, DMPlexGetRefinementLimit <https://petsc.org/release/manualpages/DMPlex/DMPlexGetRefinementLimit.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2247 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2247>

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        getRefinementUniform()
            Retrieve the flag for uniform refinement.

            Not collective.

            Returns
                refinementUniform -- The flag for uniform refinement.

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.refine <#petsc4py.PETSc.DM.refine>, DMPlex.setRefinementUniform, DMPlex.getRefinementLimit, DMPlex.setRefinementLimit, DMPlexGetRefinementUniform <https://petsc.org/release/manualpages/DMPlex/DMPlexGetRefinementUniform.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2206 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2206>

        getSubpointIS()
            Return an IS <#petsc4py.PETSc.IS> covering the entire subdm chart.

            Not collective.

            Returns
                iset -- The IS <#petsc4py.PETSc.IS> containing subdm's parent's points.

            Return type
                IS <#petsc4py.PETSc.IS>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlexGetSubpointIS <https://petsc.org/release/manualpages/DMPlex/DMPlexGetSubpointIS.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2411 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2411>

        getSubpointMap()
            Return a DMLabel <#petsc4py.PETSc.DMLabel> with point dimension as values.

            Not collective.

            Returns
                label -- The DMLabel <#petsc4py.PETSc.DMLabel> whose values are subdm's point dimensions.

            Return type
                DMLabel <#petsc4py.PETSc.DMLabel>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlexGetSubpointMap <https://petsc.org/release/manualpages/DMPlex/DMPlexGetSubpointMap.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2431 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2431>

        getSupport(p)
            Return the points on the out-edges for this point in the DAG.

            Not collective.

            Parameters
                p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart.

            Return type
                ArrayInt <#petsc4py.typing.ArrayInt>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getSupportSize, DMPlex.setSupport, DMPlex.getCone, DMPlex.setChart, DMPlexGetSupport <https://petsc.org/release/manualpages/DMPlex/DMPlexGetSupport.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:866 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L866>

        getSupportSize(p)
            Return the number of out-edges for this point in the DAG.

            Not collective.

            Parameters
                p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.setConeSize, DMPlex.setChart, DMPlex.getConeSize, DMPlexGetSupportSize <https://petsc.org/release/manualpages/DMPlex/DMPlexGetSupportSize.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:817 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L817>

        getTransitiveClosure(p, useCone=True)
            Return the points and orientations on the transitive closure of this point.

            Not collective.

            Parameters

                •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The mesh point.

                •   useCone (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- True <https://docs.python.org/3/library/constants.html#True> for the closure, otherwise return the star.

            Returns

                •   points (ArrayInt <#petsc4py.typing.ArrayInt>) -- The points.

                •   orientations (ArrayInt <#petsc4py.typing.ArrayInt>) -- The orientations.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayInt <#petsc4py.typing.ArrayInt>, ArrayInt <#petsc4py.typing.ArrayInt>]

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.setCone, DMPlex.setChart, DMPlex.getCone, DMPlexGetTransitiveClosure <https://petsc.org/release/manualpages/DMPlex/DMPlexGetTransitiveClosure.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1251 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1251>

        getVecClosure(sec, vec, point)
            Return an array of the values on the closure of a point.

            Not collective.

            Parameters

                •   sec (Section <#petsc4py.PETSc.Section>) -- The Section <#petsc4py.PETSc.Section> describing the layout in vec or None <https://docs.python.org/3/library/constants.html#None> to use the default section.

                •   vec (Vec <#petsc4py.PETSc.Vec>) -- The local vector.

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point in the DMPlex.

            Return type
                ArrayScalar <#petsc4py.typing.ArrayScalar>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlexVecRestoreClosure <https://petsc.org/release/manualpages/DMPlex/DMPlexVecRestoreClosure.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1318 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1318>

        getVertexNumbering()
            Return a global vertex numbering for all vertices on this process.

            Collective the first time it is called.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getCellNumbering, DMPlexGetVertexNumbering <https://petsc.org/release/manualpages/DMPlex/DMPlexGetVertexNumbering.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1033 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1033>

            Return type
                IS <#petsc4py.PETSc.IS>

        globalToNaturalBegin(gv, nv)
            Rearrange a Vec <#petsc4py.PETSc.Vec> in the Global order to the natural order.

            Collective.

            See also:
                DMPlexGlobalToNaturalBegin <https://petsc.org/release/manualpages/DMPlex/DMPlexGlobalToNaturalBegin.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3622 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3622>

            Parameters

                •   gv (Vec <#petsc4py.PETSc.Vec>)

                •   nv (Vec <#petsc4py.PETSc.Vec>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        globalToNaturalEnd(gv, nv)
            Rearrange a Vec <#petsc4py.PETSc.Vec> in the Global order to the natural order.

            Collective.

            See also:
                DMPlexGlobalToNaturalEnd <https://petsc.org/release/manualpages/DMPlex/DMPlexGlobalToNaturalEnd.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3634 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3634>

            Parameters

                •   gv (Vec <#petsc4py.PETSc.Vec>)

                •   nv (Vec <#petsc4py.PETSc.Vec>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        globalVectorLoad(viewer, sectiondm, sf, vec)
            Load on-disk vector data into a global vector.

            Collective.

            Parameters

                •   viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> that represents the on-disk vector data.

                •   sectiondm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM> that contains the global section on which vec is defined.

                •   sf (SF <#petsc4py.PETSc.SF>) -- The SF <#petsc4py.PETSc.SF> that migrates the on-disk vector data into vec.

                •   vec (Vec <#petsc4py.PETSc.Vec>) -- The global vector to set values of.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.topologyLoad, DMPlex.sectionLoad, DMPlex.localVectorLoad, DMPlex.globalVectorView, DMPlex.localVectorView, SF <#petsc4py.PETSc.SF>, Viewer <#petsc4py.PETSc.Viewer>, DMPlexGlobalVectorLoad <https://petsc.org/release/manualpages/DMPlex/DMPlexGlobalVectorLoad.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3534 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3534>

        globalVectorView(viewer, sectiondm, vec)
            Save a global vector.

            Collective.

            Parameters

                •   viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> to save data with.

                •   sectiondm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM> containing the global section on which vec is defined; may be the same as this DMPlex object.

                •   vec (Vec <#petsc4py.PETSc.Vec>) -- The global vector to be saved.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.topologyView, DMPlex.sectionView, DMPlex.localVectorView, DMPlex.globalVectorLoad, DMPlex.localVectorLoad, DMPlexGlobalVectorView <https://petsc.org/release/manualpages/DMPlex/DMPlexGlobalVectorView.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3381 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3381>

        insertCone(p, conePos, conePoint)
            DMPlexInsertCone - Insert a point into the in-edges for the point p in the DAG.

            Not collective.

            Parameters

                •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart.

                •   conePos (int <https://docs.python.org/3/library/functions.html#int>) -- The local index in the cone where the point should be put.

                •   conePoint (int <https://docs.python.org/3/library/functions.html#int>) -- The mesh point to insert.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.getCone, DMPlex.setChart, DMPlex.setConeSize, DM.setUp <#petsc4py.PETSc.DM.setUp>, DMPlexInsertCone <https://petsc.org/release/manualpages/DMPlex/DMPlexInsertCone.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:651 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L651>

        insertConeOrientation(p, conePos, coneOrientation)
            Insert a point orientation for the in-edge for the point p in the DAG.

            Not collective.

            Parameters

                •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart

                •   conePos (int <https://docs.python.org/3/library/functions.html#int>) -- The local index in the cone where the point should be put.

                •   coneOrientation (int <https://docs.python.org/3/library/functions.html#int>) -- The point orientation to insert.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.getCone, DMPlex.setChart, DMPlex.setConeSize, DM.setUp <#petsc4py.PETSc.DM.setUp>, DMPlexInsertConeOrientation <https://petsc.org/release/manualpages/DMPlex/DMPlexInsertConeOrientation.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:676 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L676>

        interpolate()
            Convert to a mesh with all intermediate faces, edges, etc.

            Collective.

            See also:
                DMPlex, DMPlex.uninterpolate, DMPlex.createFromCellList, DMPlexInterpolate <https://petsc.org/release/manualpages/DMPlex/DMPlexInterpolate.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1861 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1861>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        isDistributed()
            Return the flag indicating if the mesh is distributed.

            Collective.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.distribute, DMPlexIsDistributed <https://petsc.org/release/manualpages/DMPlex/DMPlexIsDistributed.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1751 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1751>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        isSimplex()
            Return the flag indicating if the first cell is a simplex.

            Not collective.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getCellType, DMPlex.getHeightStratum, DMPlexIsSimplex <https://petsc.org/release/manualpages/DMPlex/DMPlexIsSimplex.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1765 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1765>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        labelCohesiveComplete(label, bdlabel, bdvalue, flip, split, subdm)
            Add all other mesh pieces to complete the surface.

            Not collective.

            Parameters

                •   label (DMLabel <#petsc4py.PETSc.DMLabel>) -- A DMLabel <#petsc4py.PETSc.DMLabel> marking the surface.

                •   bdlabel (DMLabel <#petsc4py.PETSc.DMLabel>) -- A DMLabel <#petsc4py.PETSc.DMLabel> marking the vertices on the boundary which will not be duplicated.

                •   bdvalue (int <https://docs.python.org/3/library/functions.html#int>) -- Value of DMLabel <#petsc4py.PETSc.DMLabel> marking the vertices on the boundary.

                •   flip (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag to flip the submesh normal and replace points on the other side.

                •   split (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag to split faces incident on the surface boundary, rather than clamping those faces to the boundary

                •   subdm (DMPlex <#petsc4py.PETSc.DMPlex>) -- The DMPlex associated with the label.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.labelComplete, DMPlexLabelCohesiveComplete <https://petsc.org/release/manualpages/DMPlex/DMPlexLabelCohesiveComplete.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1529 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1529>

        labelComplete(label)
            Add the transitive closure to the surface.

            Not collective.

            Parameters
                label (DMLabel <#petsc4py.PETSc.DMLabel>) -- A DMLabel <#petsc4py.PETSc.DMLabel> marking the surface points.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.labelCohesiveComplete, DMPlexLabelComplete <https://petsc.org/release/manualpages/DMPlex/DMPlexLabelComplete.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1512 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1512>

        labelsLoad(viewer, sfxc)
            Load labels into this DMPlex object.

            Collective.

            Parameters

                •   viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> for the saved labels.

                •   sfxc (SF <#petsc4py.PETSc.SF>) -- The SF <#petsc4py.PETSc.SF> returned by topologyLoad.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.load <#petsc4py.PETSc.DM.load>, DMPlex.topologyLoad, DMPlex.coordinatesLoad, DM.view <#petsc4py.PETSc.DM.view>, SF <#petsc4py.PETSc.SF>, Viewer <#petsc4py.PETSc.Viewer>, DMPlexLabelsLoad <https://petsc.org/release/manualpages/DMPlex/DMPlexLabelsLoad.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3477 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3477>

        labelsView(viewer)
            Save DMPlex labels into a file.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> for saving.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.view <#petsc4py.PETSc.DM.view>, DMPlex.topologyView, DMPlex.coordinatesView, DMPlex.labelsLoad, Viewer <#petsc4py.PETSc.Viewer>, DMPlexLabelsView <https://petsc.org/release/manualpages/DMPlex/DMPlexLabelsView.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3342 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3342>

        localVectorLoad(viewer, sectiondm, sf, vec)
            Load on-disk vector data into a local vector.

            Collective.

            Parameters

                •   viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> that represents the on-disk vector data.

                •   sectiondm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM> that contains the local section on which vec is defined.

                •   sf (SF <#petsc4py.PETSc.SF>) -- The SF <#petsc4py.PETSc.SF> that migrates the on-disk vector data into vec.

                •   vec (Vec <#petsc4py.PETSc.Vec>) -- The local vector to set values of.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.topologyLoad, DMPlex.sectionLoad, DMPlex.globalVectorLoad, DMPlex.globalVectorView, DMPlex.localVectorView, SF <#petsc4py.PETSc.SF>, Viewer <#petsc4py.PETSc.Viewer>, DMPlexLocalVectorLoad <https://petsc.org/release/manualpages/DMPlex/DMPlexLocalVectorLoad.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3559 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3559>

        localVectorView(viewer, sectiondm, vec)
            Save a local vector.

            Collective.

            Parameters

                •   viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> to save data with.

                •   sectiondm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM> that contains the local section on which vec is defined; may be the same as this DMPlex object.

                •   vec (Vec <#petsc4py.PETSc.Vec>) -- The local vector to be saved.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.topologyView, DMPlex.sectionView, DMPlex.globalVectorView, DMPlex.globalVectorLoad, DMPlex.localVectorLoad, DMPlexLocalVectorView <https://petsc.org/release/manualpages/DMPlex/DMPlexLocalVectorView.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3405 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3405>

        markBoundaryFaces(label, value=None)
            Mark all faces on the boundary.

            Not collective.

            Parameters

                •   value (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The marker value, or DETERMINE <#petsc4py.PETSc.DETERMINE> or None <https://docs.python.org/3/library/constants.html#None> to use some value in the closure (or 1 if none are found).

                •   label (str <https://docs.python.org/3/library/stdtypes.html#str>)

            Return type
                DMLabel <#petsc4py.PETSc.DMLabel>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMLabel.create <#petsc4py.PETSc.DMLabel.create>, DM.createLabel <#petsc4py.PETSc.DM.createLabel>, DMPlexMarkBoundaryFaces <https://petsc.org/release/manualpages/DMPlex/DMPlexMarkBoundaryFaces.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1485 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1485>

        metricAverage2(metric1, metric2, metricAvg)
            Compute and return the unweighted average of two metrics.

            Collective.

            Parameters

                •   metric1 (Vec <#petsc4py.PETSc.Vec>) -- The first metric to be averaged.

                •   metric2 (Vec <#petsc4py.PETSc.Vec>) -- The second metric to be averaged.

                •   metricAvg (Vec <#petsc4py.PETSc.Vec>) -- The output averaged metric.

            Return type
                Vec <#petsc4py.PETSc.Vec>

        See also:
                DMPlex.metricAverage3, DMPlexMetricAverage2 <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricAverage2.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3192 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3192>

        metricAverage3(metric1, metric2, metric3, metricAvg)
            Compute and return the unweighted average of three metrics.

            Collective.

            Parameters

                •   metric1 (Vec <#petsc4py.PETSc.Vec>) -- The first metric to be averaged.

                •   metric2 (Vec <#petsc4py.PETSc.Vec>) -- The second metric to be averaged.

                •   metric3 (Vec <#petsc4py.PETSc.Vec>) -- The third metric to be averaged.

                •   metricAvg (Vec <#petsc4py.PETSc.Vec>) -- The output averaged metric.

            Return type
                Vec <#petsc4py.PETSc.Vec>

        See also:
                DMPlex.metricAverage2, DMPlexMetricAverage3 <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricAverage3.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3214 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3214>

        metricCreate(field=0)
            Create a Riemannian metric field.

            Collective.

            Parameters
                field (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The field number to use.

            Return type
                Vec <#petsc4py.PETSc.Vec>

        See also:
                DMPlex.metricCreateUniform, DMPlex.metricCreateIsotropic, Working with PETSc options <#petsc-options>, DMPlexMetricCreate <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricCreate.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3023 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3023>

        metricCreateIsotropic(indicator, field=0)
            Construct an isotropic metric from an error indicator.

            Collective.

            Parameters

                •   indicator (Vec <#petsc4py.PETSc.Vec>) -- The error indicator.

                •   field (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The field number to use.

            Return type
                Vec <#petsc4py.PETSc.Vec>

        See also:
                DMPlex.metricCreate, DMPlex.metricCreateUniform, DMPlexMetricCreateIsotropic <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricCreateIsotropic.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3068 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3068>

        metricCreateUniform(alpha, field=0)
            Construct a uniform isotropic metric.

            Collective.

            Parameters

                •   alpha (float <https://docs.python.org/3/library/functions.html#float>) -- Scaling parameter for the diagonal.

                •   field (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The field number to use.

            Return type
                Vec <#petsc4py.PETSc.Vec>

        See also:
                DMPlex.metricCreate, DMPlex.metricCreateIsotropic, DMPlexMetricCreateUniform <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricCreateUniform.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3044 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3044>

        metricDeterminantCreate(field=0)
            Create the determinant field for a Riemannian metric.

            Collective.

            Parameters
                field (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The field number to use.

            Returns

                •   determinant (Vec <#petsc4py.PETSc.Vec>) -- The determinant field.

                •   dmDet (DM <#petsc4py.PETSc.DM>) -- The corresponding DM

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, DM <#petsc4py.PETSc.DM>]

        See also:
                DMPlex.metricCreateUniform, DMPlex.metricCreateIsotropic, DMPlex.metricCreate, DMPlexMetricDeterminantCreate <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricDeterminantCreate.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3091 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3091>

        metricEnforceSPD(metric, ometric, determinant, restrictSizes=False, restrictAnisotropy=False)
            Enforce symmetric positive-definiteness of a metric.

            Collective.

            Parameters

                •   metric (Vec <#petsc4py.PETSc.Vec>) -- The metric.

                •   ometric (Vec <#petsc4py.PETSc.Vec>) -- The output metric.

                •   determinant (Vec <#petsc4py.PETSc.Vec>) -- The output determinant.

                •   restrictSizes (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag indicating whether maximum/minimum magnitudes should be enforced.

                •   restrictAnisotropy (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag indicating whether maximum anisotropy should be enforced.

            Returns

                •   ometric (Vec <#petsc4py.PETSc.Vec>) -- The output metric.

                •   determinant (Vec <#petsc4py.PETSc.Vec>) -- The output determinant.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>]

        See also:
                DMPlex.metricNormalize, DMPlex.metricIntersection2, DMPlex.metricIntersection3, Working with PETSc options <#petsc-options>, DMPlexMetricEnforceSPD <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricEnforceSPD.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3120 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3120>

        metricGetGradationFactor()
            Return the metric gradation factor.

            Not collective.

            See also:
                DMPlex.metricSetGradationFactor, DMPlex.metricGetHausdorffNumber, DMPlexMetricGetGradationFactor <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricGetGradationFactor.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2974 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2974>

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        metricGetHausdorffNumber()
            Return the metric Hausdorff number.

            Not collective.

            See also:
                DMPlex.metricGetGradationFactor, DMPlex.metricSetHausdorffNumber, DMPlexMetricGetHausdorffNumber <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricGetHausdorffNumber.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3008 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3008>

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        metricGetMaximumAnisotropy()
            Return the maximum tolerated metric anisotropy.

            Not collective.

            See also:
                DMPlex.metricSetMaximumAnisotropy, DMPlex.metricGetMaximumMagnitude, DMPlexMetricGetMaximumAnisotropy <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricGetMaximumAnisotropy.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2872 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2872>

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        metricGetMaximumMagnitude()
            Return the maximum tolerated metric magnitude.

            Not collective.

            See also:
                DMPlex.metricSetMaximumMagnitude, DMPlex.metricGetMinimumMagnitude, DMPlexMetricGetMaximumMagnitude <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricGetMaximumMagnitude.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2838 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2838>

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        metricGetMinimumMagnitude()
            Return the minimum tolerated metric magnitude.

            Not collective.

            See also:
                DMPlex.metricSetMinimumMagnitude, DMPlex.metricGetMaximumMagnitude, DMPlexMetricGetMinimumMagnitude <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricGetMinimumMagnitude.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2804 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2804>

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        metricGetNormalizationOrder()
            Return the order p for L-p normalization.

            Not collective.

            See also:
                DMPlex.metricSetNormalizationOrder, DMPlex.metricGetTargetComplexity, DMPlexMetricGetNormalizationOrder <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricGetNormalizationOrder.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2940 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2940>

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        metricGetNumIterations()
            Return the number of parallel adaptation iterations.

            Not collective.

            See also:
                DMPlex.metricSetNumIterations, DMPlex.metricGetVerbosity, DMPlexMetricGetNumIterations <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricGetNumIterations.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2770 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2770>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        metricGetTargetComplexity()
            Return the target metric complexity.

            Not collective.

            See also:
                DMPlex.metricSetTargetComplexity, DMPlex.metricGetNormalizationOrder, DMPlexMetricGetTargetComplexity <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricGetTargetComplexity.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2906 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2906>

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        metricGetVerbosity()
            Return the verbosity of the mesh adaptation package.

            Not collective.

            Returns
                verbosity -- The verbosity, where -1 is silent and 10 is maximum.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                DMPlex.metricSetVerbosity, DMPlex.metricGetNumIterations, DMPlexMetricGetVerbosity <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricGetVerbosity.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2731 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2731>

        metricIntersection2(metric1, metric2, metricInt)
            Compute and return the intersection of two metrics.

            Collective.

            Parameters

                •   metric1 (Vec <#petsc4py.PETSc.Vec>) -- The first metric to be intersected.

                •   metric2 (Vec <#petsc4py.PETSc.Vec>) -- The second metric to be intersected.

                •   metricInt (Vec <#petsc4py.PETSc.Vec>) -- The output intersected metric.

            Return type
                Vec <#petsc4py.PETSc.Vec>

        See also:
                DMPlex.metricIntersection3, DMPlexMetricIntersection2 <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricIntersection2.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3238 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3238>

        metricIntersection3(metric1, metric2, metric3, metricInt)
            Compute the intersection of three metrics.

            Collective.

            Parameters

                •   metric1 (Vec <#petsc4py.PETSc.Vec>) -- The first metric to be intersected.

                •   metric2 (Vec <#petsc4py.PETSc.Vec>) -- The second metric to be intersected.

                •   metric3 (Vec <#petsc4py.PETSc.Vec>) -- The third metric to be intersected.

                •   metricInt (Vec <#petsc4py.PETSc.Vec>) -- The output intersected metric.

            Return type
                Vec <#petsc4py.PETSc.Vec>

        See also:
                DMPlex.metricIntersection2, DMPlexMetricIntersection3 <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricIntersection3.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3260 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3260>

        metricIsIsotropic()
            Return the flag indicating whether the metric is isotropic or not.

            Not collective.

            See also:
                DMPlex.metricSetIsotropic, DMPlex.metricIsUniform, DMPlex.metricRestrictAnisotropyFirst, DMPlexMetricIsIsotropic <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricIsIsotropic.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2519 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2519>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        metricIsUniform()
            Return the flag indicating whether the metric is uniform or not.

            Not collective.

            See also:
                DMPlex.metricSetUniform, DMPlex.metricRestrictAnisotropyFirst, DMPlexMetricIsUniform <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricIsUniform.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2485 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2485>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        metricNoInsertion()
            Return the flag indicating whether node insertion and deletion are turned off.

            Not collective.

            See also:
                DMPlex.metricSetNoInsertion, DMPlex.metricNoSwapping, DMPlex.metricNoMovement, DMPlex.metricNoSurf, DMPlexMetricNoInsertion <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricNoInsertion.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2588 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2588>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        metricNoMovement()
            Return the flag indicating whether node movement is turned off.

            Not collective.

            See also:
                DMPlex.metricSetNoMovement, DMPlex.metricNoInsertion, DMPlex.metricNoSwapping, DMPlex.metricNoSurf, DMPlexMetricNoMovement <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricNoMovement.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2660 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2660>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        metricNoSurf()
            Return the flag indicating whether surface modification is turned off.

            Not collective.

            See also:
                DMPlex.metricSetNoSurf, DMPlex.metricNoMovement, DMPlex.metricNoInsertion, DMPlex.metricNoSwapping, DMPlexMetricNoSurf <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricNoSurf.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2696 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2696>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        metricNoSwapping()
            Return the flag indicating whether facet swapping is turned off.

            Not collective.

            See also:
                DMPlex.metricSetNoSwapping, DMPlex.metricNoInsertion, DMPlex.metricNoMovement, DMPlex.metricNoSurf, DMPlexMetricNoSwapping <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricNoSwapping.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2624 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2624>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        metricNormalize(metric, ometric, determinant, restrictSizes=True, restrictAnisotropy=True)
            Apply L-p normalization to a metric.

            Collective.

            Parameters

                •   metric (Vec <#petsc4py.PETSc.Vec>) -- The metric.

                •   ometric (Vec <#petsc4py.PETSc.Vec>) -- The output metric.

                •   determinant (Vec <#petsc4py.PETSc.Vec>) -- The output determinant.

                •   restrictSizes (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag indicating whether maximum/minimum magnitudes should be enforced.

                •   restrictAnisotropy (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag indicating whether maximum anisotropy should be enforced.

            Returns

                •   ometric (Vec <#petsc4py.PETSc.Vec>) -- The output normalized metric.

                •   determinant (Vec <#petsc4py.PETSc.Vec>) -- The output determinant.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>]

        See also:
                DMPlex.metricEnforceSPD, DMPlex.metricIntersection2, DMPlex.metricIntersection3, Working with PETSc options <#petsc-options>, DMPlexMetricNormalize <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricNormalize.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3156 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3156>

        metricRestrictAnisotropyFirst()
            Return true if anisotropy is restricted before normalization.

            Not collective.

            See also:
                DMPlex.metricIsIsotropic, DMPlex.metricSetRestrictAnisotropyFirst, DMPlexMetricRestrictAnisotropyFirst <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricRestrictAnisotropyFirst.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2553 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2553>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        metricSetFromOptions()
            Configure the object from the options database.

            Collective.

            See also:
                Working with PETSc options <#petsc-options>

        Source code at petsc4py/PETSc/DMPlex.pyx:2453 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2453>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        metricSetGradationFactor(beta)
            Set the metric gradation factor.

            Logically collective.

            Parameters
                beta (float <https://docs.python.org/3/library/functions.html#float>) -- The metric gradation factor.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricGetGradationFactor, DMPlex.metricSetHausdorffNumber, DMPlexMetricSetGradationFactor <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetGradationFactor.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2955 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2955>

        metricSetHausdorffNumber(hausd)
            Set the metric Hausdorff number.

            Logically collective.

            Parameters
                hausd (float <https://docs.python.org/3/library/functions.html#float>) -- The metric Hausdorff number.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricSetGradationFactor, DMPlex.metricGetHausdorffNumber, DMPlexMetricSetHausdorffNumber <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetHausdorffNumber.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2989 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2989>

        metricSetIsotropic(isotropic)
            Record whether the metric is isotropic or not.

            Logically collective.

            Parameters
                isotropic (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating whether the metric is isotropic or not.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricIsIsotropic, DMPlex.metricSetUniform, DMPlex.metricSetRestrictAnisotropyFirst, DMPlexMetricSetIsotropic <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetIsotropic.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2500 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2500>

        metricSetMaximumAnisotropy(a_max)
            Set the maximum tolerated metric anisotropy.

            Logically collective.

            Parameters
                a_max (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum tolerated metric anisotropy.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricGetMaximumAnisotropy, DMPlex.metricSetMaximumMagnitude, DMPlexMetricSetMaximumAnisotropy <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetMaximumAnisotropy.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2853 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2853>

        metricSetMaximumMagnitude(h_max)
            Set the maximum tolerated metric magnitude.

            Logically collective.

            Parameters
                h_max (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum tolerated metric magnitude.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricGetMaximumMagnitude, DMPlex.metricSetMinimumMagnitude, DMPlexMetricSetMaximumMagnitude <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetMaximumMagnitude.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2819 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2819>

        metricSetMinimumMagnitude(h_min)
            Set the minimum tolerated metric magnitude.

            Logically collective.

            Parameters
                h_min (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum tolerated metric magnitude.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricGetMinimumMagnitude, DMPlex.metricSetMaximumMagnitude, DMPlexMetricSetMinimumMagnitude <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetMinimumMagnitude.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2785 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2785>

        metricSetNoInsertion(noInsert)
            Set the flag indicating whether node insertion should be turned off.

            Logically collective.

            Parameters
                noInsert (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating whether node insertion and deletion should be turned off.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricNoInsertion, DMPlex.metricSetNoSwapping, DMPlex.metricSetNoMovement, DMPlex.metricSetNoSurf, DMPlexMetricSetNoInsertion <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetNoInsertion.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2568 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2568>

        metricSetNoMovement(noMove)
            Set the flag indicating whether node movement should be turned off.

            Logically collective.

            Parameters
                noMove (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating whether node movement should be turned off.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricNoMovement, DMPlex.metricSetNoInsertion, DMPlex.metricSetNoSwapping, DMPlex.metricSetNoSurf, DMPlexMetricSetNoMovement <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetNoMovement.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2640 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2640>

        metricSetNoSurf(noSurf)
            Set the flag indicating whether surface modification should be turned off.

            Logically collective.

            Parameters
                noSurf (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating whether surface modification should be turned off.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricNoSurf, DMPlex.metricSetNoMovement, DMPlex.metricSetNoInsertion, DMPlex.metricSetNoSwapping, DMPlexMetricSetNoSurf <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetNoSurf.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2676 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2676>

        metricSetNoSwapping(noSwap)
            Set the flag indicating whether facet swapping should be turned off.

            Logically collective.

            Parameters
                noSwap (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating whether facet swapping should be turned off.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricNoSwapping, DMPlex.metricSetNoInsertion, DMPlex.metricSetNoMovement, DMPlex.metricSetNoSurf, DMPlexMetricSetNoSwapping <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetNoSwapping.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2604 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2604>

        metricSetNormalizationOrder(p)
            Set the order p for L-p normalization.

            Logically collective.

            Parameters
                p (float <https://docs.python.org/3/library/functions.html#float>) -- The normalization order.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricGetNormalizationOrder, DMPlex.metricSetTargetComplexity, DMPlexMetricSetNormalizationOrder <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetNormalizationOrder.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2921 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2921>

        metricSetNumIterations(numIter)
            Set the number of parallel adaptation iterations.

            Logically collective.

            Parameters
                numIter (int <https://docs.python.org/3/library/functions.html#int>) -- The number of parallel adaptation iterations.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricSetVerbosity, DMPlex.metricGetNumIterations, DMPlexMetricSetNumIterations <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetNumIterations.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2751 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2751>

        metricSetRestrictAnisotropyFirst(restrictAnisotropyFirst)
            Record whether anisotropy is be restricted before normalization or after.

            Logically collective.

            Parameters
                restrictAnisotropyFirst (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating if anisotropy is restricted before normalization or after.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricSetIsotropic, DMPlex.metricRestrictAnisotropyFirst, DMPlexMetricSetRestrictAnisotropyFirst <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetRestrictAnisotropyFirst.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2534 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2534>

        metricSetTargetComplexity(targetComplexity)
            Set the target metric complexity.

            Logically collective.

            Parameters
                targetComplexity (float <https://docs.python.org/3/library/functions.html#float>) -- The target metric complexity.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricGetTargetComplexity, DMPlex.metricSetNormalizationOrder, DMPlexMetricSetTargetComplexity <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetTargetComplexity.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2887 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2887>

        metricSetUniform(uniform)
            Record whether the metric is uniform or not.

            Logically collective.

            Parameters
                uniform (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating whether the metric is uniform or not.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricIsUniform, DMPlex.metricSetIsotropic, DMPlex.metricSetRestrictAnisotropyFirst, DMPlexMetricSetUniform <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetUniform.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2466 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2466>

        metricSetVerbosity(verbosity)
            Set the verbosity of the mesh adaptation package.

            Logically collective.

            Parameters
                verbosity (int <https://docs.python.org/3/library/functions.html#int>) -- The verbosity, where -1 is silent and 10 is maximum.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.metricGetVerbosity, DMPlex.metricSetNumIterations, DMPlexMetricSetVerbosity <https://petsc.org/release/manualpages/DMPlex/DMPlexMetricSetVerbosity.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2712 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2712>

        migrateGlobalToNaturalSF(dmOld, sfNaturalOld, sfMigration)
            Create the SF <#petsc4py.PETSc.SF> for mapping Global Vec <#petsc4py.PETSc.Vec> to the Natural Vec <#petsc4py.PETSc.Vec> in the new DM <#petsc4py.PETSc.DM>.

            Collective.

            See also:
                DMPlexMigrateGlobalToNaturalSF <https://petsc.org/release/manualpages/DMPlex/DMPlexMigrateGlobalToNaturalSF.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3687 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3687>

            Parameters

                •   dmOld (DM <#petsc4py.PETSc.DM>)

                •   sfNaturalOld (SF <#petsc4py.PETSc.SF>)

                •   sfMigration (SF <#petsc4py.PETSc.SF>)

            Return type
                SF <#petsc4py.PETSc.SF>

        naturalToGlobalBegin(nv, gv)
            Rearrange a Vec <#petsc4py.PETSc.Vec> in the natural order to the Global order.

            Collective.

            See also:
                DMPlexNaturalToGlobalBegin <https://petsc.org/release/manualpages/DMPlex/DMPlexNaturalToGlobalBegin.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3598 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3598>

            Parameters

                •   nv (Vec <#petsc4py.PETSc.Vec>)

                •   gv (Vec <#petsc4py.PETSc.Vec>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        naturalToGlobalEnd(nv, gv)
            Rearrange a Vec <#petsc4py.PETSc.Vec> in the natural order to the Global order.

            Collective.

            See also:
                DMPlexNaturalToGlobalEnd <https://petsc.org/release/manualpages/DMPlex/DMPlexNaturalToGlobalEnd.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3610 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3610>

            Parameters

                •   nv (Vec <#petsc4py.PETSc.Vec>)

                •   gv (Vec <#petsc4py.PETSc.Vec>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        orient()
            Give a consistent orientation to the input mesh.

            Collective.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.create <#petsc4py.PETSc.DM.create>, DMPlexOrient <https://petsc.org/release/manualpages/DMPlex/DMPlexOrient.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:989 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L989>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        orientLabel(label)
            Give a consistent orientation to the hypersurface marked by a label.

            Collective.

            Parameters
                label (DMLabel <#petsc4py.PETSc.DMLabel>) -- The label marking the hypersurface.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.create <#petsc4py.PETSc.DM.create>, DMPlexOrientLabel <https://petsc.org/release/manualpages/DMPlex/DMPlexOrientLabel.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1001 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1001>

        orientPoint(p, o)
            Act with the given orientation on this mesh point.

            Not collective.

            Parameters

                •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The mesh point.

                •   o (int <https://docs.python.org/3/library/functions.html#int>) -- The orientation.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.create <#petsc4py.PETSc.DM.create>, DMPlexOrientPoint <https://petsc.org/release/manualpages/DMPlex/DMPlexOrientPoint.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:968 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L968>

        permute(perm)
            Reorder the mesh according to the input permutation.

            Collective.

            Parameters
                perm (IS <#petsc4py.PETSc.IS>) -- The point permutation, perm[old point number] = new point number.

            Returns
                pdm -- The permuted DMPlex.

            Return type
                DMPlex

        See also:
                DMPlex, Mat.permute <#petsc4py.PETSc.Mat.permute>, DMPlexPermute <https://petsc.org/release/manualpages/DMPlex/DMPlexPermute.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2291 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2291>

        rebalanceSharedPoints(entityDepth=0, useInitialGuess=True, parallel=True)
            Redistribute shared points in order to achieve better balancing.

            Collective.

            Parameters

                •   entityDepth (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Depth of the entity to balance (e.g., 0 -> balance vertices).

                •   useInitialGuess (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Whether to use the current distribution as initial guess.

                •   parallel (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Whether to use ParMETIS and do the partition in parallel or gather the graph onto a single process.

            Returns
                success -- Whether the graph partitioning was successful or not. Unsuccessful simply means no change to the partitioning.

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.distribute, Working with PETSc options <#petsc-options>, DMPlexRebalanceSharedPoints <https://petsc.org/release/manualpages/DMPlex/DMPlexRebalanceSharedPoints.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1660 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1660>

        reorderGetDefault()
            Return flag indicating whether the DMPlex should be reordered by default.

            Not collective.

            See also:
                None <https://docs.python.org/3/library/constants.html#None>, DMPlexReorderGetDefault <https://petsc.org/release/manualpages/DMPlex/DMPlexReorderGetDefault.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2315 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2315>

            Return type
                ReorderDefaultFlag <#petsc4py.PETSc.DM.ReorderDefaultFlag>

        reorderSetDefault(flag)
            Set flag indicating whether the DM should be reordered by default.

            Logically collective.

            Parameters

                •   reorder -- Flag for reordering.

                •   flag (ReorderDefaultFlag <#petsc4py.PETSc.DM.ReorderDefaultFlag>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex.reorderGetDefault, DMPlexReorderSetDefault <https://petsc.org/release/manualpages/DMPlex/DMPlexReorderSetDefault.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2329 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2329>

        sectionLoad(viewer, sectiondm, sfxc)
            Load section into a DM <#petsc4py.PETSc.DM>.

            Collective.

            Parameters

                •   viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> that represents the on-disk section (sectionA).

                •   sectiondm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM> into which the on-disk section (sectionA) is migrated.

                •   sfxc (SF <#petsc4py.PETSc.SF>) -- The SF <#petsc4py.PETSc.SF> returned by topologyLoad.

            Returns

                •   gsf (SF <#petsc4py.PETSc.SF>) -- The SF <#petsc4py.PETSc.SF> that migrates any on-disk Vec <#petsc4py.PETSc.Vec> data associated with sectionA into a global Vec <#petsc4py.PETSc.Vec> associated with the sectiondm's global section (None <https://docs.python.org/3/library/constants.html#None> if not needed).

                •   lsf (SF <#petsc4py.PETSc.SF>) -- The SF <#petsc4py.PETSc.SF> that migrates any on-disk Vec <#petsc4py.PETSc.Vec> data associated with sectionA into a local Vec <#petsc4py.PETSc.Vec> associated with the sectiondm's local section (None <https://docs.python.org/3/library/constants.html#None> if not needed).

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[SF <#petsc4py.PETSc.SF>, SF <#petsc4py.PETSc.SF>]

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.load <#petsc4py.PETSc.DM.load>, DMPlex.topologyLoad, DMPlex.coordinatesLoad, DMPlex.labelsLoad, DMPlex.globalVectorLoad, DMPlex.localVectorLoad, DMPlex.sectionView, SF <#petsc4py.PETSc.SF>, Viewer <#petsc4py.PETSc.Viewer>, DMPlexSectionLoad <https://petsc.org/release/manualpages/DMPlex/DMPlexSectionLoad.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3497 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3497>

        sectionView(viewer, sectiondm)
            Save a section associated with a DMPlex.

            Collective.

            Parameters

                •   viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> for saving.

                •   sectiondm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM> that contains the section to be saved.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.view <#petsc4py.PETSc.DM.view>, DMPlex.topologyView, DMPlex.coordinatesView, DMPlex.labelsView, DMPlex.globalVectorView, DMPlex.localVectorView, DMPlex.sectionLoad, Viewer <#petsc4py.PETSc.Viewer>, DMPlexSectionView <https://petsc.org/release/manualpages/DMPlex/DMPlexSectionView.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3360 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3360>

        setAdjacencyUseAnchors(useAnchors=True)
            Define adjacency in the mesh using the point-to-point constraints.

            Logically collective.

            Parameters
                useAnchors (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag to use the constraints. If True <https://docs.python.org/3/library/constants.html#True>, then constrained points are omitted from DMPlex.getAdjacency, and their anchor points appear in their place.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMPlex, DMPlex.getAdjacency, DMPlex.distribute, DMPlexSetAdjacencyUseAnchors <https://petsc.org/release/manualpages/DMPlex/DMPlexSetAdjacencyUseAnchors.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1564 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1564>

        setCellType(p, ctype)
            Set the polytope type of a given cell.

            Not collective.

            Parameters

                •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The cell.

                •   ctype (PolytopeType <#petsc4py.PETSc.DM.PolytopeType>) -- The polytope type of the cell.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.getCellTypeLabel, DMPlex.getDepth, DM.createLabel <#petsc4py.PETSc.DM.createLabel>, DMPlexSetCellType <https://petsc.org/release/manualpages/DMPlex/DMPlexSetCellType.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:758 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L758>

        setChart(pStart, pEnd)
            Set the interval for all mesh points [pStart, pEnd).

            Not collective.

            Parameters

                •   pStart (int <https://docs.python.org/3/library/functions.html#int>) -- The first mesh point.

                •   pEnd (int <https://docs.python.org/3/library/functions.html#int>) -- The upper bound for mesh points.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.getChart, DMPlexSetChart <https://petsc.org/release/manualpages/DMPlex/DMPlexSetChart.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:516 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L516>

        setCone(p, cone, orientation=None)
            Set the points on the in-edges for this point in the DAG.

            Not collective.

            Parameters

                •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart.

                •   cone (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- An array of points which are on the in-edges for point p.

                •   orientation (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- An array of orientations, defaults to None <https://docs.python.org/3/library/constants.html#None>.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.getCone, DMPlex.setChart, DMPlex.setConeSize, DM.setUp <#petsc4py.PETSc.DM.setUp>, DMPlex.setSupport, DMPlex.setSupportSize, DMPlexSetCone <https://petsc.org/release/manualpages/DMPlex/DMPlexSetCone.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:612 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L612>

        setConeOrientation(p, orientation)
            Set the orientations on the in-edges for this point in the DAG.

            Not collective.

            Parameters

                •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart.

                •   orientation (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- An array of orientations.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.getConeOrientation, DMPlex.setCone, DMPlex.setChart, DMPlex.setConeSize, DM.setUp <#petsc4py.PETSc.DM.setUp>, DMPlexSetConeOrientation <https://petsc.org/release/manualpages/DMPlex/DMPlexSetConeOrientation.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:727 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L727>

        setConeSize(p, size)
            Set the number of in-edges for this point in the DAG.

            Not collective.

            Parameters

                •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart.

                •   size (int <https://docs.python.org/3/library/functions.html#int>) -- The cone size for point p.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.getConeSize, DMPlex.setChart, DMPlexSetConeSize <https://petsc.org/release/manualpages/DMPlex/DMPlexSetConeSize.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:561 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L561>

        setMatClosure(sec, gsec, mat, point, values, addv=None)
            Set an array of the values on the closure of point.

            Not collective.

            Parameters

                •   sec (Section <#petsc4py.PETSc.Section>) -- The section describing the layout in mat, or None <https://docs.python.org/3/library/constants.html#None> to use the default section.

                •   gsec (Section <#petsc4py.PETSc.Section>) -- The section describing the layout in mat, or None <https://docs.python.org/3/library/constants.html#None> to use the default global section.

                •   mat (Mat <#petsc4py.PETSc.Mat>) -- The matrix.

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point in the DMPlex.

                •   values (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The array of values.

                •   mode -- The insertion mode.

                •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec> | None <https://docs.python.org/3/library/constants.html#None>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlexMatSetClosure <https://petsc.org/release/manualpages/DMPlex/DMPlexMatSetClosure.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1380 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1380>

        setMigrationSF(sf)
            Set the SF <#petsc4py.PETSc.SF> for migrating from a parent DM <#petsc4py.PETSc.DM> into this DM <#petsc4py.PETSc.DM>.

            Not collective.

            See also:
                DMPlexSetMigrationSF <https://petsc.org/release/manualpages/DMPlex/DMPlexSetMigrationSF.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3646 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3646>

            Parameters
                sf (SF <#petsc4py.PETSc.SF>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setPartitioner(part)
            Set the mesh partitioner.

            Logically collective.

            Parameters
                part (Partitioner <#petsc4py.PETSc.Partitioner>) -- The partitioner.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, Partitioner <#petsc4py.PETSc.Partitioner>, DMPlex.distribute, DMPlex.getPartitioner, Partitioner.create <#petsc4py.PETSc.Partitioner.create>, DMPlexSetPartitioner <https://petsc.org/release/manualpages/DMPlex/DMPlexSetPartitioner.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1625 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1625>

        setRefinementLimit(refinementLimit)
            Set the maximum cell volume for refinement.

            Logically collective.

            Parameters
                refinementLimit (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum cell volume in the refined mesh.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.refine <#petsc4py.PETSc.DM.refine>, DMPlex.getRefinementLimit, DMPlex.getRefinementUniform, DMPlex.setRefinementUniform, DMPlexSetRefinementLimit <https://petsc.org/release/manualpages/DMPlex/DMPlexSetRefinementLimit.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2227 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2227>

        setRefinementUniform(refinementUniform=True)
            Set the flag for uniform refinement.

            Logically collective.

            Parameters
                refinementUniform (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- The flag for uniform refinement.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.refine <#petsc4py.PETSc.DM.refine>, DMPlex.getRefinementUniform, DMPlex.getRefinementLimit, DMPlex.setRefinementLimit, DMPlexSetRefinementUniform <https://petsc.org/release/manualpages/DMPlex/DMPlexSetRefinementUniform.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:2186 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L2186>

        setSupport(p, supp)
            Set the points on the out-edges for this point in the DAG.

            Not collective.

            Parameters

                •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart.

                •   supp (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- An array of points which are on the out-edges for point p.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.setCone, DMPlex.setConeSize, DMPlex.create, DMPlex.getSupport, DMPlex.setChart, DMPlex.setSupportSize, DM.setUp <#petsc4py.PETSc.DM.setUp>, DMPlexSetSupport <https://petsc.org/release/manualpages/DMPlex/DMPlexSetSupport.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:892 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L892>

        setSupportSize(p, size)
            Set the number of out-edges for this point in the DAG.

            Not collective.

            Parameters

                •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The point, which must lie in the chart set with DMPlex.setChart.

                •   size (int <https://docs.python.org/3/library/functions.html#int>) -- The support size for point p.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.getSupportSize, DMPlex.setChart, DMPlexSetSupportSize <https://petsc.org/release/manualpages/DMPlex/DMPlexSetSupportSize.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:841 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L841>

        setTetGenOptions(opts)
            Set the options used for the Tetgen mesh generator.

            Not collective.

            Parameters
                opts (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The command line options.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                Working with PETSc options <#petsc-options>, DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.setTriangleOptions, DMPlex.generate, DMPlexTetgenSetOptions <https://petsc.org/release/manualpages/DMPlex/DMPlexTetgenSetOptions.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1465 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1465>

        setTriangleOptions(opts)
            Set the options used for the Triangle mesh generator.

            Not collective.

            Parameters
                opts (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The command line options.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                Working with PETSc options <#petsc-options>, DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.setTetGenOptions, DMPlex.generate, DMPlexTriangleSetOptions <https://petsc.org/release/manualpages/DMPlex/DMPlexTriangleSetOptions.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1445 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1445>

        setVecClosure(sec, vec, point, values, addv=None)
            Set an array of the values on the closure of point.

            Not collective.

            Parameters

                •   sec (Section <#petsc4py.PETSc.Section>) -- The section describing the layout in vec, or None <https://docs.python.org/3/library/constants.html#None> to use the default section.

                •   vec (Vec <#petsc4py.PETSc.Vec>) -- The local vector.

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point in the DMPlex.

                •   values (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The array of values.

                •   mode -- The insertion mode.

                •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec> | None <https://docs.python.org/3/library/constants.html#None>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlexVecSetClosure <https://petsc.org/release/manualpages/DMPlex/DMPlexVecSetClosure.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1348 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1348>

        stratify()
            Calculate the strata of DAG.

            Collective.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.symmetrize, DMPlexStratify <https://petsc.org/release/manualpages/DMPlex/DMPlexStratify.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:956 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L956>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        symmetrize()
            Create support (out-edge) information from cone (in-edge) information.

            Not collective.

            See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlex.create, DMPlex.setChart, DMPlex.setConeSize, DMPlex.setCone, DMPlexSymmetrize <https://petsc.org/release/manualpages/DMPlex/DMPlexSymmetrize.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:943 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L943>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        topologyLoad(viewer)
            Load a topology into this DMPlex object.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> for the saved topology

            Returns
                sfxc -- The SF <#petsc4py.PETSc.SF> that pushes points in [0, N) to the associated points in the loaded DMPlex, where N is the global number of points.

            Return type
                SF <#petsc4py.PETSc.SF>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.load <#petsc4py.PETSc.DM.load>, DMPlex.coordinatesLoad, DMPlex.labelsLoad, DM.view <#petsc4py.PETSc.DM.view>, SF <#petsc4py.PETSc.SF>, Viewer <#petsc4py.PETSc.Viewer>, DMPlexTopologyLoad <https://petsc.org/release/manualpages/DMPlex/DMPlexTopologyLoad.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3431 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3431>

        topologyView(viewer)
            Save a DMPlex topology into a file.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The Viewer <#petsc4py.PETSc.Viewer> for saving.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DM.view <#petsc4py.PETSc.DM.view>, DMPlex.coordinatesView, DMPlex.labelsView, DMPlex.topologyLoad, Viewer <#petsc4py.PETSc.Viewer>, DMPlexTopologyView <https://petsc.org/release/manualpages/DMPlex/DMPlexTopologyView.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3306 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3306>

        uninterpolate()
            Convert to a mesh with only cells and vertices.

            Collective.

            See also:
                DMPlex, DMPlex.interpolate, DMPlex.createFromCellList, DMPlexUninterpolate <https://petsc.org/release/manualpages/DMPlex/DMPlexUninterpolate.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1876 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1876>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        vecGetClosure(sec, vec, p)
            Return an array of values on the closure of p.

            Not collective.

            Parameters

                •   sec (Section <#petsc4py.PETSc.Section>) -- The section describing the layout in vec.

                •   vec (Vec <#petsc4py.PETSc.Vec>) -- The local vector.

                •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The point in the DMPlex.

            Return type
                ArrayScalar <#petsc4py.typing.ArrayScalar>

        See also:
                DM <#petsc4py.PETSc.DM>, DMPlex, DMPlexVecRestoreClosure <https://petsc.org/release/manualpages/DMPlex/DMPlexVecRestoreClosure.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:1290 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L1290>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMPlexTransform

    class petsc4py.PETSc.DMPlexTransform
        Bases: Object <#petsc4py.PETSc.Object>

        Mesh transformations.

        Methods Summary
        apply(dm) | Apply a mesh transformation.
        create([comm]) | Create a mesh transformation.
        destroy() | Destroy a mesh transformation.
        getType() | Return the transformation type name.
        setDM(dm) | Set the DM <#petsc4py.PETSc.DM> for the transformation.
        setFromOptions() | Configure the transformation from the options database.
        setType(tr_type) | Set the transformation type.
        setUp() | Setup a mesh transformation.
        view([viewer]) | View the mesh transformation.

        Methods Documentation

        apply(dm)
            Apply a mesh transformation.

            Collective.

            Source code at petsc4py/PETSc/DMPlex.pyx:3725 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3725>

            Parameters
                dm (DM <#petsc4py.PETSc.DM>)

            Return type
                DM <#petsc4py.PETSc.DM>

        create(comm=None)
            Create a mesh transformation.

            Collective.

            See also:
                DMPlexTransformCreate <https://petsc.org/release/manualpages/DMPlex/DMPlexTransformCreate.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3736 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3736>

            Parameters
                comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>)

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        destroy()
            Destroy a mesh transformation.

            Collective.

            See also:
                DMPlexTransformDestroy <https://petsc.org/release/manualpages/DMPlex/DMPlexTransformDestroy.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3753 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3753>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        getType()
            Return the transformation type name.

            Not collective.

            See also:
                DMPlexTransformGetType <https://petsc.org/release/manualpages/DMPlex/DMPlexTransformGetType.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3766 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3766>

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        setDM(dm)
            Set the DM <#petsc4py.PETSc.DM> for the transformation.

            Logically collective.

            Source code at petsc4py/PETSc/DMPlex.pyx:3804 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3804>

            Parameters
                dm (DM <#petsc4py.PETSc.DM>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setFromOptions()
            Configure the transformation from the options database.

            Collective.

            See also:
                Working with PETSc options <#petsc-options>, DMPlexTransformSetFromOptions <https://petsc.org/release/manualpages/DMPlex/DMPlexTransformSetFromOptions.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3813 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3813>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setType(tr_type)
            Set the transformation type.

            Collective.

            See also:
                DMPlexTransformSetType <https://petsc.org/release/manualpages/DMPlex/DMPlexTransformSetType.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3790 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3790>

            Parameters
                tr_type (DMPlexTransformType <#petsc4py.PETSc.DMPlexTransformType> | str <https://docs.python.org/3/library/stdtypes.html#str>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setUp()
            Setup a mesh transformation.

            Collective.

            Source code at petsc4py/PETSc/DMPlex.pyx:3780 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3780>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        view(viewer=None)
            View the mesh transformation.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                Viewer <#petsc4py.PETSc.Viewer>, DMPlexTransformView <https://petsc.org/release/manualpages/DMPlex/DMPlexTransformView.html>

        Source code at petsc4py/PETSc/DMPlex.pyx:3825 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMPlex.pyx#L3825>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMPlexTransformType

    class petsc4py.PETSc.DMPlexTransformType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Transformation types.

        Attributes Summary
        EXTRUDE | Object EXTRUDE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REFINE1D | Object REFINE1D of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REFINEALFELD | Object REFINEALFELD of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REFINEBOUNDARYLAYER | Object REFINEBOUNDARYLAYER of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REFINEPOWELLSABIN | Object REFINEPOWELLSABIN of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REFINEREGULAR | Object REFINEREGULAR of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REFINESBR | Object REFINESBR of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REFINETOBOX | Object REFINETOBOX of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REFINETOSIMPLEX | Object REFINETOSIMPLEX of type str <https://docs.python.org/3/library/stdtypes.html#str>
        TRANSFORMFILTER | Object TRANSFORMFILTER of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        EXTRUDE: str <https://docs.python.org/3/library/stdtypes.html#str> = EXTRUDE
            Object EXTRUDE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REFINE1D: str <https://docs.python.org/3/library/stdtypes.html#str> = REFINE1D
            Object REFINE1D of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REFINEALFELD: str <https://docs.python.org/3/library/stdtypes.html#str> = REFINEALFELD
            Object REFINEALFELD of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REFINEBOUNDARYLAYER: str <https://docs.python.org/3/library/stdtypes.html#str> = REFINEBOUNDARYLAYER
            Object REFINEBOUNDARYLAYER of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REFINEPOWELLSABIN: str <https://docs.python.org/3/library/stdtypes.html#str> = REFINEPOWELLSABIN
            Object REFINEPOWELLSABIN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REFINEREGULAR: str <https://docs.python.org/3/library/stdtypes.html#str> = REFINEREGULAR
            Object REFINEREGULAR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REFINESBR: str <https://docs.python.org/3/library/stdtypes.html#str> = REFINESBR
            Object REFINESBR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REFINETOBOX: str <https://docs.python.org/3/library/stdtypes.html#str> = REFINETOBOX
            Object REFINETOBOX of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REFINETOSIMPLEX: str <https://docs.python.org/3/library/stdtypes.html#str> = REFINETOSIMPLEX
            Object REFINETOSIMPLEX of type str <https://docs.python.org/3/library/stdtypes.html#str>

        TRANSFORMFILTER: str <https://docs.python.org/3/library/stdtypes.html#str> = TRANSFORMFILTER
            Object TRANSFORMFILTER of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMShell

    class petsc4py.PETSc.DMShell
        Bases: DM <#petsc4py.PETSc.DM>

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

        Methods Summary
        create([comm]) | Creates a shell DM object.
        setCoarsen(coarsen[, args, kargs]) | Set the routine used to coarsen the DMShell.
        setCreateDomainDecomposition(decomp[, args, ...]) | Set the routine used to create a domain decomposition.
        setCreateDomainDecompositionScatters(scatter) | Set the routine used to create the scatter contexts for domain decomposition.
        setCreateFieldDecomposition(decomp[, args, ...]) | Set the routine used to create a field decomposition.
        setCreateGlobalVector(create_gvec[, args, kargs]) | Set the routine to create a global vector.
        setCreateInjection(create_injection[, args, ...]) | Set the routine used to create the injection operator.
        setCreateInterpolation(create_interpolation) | Set the routine used to create the interpolation operator.
        setCreateLocalVector(create_lvec[, args, kargs]) | Set the routine to create a local vector.
        setCreateMatrix(create_matrix[, args, kargs]) | Set the routine to create a matrix.
        setCreateRestriction(create_restriction[, ...]) | Set the routine used to create the restriction operator.
        setCreateSubDM(create_subdm[, args, kargs]) | Set the routine used to create a sub DM from the DMShell.
        setGlobalToLocal(begin, end[, begin_args, ...]) | Set the routines used to perform a global to local scatter.
        setGlobalToLocalVecScatter(gtol) | Set a Scatter <#petsc4py.PETSc.Scatter> context for global to local communication.
        setGlobalVector(gv) | Set a template global vector.
        setLocalToGlobal(begin, end[, begin_args, ...]) | Set the routines used to perform a local to global scatter.
        setLocalToGlobalVecScatter(ltog) | Set a Scatter <#petsc4py.PETSc.Scatter> context for local to global communication.
        setLocalToLocal(begin, end[, begin_args, ...]) | Set the routines used to perform a local to local scatter.
        setLocalToLocalVecScatter(ltol) | Set a Scatter context for local to local communication.
        setLocalVector(lv) | Set a template local vector.
        setMatrix(mat) | Set a template matrix.
        setRefine(refine[, args, kargs]) | Set the routine used to refine the DMShell.

        Methods Documentation

        create(comm=None)
            Creates a shell DM object.

            Collective.

            Parameters
                comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                DMShellCreate <https://petsc.org/release/manualpages/DM/DMShellCreate.html>

        Source code at petsc4py/PETSc/DMShell.pyx:4 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L4>

        setCoarsen(coarsen, args=None, kargs=None)
            Set the routine used to coarsen the DMShell.

            Logically collective.

            Parameters

                •   coarsen (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, Comm <#petsc4py.PETSc.Comm>], DM <#petsc4py.PETSc.DM>] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine which coarsens the DM.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for coarsen.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for coarsen.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                setRefine, DMShellSetCoarsen <https://petsc.org/release/manualpages/DM/DMShellSetCoarsen.html>

        Source code at petsc4py/PETSc/DMShell.pyx:368 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L368>

        setCreateDomainDecomposition(decomp, args=None, kargs=None)
            Set the routine used to create a domain decomposition.

            Logically collective.

            Parameters

                •   decomp (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>], tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[list <https://docs.python.org/3/library/stdtypes.html#list>[str <https://docs.python.org/3/library/stdtypes.html#str>] | None <https://docs.python.org/3/library/constants.html#None>, list <https://docs.python.org/3/library/stdtypes.html#list>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>, list <https://docs.python.org/3/library/stdtypes.html#list>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>, list <https://docs.python.org/3/library/stdtypes.html#list>[DM <#petsc4py.PETSc.DM>] | None <https://docs.python.org/3/library/constants.html#None>]] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine to create the decomposition.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for decomp.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for decomp.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetCreateDomainDecomposition <https://petsc.org/release/manualpages/DM/DMShellSetCreateDomainDecomposition.html>

        Source code at petsc4py/PETSc/DMShell.pyx:560 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L560>

        setCreateDomainDecompositionScatters(scatter, args=None, kargs=None)
            Set the routine used to create the scatter contexts for domain decomposition.

            Logically collective.

            Parameters

                •   scatter (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, list <https://docs.python.org/3/library/stdtypes.html#list>[DM <#petsc4py.PETSc.DM>]], tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[list <https://docs.python.org/3/library/stdtypes.html#list>[Scatter <#petsc4py.PETSc.Scatter>], list <https://docs.python.org/3/library/stdtypes.html#list>[Scatter <#petsc4py.PETSc.Scatter>], list <https://docs.python.org/3/library/stdtypes.html#list>[Scatter <#petsc4py.PETSc.Scatter>]]] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine to create the scatters.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for scatter.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for scatter.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetCreateDomainDecompositionScatters <https://petsc.org/release/manualpages/DM/DMShellSetCreateDomainDecompositionScatters.html>

        Source code at petsc4py/PETSc/DMShell.pyx:592 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L592>

        setCreateFieldDecomposition(decomp, args=None, kargs=None)
            Set the routine used to create a field decomposition.

            Logically collective.

            Parameters

                •   decomp (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>], tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[list <https://docs.python.org/3/library/stdtypes.html#list>[str <https://docs.python.org/3/library/stdtypes.html#str>] | None <https://docs.python.org/3/library/constants.html#None>, list <https://docs.python.org/3/library/stdtypes.html#list>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>, list <https://docs.python.org/3/library/stdtypes.html#list>[DM <#petsc4py.PETSc.DM>] | None <https://docs.python.org/3/library/constants.html#None>]] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine to create the decomposition.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for decomp.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for decomp.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetCreateFieldDecomposition <https://petsc.org/release/manualpages/DM/DMShellSetCreateFieldDecomposition.html>

        Source code at petsc4py/PETSc/DMShell.pyx:528 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L528>

        setCreateGlobalVector(create_gvec, args=None, kargs=None)
            Set the routine to create a global vector.

            Logically collective.

            Parameters

                •   create_gvec (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>], Vec <#petsc4py.PETSc.Vec>] | None <https://docs.python.org/3/library/constants.html#None>) -- The creation routine.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for create_gvec.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for create_gvec.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                setCreateLocalVector, DMShellSetCreateGlobalVector <https://petsc.org/release/manualpages/DM/DMShellSetCreateGlobalVector.html>

        Source code at petsc4py/PETSc/DMShell.pyx:76 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L76>

        setCreateInjection(create_injection, args=None, kargs=None)
            Set the routine used to create the injection operator.

            Logically collective.

            Parameters

                •   create_injection (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, DM <#petsc4py.PETSc.DM>], Mat <#petsc4py.PETSc.Mat>] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine to create the injection.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for create_injection.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for create_injection.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetCreateInjection <https://petsc.org/release/manualpages/DM/DMShellSetCreateInjection.html>

        Source code at petsc4py/PETSc/DMShell.pyx:464 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L464>

        setCreateInterpolation(create_interpolation, args=None, kargs=None)
            Set the routine used to create the interpolation operator.

            Logically collective.

            Parameters

                •   create_interpolation (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, DM <#petsc4py.PETSc.DM>], tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Vec <#petsc4py.PETSc.Vec>]] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine to create the interpolation.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for create_interpolation.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for create_interpolation.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetCreateInterpolation <https://petsc.org/release/manualpages/DM/DMShellSetCreateInterpolation.html>

        Source code at petsc4py/PETSc/DMShell.pyx:432 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L432>

        setCreateLocalVector(create_lvec, args=None, kargs=None)
            Set the routine to create a local vector.

            Logically collective.

            Parameters

                •   create_lvec (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>], Vec <#petsc4py.PETSc.Vec>] | None <https://docs.python.org/3/library/constants.html#None>) -- The creation routine.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for create_lvec.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for create_lvec.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                setCreateGlobalVector, DMShellSetCreateLocalVector <https://petsc.org/release/manualpages/DM/DMShellSetCreateLocalVector.html>

        Source code at petsc4py/PETSc/DMShell.pyx:108 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L108>

        setCreateMatrix(create_matrix, args=None, kargs=None)
            Set the routine to create a matrix.

            Logically collective.

            Parameters

                •   create_matrix (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>], Mat <#petsc4py.PETSc.Mat>] | None <https://docs.python.org/3/library/constants.html#None>) -- The function to create a matrix.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for create_matrix.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for create_matrix.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetCreateMatrix <https://petsc.org/release/manualpages/DM/DMShellSetCreateMatrix.html>

        Source code at petsc4py/PETSc/DMShell.pyx:336 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L336>

        setCreateRestriction(create_restriction, args=None, kargs=None)
            Set the routine used to create the restriction operator.

            Logically collective.

            Parameters

                •   create_restriction (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, DM <#petsc4py.PETSc.DM>], Mat <#petsc4py.PETSc.Mat>] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine to create the restriction

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for create_restriction.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for create_restriction.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetCreateRestriction <https://petsc.org/release/manualpages/DM/DMShellSetCreateRestriction.html>

        Source code at petsc4py/PETSc/DMShell.pyx:496 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L496>

        setCreateSubDM(create_subdm, args=None, kargs=None)
            Set the routine used to create a sub DM from the DMShell.

            Logically collective.

            Parameters

                •   subdm -- The routine to create the decomposition.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for subdm.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for subdm.

                •   create_subdm (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]], tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[IS <#petsc4py.PETSc.IS>, DM <#petsc4py.PETSc.DM>]] | None <https://docs.python.org/3/library/constants.html#None>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetCreateSubDM <https://petsc.org/release/manualpages/DM/DMShellSetCreateSubDM.html>

        Source code at petsc4py/PETSc/DMShell.pyx:624 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L624>

        setGlobalToLocal(begin, end, begin_args=None, begin_kargs=None, end_args=None, end_kargs=None)
            Set the routines used to perform a global to local scatter.

            Logically collective.

            Parameters

                •   dm -- The DMShell.

                •   begin (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, Vec <#petsc4py.PETSc.Vec>, InsertMode <#petsc4py.PETSc.InsertMode>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine which begins the global to local scatter.

                •   end (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, Vec <#petsc4py.PETSc.Vec>, InsertMode <#petsc4py.PETSc.InsertMode>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine which ends the global to local scatter.

                •   begin_args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for begin.

                •   begin_kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for begin.

                •   end_args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for end.

                •   end_kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for end.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetGlobalToLocal <https://petsc.org/release/manualpages/DM/DMShellSetGlobalToLocal.html>

        Source code at petsc4py/PETSc/DMShell.pyx:140 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L140>

        setGlobalToLocalVecScatter(gtol)
            Set a Scatter <#petsc4py.PETSc.Scatter> context for global to local communication.

            Logically collective.

            Parameters
                gtol (Scatter <#petsc4py.PETSc.Scatter>) -- The global to local Scatter <#petsc4py.PETSc.Scatter> context.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetGlobalToLocalVecScatter <https://petsc.org/release/manualpages/DM/DMShellSetGlobalToLocalVecScatter.html>

        Source code at petsc4py/PETSc/DMShell.pyx:189 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L189>

        setGlobalVector(gv)
            Set a template global vector.

            Logically collective.

            Parameters
                gv (Vec <#petsc4py.PETSc.Vec>) -- Template vector.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                setLocalVector, DMShellSetGlobalVector <https://petsc.org/release/manualpages/DM/DMShellSetGlobalVector.html>

        Source code at petsc4py/PETSc/DMShell.pyx:42 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L42>

        setLocalToGlobal(begin, end, begin_args=None, begin_kargs=None, end_args=None, end_kargs=None)
            Set the routines used to perform a local to global scatter.

            Logically collective.

            Parameters

                •   begin (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, Vec <#petsc4py.PETSc.Vec>, InsertMode <#petsc4py.PETSc.InsertMode>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine which begins the local to global scatter.

                •   end (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, Vec <#petsc4py.PETSc.Vec>, InsertMode <#petsc4py.PETSc.InsertMode>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine which ends the local to global scatter.

                •   begin_args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for begin.

                •   begin_kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for begin.

                •   end_args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for end.

                •   end_kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for end.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetLocalToGlobal <https://petsc.org/release/manualpages/DM/DMShellSetLocalToGlobal.html>

        Source code at petsc4py/PETSc/DMShell.pyx:206 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L206>

        setLocalToGlobalVecScatter(ltog)
            Set a Scatter <#petsc4py.PETSc.Scatter> context for local to global communication.

            Logically collective.

            Parameters
                ltog (Scatter <#petsc4py.PETSc.Scatter>) -- The local to global Scatter <#petsc4py.PETSc.Scatter> context.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetLocalToGlobalVecScatter <https://petsc.org/release/manualpages/DM/DMShellSetLocalToGlobalVecScatter.html>

        Source code at petsc4py/PETSc/DMShell.pyx:253 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L253>

        setLocalToLocal(begin, end, begin_args=None, begin_kargs=None, end_args=None, end_kargs=None)
            Set the routines used to perform a local to local scatter.

            Logically collective.

            Parameters

                •   begin (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, Vec <#petsc4py.PETSc.Vec>, InsertMode <#petsc4py.PETSc.InsertMode>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine which begins the local to local scatter.

                •   end (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, Vec <#petsc4py.PETSc.Vec>, InsertMode <#petsc4py.PETSc.InsertMode>, Vec <#petsc4py.PETSc.Vec>], None <https://docs.python.org/3/library/constants.html#None>] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine which ends the local to local scatter.

                •   begin_args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for begin.

                •   begin_kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for begin.

                •   end_args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for end.

                •   end_kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for end.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetLocalToLocal <https://petsc.org/release/manualpages/DM/DMShellSetLocalToLocal.html>

        Source code at petsc4py/PETSc/DMShell.pyx:270 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L270>

        setLocalToLocalVecScatter(ltol)
            Set a Scatter context for local to local communication.

            Logically collective.

            Parameters
                ltol (Scatter <#petsc4py.PETSc.Scatter>) -- The local to local Scatter context.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetLocalToLocalVecScatter <https://petsc.org/release/manualpages/DM/DMShellSetLocalToLocalVecScatter.html>

        Source code at petsc4py/PETSc/DMShell.pyx:319 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L319>

        setLocalVector(lv)
            Set a template local vector.

            Logically collective.

            Parameters
                lv (Vec <#petsc4py.PETSc.Vec>) -- Template vector.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                setGlobalVector, DMShellSetLocalVector <https://petsc.org/release/manualpages/DM/DMShellSetLocalVector.html>

        Source code at petsc4py/PETSc/DMShell.pyx:59 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L59>

        setMatrix(mat)
            Set a template matrix.

            Collective.

            Parameters
                mat (Mat <#petsc4py.PETSc.Mat>) -- The template matrix.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                DMShellSetMatrix <https://petsc.org/release/manualpages/DM/DMShellSetMatrix.html>

        Source code at petsc4py/PETSc/DMShell.pyx:25 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L25>

        setRefine(refine, args=None, kargs=None)
            Set the routine used to refine the DMShell.

            Logically collective.

            Parameters

                •   refine (Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[DM <#petsc4py.PETSc.DM>, Comm <#petsc4py.PETSc.Comm>], DM <#petsc4py.PETSc.DM>] | None <https://docs.python.org/3/library/constants.html#None>) -- The routine which refines the DM.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for refine.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for refine.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                setCoarsen, DMShellSetRefine <https://petsc.org/release/manualpages/DM/DMShellSetRefine.html>

        Source code at petsc4py/PETSc/DMShell.pyx:400 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMShell.pyx#L400>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMStag

    class petsc4py.PETSc.DMStag
        Bases: DM <#petsc4py.PETSc.DM>

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

        Enumerations
        StencilLocation <#petsc4py.PETSc.DMStag.StencilLocation> | Stencil location types.
        StencilType <#petsc4py.PETSc.DMStag.StencilType> | Stencil types.

  petsc4py.PETSc.DMStag.StencilLocation

    class petsc4py.PETSc.DMStag.StencilLocation
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Stencil location types.

        Attributes Summary
        BACK | Constant BACK of type int <https://docs.python.org/3/library/functions.html#int>
        BACK_DOWN | Constant BACK_DOWN of type int <https://docs.python.org/3/library/functions.html#int>
        BACK_DOWN_LEFT | Constant BACK_DOWN_LEFT of type int <https://docs.python.org/3/library/functions.html#int>
        BACK_DOWN_RIGHT | Constant BACK_DOWN_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>
        BACK_LEFT | Constant BACK_LEFT of type int <https://docs.python.org/3/library/functions.html#int>
        BACK_RIGHT | Constant BACK_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>
        BACK_UP | Constant BACK_UP of type int <https://docs.python.org/3/library/functions.html#int>
        BACK_UP_LEFT | Constant BACK_UP_LEFT of type int <https://docs.python.org/3/library/functions.html#int>
        BACK_UP_RIGHT | Constant BACK_UP_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>
        DOWN | Constant DOWN of type int <https://docs.python.org/3/library/functions.html#int>
        DOWN_LEFT | Constant DOWN_LEFT of type int <https://docs.python.org/3/library/functions.html#int>
        DOWN_RIGHT | Constant DOWN_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>
        ELEMENT | Constant ELEMENT of type int <https://docs.python.org/3/library/functions.html#int>
        FRONT | Constant FRONT of type int <https://docs.python.org/3/library/functions.html#int>
        FRONT_DOWN | Constant FRONT_DOWN of type int <https://docs.python.org/3/library/functions.html#int>
        FRONT_DOWN_LEFT | Constant FRONT_DOWN_LEFT of type int <https://docs.python.org/3/library/functions.html#int>
        FRONT_DOWN_RIGHT | Constant FRONT_DOWN_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>
        FRONT_LEFT | Constant FRONT_LEFT of type int <https://docs.python.org/3/library/functions.html#int>
        FRONT_RIGHT | Constant FRONT_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>
        FRONT_UP | Constant FRONT_UP of type int <https://docs.python.org/3/library/functions.html#int>
        FRONT_UP_LEFT | Constant FRONT_UP_LEFT of type int <https://docs.python.org/3/library/functions.html#int>
        FRONT_UP_RIGHT | Constant FRONT_UP_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>
        LEFT | Constant LEFT of type int <https://docs.python.org/3/library/functions.html#int>
        NULLLOC | Constant NULLLOC of type int <https://docs.python.org/3/library/functions.html#int>
        RIGHT | Constant RIGHT of type int <https://docs.python.org/3/library/functions.html#int>
        UP | Constant UP of type int <https://docs.python.org/3/library/functions.html#int>
        UP_LEFT | Constant UP_LEFT of type int <https://docs.python.org/3/library/functions.html#int>
        UP_RIGHT | Constant UP_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        BACK: int <https://docs.python.org/3/library/functions.html#int> = BACK
            Constant BACK of type int <https://docs.python.org/3/library/functions.html#int>

        BACK_DOWN: int <https://docs.python.org/3/library/functions.html#int> = BACK_DOWN
            Constant BACK_DOWN of type int <https://docs.python.org/3/library/functions.html#int>

        BACK_DOWN_LEFT: int <https://docs.python.org/3/library/functions.html#int> = BACK_DOWN_LEFT
            Constant BACK_DOWN_LEFT of type int <https://docs.python.org/3/library/functions.html#int>

        BACK_DOWN_RIGHT: int <https://docs.python.org/3/library/functions.html#int> = BACK_DOWN_RIGHT
            Constant BACK_DOWN_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>

        BACK_LEFT: int <https://docs.python.org/3/library/functions.html#int> = BACK_LEFT
            Constant BACK_LEFT of type int <https://docs.python.org/3/library/functions.html#int>

        BACK_RIGHT: int <https://docs.python.org/3/library/functions.html#int> = BACK_RIGHT
            Constant BACK_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>

        BACK_UP: int <https://docs.python.org/3/library/functions.html#int> = BACK_UP
            Constant BACK_UP of type int <https://docs.python.org/3/library/functions.html#int>

        BACK_UP_LEFT: int <https://docs.python.org/3/library/functions.html#int> = BACK_UP_LEFT
            Constant BACK_UP_LEFT of type int <https://docs.python.org/3/library/functions.html#int>

        BACK_UP_RIGHT: int <https://docs.python.org/3/library/functions.html#int> = BACK_UP_RIGHT
            Constant BACK_UP_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>

        DOWN: int <https://docs.python.org/3/library/functions.html#int> = DOWN
            Constant DOWN of type int <https://docs.python.org/3/library/functions.html#int>

        DOWN_LEFT: int <https://docs.python.org/3/library/functions.html#int> = DOWN_LEFT
            Constant DOWN_LEFT of type int <https://docs.python.org/3/library/functions.html#int>

        DOWN_RIGHT: int <https://docs.python.org/3/library/functions.html#int> = DOWN_RIGHT
            Constant DOWN_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>

        ELEMENT: int <https://docs.python.org/3/library/functions.html#int> = ELEMENT
            Constant ELEMENT of type int <https://docs.python.org/3/library/functions.html#int>

        FRONT: int <https://docs.python.org/3/library/functions.html#int> = FRONT
            Constant FRONT of type int <https://docs.python.org/3/library/functions.html#int>

        FRONT_DOWN: int <https://docs.python.org/3/library/functions.html#int> = FRONT_DOWN
            Constant FRONT_DOWN of type int <https://docs.python.org/3/library/functions.html#int>

        FRONT_DOWN_LEFT: int <https://docs.python.org/3/library/functions.html#int> = FRONT_DOWN_LEFT
            Constant FRONT_DOWN_LEFT of type int <https://docs.python.org/3/library/functions.html#int>

        FRONT_DOWN_RIGHT: int <https://docs.python.org/3/library/functions.html#int> = FRONT_DOWN_RIGHT
            Constant FRONT_DOWN_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>

        FRONT_LEFT: int <https://docs.python.org/3/library/functions.html#int> = FRONT_LEFT
            Constant FRONT_LEFT of type int <https://docs.python.org/3/library/functions.html#int>

        FRONT_RIGHT: int <https://docs.python.org/3/library/functions.html#int> = FRONT_RIGHT
            Constant FRONT_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>

        FRONT_UP: int <https://docs.python.org/3/library/functions.html#int> = FRONT_UP
            Constant FRONT_UP of type int <https://docs.python.org/3/library/functions.html#int>

        FRONT_UP_LEFT: int <https://docs.python.org/3/library/functions.html#int> = FRONT_UP_LEFT
            Constant FRONT_UP_LEFT of type int <https://docs.python.org/3/library/functions.html#int>

        FRONT_UP_RIGHT: int <https://docs.python.org/3/library/functions.html#int> = FRONT_UP_RIGHT
            Constant FRONT_UP_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>

        LEFT: int <https://docs.python.org/3/library/functions.html#int> = LEFT
            Constant LEFT of type int <https://docs.python.org/3/library/functions.html#int>

        NULLLOC: int <https://docs.python.org/3/library/functions.html#int> = NULLLOC
            Constant NULLLOC of type int <https://docs.python.org/3/library/functions.html#int>

        RIGHT: int <https://docs.python.org/3/library/functions.html#int> = RIGHT
            Constant RIGHT of type int <https://docs.python.org/3/library/functions.html#int>

        UP: int <https://docs.python.org/3/library/functions.html#int> = UP
            Constant UP of type int <https://docs.python.org/3/library/functions.html#int>

        UP_LEFT: int <https://docs.python.org/3/library/functions.html#int> = UP_LEFT
            Constant UP_LEFT of type int <https://docs.python.org/3/library/functions.html#int>

        UP_RIGHT: int <https://docs.python.org/3/library/functions.html#int> = UP_RIGHT
            Constant UP_RIGHT of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMStag.StencilType

    class petsc4py.PETSc.DMStag.StencilType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Stencil types.

        Attributes Summary
        BOX | Constant BOX of type int <https://docs.python.org/3/library/functions.html#int>
        NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>
        STAR | Constant STAR of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        BOX: int <https://docs.python.org/3/library/functions.html#int> = BOX
            Constant BOX of type int <https://docs.python.org/3/library/functions.html#int>

        NONE: int <https://docs.python.org/3/library/functions.html#int> = NONE
            Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>

        STAR: int <https://docs.python.org/3/library/functions.html#int> = STAR
            Constant STAR of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
VecSplitToDMDA(vec, loc, c) | Return DMDA, Vec from a subgrid of a DMStag, its Vec.
create(dim[, dofs, sizes, boundary_types, ...]) | Create a DMDA object.
createCompatibleDMStag(dofs) | Create a compatible DMStag with different DOFs/stratum.
get1dCoordinatecArrays() | Not implemented.
getBoundaryTypes() | Return boundary types in each dimension.
getCorners() | Return starting element index, width and number of partial elements.
getDim() | Return the number of dimensions.
getDof() | Get number of DOFs associated with each stratum of the grid.
getEntriesPerElement() | Return the number of entries per element in the local representation.
getGhostCorners() | Return starting element index and width of local region.
getGlobalSizes() | Return global element counts in each dimension.
getIsFirstRank() | Return whether this process is first in each dimension in the process grid.
getIsLastRank() | Return whether this process is last in each dimension in the process grid.
getLocalSizes() | Return local elementwise sizes in each dimension.
getLocationDof(loc) | Return number of DOFs associated with a given point on the grid.
getLocationSlot(loc, c) | Return index to use in accessing raw local arrays.
getOwnershipRanges() | Return elements per process in each dimension.
getProcSizes() | Return number of processes in each dimension.
getProductCoordinateLocationSlot(loc) | Return slot for use with local product coordinate arrays.
getStencilType() | Return elementwise ghost/halo stencil type.
getStencilWidth() | Return elementwise stencil width.
getVecArray(vec) | Not implemented.
migrateVec(vec, dmTo, vecTo) | Transfer a vector between two DMStag objects.
setBoundaryTypes(boundary_types) | Set the boundary types.
setCoordinateDMType(dmtype) | Set the type to store coordinates.
setDof(dofs) | Set DOFs/stratum.
setGlobalSizes(sizes) | Set global element counts in each dimension.
setOwnershipRanges(ranges) | Set elements per process in each dimension.
setProcSizes(sizes) | Set the number of processes in each dimension in the global process grid.
setStencilType(stenciltype) | Set elementwise ghost/halo stencil type.
setStencilWidth(swidth) | Set elementwise stencil width.
setUniformCoordinates([xmin, xmax, ymin, ...]) | Set the coordinates to be a uniform grid..
setUniformCoordinatesExplicit([xmin, xmax, ...]) | Set coordinates to be a uniform grid, storing all values.
setUniformCoordinatesProduct([xmin, xmax, ...]) | Create uniform coordinates, as a product of 1D arrays.

Attributes Summary
boundary_types | Boundary types in each dimension.
corners | The lower left corner and size of local region in each dimension.
dim | The dimension.
dofs | The number of DOFs associated with each stratum of the grid.
entries_per_element | The number of entries per element in the local representation.
ghost_corners | The lower left corner and size of local region in each dimension.
global_sizes | Global element counts in each dimension.
local_sizes | Local elementwise sizes in each dimension.
proc_sizes | The number of processes in each dimension in the global decomposition.
stencil_type | Stencil type.
stencil_width | Elementwise stencil width.

Methods Documentation

    VecSplitToDMDA(vec, loc, c)
        Return DMDA, Vec from a subgrid of a DMStag, its Vec.

        Collective.

        If a c value of -k is provided, the first k DOFs for that position are extracted, padding with zero values if needed. If a non-negative value is provided, a single DOF is extracted.

        Parameters

            •   vec (Vec <#petsc4py.PETSc.Vec>) -- The Vec object.

            •   loc (StencilLocation <#petsc4py.PETSc.DMStag.StencilLocation>) -- Which subgrid to extract.

            •   c (int <https://docs.python.org/3/library/functions.html#int>) -- Which component to extract.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[DMDA <#petsc4py.PETSc.DMDA>, Vec <#petsc4py.PETSc.Vec>]

    See also:
            DMStagVecSplitToDMDA <https://petsc.org/release/manualpages/DMStag/DMStagVecSplitToDMDA.html>

    Source code at petsc4py/PETSc/DMStag.pyx:790 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L790>

    create(dim, dofs=None, sizes=None, boundary_types=None, stencil_type=None, stencil_width=None, proc_sizes=None, ownership_ranges=None, comm=None, setUp=False)
        Create a DMDA object.

        Collective.

        Creates an object to manage data living on the elements and vertices / the elements, faces, and vertices / the elements, faces, edges, and vertices of a parallelized regular 1D / 2D / 3D grid.

        Parameters

            •   dim (int <https://docs.python.org/3/library/functions.html#int>) -- The number of dimensions.

            •   dofs (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- The number of degrees of freedom per vertex, element (1D); vertex, face, element (2D); or vertex, edge, face, element (3D).

            •   sizes (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- The number of elements in each dimension.

            •   boundary_types (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[DM.BoundaryType <#petsc4py.PETSc.DM.BoundaryType> | int <https://docs.python.org/3/library/functions.html#int> | str <https://docs.python.org/3/library/stdtypes.html#str> | bool <https://docs.python.org/3/library/functions.html#bool>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- The boundary types.

            •   stencil_type (StencilType <#petsc4py.PETSc.DMStag.StencilType> | None <https://docs.python.org/3/library/constants.html#None>) -- The ghost/halo stencil type.

            •   stencil_width (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The width of the ghost/halo region.

            •   proc_sizes (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- The number of processes in x, y, z dimensions.

            •   ownership_ranges (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Sequence[int <https://docs.python.org/3/library/functions.html#int>], ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Local x, y, z element counts, of length equal to proc_sizes, summing to sizes.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            •   setUp (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Whether to call the setup routine after creating the object.

        Return type
            Self

    See also:
            DMStagCreate1d <https://petsc.org/release/manualpages/DMStag/DMStagCreate1d.html>, DMStagCreate2d <https://petsc.org/release/manualpages/DMStag/DMStagCreate2d.html>, DMStagCreate3d <https://petsc.org/release/manualpages/DMStag/DMStagCreate3d.html>, DMSetUp <https://petsc.org/release/manualpages/DM/DMSetUp.html>

    Source code at petsc4py/PETSc/DMStag.pyx:50 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L50>

    createCompatibleDMStag(dofs)
        Create a compatible DMStag with different DOFs/stratum.

        Collective.

        Parameters
            dofs (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]) -- The number of DOFs on the strata in the new DMStag.

        Return type
            DM <#petsc4py.PETSc.DM>

    See also:
            DMStagCreateCompatibleDMStag <https://petsc.org/release/manualpages/DMStag/DMStagCreateCompatibleDMStag.html>

    Source code at petsc4py/PETSc/DMStag.pyx:766 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L766>

    get1dCoordinatecArrays()
        Not implemented.

        Source code at petsc4py/PETSc/DMStag.pyx:832 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L832>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    getBoundaryTypes()
        Return boundary types in each dimension.

        Not collective.

        See also:
            setBoundaryTypes, DMStagGetBoundaryTypes <https://petsc.org/release/manualpages/DMStag/DMStagGetBoundaryTypes.html>

    Source code at petsc4py/PETSc/DMStag.pyx:478 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L478>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[str <https://docs.python.org/3/library/stdtypes.html#str>, ...]

    getCorners()
        Return starting element index, width and number of partial elements.

        Not collective.

        The returned value is calculated excluding ghost points.

        The number of extra partial elements is either 1 or 0. The value is 1 on right, top, and front non-periodic domain ("physical") boundaries, in the x, y, and z dimensions respectively, and otherwise 0.

        See also:
            getGhostCorners, DMStagGetCorners <https://petsc.org/release/manualpages/DMStag/DMStagGetCorners.html>, DMGetDimension <https://petsc.org/release/manualpages/DM/DMGetDimension.html>

    Source code at petsc4py/PETSc/DMStag.pyx:363 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L363>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...], tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...], tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]]

    getDim()
        Return the number of dimensions.

        Not collective.

        Source code at petsc4py/PETSc/DMStag.pyx:310 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L310>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getDof()
        Get number of DOFs associated with each stratum of the grid.

        Not collective.

        See also:
            DMStagGetDOF <https://petsc.org/release/manualpages/DMStag/DMStagGetDOF.html>

    Source code at petsc4py/PETSc/DMStag.pyx:348 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L348>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]

    getEntriesPerElement()
        Return the number of entries per element in the local representation.

        Not collective.

        This is the natural block size for most local operations.

        See also:
            DMStagGetEntriesPerElement <https://petsc.org/release/manualpages/DMStag/DMStagGetEntriesPerElement.html>

    Source code at petsc4py/PETSc/DMStag.pyx:318 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L318>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getGhostCorners()
        Return starting element index and width of local region.

        Not collective.

        See also:
            getCorners, DMStagGetGhostCorners <https://petsc.org/release/manualpages/DMStag/DMStagGetGhostCorners.html>

    Source code at petsc4py/PETSc/DMStag.pyx:385 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L385>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...], tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]]

    getGlobalSizes()
        Return global element counts in each dimension.

        Not collective.

        See also:
            getLocalSizes, DMStagGetGlobalSizes <https://petsc.org/release/manualpages/DMStag/DMStagGetGlobalSizes.html>

    Source code at petsc4py/PETSc/DMStag.pyx:417 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L417>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]

    getIsFirstRank()
        Return whether this process is first in each dimension in the process grid.

        Not collective.

        See also:
            DMStagGetIsFirstRank <https://petsc.org/release/manualpages/DMStag/DMStagGetIsFirstRank.html>

    Source code at petsc4py/PETSc/DMStag.pyx:496 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L496>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]

    getIsLastRank()
        Return whether this process is last in each dimension in the process grid.

        Not collective.

        See also:
            DMStagGetIsLastRank <https://petsc.org/release/manualpages/DMStag/DMStagGetIsLastRank.html>

    Source code at petsc4py/PETSc/DMStag.pyx:512 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L512>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]

    getLocalSizes()
        Return local elementwise sizes in each dimension.

        Not collective.

        The returned value is calculated excluding ghost points.

        See also:
            getGlobalSizes, DMStagGetLocalSizes <https://petsc.org/release/manualpages/DMStag/DMStagGetLocalSizes.html>

    Source code at petsc4py/PETSc/DMStag.pyx:400 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L400>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]

    getLocationDof(loc)
        Return number of DOFs associated with a given point on the grid.

        Not collective.

        Parameters
            loc (StencilLocation <#petsc4py.PETSc.DMStag.StencilLocation>) -- The grid point.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            DMStagGetLocationDOF <https://petsc.org/release/manualpages/DMStag/DMStagGetLocationDOF.html>

    Source code at petsc4py/PETSc/DMStag.pyx:721 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L721>

    getLocationSlot(loc, c)
        Return index to use in accessing raw local arrays.

        Not collective.

        Parameters

            •   loc (StencilLocation <#petsc4py.PETSc.DMStag.StencilLocation>) -- Location relative to an element.

            •   c (int <https://docs.python.org/3/library/functions.html#int>) -- Component.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            DMStagGetLocationSlot <https://petsc.org/release/manualpages/DMStag/DMStagGetLocationSlot.html>

    Source code at petsc4py/PETSc/DMStag.pyx:678 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L678>

    getOwnershipRanges()
        Return elements per process in each dimension.

        Not collective.

        See also:
            setOwnershipRanges, DMStagGetOwnershipRanges <https://petsc.org/release/manualpages/DMStag/DMStagGetOwnershipRanges.html>

    Source code at petsc4py/PETSc/DMStag.pyx:461 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L461>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>], ...]

    getProcSizes()
        Return number of processes in each dimension.

        Not collective.

        See also:
            DMStagGetNumRanks <https://petsc.org/release/manualpages/DMStag/DMStagGetNumRanks.html>

    Source code at petsc4py/PETSc/DMStag.pyx:432 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L432>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]

    getProductCoordinateLocationSlot(loc)
        Return slot for use with local product coordinate arrays.

        Not collective.

        Parameters
            loc (StencilLocation <#petsc4py.PETSc.DMStag.StencilLocation>) -- The grid location.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMStagGetProductCoordinateLocationSlot <https://petsc.org/release/manualpages/DMStag/DMStagGetProductCoordinateLocationSlot.html>

    Source code at petsc4py/PETSc/DMStag.pyx:701 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L701>

    getStencilType()
        Return elementwise ghost/halo stencil type.

        Not collective.

        See also:
            setStencilType, DMStagGetStencilType <https://petsc.org/release/manualpages/DMStag/DMStagGetStencilType.html>

    Source code at petsc4py/PETSc/DMStag.pyx:447 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L447>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getStencilWidth()
        Return elementwise stencil width.

        Not collective.

        See also:
            DMStagGetStencilWidth <https://petsc.org/release/manualpages/DMStag/DMStagGetStencilWidth.html>

    Source code at petsc4py/PETSc/DMStag.pyx:334 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L334>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getVecArray(vec)
        Not implemented.

        Source code at petsc4py/PETSc/DMStag.pyx:828 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L828>

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    migrateVec(vec, dmTo, vecTo)
        Transfer a vector between two DMStag objects.

        Collective.

        Currently only implemented to migrate global vectors to global vectors.

        Parameters

            •   vec (Vec <#petsc4py.PETSc.Vec>) -- The source vector.

            •   dmTo (DM <#petsc4py.PETSc.DM>) -- The compatible destination object.

            •   vecTo (Vec <#petsc4py.PETSc.Vec>) -- The destination vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMStagMigrateVec <https://petsc.org/release/manualpages/DMStag/DMStagMigrateVec.html>

    Source code at petsc4py/PETSc/DMStag.pyx:743 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L743>

    setBoundaryTypes(boundary_types)
        Set the boundary types.

        Logically collective.

        Parameters
            boundary_types (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[BoundaryType <#petsc4py.PETSc.DM.BoundaryType> | int <https://docs.python.org/3/library/functions.html#int> | str <https://docs.python.org/3/library/stdtypes.html#str> | bool <https://docs.python.org/3/library/functions.html#bool>, ...]) -- Boundary types for one/two/three dimensions.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getBoundaryTypes, DMStagSetBoundaryTypes <https://petsc.org/release/manualpages/DMStag/DMStagSetBoundaryTypes.html>

    Source code at petsc4py/PETSc/DMStag.pyx:201 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L201>

    setCoordinateDMType(dmtype)
        Set the type to store coordinates.

        Logically collective.

        Parameters
            dmtype (Type <#petsc4py.PETSc.DM.Type>) -- The type to store coordinates.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMStagSetCoordinateDMType <https://petsc.org/release/manualpages/DMStag/DMStagSetCoordinateDMType.html>

    Source code at petsc4py/PETSc/DMStag.pyx:657 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L657>

    setDof(dofs)
        Set DOFs/stratum.

        Logically collective.

        Parameters
            dofs (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]) -- The number of points per 0-cell (vertex/node), 1-cell (element in 1D, edge in 2D and 3D), 2-cell (element in 2D, face in 3D), or 3-cell (element in 3D).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMStagSetDOF <https://petsc.org/release/manualpages/DMStag/DMStagSetDOF.html>

    Source code at petsc4py/PETSc/DMStag.pyx:224 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L224>

    setGlobalSizes(sizes)
        Set global element counts in each dimension.

        Logically collective.

        Parameters
            sizes (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]) -- Global elementwise size in the one/two/three dimensions.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMStagSetGlobalSizes <https://petsc.org/release/manualpages/DMStag/DMStagSetGlobalSizes.html>

    Source code at petsc4py/PETSc/DMStag.pyx:246 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L246>

    setOwnershipRanges(ranges)
        Set elements per process in each dimension.

        Logically collective.

        Parameters
            ranges (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>], ...]) -- Element counts for each process in one/two/three dimensions.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getOwnershipRanges, DMStagSetOwnershipRanges <https://petsc.org/release/manualpages/DMStag/DMStagSetOwnershipRanges.html>

    Source code at petsc4py/PETSc/DMStag.pyx:286 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L286>

    setProcSizes(sizes)
        Set the number of processes in each dimension in the global process grid.

        Logically collective.

        Parameters
            sizes (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ...]) -- Number of processes in one/two/three dimensions.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMStagSetNumRanks <https://petsc.org/release/manualpages/DMStag/DMStagSetNumRanks.html>

    Source code at petsc4py/PETSc/DMStag.pyx:266 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L266>

    setStencilType(stenciltype)
        Set elementwise ghost/halo stencil type.

        Logically collective.

        Parameters
            stenciltype (StencilType <#petsc4py.PETSc.DMStag.StencilType> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The elementwise ghost stencil type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getStencilType, DMStagSetStencilType <https://petsc.org/release/manualpages/DMStag/DMStagSetStencilType.html>

    Source code at petsc4py/PETSc/DMStag.pyx:183 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L183>

    setStencilWidth(swidth)
        Set elementwise stencil width.

        Logically collective.

        The width value is not used when StencilType.NONE <#petsc4py.PETSc.DMStag.StencilType.NONE> is specified.

        Parameters
            swidth (int <https://docs.python.org/3/library/functions.html#int>) -- Stencil/halo/ghost width in elements.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMStagSetStencilWidth <https://petsc.org/release/manualpages/DMStag/DMStagSetStencilWidth.html>

    Source code at petsc4py/PETSc/DMStag.pyx:163 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L163>

    setUniformCoordinates(xmin=0, xmax=1, ymin=0, ymax=1, zmin=0, zmax=1)
        Set the coordinates to be a uniform grid..

        Collective.

        Local coordinates are populated, linearly extrapolated to ghost cells, including those outside the physical domain. This is also done in case of periodic boundaries, meaning that the same global point may have different coordinates in different local representations, which are equivalent assuming a periodicity implied by the arguments to this function, i.e., two points are equivalent if their difference is a multiple of xmax-xmin in the x dimension, ymax-ymin in the y dimension, and zmax-zmin in the z dimension.

        Parameters

            •   xmin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum global coordinate value in the x dimension.

            •   xmax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum global coordinate value in the x dimension.

            •   ymin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum global coordinate value in the y dimension.

            •   ymax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum global coordinate value in the y dimension.

            •   zmin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum global coordinate value in the z dimension.

            •   zmax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum global coordinate value in the z dimension.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setUniformCoordinatesExplicit, setUniformCoordinatesProduct, DMStagSetUniformCoordinates <https://petsc.org/release/manualpages/DMStag/DMStagSetUniformCoordinates.html>

    Source code at petsc4py/PETSc/DMStag.pyx:610 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L610>

    setUniformCoordinatesExplicit(xmin=0, xmax=1, ymin=0, ymax=1, zmin=0, zmax=1)
        Set coordinates to be a uniform grid, storing all values.

        Collective.

        Parameters

            •   xmin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum global coordinate value in the x dimension.

            •   xmax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum global coordinate value in the x dimension.

            •   ymin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum global coordinate value in the y dimension.

            •   ymax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum global coordinate value in the y dimension.

            •   zmin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum global coordinate value in the z dimension.

            •   zmax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum global coordinate value in the z dimension.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setUniformCoordinatesProduct, setUniformCoordinates, DMStagSetUniformCoordinatesExplicit <https://petsc.org/release/manualpages/DMStag/DMStagSetUniformCoordinatesExplicit.html>

    Source code at petsc4py/PETSc/DMStag.pyx:530 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L530>

    setUniformCoordinatesProduct(xmin=0, xmax=1, ymin=0, ymax=1, zmin=0, zmax=1)
        Create uniform coordinates, as a product of 1D arrays.

        Collective.

        The per-dimension 1-dimensional DMStag objects that comprise the product always have active 0-cells (vertices, element boundaries) and 1-cells (element centers).

        Parameters

            •   xmin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum global coordinate value in the x dimension.

            •   xmax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum global coordinate value in the x dimension.

            •   ymin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum global coordinate value in the y dimension.

            •   ymax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum global coordinate value in the y dimension.

            •   zmin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum global coordinate value in the z dimension.

            •   zmax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum global coordinate value in the z dimension.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setUniformCoordinatesExplicit, setUniformCoordinates, DMStagSetUniformCoordinatesProduct <https://petsc.org/release/manualpages/DMStag/DMStagSetUniformCoordinatesProduct.html>

    Source code at petsc4py/PETSc/DMStag.pyx:568 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L568>

Attributes Documentation

    boundary_types
        Boundary types in each dimension.

        Source code at petsc4py/PETSc/DMStag.pyx:866 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L866>

    corners
        The lower left corner and size of local region in each dimension.

        Source code at petsc4py/PETSc/DMStag.pyx:881 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L881>

    dim The dimension.

        Source code at petsc4py/PETSc/DMStag.pyx:836 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L836>

    dofs
        The number of DOFs associated with each stratum of the grid.

        Source code at petsc4py/PETSc/DMStag.pyx:841 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L841>

    entries_per_element
        The number of entries per element in the local representation.

        Source code at petsc4py/PETSc/DMStag.pyx:846 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L846>

    ghost_corners
        The lower left corner and size of local region in each dimension.

        Source code at petsc4py/PETSc/DMStag.pyx:886 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L886>

    global_sizes
        Global element counts in each dimension.

        Source code at petsc4py/PETSc/DMStag.pyx:851 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L851>

    local_sizes
        Local elementwise sizes in each dimension.

        Source code at petsc4py/PETSc/DMStag.pyx:856 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L856>

    proc_sizes
        The number of processes in each dimension in the global decomposition.

        Source code at petsc4py/PETSc/DMStag.pyx:861 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L861>

    stencil_type
        Stencil type.

        Source code at petsc4py/PETSc/DMStag.pyx:871 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L871>

    stencil_width
        Elementwise stencil width.

        Source code at petsc4py/PETSc/DMStag.pyx:876 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMStag.pyx#L876>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMSwarm

    class petsc4py.PETSc.DMSwarm
        Bases: DM <#petsc4py.PETSc.DM>

        A DM <#petsc4py.PETSc.DM> object used to represent arrays of data (fields) of arbitrary type.

        Enumerations
        CollectType <#petsc4py.PETSc.DMSwarm.CollectType> | Swarm collection types.
        MigrateType <#petsc4py.PETSc.DMSwarm.MigrateType> | Swarm migration types.
        PICLayoutType <#petsc4py.PETSc.DMSwarm.PICLayoutType> | Swarm PIC layout types.
        Type <#petsc4py.PETSc.DMSwarm.Type> | Swarm types.

  petsc4py.PETSc.DMSwarm.CollectType

    class petsc4py.PETSc.DMSwarm.CollectType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Swarm collection types.

        Attributes Summary
        COLLECT_BASIC | Constant COLLECT_BASIC of type int <https://docs.python.org/3/library/functions.html#int>
        COLLECT_DMDABOUNDINGBOX | Constant COLLECT_DMDABOUNDINGBOX of type int <https://docs.python.org/3/library/functions.html#int>
        COLLECT_GENERAL | Constant COLLECT_GENERAL of type int <https://docs.python.org/3/library/functions.html#int>
        COLLECT_USER | Constant COLLECT_USER of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        COLLECT_BASIC: int <https://docs.python.org/3/library/functions.html#int> = COLLECT_BASIC
            Constant COLLECT_BASIC of type int <https://docs.python.org/3/library/functions.html#int>

        COLLECT_DMDABOUNDINGBOX: int <https://docs.python.org/3/library/functions.html#int> = COLLECT_DMDABOUNDINGBOX
            Constant COLLECT_DMDABOUNDINGBOX of type int <https://docs.python.org/3/library/functions.html#int>

        COLLECT_GENERAL: int <https://docs.python.org/3/library/functions.html#int> = COLLECT_GENERAL
            Constant COLLECT_GENERAL of type int <https://docs.python.org/3/library/functions.html#int>

        COLLECT_USER: int <https://docs.python.org/3/library/functions.html#int> = COLLECT_USER
            Constant COLLECT_USER of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMSwarm.MigrateType

    class petsc4py.PETSc.DMSwarm.MigrateType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Swarm migration types.

        Attributes Summary
        MIGRATE_BASIC | Constant MIGRATE_BASIC of type int <https://docs.python.org/3/library/functions.html#int>
        MIGRATE_DMCELLEXACT | Constant MIGRATE_DMCELLEXACT of type int <https://docs.python.org/3/library/functions.html#int>
        MIGRATE_DMCELLNSCATTER | Constant MIGRATE_DMCELLNSCATTER of type int <https://docs.python.org/3/library/functions.html#int>
        MIGRATE_USER | Constant MIGRATE_USER of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        MIGRATE_BASIC: int <https://docs.python.org/3/library/functions.html#int> = MIGRATE_BASIC
            Constant MIGRATE_BASIC of type int <https://docs.python.org/3/library/functions.html#int>

        MIGRATE_DMCELLEXACT: int <https://docs.python.org/3/library/functions.html#int> = MIGRATE_DMCELLEXACT
            Constant MIGRATE_DMCELLEXACT of type int <https://docs.python.org/3/library/functions.html#int>

        MIGRATE_DMCELLNSCATTER: int <https://docs.python.org/3/library/functions.html#int> = MIGRATE_DMCELLNSCATTER
            Constant MIGRATE_DMCELLNSCATTER of type int <https://docs.python.org/3/library/functions.html#int>

        MIGRATE_USER: int <https://docs.python.org/3/library/functions.html#int> = MIGRATE_USER
            Constant MIGRATE_USER of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMSwarm.PICLayoutType

    class petsc4py.PETSc.DMSwarm.PICLayoutType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Swarm PIC layout types.

        Attributes Summary
        LAYOUT_GAUSS | Constant LAYOUT_GAUSS of type int <https://docs.python.org/3/library/functions.html#int>
        LAYOUT_REGULAR | Constant LAYOUT_REGULAR of type int <https://docs.python.org/3/library/functions.html#int>
        LAYOUT_SUBDIVISION | Constant LAYOUT_SUBDIVISION of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        LAYOUT_GAUSS: int <https://docs.python.org/3/library/functions.html#int> = LAYOUT_GAUSS
            Constant LAYOUT_GAUSS of type int <https://docs.python.org/3/library/functions.html#int>

        LAYOUT_REGULAR: int <https://docs.python.org/3/library/functions.html#int> = LAYOUT_REGULAR
            Constant LAYOUT_REGULAR of type int <https://docs.python.org/3/library/functions.html#int>

        LAYOUT_SUBDIVISION: int <https://docs.python.org/3/library/functions.html#int> = LAYOUT_SUBDIVISION
            Constant LAYOUT_SUBDIVISION of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DMSwarm.Type

    class petsc4py.PETSc.DMSwarm.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Swarm types.

        Attributes Summary
        BASIC | Constant BASIC of type int <https://docs.python.org/3/library/functions.html#int>
        PIC | Constant PIC of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        BASIC: int <https://docs.python.org/3/library/functions.html#int> = BASIC
            Constant BASIC of type int <https://docs.python.org/3/library/functions.html#int>

        PIC: int <https://docs.python.org/3/library/functions.html#int> = PIC
            Constant PIC of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
addCellDM(celldm) | Add a cell DM to the DMSwarm.
addNPoints(npoints) | Add space for a number of new points in the DMSwarm.
addPoint() | Add space for one new point in the DMSwarm.
collectViewCreate() | Apply a collection method and gather points in neighbor ranks.
collectViewDestroy() | Reset the DMSwarm to the size prior to calling collectViewCreate.
computeMoments(coord, weight) | Return the moments defined in the active cell DM.
copyPoint(pi, pj) | Copy point pi to point pj in the DMSwarm.
create([comm]) | Create an empty DM object and set its type to DM.Type.SWARM <#petsc4py.PETSc.DM.Type.SWARM>.
createGlobalVectorFromField(fieldname) | Create a global Vec <#petsc4py.PETSc.Vec> object associated with a given field.
createGlobalVectorFromFields(fieldnames) | Create a global Vec <#petsc4py.PETSc.Vec> object associated with a given set of fields.
createLocalVectorFromField(fieldname) | Create a local Vec <#petsc4py.PETSc.Vec> object associated with a given field.
createLocalVectorFromFields(fieldnames) | Create a local Vec <#petsc4py.PETSc.Vec> object associated with a given set of fields.
destroyGlobalVectorFromField(fieldname) | Destroy the global Vec <#petsc4py.PETSc.Vec> object associated with a given field.
destroyGlobalVectorFromFields(fieldnames) | Destroy the global Vec <#petsc4py.PETSc.Vec> object associated with a given set of fields.
destroyLocalVectorFromField(fieldname) | Destroy the local Vec <#petsc4py.PETSc.Vec> object associated with a given field.
destroyLocalVectorFromFields(fieldnames) | Destroy the local Vec <#petsc4py.PETSc.Vec> object associated with a given set of fields.
finalizeFieldRegister() | Finalize the registration of fields to a DMSwarm.
getCellDM() | Return DM <#petsc4py.PETSc.DM> cell attached to DMSwarm.
getCellDMActive() | Return the active cell DM in the DMSwarm.
getCellDMByName(name) | Return the cell DM with the given name in the DMSwarm.
getCellDMNames() | Return the names of all cell DMs in the DMSwarm.
getField(fieldname) | Return arrays storing all entries associated with a field.
getLocalSize() | Return the local length of fields registered.
getSize() | Return the total length of fields registered.
initializeFieldRegister() | Initiate the registration of fields to a DMSwarm.
insertPointUsingCellDM(layoutType, fill_param) | Insert point coordinates within each cell.
migrate([remove_sent_points]) | Relocate points defined in the DMSwarm to other MPI ranks.
projectFields(dm, fieldnames, vecs[, mode]) | Project a set of DMSwarm fields onto the cell DM <#petsc4py.PETSc.DM>.
registerField(fieldname, blocksize[, dtype]) | Register a field to a DMSwarm with a native PETSc data type.
removePoint() | Remove the last point from the DMSwarm.
removePointAtIndex(index) | Remove a specific point from the DMSwarm.
restoreField(fieldname) | Restore accesses associated with a registered field.
setCellDM(dm) | Attach a DM <#petsc4py.PETSc.DM> to a DMSwarm.
setCellDMActive(name) | Activate a cell DM in the DMSwarm.
setLocalSizes(nlocal, buffer) | Set the length of all registered fields on the DMSwarm.
setPointCoordinates(coordinates[, ...]) | Set point coordinates in a DMSwarm from a user-defined list.
setPointCoordinatesCellwise(coordinates) | Insert point coordinates within each cell.
setPointsUniformCoordinates(min, max, npoints) | Set point coordinates in a DMSwarm on a regular (ijk) grid.
setType(dmswarm_type) | Set particular flavor of DMSwarm.
sortGetAccess() | Setup up a DMSwarm point sort context.
sortGetIsValid() | Return whether the sort context is up-to-date.
sortGetNumberOfPointsPerCell(e) | Return the number of points in a cell.
sortGetPointsPerCell(e) | Create an array of point indices for all points in a cell.
sortGetSizes() | Return the sizes associated with a DMSwarm point sorting context.
sortRestoreAccess() | Invalidate the DMSwarm point sorting context.
vectorDefineField(fieldname) | Set the fields from which to define a Vec <#petsc4py.PETSc.Vec> object.
viewFieldsXDMF(filename, fieldnames) | Write a selection of DMSwarm fields to an XDMF3 file.
viewXDMF(filename) | Write this DMSwarm fields to an XDMF3 file.

Methods Documentation

    addCellDM(celldm)
        Add a cell DM to the DMSwarm.

        Logically collective.

        Parameters

            •   cellDM (CellDM <#petsc4py.PETSc.CellDM>) -- The cell DM object

            •   celldm (CellDM <#petsc4py.PETSc.CellDM>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmAddCellDM <https://petsc.org/release/manualpages/DMSwarm/DMSwarmAddCellDM.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:957 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L957>

    addNPoints(npoints)
        Add space for a number of new points in the DMSwarm.

        Not collective.

        Parameters
            npoints (int <https://docs.python.org/3/library/functions.html#int>) -- The number of new points to add.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmAddNPoints <https://petsc.org/release/manualpages/DMSwarm/DMSwarmAddNPoints.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:444 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L444>

    addPoint()
        Add space for one new point in the DMSwarm.

        Not collective.

        See also:
            DMSwarmAddPoint <https://petsc.org/release/manualpages/DMSwarm/DMSwarmAddPoint.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:432 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L432>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    collectViewCreate()
        Apply a collection method and gather points in neighbor ranks.

        Collective.

        See also:
            collectViewDestroy, DMSwarmCollectViewCreate <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCollectViewCreate.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:560 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L560>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    collectViewDestroy()
        Reset the DMSwarm to the size prior to calling collectViewCreate.

        Collective.

        See also:
            collectViewCreate, DMSwarmCollectViewDestroy <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCollectViewDestroy.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:572 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L572>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    computeMoments(coord, weight)
        Return the moments defined in the active cell DM.

        Collective.

        Notes

        We integrate the given weight field over the given coordinate

        See also:
            DMSwarmComputeMoments <https://petsc.org/release/manualpages/DMSwarm/DMSwarmComputeMoments.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:1047 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L1047>

        Parameters

            •   coord (str <https://docs.python.org/3/library/stdtypes.html#str>)

            •   weight (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[float <https://docs.python.org/3/library/functions.html#float>]

    copyPoint(pi, pj)
        Copy point pi to point pj in the DMSwarm.

        Not collective.

        Parameters

            •   pi (int <https://docs.python.org/3/library/functions.html#int>) -- The index of the point to copy (source).

            •   pj (int <https://docs.python.org/3/library/functions.html#int>) -- The point index where the copy should be located (destination).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmCopyPoint <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCopyPoint.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:492 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L492>

    create(comm=None)
        Create an empty DM object and set its type to DM.Type.SWARM <#petsc4py.PETSc.DM.Type.SWARM>.

        Collective.

        DMs are the abstract objects in PETSc that mediate between meshes and discretizations and the algebraic solvers, time integrators, and optimization algorithms.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            DMCreate <https://petsc.org/release/manualpages/DM/DMCreate.html>, DMSetType <https://petsc.org/release/manualpages/DM/DMSetType.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:39 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L39>

    createGlobalVectorFromField(fieldname)
        Create a global Vec <#petsc4py.PETSc.Vec> object associated with a given field.

        Collective.

        The vector must be returned to the DMSwarm using a matching call to destroyGlobalVectorFromField.

        Parameters
            fieldname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The textual name given to a registered field.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            destroyGlobalVectorFromField, DMSwarmCreateGlobalVectorFromField <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCreateGlobalVectorFromField.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:65 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L65>

    createGlobalVectorFromFields(fieldnames)
        Create a global Vec <#petsc4py.PETSc.Vec> object associated with a given set of fields.

        Collective.

        The vector must be returned to the DMSwarm using a matching call to destroyGlobalVectorFromFields.

        Parameters
            fieldnames (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[str <https://docs.python.org/3/library/stdtypes.html#str>]) -- The textual name given to each registered field.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            destroyGlobalVectorFromFields, DMSwarmCreateGlobalVectorFromFields <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCreateGlobalVectorFromFields.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:109 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L109>

    createLocalVectorFromField(fieldname)
        Create a local Vec <#petsc4py.PETSc.Vec> object associated with a given field.

        Collective.

        The vector must be returned to the DMSwarm using a matching call to destroyLocalVectorFromField.

        Parameters
            fieldname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The textual name given to a registered field.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            destroyLocalVectorFromField, DMSwarmCreateLocalVectorFromField <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCreateLocalVectorFromField.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:165 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L165>

    createLocalVectorFromFields(fieldnames)
        Create a local Vec <#petsc4py.PETSc.Vec> object associated with a given set of fields.

        Collective.

        The vector must be returned to the DMSwarm using a matching call to destroyLocalVectorFromFields.

        Parameters
            fieldnames (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[str <https://docs.python.org/3/library/stdtypes.html#str>]) -- The textual name given to each registered field.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            destroyLocalVectorFromFields, DMSwarmCreateLocalVectorFromFields <https://petsc.org/release/manualpages/DMSwarm/DMSwarmCreateLocalVectorFromFields.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:209 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L209>

    destroyGlobalVectorFromField(fieldname)
        Destroy the global Vec <#petsc4py.PETSc.Vec> object associated with a given field.

        Collective.

        Parameters
            fieldname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The textual name given to a registered field.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            createGlobalVectorFromField, DMSwarmDestroyGlobalVectorFromField <https://petsc.org/release/manualpages/DMSwarm/DMSwarmDestroyGlobalVectorFromField.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:89 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L89>

    destroyGlobalVectorFromFields(fieldnames)
        Destroy the global Vec <#petsc4py.PETSc.Vec> object associated with a given set of fields.

        Collective.

        Parameters
            fieldnames (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[str <https://docs.python.org/3/library/stdtypes.html#str>]) -- The textual name given to each registered field.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            createGlobalVectorFromFields, DMSwarmDestroyGlobalVectorFromFields <https://petsc.org/release/manualpages/DMSwarm/DMSwarmDestroyGlobalVectorFromFields.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:139 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L139>

    destroyLocalVectorFromField(fieldname)
        Destroy the local Vec <#petsc4py.PETSc.Vec> object associated with a given field.

        Collective.

        Parameters
            fieldname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The textual name given to a registered field.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            createLocalVectorFromField, DMSwarmDestroyLocalVectorFromField <https://petsc.org/release/manualpages/DMSwarm/DMSwarmDestroyLocalVectorFromField.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:189 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L189>

    destroyLocalVectorFromFields(fieldnames)
        Destroy the local Vec <#petsc4py.PETSc.Vec> object associated with a given set of fields.

        Collective.

        Parameters
            fieldnames (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[str <https://docs.python.org/3/library/stdtypes.html#str>]) -- The textual name given to each registered field.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            createLocalVectorFromFields, DMSwarmDestroyLocalVectorFromFields <https://petsc.org/release/manualpages/DMSwarm/DMSwarmDestroyLocalVectorFromFields.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:239 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L239>

    finalizeFieldRegister()
        Finalize the registration of fields to a DMSwarm.

        Collective.

        See also:
            initializeFieldRegister, DMSwarmFinalizeFieldRegister <https://petsc.org/release/manualpages/DMSwarm/DMSwarmFinalizeFieldRegister.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:279 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L279>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    getCellDM()
        Return DM <#petsc4py.PETSc.DM> cell attached to DMSwarm.

        Collective.

        See also:
            setCellDM, DMSwarmGetCellDM <https://petsc.org/release/manualpages/DMSwarm/DMSwarmGetCellDM.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:601 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L601>

        Return type
            DM <#petsc4py.PETSc.DM>

    getCellDMActive()
        Return the active cell DM in the DMSwarm.

        Not collective.

        See also:
            DMSwarmGetCellDMActive <https://petsc.org/release/manualpages/DMSwarm/DMSwarmGetCellDMActive.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:993 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L993>

        Return type
            CellDM <#petsc4py.PETSc.CellDM>

    getCellDMByName(name)
        Return the cell DM with the given name in the DMSwarm.

        Not collective.

        See also:
            DMSwarmGetCellDMByName <https://petsc.org/release/manualpages/DMSwarm/DMSwarmGetCellDMByName.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:1010 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L1010>

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            CellDM <#petsc4py.PETSc.CellDM>

    getCellDMNames()
        Return the names of all cell DMs in the DMSwarm.

        Not collective.

        See also:
            DMSwarmGetCellDMNames <https://petsc.org/release/manualpages/DMSwarm/DMSwarmGetCellDMNames.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:1029 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L1029>

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[str <https://docs.python.org/3/library/stdtypes.html#str>]

    getField(fieldname)
        Return arrays storing all entries associated with a field.

        Not collective.

        The returned array contains underlying values of the field.

        The array must be returned to the DMSwarm using a matching call to restoreField.

        Parameters
            fieldname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The textual name to identify this field.

        Returns
            The type of the entries in the array will match the type of the field. The array is two dimensional with shape (num_points, blocksize).

        Return type
            numpy.ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>

    See also:
            restoreField, DMSwarmGetField <https://petsc.org/release/manualpages/DMSwarm/DMSwarmGetField.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:343 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L343>

    getLocalSize()
        Return the local length of fields registered.

        Not collective.

        See also:
            DMSwarmGetLocalSize <https://petsc.org/release/manualpages/DMSwarm/DMSwarmGetLocalSize.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:513 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L513>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getSize()
        Return the total length of fields registered.

        Collective.

        See also:
            DMSwarmGetSize <https://petsc.org/release/manualpages/DMSwarm/DMSwarmGetSize.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:527 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L527>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    initializeFieldRegister()
        Initiate the registration of fields to a DMSwarm.

        Collective.

        After all fields have been registered, you must call finalizeFieldRegister.

        See also:
            finalizeFieldRegister, DMSwarmInitializeFieldRegister <https://petsc.org/release/manualpages/DMSwarm/DMSwarmInitializeFieldRegister.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:265 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L265>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    insertPointUsingCellDM(layoutType, fill_param)
        Insert point coordinates within each cell.

        Not collective.

        Parameters

            •   layout_type -- Method used to fill each cell with the cell DM.

            •   fill_param (int <https://docs.python.org/3/library/functions.html#int>) -- Parameter controlling how many points per cell are added (the meaning of this parameter is dependent on the layout type).

            •   layoutType (PICLayoutType <#petsc4py.PETSc.DMSwarm.PICLayoutType>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmInsertPointsUsingCellDM <https://petsc.org/release/manualpages/DMSwarm/DMSwarmInsertPointsUsingCellDM.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:716 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L716>

    migrate(remove_sent_points=False)
        Relocate points defined in the DMSwarm to other MPI ranks.

        Collective.

        Parameters
            remove_sent_points (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating if sent points should be removed from the current MPI rank.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmMigrate <https://petsc.org/release/manualpages/DMSwarm/DMSwarmMigrate.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:541 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L541>

    projectFields(dm, fieldnames, vecs, mode=None)
        Project a set of DMSwarm fields onto the cell DM <#petsc4py.PETSc.DM>.

        Collective.

        Parameters

            •   dm (DM <#petsc4py.PETSc.DM>) -- The continuum DM <#petsc4py.PETSc.DM>.

            •   fieldnames (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[str <https://docs.python.org/3/library/stdtypes.html#str>]) -- The textual names of the swarm fields to project.

            •   vecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>])

            •   mode (ScatterModeSpec <#petsc4py.typing.ScatterModeSpec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmProjectFields <https://petsc.org/release/manualpages/DM/DMSwarmProjectFields.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:925 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L925>

    registerField(fieldname, blocksize, dtype=ScalarType)
        Register a field to a DMSwarm with a native PETSc data type.

        Collective.

        Parameters

            •   fieldname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The textual name to identify this field.

            •   blocksize (int <https://docs.python.org/3/library/functions.html#int>) -- The number of each data type.

            •   dtype (type <#petsc4py.PETSc.Device.type> | dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>) -- A valid PETSc data type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmRegisterPetscDatatypeField <https://petsc.org/release/manualpages/DMSwarm/DMSwarmRegisterPetscDatatypeField.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:313 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L313>

    removePoint()
        Remove the last point from the DMSwarm.

        Not collective.

        See also:
            DMSwarmRemovePoint <https://petsc.org/release/manualpages/DMSwarm/DMSwarmRemovePoint.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:462 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L462>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    removePointAtIndex(index)
        Remove a specific point from the DMSwarm.

        Not collective.

        Parameters
            index (int <https://docs.python.org/3/library/functions.html#int>) -- Index of point to remove

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmRemovePointAtIndex <https://petsc.org/release/manualpages/DMSwarm/DMSwarmRemovePointAtIndex.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:474 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L474>

    restoreField(fieldname)
        Restore accesses associated with a registered field.

        Not collective.

        Parameters
            fieldname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The textual name to identify this field.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getField, DMSwarmRestoreField <https://petsc.org/release/manualpages/DMSwarm/DMSwarmRestoreField.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:389 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L389>

    setCellDM(dm)
        Attach a DM <#petsc4py.PETSc.DM> to a DMSwarm.

        Collective.

        Parameters
            dm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM> to attach to the DMSwarm.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getCellDM, DMSwarmSetCellDM <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSetCellDM.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:584 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L584>

    setCellDMActive(name)
        Activate a cell DM in the DMSwarm.

        Logically collective.

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The name of the cell DM to activate

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmSetCellDMActive <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSetCellDMActive.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:974 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L974>

    setLocalSizes(nlocal, buffer)
        Set the length of all registered fields on the DMSwarm.

        Not collective.

        Parameters

            •   nlocal (int <https://docs.python.org/3/library/functions.html#int>) -- The length of each registered field.

            •   buffer (int <https://docs.python.org/3/library/functions.html#int>) -- The length of the buffer used for efficient dynamic resizing.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            DMSwarmSetLocalSizes <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSetLocalSizes.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:291 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L291>

    setPointCoordinates(coordinates, redundant=False, mode=None)
        Set point coordinates in a DMSwarm from a user-defined list.

        Collective.

        Parameters

            •   coordinates (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) -- The coordinate values.

            •   redundant (bool <https://docs.python.org/3/library/functions.html#bool>) -- If set to True <https://docs.python.org/3/library/constants.html#True>, it is assumed that coordinates are only valid on rank 0 and should be broadcast to other ranks.

            •   mode (InsertMode <#petsc4py.PETSc.InsertMode> | None <https://docs.python.org/3/library/constants.html#None>) -- Indicates whether to append points to the swarm (InsertMode.ADD <#petsc4py.PETSc.InsertMode.ADD>), or override existing points (InsertMode.INSERT <#petsc4py.PETSc.InsertMode.INSERT>).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmSetPointCoordinates <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSetPointCoordinates.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:680 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L680>

    setPointCoordinatesCellwise(coordinates)
        Insert point coordinates within each cell.

        Not collective.

        Point coordinates are defined over the reference cell.

        Parameters
            coordinates (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) -- The coordinates (defined in the local coordinate system for each cell) to insert.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmSetPointCoordinatesCellwise <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSetPointCoordinatesCellwise.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:738 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L738>

    setPointsUniformCoordinates(min, max, npoints, mode=None)
        Set point coordinates in a DMSwarm on a regular (ijk) grid.

        Collective.

        Parameters

            •   min (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) -- Minimum coordinate values in the x, y, z directions (array of length dim).

            •   max (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) -- Maximum coordinate values in the x, y, z directions (array of length dim).

            •   npoints (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Number of points in each spatial direction (array of length dim).

            •   mode (InsertMode <#petsc4py.PETSc.InsertMode> | None <https://docs.python.org/3/library/constants.html#None>) -- Indicates whether to append points to the swarm (InsertMode.ADD <#petsc4py.PETSc.InsertMode.ADD>), or override existing points (InsertMode.INSERT <#petsc4py.PETSc.InsertMode.INSERT>).

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            DMSwarmSetPointsUniformCoordinates <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSetPointsUniformCoordinates.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:636 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L636>

    setType(dmswarm_type)
        Set particular flavor of DMSwarm.

        Collective.

        Parameters
            dmswarm_type (Type <#petsc4py.PETSc.DMSwarm.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The DMSwarm type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmSetType <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSetType.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:618 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L618>

    sortGetAccess()
        Setup up a DMSwarm point sort context.

        Not collective.

        The point sort context is used for efficient traversal of points within a cell.

        You must call sortRestoreAccess when you no longer need access to the sort context.

        See also:
            sortRestoreAccess, DMSwarmSortGetAccess <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSortGetAccess.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:813 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L813>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    sortGetIsValid()
        Return whether the sort context is up-to-date.

        Not collective.

        Returns the flag associated with a DMSwarm point sorting context.

        See also:
            DMSwarmSortGetIsValid <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSortGetIsValid.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:887 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L887>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    sortGetNumberOfPointsPerCell(e)
        Return the number of points in a cell.

        Not collective.

        Parameters
            e (int <https://docs.python.org/3/library/functions.html#int>) -- The index of the cell.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            DMSwarmSortGetNumberOfPointsPerCell <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSortGetNumberOfPointsPerCell.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:867 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L867>

    sortGetPointsPerCell(e)
        Create an array of point indices for all points in a cell.

        Not collective.

        Parameters
            e (int <https://docs.python.org/3/library/functions.html#int>) -- The index of the cell.

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            DMSwarmSortGetPointsPerCell <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSortGetPointsPerCell.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:843 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L843>

    sortGetSizes()
        Return the sizes associated with a DMSwarm point sorting context.

        Not collective.

        Returns

            •   ncells (int <https://docs.python.org/3/library/functions.html#int>) -- Number of cells within the sort context.

            •   npoints (int <https://docs.python.org/3/library/functions.html#int>) -- Number of points used to create the sort context.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            DMSwarmSortGetSizes <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSortGetSizes.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:903 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L903>

    sortRestoreAccess()
        Invalidate the DMSwarm point sorting context.

        Not collective.

        See also:
            sortGetAccess, DMSwarmSortRestoreAccess <https://petsc.org/release/manualpages/DMSwarm/DMSwarmSortRestoreAccess.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:831 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L831>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    vectorDefineField(fieldname)
        Set the fields from which to define a Vec <#petsc4py.PETSc.Vec> object.

        Collective.

        The field will be used when DM.createLocalVec <#petsc4py.PETSc.DM.createLocalVec>, or DM.createGlobalVec <#petsc4py.PETSc.DM.createGlobalVec> is called.

        Parameters
            fieldname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The textual names given to a registered field.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmVectorDefineField <https://petsc.org/release/manualpages/DMSwarm/DMSwarmVectorDefineField.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:410 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L410>

    viewFieldsXDMF(filename, fieldnames)
        Write a selection of DMSwarm fields to an XDMF3 file.

        Collective.

        Parameters

            •   filename (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The file name of the XDMF file (must have the extension .xmf).

            •   fieldnames (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[str <https://docs.python.org/3/library/stdtypes.html#str>]) -- Array containing the textual names of fields to write.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmViewFieldsXDMF <https://petsc.org/release/manualpages/DMSwarm/DMSwarmViewFieldsXDMF.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:765 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L765>

    viewXDMF(filename)
        Write this DMSwarm fields to an XDMF3 file.

        Collective.

        Parameters
            filename (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The file name of the XDMF file (must have the extension .xmf).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            DMSwarmViewXDMF <https://petsc.org/release/manualpages/DMSwarm/DMSwarmViewXDMF.html>

    Source code at petsc4py/PETSc/DMSwarm.pyx:794 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DMSwarm.pyx#L794>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DS

    class petsc4py.PETSc.DS
        Bases: Object <#petsc4py.PETSc.Object>

        Discrete System object.

        Enumerations
        Type <#petsc4py.PETSc.DS.Type> | The Discrete System types.

  petsc4py.PETSc.DS.Type

    class petsc4py.PETSc.DS.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The Discrete System types.

        Attributes Summary
        BASIC | Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        BASIC: str <https://docs.python.org/3/library/stdtypes.html#str> = BASIC
            Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
create([comm]) | Create an empty DS.
destroy() | Destroy the discrete system.
getComponents() | Return the number of components for each field on an evaluation point.
getCoordinateDimension() | Return the coordinate dimension of the DS.
getDimensions() | Return the size of the space for each field on an evaluation point.
getFieldIndex(disc) | Return the index of the given field.
getNumFields() | Return the number of fields in the DS.
getSpatialDimension() | Return the spatial dimension of the DS.
getTotalComponents() | Return the total number of components in this system.
getTotalDimensions() | Return the total size of the approximation space for this system.
getType() | Return the type of the discrete system.
setDiscretisation(f, disc) | Set the discretization object for the given field.
setFromOptions() | Set parameters in a DS from the options database.
setType(ds_type) | Build a particular type of a discrete system.
setUp() | Construct data structures for the discrete system.
view([viewer]) | View a discrete system.

Methods Documentation

    create(comm=None)
        Create an empty DS.

        Collective.

        The type can then be set with setType.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            setType, destroy, PetscDSCreate <https://petsc.org/release/manualpages/DT/PetscDSCreate.html>

    Source code at petsc4py/PETSc/DS.pyx:53 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L53>

    destroy()
        Destroy the discrete system.

        Collective.

        See also:
            create, PetscDSDestroy <https://petsc.org/release/manualpages/DT/PetscDSDestroy.html>

    Source code at petsc4py/PETSc/DS.pyx:40 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L40>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getComponents()
        Return the number of components for each field on an evaluation point.

        Not collective.

        See also:
            PetscDSGetComponents <https://petsc.org/release/manualpages/DT/PetscDSGetComponents.html>

    Source code at petsc4py/PETSc/DS.pyx:246 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L246>

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    getCoordinateDimension()
        Return the coordinate dimension of the DS.

        Not collective.

        The coordinate dimension of the DS is the dimension of the space into which the discretiaztions are embedded.

        See also:
            PetscDSGetCoordinateDimension <https://petsc.org/release/manualpages/DT/PetscDSGetCoordinateDimension.html>

    Source code at petsc4py/PETSc/DS.pyx:153 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L153>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getDimensions()
        Return the size of the space for each field on an evaluation point.

        Not collective.

        See also:
            PetscDSGetDimensions <https://petsc.org/release/manualpages/DT/PetscDSGetDimensions.html>

    Source code at petsc4py/PETSc/DS.pyx:231 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L231>

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    getFieldIndex(disc)
        Return the index of the given field.

        Not collective.

        Parameters
            disc (Object <#petsc4py.PETSc.Object>) -- The discretization object.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            PetscDSGetFieldIndex <https://petsc.org/release/manualpages/DT/PetscDSGetFieldIndex.html>

    Source code at petsc4py/PETSc/DS.pyx:184 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L184>

    getNumFields()
        Return the number of fields in the DS.

        Not collective.

        See also:
            PetscDSGetNumFields <https://petsc.org/release/manualpages/DT/PetscDSGetNumFields.html>

    Source code at petsc4py/PETSc/DS.pyx:170 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L170>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getSpatialDimension()
        Return the spatial dimension of the DS.

        Not collective.

        The spatial dimension of the DS is the topological dimension of the discretizations.

        See also:
            PetscDSGetSpatialDimension <https://petsc.org/release/manualpages/DT/PetscDSGetSpatialDimension.html>

    Source code at petsc4py/PETSc/DS.pyx:136 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L136>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getTotalComponents()
        Return the total number of components in this system.

        Not collective.

        See also:
            PetscDSGetTotalComponents <https://petsc.org/release/manualpages/DT/PetscDSGetTotalComponents.html>

    Source code at petsc4py/PETSc/DS.pyx:217 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L217>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getTotalDimensions()
        Return the total size of the approximation space for this system.

        Not collective.

        See also:
            PetscDSGetTotalDimension <https://petsc.org/release/manualpages/DT/PetscDSGetTotalDimension.html>

    Source code at petsc4py/PETSc/DS.pyx:203 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L203>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getType()
        Return the type of the discrete system.

        Not collective.

        See also:
            setType, PetscDSGetType <https://petsc.org/release/manualpages/DT/PetscDSGetType.html>

    Source code at petsc4py/PETSc/DS.pyx:95 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L95>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    setDiscretisation(f, disc)
        Set the discretization object for the given field.

        Not collective.

        Parameters

            •   f (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

            •   disc (Object <#petsc4py.PETSc.Object>) -- The discretization object.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscDSSetDiscretization <https://petsc.org/release/manualpages/DT/PetscDSSetDiscretization.html>

    Source code at petsc4py/PETSc/DS.pyx:261 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L261>

    setFromOptions()
        Set parameters in a DS from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, PetscDSSetFromOptions <https://petsc.org/release/manualpages/DT/PetscDSSetFromOptions.html>

    Source code at petsc4py/PETSc/DS.pyx:109 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L109>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setType(ds_type)
        Build a particular type of a discrete system.

        Collective.

        Parameters
            ds_type (Type <#petsc4py.PETSc.DS.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of the discrete system.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getType, PetscDSSetType <https://petsc.org/release/manualpages/DT/PetscDSSetType.html>

    Source code at petsc4py/PETSc/DS.pyx:76 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L76>

    setUp()
        Construct data structures for the discrete system.

        Collective.

        See also:
            PetscDSSetUp <https://petsc.org/release/manualpages/DT/PetscDSSetUp.html>

    Source code at petsc4py/PETSc/DS.pyx:121 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L121>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    view(viewer=None)
        View a discrete system.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> to display the system.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscDSView <https://petsc.org/release/manualpages/DT/PetscDSView.html>

    Source code at petsc4py/PETSc/DS.pyx:21 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DS.pyx#L21>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Device

    class petsc4py.PETSc.Device
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The device object.

        Represents a handle to an accelerator (which may be the host).

        See also:
            DeviceContext <#petsc4py.PETSc.DeviceContext>, PetscDevice <https://petsc.org/release/manualpages/Sys/PetscDevice.html>

    Enumerations
    Type <#petsc4py.PETSc.Device.Type> | The type of device.

  petsc4py.PETSc.Device.Type

    class petsc4py.PETSc.Device.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The type of device.

        See also:
            Device <#petsc4py.PETSc.Device>, Device.create <#petsc4py.PETSc.Device.create>, Device.getDeviceType <#petsc4py.PETSc.Device.getDeviceType>, Device.type <#petsc4py.PETSc.Device.type>, PetscDeviceType <https://petsc.org/release/manualpages/Sys/PetscDeviceType.html>

    Attributes Summary
    CUDA | Constant CUDA of type int <https://docs.python.org/3/library/functions.html#int>
    DEFAULT | Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>
    HIP | Constant HIP of type int <https://docs.python.org/3/library/functions.html#int>
    HOST | Constant HOST of type int <https://docs.python.org/3/library/functions.html#int>
    SYCL | Constant SYCL of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        CUDA: int <https://docs.python.org/3/library/functions.html#int> = CUDA
            Constant CUDA of type int <https://docs.python.org/3/library/functions.html#int>

        DEFAULT: int <https://docs.python.org/3/library/functions.html#int> = DEFAULT
            Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>

        HIP: int <https://docs.python.org/3/library/functions.html#int> = HIP
            Constant HIP of type int <https://docs.python.org/3/library/functions.html#int>

        HOST: int <https://docs.python.org/3/library/functions.html#int> = HOST
            Constant HOST of type int <https://docs.python.org/3/library/functions.html#int>

        SYCL: int <https://docs.python.org/3/library/functions.html#int> = SYCL
            Constant SYCL of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
configure() | Configure and setup a device object.
create([dtype, device_id]) | Create a device object.
destroy() | Destroy a device object.
getDeviceId() | Return the device id.
getDeviceType() | Return the type of the device.
setDefaultType(device_type) | Set the device type to be used as the default in subsequent calls to create.
view([viewer]) | View a device object.

Attributes Summary
device_id | The device id.
type | The device type.

Methods Documentation

    configure()
        Configure and setup a device object.

        Not collective.

        See also:
            create, PetscDeviceConfigure <https://petsc.org/release/manualpages/Device/PetscDeviceConfigure.html>

    Source code at petsc4py/PETSc/Device.pyx:132 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L132>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    classmethod create(dtype=None, device_id=DECIDE)
        Create a device object.

        Not collective.

        Parameters

            •   dtype (Type <#petsc4py.PETSc.Device.Type> | None <https://docs.python.org/3/library/constants.html#None>) -- The type of device to create (or None <https://docs.python.org/3/library/constants.html#None> for the default).

            •   device_id (int <https://docs.python.org/3/library/functions.html#int>) -- The numeric id of the device to create.

        Return type
            Device <#petsc4py.PETSc.Device>

    See also:
            destroy, PetscDeviceCreate <https://petsc.org/release/manualpages/Device/PetscDeviceCreate.html>

    Source code at petsc4py/PETSc/Device.pyx:94 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L94>

    destroy()
        Destroy a device object.

        Not collective.

        See also:
            create, PetscDeviceDestroy <https://petsc.org/release/manualpages/Device/PetscDeviceDestroy.html>

    Source code at petsc4py/PETSc/Device.pyx:120 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L120>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    getDeviceId()
        Return the device id.

        Not collective.

        See also:
            create, PetscDeviceGetDeviceId <https://petsc.org/release/manualpages/Device/PetscDeviceGetDeviceId.html>

    Source code at petsc4py/PETSc/Device.pyx:180 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L180>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getDeviceType()
        Return the type of the device.

        Not collective.

        See also:
            type, PetscDeviceGetType <https://petsc.org/release/manualpages/Device/PetscDeviceGetType.html>

    Source code at petsc4py/PETSc/Device.pyx:165 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L165>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    static setDefaultType(device_type)
        Set the device type to be used as the default in subsequent calls to create.

        Not collective.

        See also:
            create, PetscDeviceSetDefaultDeviceType <https://petsc.org/release/manualpages/Device/PetscDeviceSetDefaultDeviceType.html>

    Source code at petsc4py/PETSc/Device.pyx:195 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L195>

        Parameters
            device_type (Type <#petsc4py.PETSc.Device.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        View a device object.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscDeviceView <https://petsc.org/release/manualpages/Device/PetscDeviceView.html>

    Source code at petsc4py/PETSc/Device.pyx:144 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L144>

Attributes Documentation

    device_id
        The device id.

        Source code at petsc4py/PETSc/Device.pyx:215 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L215>

    type
        The device type.

        Source code at petsc4py/PETSc/Device.pyx:210 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L210>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DeviceContext

    class petsc4py.PETSc.DeviceContext
        Bases: Object <#petsc4py.PETSc.Object>

        DeviceContext object.

        Represents an abstract handle to a device context.

        See also:
            Device <#petsc4py.PETSc.Device>, PetscDeviceContext <https://petsc.org/release/manualpages/Sys/PetscDeviceContext.html>

    Enumerations
    JoinMode <#petsc4py.PETSc.DeviceContext.JoinMode> | The type of join to perform.
    StreamType <#petsc4py.PETSc.DeviceContext.StreamType> | The type of stream.

  petsc4py.PETSc.DeviceContext.JoinMode

    class petsc4py.PETSc.DeviceContext.JoinMode
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The type of join to perform.

        See also:
            DeviceContext <#petsc4py.PETSc.DeviceContext>, DeviceContext.join <#petsc4py.PETSc.DeviceContext.join>, DeviceContext.fork <#petsc4py.PETSc.DeviceContext.fork>, PetscDeviceContextJoinMode <https://petsc.org/release/manualpages/Sys/PetscDeviceContextJoinMode.html>

    Attributes Summary
    DESTROY | Constant DESTROY of type int <https://docs.python.org/3/library/functions.html#int>
    NO_SYNC | Constant NO_SYNC of type int <https://docs.python.org/3/library/functions.html#int>
    SYNC | Constant SYNC of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        DESTROY: int <https://docs.python.org/3/library/functions.html#int> = DESTROY
            Constant DESTROY of type int <https://docs.python.org/3/library/functions.html#int>

        NO_SYNC: int <https://docs.python.org/3/library/functions.html#int> = NO_SYNC
            Constant NO_SYNC of type int <https://docs.python.org/3/library/functions.html#int>

        SYNC: int <https://docs.python.org/3/library/functions.html#int> = SYNC
            Constant SYNC of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DeviceContext.StreamType

    class petsc4py.PETSc.DeviceContext.StreamType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The type of stream.

        See also:
            DeviceContext <#petsc4py.PETSc.DeviceContext>, DeviceContext.getStreamType <#petsc4py.PETSc.DeviceContext.getStreamType>, DeviceContext.setStreamType <#petsc4py.PETSc.DeviceContext.setStreamType>, PetscStreamType <https://petsc.org/release/manualpages/Sys/PetscStreamType.html>

    Attributes Summary
    DEFAULT | Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>
    DEFAULT_WITH_BARRIER | Constant DEFAULT_WITH_BARRIER of type int <https://docs.python.org/3/library/functions.html#int>
    NONBLOCKING | Constant NONBLOCKING of type int <https://docs.python.org/3/library/functions.html#int>
    NONBLOCKING_WITH_BARRIER | Constant NONBLOCKING_WITH_BARRIER of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        DEFAULT: int <https://docs.python.org/3/library/functions.html#int> = DEFAULT
            Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>

        DEFAULT_WITH_BARRIER: int <https://docs.python.org/3/library/functions.html#int> = DEFAULT_WITH_BARRIER
            Constant DEFAULT_WITH_BARRIER of type int <https://docs.python.org/3/library/functions.html#int>

        NONBLOCKING: int <https://docs.python.org/3/library/functions.html#int> = NONBLOCKING
            Constant NONBLOCKING of type int <https://docs.python.org/3/library/functions.html#int>

        NONBLOCKING_WITH_BARRIER: int <https://docs.python.org/3/library/functions.html#int> = NONBLOCKING_WITH_BARRIER
            Constant NONBLOCKING_WITH_BARRIER of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
create() | Create an empty DeviceContext.
destroy() | Destroy a device context.
duplicate() | Duplicate a the device context.
fork(n[, stream_type]) | Create multiple device contexts which are all logically dependent on this one.
getCurrent() | Return the current device context.
getDevice() | Get the Device <#petsc4py.PETSc.Device> which this instance is attached to.
getStreamType() | Return the StreamType <#petsc4py.PETSc.DeviceContext.StreamType>.
idle() | Return whether the underlying stream for the device context is idle.
join(join_mode, py_sub_ctxs) | Join a set of device contexts on this one.
setCurrent(dctx) | Set the current device context.
setDevice(device) | Set the Device <#petsc4py.PETSc.Device> which this DeviceContext is attached to.
setFromOptions([comm]) | Configure the DeviceContext from the options database.
setStreamType(stream_type) | Set the StreamType <#petsc4py.PETSc.DeviceContext.StreamType>.
setUp() | Set up the internal data structures for using the device context.
synchronize() | Synchronize a device context.
waitFor(other) | Make this instance wait for other.

Attributes Summary
current | The current global device context.
device | The device associated to the device context.
stream_type | The stream type.

Methods Documentation

    create()
        Create an empty DeviceContext.

        Not collective.

        See also:
            destroy, Device <#petsc4py.PETSc.Device>, PetscDeviceContextCreate <https://petsc.org/release/manualpages/Device/PetscDeviceContextCreate.html>

    Source code at petsc4py/PETSc/Device.pyx:240 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L240>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    destroy()
        Destroy a device context.

        Not collective.

        See also:
            create, PetscDeviceContextDestroy <https://petsc.org/release/manualpages/Device/PetscDeviceContextDestroy.html>

    Source code at petsc4py/PETSc/Device.pyx:255 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L255>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    duplicate()
        Duplicate a the device context.

        Not collective.

        See also:
            create, PetscDeviceContextDuplicate <https://petsc.org/release/manualpages/Device/PetscDeviceContextDuplicate.html>

    Source code at petsc4py/PETSc/Device.pyx:348 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L348>

        Return type
            DeviceContext <#petsc4py.PETSc.DeviceContext>

    fork(n, stream_type=None)
        Create multiple device contexts which are all logically dependent on this one.

        Not collective.

        Parameters

            •   n (int <https://docs.python.org/3/library/functions.html#int>) -- The number of device contexts to create.

            •   stream_type (StreamType <#petsc4py.PETSc.DeviceContext.StreamType> | str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The type of stream of the forked device context.

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[DeviceContext <#petsc4py.PETSc.DeviceContext>]

    Examples

    The device contexts created must be destroyed using join.

        >>> dctx = PETSc.DeviceContext().getCurrent()
        >>> dctxs = dctx.fork(4)
        >>> ... # perform computations
        >>> # we can mix various join modes
        >>> dctx.join(PETSc.DeviceContext.JoinMode.SYNC, dctxs[0:2])
        >>> dctx.join(PETSc.DeviceContext.JoinMode.SYNC, dctxs[2:])
        >>> ... # some more computations and joins
        >>> # dctxs must be all destroyed with joinMode.DESTROY
        >>> dctx.join(PETSc.DeviceContext.JoinMode.DESTROY, dctxs)

    See also:
            join, waitFor, PetscDeviceContextFork <https://petsc.org/release/manualpages/Device/PetscDeviceContextFork.html>

    Source code at petsc4py/PETSc/Device.pyx:399 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L399>

    static getCurrent()
        Return the current device context.

        Not collective.

        See also:
            current, setCurrent, PetscDeviceContextGetCurrentContext <https://petsc.org/release/manualpages/Device/PetscDeviceContextGetCurrentContext.html>

    Source code at petsc4py/PETSc/Device.pyx:519 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L519>

        Return type
            DeviceContext <#petsc4py.PETSc.DeviceContext>

    getDevice()
        Get the Device <#petsc4py.PETSc.Device> which this instance is attached to.

        Not collective.

        See also:
            setDevice, device, Device <#petsc4py.PETSc.Device>, PetscDeviceContextGetDevice <https://petsc.org/release/manualpages/Device/PetscDeviceContextGetDevice.html>

    Source code at petsc4py/PETSc/Device.pyx:302 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L302>

        Return type
            Device <#petsc4py.PETSc.Device>

    getStreamType()
        Return the StreamType <#petsc4py.PETSc.DeviceContext.StreamType>.

        Not collective.

        See also:
            stream_type, setStreamType, PetscDeviceContextGetStreamType <https://petsc.org/release/manualpages/Device/PetscDeviceContextGetStreamType.html>

    Source code at petsc4py/PETSc/Device.pyx:268 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L268>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    idle()
        Return whether the underlying stream for the device context is idle.

        Not collective.

        See also:
            synchronize, PetscDeviceContextQueryIdle <https://petsc.org/release/manualpages/Device/PetscDeviceContextQueryIdle.html>

    Source code at petsc4py/PETSc/Device.pyx:363 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L363>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    join(join_mode, py_sub_ctxs)
        Join a set of device contexts on this one.

        Not collective.

        Parameters

            •   join_mode (JoinMode <#petsc4py.PETSc.DeviceContext.JoinMode> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of join to perform.

            •   py_sub_ctxs (list <https://docs.python.org/3/library/stdtypes.html#list>[DeviceContext <#petsc4py.PETSc.DeviceContext>]) -- The list of device contexts to join.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            fork, waitFor, PetscDeviceContextJoin <https://petsc.org/release/manualpages/Device/PetscDeviceContextJoin.html>

    Source code at petsc4py/PETSc/Device.pyx:448 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L448>

    static setCurrent(dctx)
        Set the current device context.

        Not collective.

        Parameters
            dctx (DeviceContext <#petsc4py.PETSc.DeviceContext> | None <https://docs.python.org/3/library/constants.html#None>) -- The DeviceContext to set as current (or None <https://docs.python.org/3/library/constants.html#None> to use the default context).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            current, getCurrent, PetscDeviceContextSetCurrentContext <https://petsc.org/release/manualpages/Device/PetscDeviceContextSetCurrentContext.html>

    Source code at petsc4py/PETSc/Device.pyx:535 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L535>

    setDevice(device)
        Set the Device <#petsc4py.PETSc.Device> which this DeviceContext is attached to.

        Collective.

        Parameters
            device (Device <#petsc4py.PETSc.Device>) -- The Device <#petsc4py.PETSc.Device> to which this instance is attached to.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getDevice, device, Device <#petsc4py.PETSc.Device>, PetscDeviceContextSetDevice <https://petsc.org/release/manualpages/Device/PetscDeviceContextSetDevice.html>

    Source code at petsc4py/PETSc/Device.pyx:317 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L317>

    setFromOptions(comm=None)
        Configure the DeviceContext from the options database.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>, PetscDeviceContextSetFromOptions <https://petsc.org/release/manualpages/Device/PetscDeviceContextSetFromOptions.html>

    Source code at petsc4py/PETSc/Device.pyx:500 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L500>

    setStreamType(stream_type)
        Set the StreamType <#petsc4py.PETSc.DeviceContext.StreamType>.

        Not collective.

        Parameters
            stream_type (StreamType <#petsc4py.PETSc.DeviceContext.StreamType> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of stream to set

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            stream_type, getStreamType, PetscDeviceContextSetStreamType <https://petsc.org/release/manualpages/Device/PetscDeviceContextSetStreamType.html>

    Source code at petsc4py/PETSc/Device.pyx:283 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L283>

    setUp()
        Set up the internal data structures for using the device context.

        Not collective.

        See also:
            create, PetscDeviceContextSetUp <https://petsc.org/release/manualpages/Device/PetscDeviceContextSetUp.html>

    Source code at petsc4py/PETSc/Device.pyx:336 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L336>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    synchronize()
        Synchronize a device context.

        Not collective.

        Notes

        The underlying stream is considered idle after this routine returns, i.e. idle will return True.

        See also:
            idle, PetscDeviceContextSynchronize <https://petsc.org/release/manualpages/Device/PetscDeviceContextSynchronize.html>

    Source code at petsc4py/PETSc/Device.pyx:483 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L483>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    waitFor(other)
        Make this instance wait for other.

        Not collective.

        Parameters
            other (DeviceContext <#petsc4py.PETSc.DeviceContext> | None <https://docs.python.org/3/library/constants.html#None>) -- The other DeviceContext to wait for

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            fork, join, PetscDeviceContextWaitForContext <https://petsc.org/release/manualpages/Device/PetscDeviceContextWaitForContext.html>

    Source code at petsc4py/PETSc/Device.pyx:378 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L378>

Attributes Documentation

    current
        The current global device context.

        Source code at petsc4py/PETSc/Device.pyx:574 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L574>

    device
        The device associated to the device context.

        Source code at petsc4py/PETSc/Device.pyx:566 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L566>

    stream_type
        The stream type.

        Source code at petsc4py/PETSc/Device.pyx:558 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Device.pyx#L558>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.DualSpace

    class petsc4py.PETSc.DualSpace
        Bases: Object <#petsc4py.PETSc.Object>

        Dual space to a linear space.

        Enumerations
        Type <#petsc4py.PETSc.DualSpace.Type> | The dual space types.

  petsc4py.PETSc.DualSpace.Type

    class petsc4py.PETSc.DualSpace.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The dual space types.

        Attributes Summary
        BDM | Object BDM of type str <https://docs.python.org/3/library/stdtypes.html#str>
        LAGRANGE | Object LAGRANGE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REFINED | Object REFINED of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SIMPLE | Object SIMPLE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        BDM: str <https://docs.python.org/3/library/stdtypes.html#str> = BDM
            Object BDM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LAGRANGE: str <https://docs.python.org/3/library/stdtypes.html#str> = LAGRANGE
            Object LAGRANGE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REFINED: str <https://docs.python.org/3/library/stdtypes.html#str> = REFINED
            Object REFINED of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SIMPLE: str <https://docs.python.org/3/library/stdtypes.html#str> = SIMPLE
            Object SIMPLE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
create([comm]) | Create an empty DualSpace object.
destroy() | Destroy the DualSpace object.
duplicate() | Create a duplicate DualSpace object that is not set up.
getDM() | Return the DM <#petsc4py.PETSc.DM> representing the reference cell of a DualSpace.
getDimension() | Return the dimension of the dual space.
getFunctional(i) | Return the i-th basis functional in the dual space.
getInteriorDimension() | Return the interior dimension of the dual space.
getLagrangeContinuity() | Return whether the element is continuous.
getLagrangeTensor() | Return the tensor nature of the dual space.
getLagrangeTrimmed() | Return the trimmed nature of the dual space.
getNumComponents() | Return the number of components for this space.
getNumDof() | Return the number of degrees of freedom for each spatial dimension.
getOrder() | Return the order of the dual space.
getType() | Return the type of the dual space object.
setDM(dm) | Set the DM <#petsc4py.PETSc.DM> representing the reference cell.
setLagrangeContinuity(continuous) | Indicate whether the element is continuous.
setLagrangeTensor(tensor) | Set the tensor nature of the dual space.
setLagrangeTrimmed(trimmed) | Set the trimmed nature of the dual space.
setNumComponents(nc) | Set the number of components for this space.
setOrder(order) | Set the order of the dual space.
setSimpleDimension(dim) | Set the number of functionals in the dual space basis.
setSimpleFunctional(func, functional) | Set the given basis element for this dual space.
setType(dualspace_type) | Build a particular type of dual space.
setUp() | Construct a basis for a DualSpace.
view([viewer]) | View a DualSpace.

Methods Documentation

    create(comm=None)
        Create an empty DualSpace object.

        Collective.

        The type can then be set with setType.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PetscDualSpaceCreate <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceCreate.html>

    Source code at petsc4py/PETSc/Space.pyx:594 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L594>

    destroy()
        Destroy the DualSpace object.

        Collective.

        See also:
            PetscDualSpaceDestroy <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceDestroy.html>

    Source code at petsc4py/PETSc/Space.pyx:636 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L636>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    duplicate()
        Create a duplicate DualSpace object that is not set up.

        Collective.

        See also:
            PetscDualSpaceDuplicate <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceDuplicate.html>

    Source code at petsc4py/PETSc/Space.pyx:649 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L649>

        Return type
            DualSpace <#petsc4py.PETSc.DualSpace>

    getDM()
        Return the DM <#petsc4py.PETSc.DM> representing the reference cell of a DualSpace.

        Not collective.

        See also:
            setDM, PetscDualSpaceGetDM <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceGetDM.html>

    Source code at petsc4py/PETSc/Space.pyx:662 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L662>

        Return type
            DM <#petsc4py.PETSc.DM>

    getDimension()
        Return the dimension of the dual space.

        Not collective.

        The dimension of the dual space, i.e. the number of basis functionals.

        See also:
            PetscDualSpaceGetDimension <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceGetDimension.html>

    Source code at petsc4py/PETSc/Space.pyx:696 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L696>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getFunctional(i)
        Return the i-th basis functional in the dual space.

        Not collective.

        Parameters
            i (int <https://docs.python.org/3/library/functions.html#int>) -- The basis number.

        Return type
            Quad <#petsc4py.PETSc.Quad>

    See also:
            PetscDualSpaceGetFunctional <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceGetFunctional.html>

    Source code at petsc4py/PETSc/Space.pyx:826 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L826>

    getInteriorDimension()
        Return the interior dimension of the dual space.

        Not collective.

        The interior dimension of the dual space, i.e. the number of basis functionals assigned to the interior of the reference domain.

        See also:
            PetscDualSpaceGetInteriorDimension <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceGetInteriorDimension.html>

    Source code at petsc4py/PETSc/Space.pyx:847 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L847>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getLagrangeContinuity()
        Return whether the element is continuous.

        Not collective.

        See also:
            setLagrangeContinuity, PetscDualSpaceLagrangeGetContinuity <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceLagrangeGetContinuity.html>

    Source code at petsc4py/PETSc/Space.pyx:864 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L864>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getLagrangeTensor()
        Return the tensor nature of the dual space.

        Not collective.

        See also:
            setLagrangeTensor, PetscDualSpaceLagrangeGetTensor <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceLagrangeGetTensor.html>

    Source code at petsc4py/PETSc/Space.pyx:896 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L896>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getLagrangeTrimmed()
        Return the trimmed nature of the dual space.

        Not collective.

        See also:
            setLagrangeTrimmed, PetscDualSpaceLagrangeGetTrimmed <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceLagrangeGetTrimmed.html>

    Source code at petsc4py/PETSc/Space.pyx:928 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L928>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getNumComponents()
        Return the number of components for this space.

        Not collective.

        See also:
            setNumComponents, PetscDualSpaceGetNumComponents <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceGetNumComponents.html>

    Source code at petsc4py/PETSc/Space.pyx:712 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L712>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getNumDof()
        Return the number of degrees of freedom for each spatial dimension.

        Not collective.

        See also:
            PetscDualSpaceGetNumDof <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceGetNumDof.html>

    Source code at petsc4py/PETSc/Space.pyx:810 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L810>

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    getOrder()
        Return the order of the dual space.

        Not collective.

        See also:
            setOrder, PetscDualSpaceGetOrder <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceGetOrder.html>

    Source code at petsc4py/PETSc/Space.pyx:778 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L778>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getType()
        Return the type of the dual space object.

        Not collective.

        See also:
            setType, PetscDualSpaceGetType <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceGetType.html>

    Source code at petsc4py/PETSc/Space.pyx:744 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L744>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    setDM(dm)
        Set the DM <#petsc4py.PETSc.DM> representing the reference cell.

        Not collective.

        Parameters
            dm (DM <#petsc4py.PETSc.DM>) -- The reference cell.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getDM, PetscDualSpaceSetDM <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceSetDM.html>

    Source code at petsc4py/PETSc/Space.pyx:679 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L679>

    setLagrangeContinuity(continuous)
        Indicate whether the element is continuous.

        Not collective.

        Parameters
            continuous (bool <https://docs.python.org/3/library/functions.html#bool>) -- The flag for element continuity.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getLagrangeContinuity, PetscDualSpaceLagrangeSetContinuity <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceLagrangeSetContinuity.html>

    Source code at petsc4py/PETSc/Space.pyx:878 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L878>

    setLagrangeTensor(tensor)
        Set the tensor nature of the dual space.

        Not collective.

        Parameters
            tensor (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether the dual space has tensor layout (vs. simplicial).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getLagrangeTensor, PetscDualSpaceLagrangeSetTensor <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceLagrangeSetTensor.html>

    Source code at petsc4py/PETSc/Space.pyx:910 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L910>

    setLagrangeTrimmed(trimmed)
        Set the trimmed nature of the dual space.

        Not collective.

        Parameters
            trimmed (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether the dual space represents to dual basis of a trimmed polynomial space (e.g. Raviart-Thomas and higher order / other form degree variants).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getLagrangeTrimmed, PetscDualSpaceLagrangeSetTrimmed <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceLagrangeSetTrimmed.html>

    Source code at petsc4py/PETSc/Space.pyx:942 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L942>

    setNumComponents(nc)
        Set the number of components for this space.

        Logically collective.

        Parameters
            nc (int <https://docs.python.org/3/library/functions.html#int>) -- The number of components

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getNumComponents, PetscDualSpaceSetNumComponents <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceSetNumComponents.html>

    Source code at petsc4py/PETSc/Space.pyx:726 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L726>

    setOrder(order)
        Set the order of the dual space.

        Not collective.

        Parameters
            order (int <https://docs.python.org/3/library/functions.html#int>) -- The order.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getOrder, PetscDualSpaceSetOrder <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceSetOrder.html>

    Source code at petsc4py/PETSc/Space.pyx:792 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L792>

    setSimpleDimension(dim)
        Set the number of functionals in the dual space basis.

        Logically collective.

        Parameters
            dim (int <https://docs.python.org/3/library/functions.html#int>) -- The basis dimension.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscDualSpaceSimpleSetDimension <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceSimpleSetDimension.html>

    Source code at petsc4py/PETSc/Space.pyx:962 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L962>

    setSimpleFunctional(func, functional)
        Set the given basis element for this dual space.

        Not collective.

        Parameters

            •   func (int <https://docs.python.org/3/library/functions.html#int>) -- The basis index.

            •   functional (Quad <#petsc4py.PETSc.Quad>) -- The basis functional.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscDualSpaceSimpleSetFunctional <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceSimpleSetFunctional.html>

    Source code at petsc4py/PETSc/Space.pyx:980 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L980>

    setType(dualspace_type)
        Build a particular type of dual space.

        Collective.

        Parameters
            dualspace_type (Type <#petsc4py.PETSc.DualSpace.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The kind of space.

        Return type
            Self

    See also:
            getType, PetscDualSpaceSetType <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceSetType.html>

    Source code at petsc4py/PETSc/Space.pyx:758 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L758>

    setUp()
        Construct a basis for a DualSpace.

        Collective.

        See also:
            PetscDualSpaceSetUp <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceSetUp.html>

    Source code at petsc4py/PETSc/Space.pyx:582 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L582>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        View a DualSpace.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> to display the DualSpace.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscDualSpaceView <https://petsc.org/release/manualpages/DUALSPACE/PetscDualSpaceView.html>

    Source code at petsc4py/PETSc/Space.pyx:617 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L617>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.FE

    class petsc4py.PETSc.FE
        Bases: Object <#petsc4py.PETSc.Object>

        A PETSc object that manages a finite element space.

        Enumerations
        Type <#petsc4py.PETSc.FE.Type> | The finite element types.

  petsc4py.PETSc.FE.Type

    class petsc4py.PETSc.FE.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The finite element types.

        Attributes Summary
        BASIC | Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>
        COMPOSITE | Object COMPOSITE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        OPENCL | Object OPENCL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        BASIC: str <https://docs.python.org/3/library/stdtypes.html#str> = BASIC
            Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        COMPOSITE: str <https://docs.python.org/3/library/stdtypes.html#str> = COMPOSITE
            Object COMPOSITE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        OPENCL: str <https://docs.python.org/3/library/stdtypes.html#str> = OPENCL
            Object OPENCL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
create([comm]) | Create an empty FE object.
createByCell(dim, nc, ctype[, qorder, ...]) | Create a FE for basic FEM computation.
createDefault(dim, nc, isSimplex[, qorder, ...]) | Create a FE for basic FEM computation.
createLagrange(dim, nc, isSimplex, k[, ...]) | Create a FE for the basic Lagrange space of degree k.
destroy() | Destroy the FE object.
getBasisSpace() | Return the Space <#petsc4py.PETSc.Space> used for the approximation of the FE solution.
getDimension() | Return the dimension of the finite element space on a cell.
getDualSpace() | Return the DualSpace <#petsc4py.PETSc.DualSpace> used to define the inner product for the FE.
getFaceQuadrature() | Return the Quad <#petsc4py.PETSc.Quad> used to calculate inner products on faces.
getNumComponents() | Return the number of components in the element.
getNumDof() | Return the number of DOFs.
getQuadrature() | Return the Quad <#petsc4py.PETSc.Quad> used to calculate inner products.
getSpatialDimension() | Return the spatial dimension of the element.
getTileSizes() | Return the tile sizes for evaluation.
setBasisSpace(sp) | Set the Space <#petsc4py.PETSc.Space> used for the approximation of the solution.
setDualSpace(dspace) | Set the DualSpace <#petsc4py.PETSc.DualSpace> used to define the inner product.
setFaceQuadrature(quad) | Set the Quad <#petsc4py.PETSc.Quad> used to calculate inner products on faces.
setFromOptions() | Set parameters in a FE from the options database.
setNumComponents(comp) | Set the number of field components in the element.
setQuadrature(quad) | Set the Quad <#petsc4py.PETSc.Quad> used to calculate inner products.
setTileSizes(blockSize, numBlocks, ...) | Set the tile sizes for evaluation.
setType(fe_type) | Build a particular FE.
setUp() | Construct data structures for the FE after the Type <#petsc4py.PETSc.FE.Type> has been set.
view([viewer]) | View a FE object.

Methods Documentation

    create(comm=None)
        Create an empty FE object.

        Collective.

        The type can then be set with setType.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            setType, PetscFECreate <https://petsc.org/release/manualpages/FE/PetscFECreate.html>

    Source code at petsc4py/PETSc/FE.pyx:53 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L53>

    createByCell(dim, nc, ctype, qorder=DETERMINE, prefix=None, comm=None)
        Create a FE for basic FEM computation.

        Collective.

        Parameters

            •   dim (int <https://docs.python.org/3/library/functions.html#int>) -- The spatial dimension.

            •   nc (int <https://docs.python.org/3/library/functions.html#int>) -- The number of components.

            •   ctype (PolytopeType <#petsc4py.PETSc.DM.PolytopeType>) -- The cell type.

            •   qorder (int <https://docs.python.org/3/library/functions.html#int>) -- The quadrature order or DETERMINE <#petsc4py.PETSc.DETERMINE> to use Space <#petsc4py.PETSc.Space> polynomial degree.

            •   prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The options prefix, or None <https://docs.python.org/3/library/constants.html#None>.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PetscFECreateByCell <https://petsc.org/release/manualpages/FE/PetscFECreateByCell.html>

    Source code at petsc4py/PETSc/FE.pyx:122 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L122>

    createDefault(dim, nc, isSimplex, qorder=DETERMINE, prefix=None, comm=None)
        Create a FE for basic FEM computation.

        Collective.

        Parameters

            •   dim (int <https://docs.python.org/3/library/functions.html#int>) -- The spatial dimension.

            •   nc (int <https://docs.python.org/3/library/functions.html#int>) -- The number of components.

            •   isSimplex (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag for simplex reference cell, otherwise it's a tensor product.

            •   qorder (int <https://docs.python.org/3/library/functions.html#int>) -- The quadrature order or DETERMINE <#petsc4py.PETSc.DETERMINE> to use Space <#petsc4py.PETSc.Space> polynomial degree.

            •   prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The options prefix, or None <https://docs.python.org/3/library/constants.html#None>.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PetscFECreateDefault <https://petsc.org/release/manualpages/FE/PetscFECreateDefault.html>

    Source code at petsc4py/PETSc/FE.pyx:76 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L76>

    createLagrange(dim, nc, isSimplex, k, qorder=DETERMINE, comm=None)
        Create a FE for the basic Lagrange space of degree k.

        Collective.

        Parameters

            •   dim (int <https://docs.python.org/3/library/functions.html#int>) -- The spatial dimension.

            •   nc (int <https://docs.python.org/3/library/functions.html#int>) -- The number of components.

            •   isSimplex (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag for simplex reference cell, otherwise it's a tensor product.

            •   k (int <https://docs.python.org/3/library/functions.html#int>) -- The degree of the space.

            •   qorder (int <https://docs.python.org/3/library/functions.html#int>) -- The quadrature order or DETERMINE <#petsc4py.PETSc.DETERMINE> to use Space <#petsc4py.PETSc.Space> polynomial degree.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PetscFECreateLagrange <https://petsc.org/release/manualpages/FE/PetscFECreateLagrange.html>

    Source code at petsc4py/PETSc/FE.pyx:168 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L168>

    destroy()
        Destroy the FE object.

        Collective.

        See also:
            PetscFEDestroy <https://petsc.org/release/manualpages/FE/PetscFEDestroy.html>

    Source code at petsc4py/PETSc/FE.pyx:40 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L40>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getBasisSpace()
        Return the Space <#petsc4py.PETSc.Space> used for the approximation of the FE solution.

        Not collective.

        See also:
            setBasisSpace, PetscFEGetBasisSpace <https://petsc.org/release/manualpages/FE/PetscFEGetBasisSpace.html>

    Source code at petsc4py/PETSc/FE.pyx:433 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L433>

        Return type
            Space <#petsc4py.PETSc.Space>

    getDimension()
        Return the dimension of the finite element space on a cell.

        Not collective.

        See also:
            PetscFEGetDimension <https://petsc.org/release/manualpages/FE/PetscFEGetDimension.html>

    Source code at petsc4py/PETSc/FE.pyx:227 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L227>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getDualSpace()
        Return the DualSpace <#petsc4py.PETSc.DualSpace> used to define the inner product for the FE.

        Not collective.

        See also:
            setDualSpace, DualSpace <#petsc4py.PETSc.DualSpace>, PetscFEGetDualSpace <https://petsc.org/release/manualpages/FE/PetscFEGetDualSpace.html>

    Source code at petsc4py/PETSc/FE.pyx:489 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L489>

        Return type
            DualSpace <#petsc4py.PETSc.DualSpace>

    getFaceQuadrature()
        Return the Quad <#petsc4py.PETSc.Quad> used to calculate inner products on faces.

        Not collective.

        See also:
            setFaceQuadrature, PetscFEGetFaceQuadrature <https://petsc.org/release/manualpages/FE/PetscFEGetFaceQuadrature.html>

    Source code at petsc4py/PETSc/FE.pyx:362 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L362>

        Return type
            Quad <#petsc4py.PETSc.Quad>

    getNumComponents()
        Return the number of components in the element.

        Not collective.

        See also:
            setNumComponents, PetscFEGetNumComponents <https://petsc.org/release/manualpages/FE/PetscFEGetNumComponents.html>

    Source code at petsc4py/PETSc/FE.pyx:255 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L255>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getNumDof()
        Return the number of DOFs.

        Not collective.

        Return the number of DOFs (dual basis vectors) associated with mesh points on the reference cell of a given dimension.

        See also:
            PetscFEGetNumDof <https://petsc.org/release/manualpages/FE/PetscFEGetNumDof.html>

    Source code at petsc4py/PETSc/FE.pyx:287 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L287>

        Return type
            ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>

    getQuadrature()
        Return the Quad <#petsc4py.PETSc.Quad> used to calculate inner products.

        Not collective.

        See also:
            setQuadrature, PetscFEGetQuadrature <https://petsc.org/release/manualpages/FE/PetscFEGetQuadrature.html>

    Source code at petsc4py/PETSc/FE.pyx:212 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L212>

        Return type
            Quad <#petsc4py.PETSc.Quad>

    getSpatialDimension()
        Return the spatial dimension of the element.

        Not collective.

        See also:
            PetscFEGetSpatialDimension <https://petsc.org/release/manualpages/FE/PetscFEGetSpatialDimension.html>

    Source code at petsc4py/PETSc/FE.pyx:241 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L241>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getTileSizes()
        Return the tile sizes for evaluation.

        Not collective.

        Returns

            •   blockSize (int <https://docs.python.org/3/library/functions.html#int>) -- The number of elements in a block.

            •   numBlocks (int <https://docs.python.org/3/library/functions.html#int>) -- The number of blocks in a batch.

            •   batchSize (int <https://docs.python.org/3/library/functions.html#int>) -- The number of elements in a batch.

            •   numBatches (int <https://docs.python.org/3/library/functions.html#int>) -- The number of batches in a chunk.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            setTileSizes, PetscFEGetTileSizes <https://petsc.org/release/manualpages/FE/PetscFEGetTileSizes.html>

    Source code at petsc4py/PETSc/FE.pyx:306 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L306>

    setBasisSpace(sp)
        Set the Space <#petsc4py.PETSc.Space> used for the approximation of the solution.

        Not collective.

        Parameters
            sp (Space <#petsc4py.PETSc.Space>) -- The Space <#petsc4py.PETSc.Space> object.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getBasisSpace, PetscFESetBasisSpace <https://petsc.org/release/manualpages/FE/PetscFESetBasisSpace.html>

    Source code at petsc4py/PETSc/FE.pyx:448 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L448>

    setDualSpace(dspace)
        Set the DualSpace <#petsc4py.PETSc.DualSpace> used to define the inner product.

        Not collective.

        Parameters
            dspace (DualSpace <#petsc4py.PETSc.DualSpace>) -- The DualSpace <#petsc4py.PETSc.DualSpace> object.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getDualSpace, DualSpace <#petsc4py.PETSc.DualSpace>, PetscFESetDualSpace <https://petsc.org/release/manualpages/FE/PetscFESetDualSpace.html>

    Source code at petsc4py/PETSc/FE.pyx:504 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L504>

    setFaceQuadrature(quad)
        Set the Quad <#petsc4py.PETSc.Quad> used to calculate inner products on faces.

        Not collective.

        Parameters
            quad (Quad <#petsc4py.PETSc.Quad>) -- The Quad <#petsc4py.PETSc.Quad> object.

        Return type
            Quad <#petsc4py.PETSc.Quad>

    See also:
            getFaceQuadrature, PetscFESetFaceQuadrature <https://petsc.org/release/manualpages/FE/PetscFESetFaceQuadrature.html>

    Source code at petsc4py/PETSc/FE.pyx:395 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L395>

    setFromOptions()
        Set parameters in a FE from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, PetscFESetFromOptions <https://petsc.org/release/manualpages/FE/PetscFESetFromOptions.html>

    Source code at petsc4py/PETSc/FE.pyx:465 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L465>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setNumComponents(comp)
        Set the number of field components in the element.

        Not collective.

        Parameters
            comp (int <https://docs.python.org/3/library/functions.html#int>) -- The number of field components.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getNumComponents, PetscFESetNumComponents <https://petsc.org/release/manualpages/FE/PetscFESetNumComponents.html>

    Source code at petsc4py/PETSc/FE.pyx:269 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L269>

    setQuadrature(quad)
        Set the Quad <#petsc4py.PETSc.Quad> used to calculate inner products.

        Not collective.

        Parameters
            quad (Quad <#petsc4py.PETSc.Quad>) -- The Quad <#petsc4py.PETSc.Quad> object.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            getQuadrature, PetscFESetQuadrature <https://petsc.org/release/manualpages/FE/PetscFESetQuadrature.html>

    Source code at petsc4py/PETSc/FE.pyx:377 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L377>

    setTileSizes(blockSize, numBlocks, batchSize, numBatches)
        Set the tile sizes for evaluation.

        Not collective.

        Parameters

            •   blockSize (int <https://docs.python.org/3/library/functions.html#int>) -- The number of elements in a block.

            •   numBlocks (int <https://docs.python.org/3/library/functions.html#int>) -- The number of blocks in a batch.

            •   batchSize (int <https://docs.python.org/3/library/functions.html#int>) -- The number of elements in a batch.

            •   numBatches (int <https://docs.python.org/3/library/functions.html#int>) -- The number of batches in a chunk.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getTileSizes, PetscFESetTileSizes <https://petsc.org/release/manualpages/FE/PetscFESetTileSizes.html>

    Source code at petsc4py/PETSc/FE.pyx:332 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L332>

    setType(fe_type)
        Build a particular FE.

        Collective.

        Parameters
            fe_type (Type <#petsc4py.PETSc.FE.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The kind of FEM space.

        Return type
            Self

    See also:
            PetscFESetType <https://petsc.org/release/manualpages/FE/PetscFESetType.html>

    Source code at petsc4py/PETSc/FE.pyx:413 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L413>

    setUp()
        Construct data structures for the FE after the Type <#petsc4py.PETSc.FE.Type> has been set.

        Collective.

        See also:
            PetscFESetUp <https://petsc.org/release/manualpages/FE/PetscFESetUp.html>

    Source code at petsc4py/PETSc/FE.pyx:477 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L477>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        View a FE object.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> to display the graph.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscFEView <https://petsc.org/release/manualpages/FE/PetscFEView.html>

    Source code at petsc4py/PETSc/FE.pyx:21 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/FE.pyx#L21>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.IS

    class petsc4py.PETSc.IS
        Bases: Object <#petsc4py.PETSc.Object>

        A collection of indices.

        IS objects are used to index into vectors and matrices and to set up vector scatters.

        See also:
            IS <https://petsc.org/release/manualpages/IS/IS.html>

    Enumerations
    Type <#petsc4py.PETSc.IS.Type> | The index set types.

  petsc4py.PETSc.IS.Type

    class petsc4py.PETSc.IS.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The index set types.

        Attributes Summary
        BLOCK | Object BLOCK of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GENERAL | Object GENERAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        STRIDE | Object STRIDE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        BLOCK: str <https://docs.python.org/3/library/stdtypes.html#str> = BLOCK
            Object BLOCK of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GENERAL: str <https://docs.python.org/3/library/stdtypes.html#str> = GENERAL
            Object GENERAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        STRIDE: str <https://docs.python.org/3/library/stdtypes.html#str> = STRIDE
            Object STRIDE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
allGather() | Concatenate index sets stored across processors.
buildTwoSided([toindx]) | Create an index set describing a global mapping.
complement(nmin, nmax) | Create a complement index set.
copy([result]) | Copy the contents of the index set into another.
create([comm]) | Create an IS.
createBlock(bsize, indices[, comm]) | Create a blocked index set.
createGeneral(indices[, comm]) | Create an IS with indices.
createStride(size[, first, step, comm]) | Create an index set consisting of evenly spaced values.
destroy() | Destroy the index set.
difference(iset) | Return the difference between two index sets.
duplicate() | Create a copy of the index set.
embed(iset, drop) | Embed self into iset.
equal(iset) | Return whether the index sets have the same set of indices or not.
expand(iset) | Return the union of two (possibly unsorted) index sets.
getBlockIndices() | Return the indices of an index set with type IS.Type.BLOCK <#petsc4py.PETSc.IS.Type.BLOCK>.
getBlockSize() | Return the number of elements in a block.
getIndices() | Return the indices of the index set.
getInfo() | Return stride information for an index set with type IS.Type.STRIDE <#petsc4py.PETSc.IS.Type.STRIDE>.
getLocalSize() | Return the process-local length of the index set.
getSize() | Return the global length of an index set.
getSizes() | Return the local and global sizes of the index set.
getStride() | Return size and stride information.
getType() | Return the index set type associated with the IS.
intersect(iset) | Return the intersection of two index sets.
invertPermutation([nlocal]) | Invert the index set.
isIdentity() | Return whether the index set has been declared as an identity.
isPermutation() | Return whether an index set has been declared to be a permutation.
isSorted() | Return whether the indices have been sorted.
load(viewer) | Load a stored index set.
partitioningCount([npart]) | Return the number of elements per process after a partitioning.
partitioningToNumbering() | Return the new global numbering after a partitioning.
renumber([mult]) | Renumber the non-negative entries of an index set, starting from 0.
setBlockIndices(bsize, indices) | Set the indices for an index set with type IS.Type.BLOCK <#petsc4py.PETSc.IS.Type.BLOCK>.
setBlockSize(bs) | Set the block size of the index set.
setIdentity() | Mark the index set as being an identity.
setIndices(indices) | Set the indices of an index set.
setPermutation() | Mark the index set as being a permutation.
setStride(size[, first, step]) | Set the stride information for an index set with type IS.Type.STRIDE <#petsc4py.PETSc.IS.Type.STRIDE>.
setType(is_type) | Set the type of the index set.
sort() | Sort the indices of an index set.
sum(iset) | Return the union of two (sorted) index sets.
toGeneral() | Convert the index set type to IS.Type.GENERAL <#petsc4py.PETSc.IS.Type.GENERAL>.
union(iset) | Return the union of two (possibly unsorted) index sets.
view([viewer]) | Display the index set.

Attributes Summary
array | View of the index set as an array of integers.
block_size | The number of elements in a block.
identity | True <https://docs.python.org/3/library/constants.html#True> if index set is an identity, False <https://docs.python.org/3/library/constants.html#False> otherwise.
indices | The indices of the index set.
local_size | The local size of the index set.
permutation | True <https://docs.python.org/3/library/constants.html#True> if index set is a permutation, False <https://docs.python.org/3/library/constants.html#False> otherwise.
size | The global size of the index set.
sizes | The local and global sizes of the index set.
sorted | True <https://docs.python.org/3/library/constants.html#True> if index set is sorted, False <https://docs.python.org/3/library/constants.html#False> otherwise.

Methods Documentation

    allGather()
        Concatenate index sets stored across processors.

        Collective.

        The returned index set will be the same on every processor.

        See also:
            ISAllGather <https://petsc.org/release/manualpages/IS/ISAllGather.html>

    Source code at petsc4py/PETSc/IS.pyx:304 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L304>

        Return type
            IS <#petsc4py.PETSc.IS>

    buildTwoSided(toindx=None)
        Create an index set describing a global mapping.

        Collective.

        This function generates an index set that contains new numbers from remote or local on the index set.

        Parameters
            toindx (IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>) -- Index set describing which indices to send, default is to send natural numbering.

        Returns
            New index set containing the new numbers from remote or local.

        Return type
            IS

    See also:
            ISBuildTwoSided <https://petsc.org/release/manualpages/IS/ISBuildTwoSided.html>

    Source code at petsc4py/PETSc/IS.pyx:333 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L333>

    complement(nmin, nmax)
        Create a complement index set.

        Collective.

        The complement set of indices is all indices that are not in the provided set (and within the provided bounds).

        Parameters

            •   nmin (int <https://docs.python.org/3/library/functions.html#int>) -- Minimum index that can be found in the local part of the complement index set.

            •   nmax (int <https://docs.python.org/3/library/functions.html#int>) -- One greater than the maximum index that can be found in the local part of the complement index set.

        Return type
            IS <#petsc4py.PETSc.IS>

    Notes

    For a parallel index set, this will generate the local part of the complement on each process.

    To generate the entire complement (on each process) of a parallel index set, first call IS.allGather and then call this method.

    See also:
            IS.allGather, ISComplement <https://petsc.org/release/manualpages/IS/ISComplement.html>

    Source code at petsc4py/PETSc/IS.pyx:747 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L747>

    copy(result=None)
        Copy the contents of the index set into another.

        Collective.

        Parameters
            result (IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>) -- The target index set. If None <https://docs.python.org/3/library/constants.html#None> then IS.duplicate is called first.

        Returns
            The copied index set. If result is not None <https://docs.python.org/3/library/constants.html#None> then this is returned here.

        Return type
            IS

    See also:
            IS.duplicate, ISCopy <https://petsc.org/release/manualpages/IS/ISCopy.html>

    Source code at petsc4py/PETSc/IS.pyx:253 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L253>

    create(comm=None)
        Create an IS.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            ISCreate <https://petsc.org/release/manualpages/IS/ISCreate.html>

    Source code at petsc4py/PETSc/IS.pyx:88 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L88>

    createBlock(bsize, indices, comm=None)
        Create a blocked index set.

        Collective.

        Parameters

            •   bsize (int <https://docs.python.org/3/library/functions.html#int>) -- Block size.

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Integer array of indices.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            ISCreateBlock <https://petsc.org/release/manualpages/IS/ISCreateBlock.html>

    Source code at petsc4py/PETSc/IS.pyx:171 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L171>

    createGeneral(indices, comm=None)
        Create an IS with indices.

        Collective.

        Parameters

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Integer array.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            ISCreateGeneral <https://petsc.org/release/manualpages/IS/ISCreateGeneral.html>

    Source code at petsc4py/PETSc/IS.pyx:142 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L142>

    createStride(size, first=0, step=1, comm=None)
        Create an index set consisting of evenly spaced values.

        Collective.

        Parameters

            •   size (int <https://docs.python.org/3/library/functions.html#int>) -- The length of the locally owned portion of the index set.

            •   first (int <https://docs.python.org/3/library/functions.html#int>) -- The first element of the index set.

            •   step (int <https://docs.python.org/3/library/functions.html#int>) -- The difference between adjacent indices.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            ISCreateStride <https://petsc.org/release/manualpages/IS/ISCreateStride.html>

    Source code at petsc4py/PETSc/IS.pyx:204 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L204>

    destroy()
        Destroy the index set.

        Collective.

        See also:
            ISDestroy <https://petsc.org/release/manualpages/IS/ISDestroy.html>

    Source code at petsc4py/PETSc/IS.pyx:75 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L75>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    difference(iset)
        Return the difference between two index sets.

        Collective.

        Parameters
            iset (IS <#petsc4py.PETSc.IS>) -- Index set to compute the difference with.

        Returns
            Index set representing the difference between self and iset.

        Return type
            IS

    See also:
            ISDifference <https://petsc.org/release/manualpages/IS/ISDifference.html>

    Source code at petsc4py/PETSc/IS.pyx:723 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L723>

    duplicate()
        Create a copy of the index set.

        Collective.

        See also:
            IS.copy, ISDuplicate <https://petsc.org/release/manualpages/IS/ISDuplicate.html>

    Source code at petsc4py/PETSc/IS.pyx:239 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L239>

        Return type
            IS <#petsc4py.PETSc.IS>

    embed(iset, drop)
        Embed self into iset.

        Not collective.

        The embedding is performed by finding the locations in iset that have the same indices as self.

        Parameters

            •   iset (IS <#petsc4py.PETSc.IS>) -- The index set to embed into.

            •   drop (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating whether to drop indices from self that are not in iset.

        Returns
            The embedded index set.

        Return type
            IS

    See also:
            ISEmbed <https://petsc.org/release/manualpages/IS/ISEmbed.html>

    Source code at petsc4py/PETSc/IS.pyx:783 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L783>

    equal(iset)
        Return whether the index sets have the same set of indices or not.

        Collective.

        Parameters
            iset (IS <#petsc4py.PETSc.IS>) -- The index set to compare indices with.

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    See also:
            ISEqual <https://petsc.org/release/manualpages/IS/ISEqual.html>

    Source code at petsc4py/PETSc/IS.pyx:599 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L599>

    expand(iset)
        Return the union of two (possibly unsorted) index sets.

        Collective.

        To compute the union, expand concatenates the two index sets and removes any duplicates.

        Parameters
            iset (IS <#petsc4py.PETSc.IS>) -- Index set to compute the union with.

        Returns
            The new, combined, index set.

        Return type
            IS

    See also:
            ISExpand <https://petsc.org/release/manualpages/IS/ISExpand.html>

    Source code at petsc4py/PETSc/IS.pyx:637 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L637>

    getBlockIndices()
        Return the indices of an index set with type IS.Type.BLOCK <#petsc4py.PETSc.IS.Type.BLOCK>.

        Not collective.

        See also:
            ISBlockGetIndices <https://petsc.org/release/manualpages/IS/ISBlockGetIndices.html>

    Source code at petsc4py/PETSc/IS.pyx:906 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L906>

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    getBlockSize()
        Return the number of elements in a block.

        Not collective.

        See also:
            ISGetBlockSize <https://petsc.org/release/manualpages/IS/ISGetBlockSize.html>

    Source code at petsc4py/PETSc/IS.pyx:486 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L486>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getIndices()
        Return the indices of the index set.

        Not collective.

        See also:
            ISGetIndices <https://petsc.org/release/manualpages/IS/ISGetIndices.html>

    Source code at petsc4py/PETSc/IS.pyx:862 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L862>

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    getInfo()
        Return stride information for an index set with type IS.Type.STRIDE <#petsc4py.PETSc.IS.Type.STRIDE>.

        Not collective.

        Returns

            •   first (int <https://docs.python.org/3/library/functions.html#int>) -- First element of the index set.

            •   step (int <https://docs.python.org/3/library/functions.html#int>) -- Difference between adjacent indices.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            IS.getStride, ISStrideGetInfo <https://petsc.org/release/manualpages/IS/ISStrideGetInfo.html>

    Source code at petsc4py/PETSc/IS.pyx:976 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L976>

    getLocalSize()
        Return the process-local length of the index set.

        Not collective.

        See also:
            ISGetLocalSize <https://petsc.org/release/manualpages/IS/ISGetLocalSize.html>

    Source code at petsc4py/PETSc/IS.pyx:450 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L450>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getSize()
        Return the global length of an index set.

        Not collective.

        See also:
            ISGetSize <https://petsc.org/release/manualpages/IS/ISGetSize.html>

    Source code at petsc4py/PETSc/IS.pyx:436 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L436>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getSizes()
        Return the local and global sizes of the index set.

        Not collective.

        Returns

            •   local_size (int <https://docs.python.org/3/library/functions.html#int>) -- The local size.

            •   global_size (int <https://docs.python.org/3/library/functions.html#int>) -- The global size.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            IS.getLocalSize, IS.getSize

    Source code at petsc4py/PETSc/IS.pyx:464 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L464>

    getStride()
        Return size and stride information.

        Not collective.

        Returns

            •   size (int <https://docs.python.org/3/library/functions.html#int>) -- Length of the locally owned portion of the index set.

            •   first (int <https://docs.python.org/3/library/functions.html#int>) -- First element of the index set.

            •   step (int <https://docs.python.org/3/library/functions.html#int>) -- Difference between adjacent indices.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            ISGetLocalSize <https://petsc.org/release/manualpages/IS/ISGetLocalSize.html>, ISStrideGetInfo <https://petsc.org/release/manualpages/IS/ISStrideGetInfo.html>

    Source code at petsc4py/PETSc/IS.pyx:952 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L952>

    getType()
        Return the index set type associated with the IS.

        Not collective.

        See also:
            ISGetType <https://petsc.org/release/manualpages/IS/ISGetType.html>

    Source code at petsc4py/PETSc/IS.pyx:128 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L128>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    intersect(iset)
        Return the intersection of two index sets.

        Collective.

        Parameters
            iset (IS <#petsc4py.PETSc.IS>) -- Index set to compute the intersection with.

        Returns
            Index set representing the intersection of self and iset.

        Return type
            IS

    See also:
            ISIntersect <https://petsc.org/release/manualpages/IS/ISIntersect.html>

    Source code at petsc4py/PETSc/IS.pyx:699 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L699>

    invertPermutation(nlocal=None)
        Invert the index set.

        Collective.

        For this to be correct the index set must be a permutation.

        Parameters
            nlocal (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The number of indices on this processor in the resulting index set, defaults to PETSC_DECIDE.

        Return type
            IS <#petsc4py.PETSc.IS>

    See also:
            ISInvertPermutation <https://petsc.org/release/manualpages/IS/ISInvertPermutation.html>

    Source code at petsc4py/PETSc/IS.pyx:363 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L363>

    isIdentity()
        Return whether the index set has been declared as an identity.

        Collective.

        See also:
            ISIdentity <https://petsc.org/release/manualpages/IS/ISIdentity.html>

    Source code at petsc4py/PETSc/IS.pyx:585 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L585>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    isPermutation()
        Return whether an index set has been declared to be a permutation.

        Logically collective.

        See also:
            ISPermutation <https://petsc.org/release/manualpages/IS/ISPermutation.html>

    Source code at petsc4py/PETSc/IS.pyx:558 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L558>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    isSorted()
        Return whether the indices have been sorted.

        Collective.

        See also:
            ISSorted <https://petsc.org/release/manualpages/IS/ISSorted.html>

    Source code at petsc4py/PETSc/IS.pyx:531 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L531>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    load(viewer)
        Load a stored index set.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer>) -- Binary file viewer, either Viewer.Type.BINARY <#petsc4py.PETSc.Viewer.Type.BINARY> or Viewer.Type.HDF5 <#petsc4py.PETSc.Viewer.Type.HDF5>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            ISLoad <https://petsc.org/release/manualpages/IS/ISLoad.html>

    Source code at petsc4py/PETSc/IS.pyx:281 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L281>

    partitioningCount(npart=None)
        Return the number of elements per process after a partitioning.

        Collective.

        Assuming that the index set represents a partitioning, determine the number of elements on each (partition) rank.

        Parameters
            npart (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The number of partitions, defaults to the size of the communicator.

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    See also:
            ISPartitioningCount <https://petsc.org/release/manualpages/IS/ISPartitioningCount.html>

    Source code at petsc4py/PETSc/IS.pyx:404 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L404>

    partitioningToNumbering()
        Return the new global numbering after a partitioning.

        Collective.

        Assuming that the index set represents a partitioning, generate another index set with the new global node number in the new ordering.

        See also:
            ISPartitioningToNumbering <https://petsc.org/release/manualpages/IS/ISPartitioningToNumbering.html>

    Source code at petsc4py/PETSc/IS.pyx:387 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L387>

        Return type
            IS <#petsc4py.PETSc.IS>

    renumber(mult=None)
        Renumber the non-negative entries of an index set, starting from 0.

        Collective.

        Parameters
            mult (IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>) -- The multiplicity of each entry in self, default implies a multiplicity of 1.

        Returns

            •   int <https://docs.python.org/3/library/functions.html#int> -- One past the largest entry of the new index set.

            •   IS -- The renumbered index set.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, IS <#petsc4py.PETSc.IS>]

    See also:
            ISRenumber <https://petsc.org/release/manualpages/IS/ISRenumber.html>

    Source code at petsc4py/PETSc/IS.pyx:814 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L814>

    setBlockIndices(bsize, indices)
        Set the indices for an index set with type IS.Type.BLOCK <#petsc4py.PETSc.IS.Type.BLOCK>.

        Collective.

        Parameters

            •   bsize (int <https://docs.python.org/3/library/functions.html#int>) -- Number of elements in each block.

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- List of integers.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            ISBlockSetIndices <https://petsc.org/release/manualpages/IS/ISBlockSetIndices.html>

    Source code at petsc4py/PETSc/IS.pyx:883 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L883>

    setBlockSize(bs)
        Set the block size of the index set.

        Logically collective.

        Parameters
            bs (int <https://docs.python.org/3/library/functions.html#int>) -- Block size.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            ISSetBlockSize <https://petsc.org/release/manualpages/IS/ISSetBlockSize.html>

    Source code at petsc4py/PETSc/IS.pyx:500 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L500>

    setIdentity()
        Mark the index set as being an identity.

        Logically collective.

        See also:
            ISSetIdentity <https://petsc.org/release/manualpages/IS/ISSetIdentity.html>

    Source code at petsc4py/PETSc/IS.pyx:572 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L572>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    setIndices(indices)
        Set the indices of an index set.

        Logically collective.

        The index set is assumed to be of type IS.Type.GENERAL <#petsc4py.PETSc.IS.Type.GENERAL>.

        See also:
            ISGeneralSetIndices <https://petsc.org/release/manualpages/IS/ISGeneralSetIndices.html>

    Source code at petsc4py/PETSc/IS.pyx:845 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L845>

        Parameters
            indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>])

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPermutation()
        Mark the index set as being a permutation.

        Logically collective.

        See also:
            ISSetPermutation <https://petsc.org/release/manualpages/IS/ISSetPermutation.html>

    Source code at petsc4py/PETSc/IS.pyx:545 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L545>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    setStride(size, first=0, step=1)
        Set the stride information for an index set with type IS.Type.STRIDE <#petsc4py.PETSc.IS.Type.STRIDE>.

        Logically collective.

        Parameters

            •   size (int <https://docs.python.org/3/library/functions.html#int>) -- Length of the locally owned portion of the index set.

            •   first (int <https://docs.python.org/3/library/functions.html#int>) -- First element of the index set.

            •   step (int <https://docs.python.org/3/library/functions.html#int>) -- Difference between adjacent indices.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            ISStrideSetStride <https://petsc.org/release/manualpages/IS/ISStrideSetStride.html>

    Source code at petsc4py/PETSc/IS.pyx:928 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L928>

    setType(is_type)
        Set the type of the index set.

        Collective.

        Parameters
            is_type (Type <#petsc4py.PETSc.IS.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The index set type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            ISSetType <https://petsc.org/release/manualpages/IS/ISSetType.html>

    Source code at petsc4py/PETSc/IS.pyx:109 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L109>

    sort()
        Sort the indices of an index set.

        Collective.

        See also:
            ISSort <https://petsc.org/release/manualpages/IS/ISSort.html>

    Source code at petsc4py/PETSc/IS.pyx:518 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L518>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    sum(iset)
        Return the union of two (sorted) index sets.

        Collective.

        Parameters
            iset (IS <#petsc4py.PETSc.IS>) -- The index set to compute the union with.

        Return type
            IS <#petsc4py.PETSc.IS>

    See also:
            ISSum <https://petsc.org/release/manualpages/IS/ISSum.html>

    Source code at petsc4py/PETSc/IS.pyx:618 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L618>

    toGeneral()
        Convert the index set type to IS.Type.GENERAL <#petsc4py.PETSc.IS.Type.GENERAL>.

        Collective.

        See also:
            ISToGeneral <https://petsc.org/release/manualpages/IS/ISToGeneral.html>, ISType <https://petsc.org/release/manualpages/IS/ISType.html>

    Source code at petsc4py/PETSc/IS.pyx:320 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L320>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    union(iset)
        Return the union of two (possibly unsorted) index sets.

        Collective.

        This function will call either ISSum <https://petsc.org/release/manualpages/IS/ISSum.html> or ISExpand <https://petsc.org/release/manualpages/IS/ISExpand.html> depending on whether or not the input sets are already sorted.

        Sequential only (as ISSum <https://petsc.org/release/manualpages/IS/ISSum.html> is sequential only).

        Parameters
            iset (IS <#petsc4py.PETSc.IS>) -- Index set to compute the union with.

        Returns
            The new, combined, index set.

        Return type
            IS

    See also:
            IS.expand, IS.sum

    Source code at petsc4py/PETSc/IS.pyx:664 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L664>

    view(viewer=None)
        Display the index set.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- Viewer used to display the IS.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            ISView <https://petsc.org/release/manualpages/IS/ISView.html>

    Source code at petsc4py/PETSc/IS.pyx:56 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L56>

Attributes Documentation

    array
        View of the index set as an array of integers.

        Not collective.

        Source code at petsc4py/PETSc/IS.pyx:1105 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1105>

    block_size
        The number of elements in a block.

        Not collective.

        See also:
            IS.getBlockSize

    Source code at petsc4py/PETSc/IS.pyx:1079 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1079>

    identity
        True <https://docs.python.org/3/library/constants.html#True> if index set is an identity, False <https://docs.python.org/3/library/constants.html#False> otherwise.

        Collective.

        See also:
            IS.isIdentity

    Source code at petsc4py/PETSc/IS.pyx:1012 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1012>

    indices
        The indices of the index set.

        Not collective.

        See also:
            IS.getIndices

    Source code at petsc4py/PETSc/IS.pyx:1092 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1092>

    local_size
        The local size of the index set.

        Not collective.

        See also:
            IS.getLocalSize

    Source code at petsc4py/PETSc/IS.pyx:1066 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1066>

    permutation
        True <https://docs.python.org/3/library/constants.html#True> if index set is a permutation, False <https://docs.python.org/3/library/constants.html#False> otherwise.

        Logically collective.

        See also:
            IS.isPermutation

    Source code at petsc4py/PETSc/IS.pyx:999 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L999>

    size
        The global size of the index set.

        Not collective.

        See also:
            IS.getSize

    Source code at petsc4py/PETSc/IS.pyx:1053 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1053>

    sizes
        The local and global sizes of the index set.

        Not collective.

        See also:
            IS.getSizes

    Source code at petsc4py/PETSc/IS.pyx:1040 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1040>

    sorted
        True <https://docs.python.org/3/library/constants.html#True> if index set is sorted, False <https://docs.python.org/3/library/constants.html#False> otherwise.

        Collective.

        See also:
            IS.isSorted

    Source code at petsc4py/PETSc/IS.pyx:1025 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1025>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.InsertMode

    class petsc4py.PETSc.InsertMode
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Insertion mode.

        Most commonly used insertion modes are:

        INSERT
            Insert provided value/s discarding previous value/s.

        ADD Add provided value/s to current value/s.

        MAX Insert the maximum of provided value/s and current value/s.

    See also:
            InsertMode <https://petsc.org/release/manualpages/Sys/InsertMode.html>

    Attributes Summary
    ADD | Constant ADD of type int <https://docs.python.org/3/library/functions.html#int>
    ADD_ALL | Constant ADD_ALL of type int <https://docs.python.org/3/library/functions.html#int>
    ADD_ALL_VALUES | Constant ADD_ALL_VALUES of type int <https://docs.python.org/3/library/functions.html#int>
    ADD_BC | Constant ADD_BC of type int <https://docs.python.org/3/library/functions.html#int>
    ADD_BC_VALUES | Constant ADD_BC_VALUES of type int <https://docs.python.org/3/library/functions.html#int>
    ADD_VALUES | Constant ADD_VALUES of type int <https://docs.python.org/3/library/functions.html#int>
    INSERT | Constant INSERT of type int <https://docs.python.org/3/library/functions.html#int>
    INSERT_ALL | Constant INSERT_ALL of type int <https://docs.python.org/3/library/functions.html#int>
    INSERT_ALL_VALUES | Constant INSERT_ALL_VALUES of type int <https://docs.python.org/3/library/functions.html#int>
    INSERT_BC | Constant INSERT_BC of type int <https://docs.python.org/3/library/functions.html#int>
    INSERT_BC_VALUES | Constant INSERT_BC_VALUES of type int <https://docs.python.org/3/library/functions.html#int>
    INSERT_VALUES | Constant INSERT_VALUES of type int <https://docs.python.org/3/library/functions.html#int>
    MAX | Constant MAX of type int <https://docs.python.org/3/library/functions.html#int>
    MAX_VALUES | Constant MAX_VALUES of type int <https://docs.python.org/3/library/functions.html#int>
    NOT_SET_VALUES | Constant NOT_SET_VALUES of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        ADD: int <https://docs.python.org/3/library/functions.html#int> = ADD
            Constant ADD of type int <https://docs.python.org/3/library/functions.html#int>

        ADD_ALL: int <https://docs.python.org/3/library/functions.html#int> = ADD_ALL
            Constant ADD_ALL of type int <https://docs.python.org/3/library/functions.html#int>

        ADD_ALL_VALUES: int <https://docs.python.org/3/library/functions.html#int> = ADD_ALL_VALUES
            Constant ADD_ALL_VALUES of type int <https://docs.python.org/3/library/functions.html#int>

        ADD_BC: int <https://docs.python.org/3/library/functions.html#int> = ADD_BC
            Constant ADD_BC of type int <https://docs.python.org/3/library/functions.html#int>

        ADD_BC_VALUES: int <https://docs.python.org/3/library/functions.html#int> = ADD_BC_VALUES
            Constant ADD_BC_VALUES of type int <https://docs.python.org/3/library/functions.html#int>

        ADD_VALUES: int <https://docs.python.org/3/library/functions.html#int> = ADD_VALUES
            Constant ADD_VALUES of type int <https://docs.python.org/3/library/functions.html#int>

        INSERT: int <https://docs.python.org/3/library/functions.html#int> = INSERT
            Constant INSERT of type int <https://docs.python.org/3/library/functions.html#int>

        INSERT_ALL: int <https://docs.python.org/3/library/functions.html#int> = INSERT_ALL
            Constant INSERT_ALL of type int <https://docs.python.org/3/library/functions.html#int>

        INSERT_ALL_VALUES: int <https://docs.python.org/3/library/functions.html#int> = INSERT_ALL_VALUES
            Constant INSERT_ALL_VALUES of type int <https://docs.python.org/3/library/functions.html#int>

        INSERT_BC: int <https://docs.python.org/3/library/functions.html#int> = INSERT_BC
            Constant INSERT_BC of type int <https://docs.python.org/3/library/functions.html#int>

        INSERT_BC_VALUES: int <https://docs.python.org/3/library/functions.html#int> = INSERT_BC_VALUES
            Constant INSERT_BC_VALUES of type int <https://docs.python.org/3/library/functions.html#int>

        INSERT_VALUES: int <https://docs.python.org/3/library/functions.html#int> = INSERT_VALUES
            Constant INSERT_VALUES of type int <https://docs.python.org/3/library/functions.html#int>

        MAX: int <https://docs.python.org/3/library/functions.html#int> = MAX
            Constant MAX of type int <https://docs.python.org/3/library/functions.html#int>

        MAX_VALUES: int <https://docs.python.org/3/library/functions.html#int> = MAX_VALUES
            Constant MAX_VALUES of type int <https://docs.python.org/3/library/functions.html#int>

        NOT_SET_VALUES: int <https://docs.python.org/3/library/functions.html#int> = NOT_SET_VALUES
            Constant NOT_SET_VALUES of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.KSP

    class petsc4py.PETSc.KSP
        Bases: Object <#petsc4py.PETSc.Object>

        Abstract PETSc object that manages all Krylov methods.

        This is the object that manages the linear solves in PETSc (even those such as direct solvers that do no use Krylov accelerators).

        Notes

        When a direct solver is used, but no Krylov solver is used, the KSP object is still used but with a Type.PREONLY <#petsc4py.PETSc.KSP.Type.PREONLY>, meaning that only application of the preconditioner is used as the linear solver.

        See also:
            create, setType, SNES <#petsc4py.PETSc.SNES>, TS <#petsc4py.PETSc.TS>, PC <#petsc4py.PETSc.PC>, Type.CG <#petsc4py.PETSc.KSP.Type.CG>, Type.GMRES <#petsc4py.PETSc.KSP.Type.GMRES>, KSP <https://petsc.org/release/manualpages/KSP/KSP.html>

    Enumerations
    ConvergedReason <#petsc4py.PETSc.KSP.ConvergedReason> | KSP Converged Reason.
    DMActive <#petsc4py.PETSc.KSP.DMActive> | Argument to KSPSetDMActive().
    HPDDMType <#petsc4py.PETSc.KSP.HPDDMType> | The HPDDM Krylov solver type.
    NormType <#petsc4py.PETSc.KSP.NormType> | KSP norm type.
    Type <#petsc4py.PETSc.KSP.Type> | KSP Type.

  petsc4py.PETSc.KSP.ConvergedReason

    class petsc4py.PETSc.KSP.ConvergedReason
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        KSP Converged Reason.

        CONVERGED_ITERATING
            Still iterating

        ITERATING
            Still iterating

        CONVERGED_RTOL_NORMAL_EQUATIONS
            Undocumented.

        CONVERGED_ATOL_NORMAL_EQUATIONS
            Undocumented.

        CONVERGED_RTOL
            ∥r∥ <= rtolnorm(b) or rtolnorm(b - Ax₀)

        CONVERGED_ATOL
            ∥r∥ <= atol

        CONVERGED_ITS
            Used by the Type.PREONLY <#petsc4py.PETSc.KSP.Type.PREONLY> solver after the single iteration of the preconditioner is applied. Also used when the KSPConvergedSkip <https://petsc.org/release/manualpages/KSP/KSPConvergedSkip.html> convergence test routine is set in KSP.

        CONVERGED_NEG_CURVE
            Undocumented.

        CONVERGED_STEP_LENGTH
            Undocumented.

        CONVERGED_HAPPY_BREAKDOWN
            Undocumented.

        DIVERGED_NULL
            Undocumented.

        DIVERGED_MAX_IT
            Ran out of iterations before any convergence criteria was reached.

        DIVERGED_DTOL
            norm(r) >= dtol*norm(b)

        DIVERGED_BREAKDOWN
            A breakdown in the Krylov method was detected so the method could not continue to enlarge the Krylov space. Could be due to a singular matrix or preconditioner. In KSPHPDDM, this is also returned when some search directions within a block are collinear.

        DIVERGED_BREAKDOWN_BICG
            A breakdown in the KSPBICG method was detected so the method could not continue to enlarge the Krylov space.

        DIVERGED_NONSYMMETRIC
            It appears the operator or preconditioner is not symmetric and this Krylov method (Type.CG <#petsc4py.PETSc.KSP.Type.CG>, Type.MINRES <#petsc4py.PETSc.KSP.Type.MINRES>, Type.CR <#petsc4py.PETSc.KSP.Type.CR>) requires symmetry.

        DIVERGED_INDEFINITE_PC
            It appears the preconditioner is indefinite (has both positive and negative eigenvalues) and this Krylov method (Type.CG <#petsc4py.PETSc.KSP.Type.CG>) requires it to be positive definite.

        DIVERGED_NANORINF
            Undocumented.

        DIVERGED_INDEFINITE_MAT
            Undocumented.

        DIVERGED_PCSETUP_FAILED
            It was not possible to build or use the requested preconditioner. This is usually due to a zero pivot in a factorization. It can also result from a failure in a subpreconditioner inside a nested preconditioner such as PC.Type.FIELDSPLIT <#petsc4py.PETSc.PC.Type.FIELDSPLIT>.

    See also:
            None <https://docs.python.org/3/library/constants.html#None>

    Attributes Summary
    CONVERGED_ATOL | Constant CONVERGED_ATOL of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_ATOL_NORMAL_EQUATIONS | Constant CONVERGED_ATOL_NORMAL_EQUATIONS of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_HAPPY_BREAKDOWN | Constant CONVERGED_HAPPY_BREAKDOWN of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_ITERATING | Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_ITS | Constant CONVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_NEG_CURVE | Constant CONVERGED_NEG_CURVE of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_RTOL | Constant CONVERGED_RTOL of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_RTOL_NORMAL_EQUATIONS | Constant CONVERGED_RTOL_NORMAL_EQUATIONS of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_STEP_LENGTH | Constant CONVERGED_STEP_LENGTH of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_BREAKDOWN | Constant DIVERGED_BREAKDOWN of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_BREAKDOWN_BICG | Constant DIVERGED_BREAKDOWN_BICG of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_DTOL | Constant DIVERGED_DTOL of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_INDEFINITE_MAT | Constant DIVERGED_INDEFINITE_MAT of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_INDEFINITE_PC | Constant DIVERGED_INDEFINITE_PC of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_MAX_IT | Constant DIVERGED_MAX_IT of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_NANORINF | Constant DIVERGED_NANORINF of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_NONSYMMETRIC | Constant DIVERGED_NONSYMMETRIC of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_NULL | Constant DIVERGED_NULL of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_PCSETUP_FAILED | Constant DIVERGED_PCSETUP_FAILED of type int <https://docs.python.org/3/library/functions.html#int>
    ITERATING | Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        CONVERGED_ATOL: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_ATOL
            Constant CONVERGED_ATOL of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_ATOL_NORMAL_EQUATIONS: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_ATOL_NORMAL_EQUATIONS
            Constant CONVERGED_ATOL_NORMAL_EQUATIONS of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_HAPPY_BREAKDOWN: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_HAPPY_BREAKDOWN
            Constant CONVERGED_HAPPY_BREAKDOWN of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_ITERATING: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_ITERATING
            Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_ITS: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_ITS
            Constant CONVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_NEG_CURVE: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_NEG_CURVE
            Constant CONVERGED_NEG_CURVE of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_RTOL: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_RTOL
            Constant CONVERGED_RTOL of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_RTOL_NORMAL_EQUATIONS: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_RTOL_NORMAL_EQUATIONS
            Constant CONVERGED_RTOL_NORMAL_EQUATIONS of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_STEP_LENGTH: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_STEP_LENGTH
            Constant CONVERGED_STEP_LENGTH of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_BREAKDOWN: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_BREAKDOWN
            Constant DIVERGED_BREAKDOWN of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_BREAKDOWN_BICG: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_BREAKDOWN_BICG
            Constant DIVERGED_BREAKDOWN_BICG of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_DTOL: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_DTOL
            Constant DIVERGED_DTOL of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_INDEFINITE_MAT: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_INDEFINITE_MAT
            Constant DIVERGED_INDEFINITE_MAT of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_INDEFINITE_PC: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_INDEFINITE_PC
            Constant DIVERGED_INDEFINITE_PC of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_MAX_IT: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_MAX_IT
            Constant DIVERGED_MAX_IT of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_NANORINF: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_NANORINF
            Constant DIVERGED_NANORINF of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_NONSYMMETRIC: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_NONSYMMETRIC
            Constant DIVERGED_NONSYMMETRIC of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_NULL: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_NULL
            Constant DIVERGED_NULL of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_PCSETUP_FAILED: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_PCSETUP_FAILED
            Constant DIVERGED_PCSETUP_FAILED of type int <https://docs.python.org/3/library/functions.html#int>

        ITERATING: int <https://docs.python.org/3/library/functions.html#int> = ITERATING
            Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.KSP.DMActive

    class petsc4py.PETSc.KSP.DMActive
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Argument to KSPSetDMActive().

        Attributes Summary
        ALL | Constant ALL of type int <https://docs.python.org/3/library/functions.html#int>
        INITIAL_GUESS | Constant INITIAL_GUESS of type int <https://docs.python.org/3/library/functions.html#int>
        OPERATOR | Constant OPERATOR of type int <https://docs.python.org/3/library/functions.html#int>
        RHS | Constant RHS of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        ALL: int <https://docs.python.org/3/library/functions.html#int> = ALL
            Constant ALL of type int <https://docs.python.org/3/library/functions.html#int>

        INITIAL_GUESS: int <https://docs.python.org/3/library/functions.html#int> = INITIAL_GUESS
            Constant INITIAL_GUESS of type int <https://docs.python.org/3/library/functions.html#int>

        OPERATOR: int <https://docs.python.org/3/library/functions.html#int> = OPERATOR
            Constant OPERATOR of type int <https://docs.python.org/3/library/functions.html#int>

        RHS: int <https://docs.python.org/3/library/functions.html#int> = RHS
            Constant RHS of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.KSP.HPDDMType

    class petsc4py.PETSc.KSP.HPDDMType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The HPDDM Krylov solver type.

        Attributes Summary
        BCG | Constant BCG of type int <https://docs.python.org/3/library/functions.html#int>
        BFBCG | Constant BFBCG of type int <https://docs.python.org/3/library/functions.html#int>
        BGCRODR | Constant BGCRODR of type int <https://docs.python.org/3/library/functions.html#int>
        BGMRES | Constant BGMRES of type int <https://docs.python.org/3/library/functions.html#int>
        CG | Constant CG of type int <https://docs.python.org/3/library/functions.html#int>
        GCRODR | Constant GCRODR of type int <https://docs.python.org/3/library/functions.html#int>
        GMRES | Constant GMRES of type int <https://docs.python.org/3/library/functions.html#int>
        PREONLY | Constant PREONLY of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        BCG: int <https://docs.python.org/3/library/functions.html#int> = BCG
            Constant BCG of type int <https://docs.python.org/3/library/functions.html#int>

        BFBCG: int <https://docs.python.org/3/library/functions.html#int> = BFBCG
            Constant BFBCG of type int <https://docs.python.org/3/library/functions.html#int>

        BGCRODR: int <https://docs.python.org/3/library/functions.html#int> = BGCRODR
            Constant BGCRODR of type int <https://docs.python.org/3/library/functions.html#int>

        BGMRES: int <https://docs.python.org/3/library/functions.html#int> = BGMRES
            Constant BGMRES of type int <https://docs.python.org/3/library/functions.html#int>

        CG: int <https://docs.python.org/3/library/functions.html#int> = CG
            Constant CG of type int <https://docs.python.org/3/library/functions.html#int>

        GCRODR: int <https://docs.python.org/3/library/functions.html#int> = GCRODR
            Constant GCRODR of type int <https://docs.python.org/3/library/functions.html#int>

        GMRES: int <https://docs.python.org/3/library/functions.html#int> = GMRES
            Constant GMRES of type int <https://docs.python.org/3/library/functions.html#int>

        PREONLY: int <https://docs.python.org/3/library/functions.html#int> = PREONLY
            Constant PREONLY of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.KSP.NormType

    class petsc4py.PETSc.KSP.NormType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        KSP norm type.

        The available norm types are:

        NONE
            Skips computing the norm, this should generally only be used if you are using the Krylov method as a smoother with a fixed small number of iterations. Implicitly sets KSPConvergedSkip <https://petsc.org/release/manualpages/KSP/KSPConvergedSkip.html> as KSP convergence test. Note that certain algorithms such as Type.GMRES <#petsc4py.PETSc.KSP.Type.GMRES> ALWAYS require the norm calculation, for these methods the norms are still computed, they are just not used in the convergence test.

        PRECONDITIONED
            The default for left preconditioned solves, uses the l₂ norm of the preconditioned residual P⁻¹(b - Ax).

        UNPRECONDITIONED
            Uses the l₂ norm of the true b - Ax residual.

        NATURAL
            Supported by Type.CG <#petsc4py.PETSc.KSP.Type.CG>, Type.CR <#petsc4py.PETSc.KSP.Type.CR>, Type.CGNE <#petsc4py.PETSc.KSP.Type.CGNE>, Type.CGS <#petsc4py.PETSc.KSP.Type.CGS>.

    Attributes Summary
    DEFAULT | Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>
    NATURAL | Constant NATURAL of type int <https://docs.python.org/3/library/functions.html#int>
    NO | Constant NO of type int <https://docs.python.org/3/library/functions.html#int>
    NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_DEFAULT | Constant NORM_DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_NATURAL | Constant NORM_NATURAL of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_NONE | Constant NORM_NONE of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_PRECONDITIONED | Constant NORM_PRECONDITIONED of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_UNPRECONDITIONED | Constant NORM_UNPRECONDITIONED of type int <https://docs.python.org/3/library/functions.html#int>
    PRECONDITIONED | Constant PRECONDITIONED of type int <https://docs.python.org/3/library/functions.html#int>
    UNPRECONDITIONED | Constant UNPRECONDITIONED of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        DEFAULT: int <https://docs.python.org/3/library/functions.html#int> = DEFAULT
            Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>

        NATURAL: int <https://docs.python.org/3/library/functions.html#int> = NATURAL
            Constant NATURAL of type int <https://docs.python.org/3/library/functions.html#int>

        NO: int <https://docs.python.org/3/library/functions.html#int> = NO
            Constant NO of type int <https://docs.python.org/3/library/functions.html#int>

        NONE: int <https://docs.python.org/3/library/functions.html#int> = NONE
            Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_DEFAULT: int <https://docs.python.org/3/library/functions.html#int> = NORM_DEFAULT
            Constant NORM_DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_NATURAL: int <https://docs.python.org/3/library/functions.html#int> = NORM_NATURAL
            Constant NORM_NATURAL of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_NONE: int <https://docs.python.org/3/library/functions.html#int> = NORM_NONE
            Constant NORM_NONE of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_PRECONDITIONED: int <https://docs.python.org/3/library/functions.html#int> = NORM_PRECONDITIONED
            Constant NORM_PRECONDITIONED of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_UNPRECONDITIONED: int <https://docs.python.org/3/library/functions.html#int> = NORM_UNPRECONDITIONED
            Constant NORM_UNPRECONDITIONED of type int <https://docs.python.org/3/library/functions.html#int>

        PRECONDITIONED: int <https://docs.python.org/3/library/functions.html#int> = PRECONDITIONED
            Constant PRECONDITIONED of type int <https://docs.python.org/3/library/functions.html#int>

        UNPRECONDITIONED: int <https://docs.python.org/3/library/functions.html#int> = UNPRECONDITIONED
            Constant UNPRECONDITIONED of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.KSP.Type

    class petsc4py.PETSc.KSP.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        KSP Type.

        The available types are:

        RICHARDSON
            The preconditioned Richardson iterative method KSPRICHARDSON <https://petsc.org/release/manualpages/KSP/KSPRICHARDSON.html>.

        CHEBYSHEV
            The preconditioned Chebyshev iterative method. KSPCHEBYSHEV <https://petsc.org/release/manualpages/KSP/KSPCHEBYSHEV.html>.

        CG  The Preconditioned Conjugate Gradient (PCG) iterative method. KSPCG <https://petsc.org/release/manualpages/KSP/KSPCG.html>

        GROPPCG
            A pipelined conjugate gradient method (Gropp). KSPGROPPCG <https://petsc.org/release/manualpages/KSP/KSPGROPPCG.html>

        PIPECG
            A pipelined conjugate gradient method. KSPPIPECG <https://petsc.org/release/manualpages/KSP/KSPPIPECG.html>

        PIPECGRR
            Pipelined Conjugate Gradients with Residual Replacement. KSPPIPECGRR <https://petsc.org/release/manualpages/KSP/KSPPIPECGRR.html>

        PIPELCG
            Deep pipelined (length l) Conjugate Gradient method. KSPPIPELCG <https://petsc.org/release/manualpages/KSP/KSPPIPELCG.html>

        PIPEPRCG
            Pipelined predict-and-recompute conjugate gradient method. KSPPIPEPRCG <https://petsc.org/release/manualpages/KSP/KSPPIPEPRCG.html>

        PIPECG2
            Pipelined conjugate gradient method with a single non-blocking reduction per two iterations. KSPPIPECG2 <https://petsc.org/release/manualpages/KSP/KSPPIPECG2.html>

        CGNE
            Applies the preconditioned conjugate gradient method to the normal equations without explicitly forming AᵀA. KSPCGNE <https://petsc.org/release/manualpages/KSP/KSPCGNE.html>

        NASH
            Conjugate gradient method subject to a constraint on the solution norm. KSPNASH <https://petsc.org/release/manualpages/KSP/KSPNASH.html>

        STCG
            Conjugate gradient method subject to a constraint on the solution norm. KSPSTCG <https://petsc.org/release/manualpages/KSP/KSPSTCG.html>

        GLTR
            Conjugate gradient method subject to a constraint on the solution norm. KSPGLTR <https://petsc.org/release/manualpages/KSP/KSPGLTR.html>

        FCG Flexible Conjugate Gradient method (FCG). Unlike most KSP methods this allows the preconditioner to be nonlinear. KSPFCG <https://petsc.org/release/manualpages/KSP/KSPFCG.html>

        PIPEFCG
            Pipelined, Flexible Conjugate Gradient method. KSPPIPEFCG <https://petsc.org/release/manualpages/KSP/KSPPIPEFCG.html>

        GMRES
            Generalized Minimal Residual method with restart. KSPGMRES <https://petsc.org/release/manualpages/KSP/KSPGMRES.html>

        PIPEFGMRES
            Pipelined (1-stage) Flexible Generalized Minimal Residual method. KSPPIPEFGMRES <https://petsc.org/release/manualpages/KSP/KSPPIPEFGMRES.html>

        FGMRES
            Implements the Flexible Generalized Minimal Residual method. KSPFGMRES <https://petsc.org/release/manualpages/KSP/KSPFGMRES.html>

        LGMRES
            Augments the standard Generalized Minimal Residual method approximation space with approximations to the error from previous restart cycles. KSPLGMRES <https://petsc.org/release/manualpages/KSP/KSPLGMRES.html>

        DGMRES
            Deflated Generalized Minimal Residual method. In this implementation, the adaptive strategy allows to switch to the deflated GMRES when the stagnation occurs. KSPDGMRES <https://petsc.org/release/manualpages/KSP/KSPDGMRES.html>

        PGMRES
            Pipelined Generalized Minimal Residual method. KSPPGMRES <https://petsc.org/release/manualpages/KSP/KSPPGMRES.html>

        TCQMR
            A variant of Quasi Minimal Residual (QMR). KSPTCQMR <https://petsc.org/release/manualpages/KSP/KSPTCQMR.html>

        BCGS
            Stabilized version of Biconjugate Gradient (BiCGStab) method. KSPBCGS <https://petsc.org/release/manualpages/KSP/KSPBCGS.html>

        IBCGS
            Improved Stabilized version of BiConjugate Gradient (IBiCGStab) method in an alternative form to have only a single global reduction operation instead of the usual 3 (or 4). KSPIBCGS <https://petsc.org/release/manualpages/KSP/KSPIBCGS.html>

        QMRCGS
            Quasi- Minimal Residual variant of the Bi-CGStab algorithm (QMRCGStab) method. KSPQMRCGS <https://petsc.org/release/manualpages/KSP/KSPQMRCGS.html>

        FBCGS
            Flexible Stabilized version of BiConjugate Gradient (BiCGStab) method. KSPFBCGS <https://petsc.org/release/manualpages/KSP/KSPFBCGS.html>

        FBCGSR
            A mathematically equivalent variant of flexible stabilized BiConjugate Gradient (BiCGStab). KSPFBCGSR <https://petsc.org/release/manualpages/KSP/KSPFBCGSR.html>

        BCGSL
            Variant of the L-step stabilized BiConjugate Gradient (BiCGStab(L)) algorithm. Uses "L-step" Minimal Residual (MR) polynomials. The variation concerns cases when some parameters are negative due to round-off. KSPBCGSL <https://petsc.org/release/manualpages/KSP/KSPBCGSL.html>

        PIPEBCGS
            Pipelined stabilized BiConjugate Gradient (BiCGStab) method. KSPPIPEBCGS <https://petsc.org/release/manualpages/KSP/KSPPIPEBCGS.html>

        CGS Conjugate Gradient Squared method. KSPCGS <https://petsc.org/release/manualpages/KSP/KSPCGS.html>

        TFQMR
            A Transpose Tree Quasi- Minimal Residual (QMR). KSPCR <https://petsc.org/release/manualpages/KSP/KSPCR.html>

        CR  (Preconditioned) Conjugate Residuals (CR) method. KSPCR <https://petsc.org/release/manualpages/KSP/KSPCR.html>

        PIPECR
            Pipelined Conjugate Residual (CR) method. KSPPIPECR <https://petsc.org/release/manualpages/KSP/KSPPIPECR.html>

        LSQR
            Least squares solver. KSPLSQR <https://petsc.org/release/manualpages/KSP/KSPLSQR.html>

        PREONLY
            Applies ONLY the preconditioner exactly once. This may be used in inner iterations, where it is desired to allow multiple iterations as well as the "0-iteration" case. It is commonly used with the direct solver preconditioners like PCLU and PCCHOLESKY. There is an alias of KSPNONE. KSPPREONLY <https://petsc.org/release/manualpages/KSP/KSPPREONLY.html>

        NONE
            No solver KSPNONE

        QCG Conjugate Gradient (CG) method subject to a constraint on the solution norm. KSPQCG <https://petsc.org/release/manualpages/KSP/KSPQCG.html>

        BICG
            Implements the Biconjugate gradient method (BiCG). Similar to running the conjugate gradient on the normal equations. KSPBICG <https://petsc.org/release/manualpages/KSP/KSPBICG.html>

        MINRES
            Minimum Residual (MINRES) method. KSPMINRES <https://petsc.org/release/manualpages/KSP/KSPMINRES.html>

        SYMMLQ
            Symmetric LQ method (SymmLQ). Uses LQ decomposition (lower trapezoidal). KSPSYMMLQ <https://petsc.org/release/manualpages/KSP/KSPSYMMLQ.html>

        LCD Left Conjugate Direction (LCD) method. KSPLCD <https://petsc.org/release/manualpages/KSP/KSPLCD.html>

        PYTHON
            Python shell solver. Call Python function to implement solver. KSPPYTHON

        GCR Preconditioned flexible Generalized Conjugate Residual (GCR) method. KSPGCR <https://petsc.org/release/manualpages/KSP/KSPGCR.html>

        PIPEGCR
            Pipelined Generalized Conjugate Residual method. KSPPIPEGCR <https://petsc.org/release/manualpages/KSP/KSPPIPEGCR.html>

        TSIRM
            Two-Stage Iteration with least-squares Residual Minimization method. KSPTSIRM <https://petsc.org/release/manualpages/KSP/KSPTSIRM.html>

        CGLS
            Conjugate Gradient method for Least-Squares problems. Supports non-square (rectangular) matrices. KSPCGLS <https://petsc.org/release/manualpages/KSP/KSPCGLS.html>

        FETIDP
            Dual-Primal (DP) Finite Element Tearing and Interconnect (FETI) method. KSPFETIDP <https://petsc.org/release/manualpages/KSP/KSPFETIDP.html>

        HPDDM
            Interface with the HPDDM library. This KSP may be used to further select methods that are currently not implemented natively in PETSc, e.g., GCRODR, a recycled Krylov method which is similar to KSPLGMRES. KSPHPDDM <https://petsc.org/release/manualpages/KSP/KSPHPDDM.html>

    See also:
            Working with PETSc options <#petsc-options>, KSPType <https://petsc.org/release/manualpages/KSP/KSPType.html>

    Attributes Summary
    BCGS | Object BCGS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BCGSL | Object BCGSL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BICG | Object BICG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CG | Object CG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CGLS | Object CGLS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CGNE | Object CGNE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CGS | Object CGS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CHEBYSHEV | Object CHEBYSHEV of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CR | Object CR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    DGMRES | Object DGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>
    FBCGS | Object FBCGS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    FBCGSR | Object FBCGSR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    FCG | Object FCG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    FETIDP | Object FETIDP of type str <https://docs.python.org/3/library/stdtypes.html#str>
    FGMRES | Object FGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>
    GCR | Object GCR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    GLTR | Object GLTR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    GMRES | Object GMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>
    GROPPCG | Object GROPPCG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    HPDDM | Object HPDDM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    IBCGS | Object IBCGS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LCD | Object LCD of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LGMRES | Object LGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LSQR | Object LSQR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MINRES | Object MINRES of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NASH | Object NASH of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NONE | Object NONE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PGMRES | Object PGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PIPEBCGS | Object PIPEBCGS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PIPECG | Object PIPECG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PIPECG2 | Object PIPECG2 of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PIPECGRR | Object PIPECGRR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PIPECR | Object PIPECR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PIPEFCG | Object PIPEFCG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PIPEFGMRES | Object PIPEFGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PIPEGCR | Object PIPEGCR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PIPELCG | Object PIPELCG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PIPEPRCG | Object PIPEPRCG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PREONLY | Object PREONLY of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PYTHON | Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>
    QCG | Object QCG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    QMRCGS | Object QMRCGS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    RICHARDSON | Object RICHARDSON of type str <https://docs.python.org/3/library/stdtypes.html#str>
    STCG | Object STCG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SYMMLQ | Object SYMMLQ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    TCQMR | Object TCQMR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    TFQMR | Object TFQMR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    TSIRM | Object TSIRM of type str <https://docs.python.org/3/library/stdtypes.html#str>

    Attributes Documentation

        BCGS: str <https://docs.python.org/3/library/stdtypes.html#str> = BCGS
            Object BCGS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BCGSL: str <https://docs.python.org/3/library/stdtypes.html#str> = BCGSL
            Object BCGSL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BICG: str <https://docs.python.org/3/library/stdtypes.html#str> = BICG
            Object BICG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CG: str <https://docs.python.org/3/library/stdtypes.html#str> = CG
            Object CG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CGLS: str <https://docs.python.org/3/library/stdtypes.html#str> = CGLS
            Object CGLS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CGNE: str <https://docs.python.org/3/library/stdtypes.html#str> = CGNE
            Object CGNE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CGS: str <https://docs.python.org/3/library/stdtypes.html#str> = CGS
            Object CGS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CHEBYSHEV: str <https://docs.python.org/3/library/stdtypes.html#str> = CHEBYSHEV
            Object CHEBYSHEV of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CR: str <https://docs.python.org/3/library/stdtypes.html#str> = CR
            Object CR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DGMRES: str <https://docs.python.org/3/library/stdtypes.html#str> = DGMRES
            Object DGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>

        FBCGS: str <https://docs.python.org/3/library/stdtypes.html#str> = FBCGS
            Object FBCGS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        FBCGSR: str <https://docs.python.org/3/library/stdtypes.html#str> = FBCGSR
            Object FBCGSR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        FCG: str <https://docs.python.org/3/library/stdtypes.html#str> = FCG
            Object FCG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        FETIDP: str <https://docs.python.org/3/library/stdtypes.html#str> = FETIDP
            Object FETIDP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        FGMRES: str <https://docs.python.org/3/library/stdtypes.html#str> = FGMRES
            Object FGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GCR: str <https://docs.python.org/3/library/stdtypes.html#str> = GCR
            Object GCR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GLTR: str <https://docs.python.org/3/library/stdtypes.html#str> = GLTR
            Object GLTR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GMRES: str <https://docs.python.org/3/library/stdtypes.html#str> = GMRES
            Object GMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GROPPCG: str <https://docs.python.org/3/library/stdtypes.html#str> = GROPPCG
            Object GROPPCG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HPDDM: str <https://docs.python.org/3/library/stdtypes.html#str> = HPDDM
            Object HPDDM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        IBCGS: str <https://docs.python.org/3/library/stdtypes.html#str> = IBCGS
            Object IBCGS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LCD: str <https://docs.python.org/3/library/stdtypes.html#str> = LCD
            Object LCD of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LGMRES: str <https://docs.python.org/3/library/stdtypes.html#str> = LGMRES
            Object LGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LSQR: str <https://docs.python.org/3/library/stdtypes.html#str> = LSQR
            Object LSQR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MINRES: str <https://docs.python.org/3/library/stdtypes.html#str> = MINRES
            Object MINRES of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NASH: str <https://docs.python.org/3/library/stdtypes.html#str> = NASH
            Object NASH of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NONE: str <https://docs.python.org/3/library/stdtypes.html#str> = NONE
            Object NONE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PGMRES: str <https://docs.python.org/3/library/stdtypes.html#str> = PGMRES
            Object PGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PIPEBCGS: str <https://docs.python.org/3/library/stdtypes.html#str> = PIPEBCGS
            Object PIPEBCGS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PIPECG: str <https://docs.python.org/3/library/stdtypes.html#str> = PIPECG
            Object PIPECG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PIPECG2: str <https://docs.python.org/3/library/stdtypes.html#str> = PIPECG2
            Object PIPECG2 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PIPECGRR: str <https://docs.python.org/3/library/stdtypes.html#str> = PIPECGRR
            Object PIPECGRR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PIPECR: str <https://docs.python.org/3/library/stdtypes.html#str> = PIPECR
            Object PIPECR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PIPEFCG: str <https://docs.python.org/3/library/stdtypes.html#str> = PIPEFCG
            Object PIPEFCG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PIPEFGMRES: str <https://docs.python.org/3/library/stdtypes.html#str> = PIPEFGMRES
            Object PIPEFGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PIPEGCR: str <https://docs.python.org/3/library/stdtypes.html#str> = PIPEGCR
            Object PIPEGCR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PIPELCG: str <https://docs.python.org/3/library/stdtypes.html#str> = PIPELCG
            Object PIPELCG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PIPEPRCG: str <https://docs.python.org/3/library/stdtypes.html#str> = PIPEPRCG
            Object PIPEPRCG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PREONLY: str <https://docs.python.org/3/library/stdtypes.html#str> = PREONLY
            Object PREONLY of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PYTHON: str <https://docs.python.org/3/library/stdtypes.html#str> = PYTHON
            Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        QCG: str <https://docs.python.org/3/library/stdtypes.html#str> = QCG
            Object QCG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        QMRCGS: str <https://docs.python.org/3/library/stdtypes.html#str> = QMRCGS
            Object QMRCGS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RICHARDSON: str <https://docs.python.org/3/library/stdtypes.html#str> = RICHARDSON
            Object RICHARDSON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        STCG: str <https://docs.python.org/3/library/stdtypes.html#str> = STCG
            Object STCG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SYMMLQ: str <https://docs.python.org/3/library/stdtypes.html#str> = SYMMLQ
            Object SYMMLQ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        TCQMR: str <https://docs.python.org/3/library/stdtypes.html#str> = TCQMR
            Object TCQMR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        TFQMR: str <https://docs.python.org/3/library/stdtypes.html#str> = TFQMR
            Object TFQMR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        TSIRM: str <https://docs.python.org/3/library/stdtypes.html#str> = TSIRM
            Object TSIRM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
addConvergenceTest(converged[, args, kargs, ...]) | Add the function to be used to determine convergence.
appendOptionsPrefix(prefix) | Append to prefix used for all KSP options in the database.
buildResidual([r]) | Return the residual of the linear system.
buildSolution([x]) | Return the solution vector.
callConvergenceTest(its, rnorm) | Call the convergence test callback.
computeEigenvalues() | Compute the extreme eigenvalues for the preconditioned operator.
computeExtremeSingularValues() | Compute the extreme singular values for the preconditioned operator.
create([comm]) | Create the KSP context.
createPython([context, comm]) | Create a linear solver of Python type.
destroy() | Destroy KSP context.
getAppCtx() | Return the user-defined context for the linear solver.
getCGObjectiveValue() | Return the CG objective function value.
getComputeEigenvalues() | Return flag indicating whether eigenvalues will be calculated.
getComputeSingularValues() | Return flag indicating whether singular values will be calculated.
getConvergedReason() | Use reason property.
getConvergenceHistory() | Return array containing the residual history.
getConvergenceTest() | Return the function to be used to determine convergence.
getDM() | Return the DM <#petsc4py.PETSc.DM> that may be used by some preconditioners.
getErrorIfNotConverged() | Return the flag indicating the solver will error if divergent.
getHPDDMType() | Return the Krylov solver type.
getInitialGuessKnoll() | Determine whether the KSP solver is using the Knoll trick.
getInitialGuessNonzero() | Determine whether the KSP solver uses a zero initial guess.
getIterationNumber() | Use its property.
getMonitor() | Return function used to monitor the residual.
getNormType() | Return the norm that is used for convergence testing.
getOperators() | Return the matrix associated with the linear system.
getOptionsPrefix() | Return the prefix used for all KSP options in the database.
getPC() | Return the preconditioner.
getPCSide() | Return the preconditioning side.
getPythonContext() | Return the instance of the class implementing Python methods.
getPythonType() | Return the fully qualified Python name of the class used by the solver.
getResidualNorm() | Use norm property.
getRhs() | Return the right-hand side vector for the linear system.
getSolution() | Return the solution for the linear system to be solved.
getTolerances() | Return various tolerances used by the KSP convergence tests.
getType() | Return the KSP type as a string from the KSP object.
getWorkVecs([right, left]) | Create working vectors.
logConvergenceHistory(rnorm) | Add residual to convergence history.
matSolve(B, X) | Solve a linear system with multiple right-hand sides.
matSolveTranspose(B, X) | Solve the transpose of a linear system with multiple RHS.
monitor(its, rnorm) | Run the user provided monitor routines, if they exist.
monitorCancel() | Clear all monitors for a KSP object.
reset() | Resets a KSP context.
setAppCtx(appctx) | Set the optional user-defined context for the linear solver.
setComputeEigenvalues(flag) | Set a flag to compute eigenvalues.
setComputeOperators(operators[, args, kargs]) | Set routine to compute the linear operators.
setComputeRHS(rhs[, args, kargs]) | Set routine to compute the right-hand side of the linear system.
setComputeSingularValues(flag) | Set flag to calculate singular values.
setConvergedReason(reason) | Use reason property.
setConvergenceHistory([length, reset]) | Set the array used to hold the residual history.
setConvergenceTest(converged[, args, kargs]) | Set the function to be used to determine convergence.
setDM(dm) | Set the DM <#petsc4py.PETSc.DM> that may be used by some preconditioners.
setDMActive(dmactive, flag) | DM <#petsc4py.PETSc.DM> should be used to generate system matrix & RHS vector.
setErrorIfNotConverged(flag) | Cause solve to generate an error if not converged.
setFromOptions() | Set KSP options from the options database.
setGMRESRestart(restart) | Set number of iterations at which KSP restarts.
setHPDDMType(hpddm_type) | Set the Krylov solver type.
setInitialGuessKnoll(flag) | Tell solver to use PC.apply <#petsc4py.PETSc.PC.apply> to compute the initial guess.
setInitialGuessNonzero(flag) | Tell the iterative solver that the initial guess is nonzero.
setIterationNumber(its) | Use its property.
setMonitor(monitor[, args, kargs]) | Set additional function to monitor the residual.
setNormType(normtype) | Set the norm that is used for convergence testing.
setOperators([A, P]) | Set matrix associated with the linear system.
setOptionsPrefix(prefix) | Set the prefix used for all KSP options in the database.
setPC(pc) | Set the preconditioner.
setPCSide(side) | Set the preconditioning side.
setPostSolve(postsolve[, args, kargs]) | Set the function that is called at the end of each KSP.solve.
setPreSolve(presolve[, args, kargs]) | Set the function that is called at the beginning of each KSP.solve.
setPythonContext([context]) | Set the instance of the class implementing Python methods.
setPythonType(py_type) | Set the fully qualified Python name of the class to be used.
setResidualNorm(rnorm) | Use norm property.
setTolerances([rtol, atol, divtol, max_it]) | Set various tolerances used by the KSP convergence testers.
setType(ksp_type) | Build the KSP data structure for a particular Type <#petsc4py.PETSc.KSP.Type>.
setUp() | Set up internal data structures for an iterative solver.
setUpOnBlocks() | Set up the preconditioner for each block in a block method.
setUseFischerGuess(model, size) | Use the Paul Fischer algorithm to compute initial guesses.
solve(b, x) | Solve the linear system.
solveTranspose(b, x) | Solve the transpose of a linear system.
view([viewer]) | Print the KSP data structure.

Attributes Summary
appctx | The solver application context.
atol | The absolute tolerance of the solver.
divtol | The divergence tolerance of the solver.
dm | The solver DM <#petsc4py.PETSc.DM>.
guess_knoll | Whether solver uses Knoll trick.
guess_nonzero | Whether guess is non-zero.
history | The convergence history of the solver.
is_converged | Boolean indicating if the solver has converged.
is_diverged | Boolean indicating if the solver has failed.
is_iterating | Boolean indicating if the solver has not converged yet.
its | The current number of iterations the solver has taken.
mat_op | The system matrix operator.
mat_pc | The preconditioner operator.
max_it | The maximum number of iteration the solver may take.
norm | The norm of the residual at the current iteration.
norm_type | The norm used by the solver.
pc | The PC <#petsc4py.PETSc.PC> of the solver.
pc_side | The side on which preconditioning is performed.
reason | The converged reason.
rtol | The relative tolerance of the solver.
vec_rhs | The right-hand side vector.
vec_sol | The solution vector.

Methods Documentation

    addConvergenceTest(converged, args=None, kargs=None, prepend=False)
        Add the function to be used to determine convergence.

        Logically collective.

        Parameters

            •   converged (KSPConvergenceTestFunction <#petsc4py.typing.KSPConvergenceTestFunction>) -- Callback which computes the convergence.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for callback function.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for callback function.

            •   prepend (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether to prepend this call before the default convergence test or call it after.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    Cannot be mixed with a call to setConvergenceTest. It can only be called once. If called multiple times, it will generate an error.

    See also:
            setTolerances, getConvergenceTest, setConvergenceTest, KSPSetConvergenceTest <https://petsc.org/release/manualpages/KSP/KSPSetConvergenceTest.html>, KSPConvergedDefault <https://petsc.org/release/manualpages/KSP/KSPConvergedDefault.html>

    Source code at petsc4py/PETSc/KSP.pyx:1079 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1079>

    appendOptionsPrefix(prefix)
        Append to prefix used for all KSP options in the database.

        Logically collective.

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The options prefix to append.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.

    See also:
            KSPAppendOptionsPrefix <https://petsc.org/release/manualpages/KSP/KSPAppendOptionsPrefix.html>

    Source code at petsc4py/PETSc/KSP.pyx:585 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L585>

    buildResidual(r=None)
        Return the residual of the linear system.

        Collective.

        Parameters
            r (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional vector to use for the result.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            buildSolution, KSPBuildResidual <https://petsc.org/release/manualpages/KSP/KSPBuildResidual.html>

    Source code at petsc4py/PETSc/KSP.pyx:2077 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2077>

    buildSolution(x=None)
        Return the solution vector.

        Collective.

        Parameters
            x (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional vector to store the solution.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            buildResidual, KSPBuildSolution <https://petsc.org/release/manualpages/KSP/KSPBuildSolution.html>

    Source code at petsc4py/PETSc/KSP.pyx:2055 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2055>

    callConvergenceTest(its, rnorm)
        Call the convergence test callback.

        Collective.

        Parameters

            •   its (int <https://docs.python.org/3/library/functions.html#int>) -- Number of iterations.

            •   rnorm (float <https://docs.python.org/3/library/functions.html#float>) -- The residual norm.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    This functionality is implemented in petsc4py.

    Source code at petsc4py/PETSc/KSP.pyx:1135 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1135>

    computeEigenvalues()
        Compute the extreme eigenvalues for the preconditioned operator.

        Not collective.

        See also:
            KSPComputeEigenvalues <https://petsc.org/release/manualpages/KSP/KSPComputeEigenvalues.html>

    Source code at petsc4py/PETSc/KSP.pyx:2099 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2099>

        Return type
            ArrayComplex <#petsc4py.typing.ArrayComplex>

    computeExtremeSingularValues()
        Compute the extreme singular values for the preconditioned operator.

        Collective.

        Returns

            •   smax (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum singular value.

            •   smin (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum singular value.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            KSPComputeExtremeSingularValues <https://petsc.org/release/manualpages/KSP/KSPComputeExtremeSingularValues.html>

    Source code at petsc4py/PETSc/KSP.pyx:2122 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2122>

    create(comm=None)
        Create the KSP context.

        Collective.

        See also:
            KSPCreate <https://petsc.org/release/manualpages/KSP/KSPCreate.html>

    Source code at petsc4py/PETSc/KSP.pyx:467 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L467>

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    createPython(context=None, comm=None)
        Create a linear solver of Python type.

        Collective.

        Parameters

            •   context (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- An instance of the Python class implementing the required methods.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PETSc Python linear solver type <#petsc-python-ksp>, setType, setPythonContext, Type.PYTHON <#petsc4py.PETSc.KSP.Type.PYTHON>

    Source code at petsc4py/PETSc/KSP.pyx:2168 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2168>

    destroy()
        Destroy KSP context.

        Collective.

        See also:
            KSPDestroy <https://petsc.org/release/manualpages/KSP/KSPDestroy.html>

    Source code at petsc4py/PETSc/KSP.pyx:454 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L454>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getAppCtx()
        Return the user-defined context for the linear solver.

        Not collective.

        See also:
            setAppCtx

    Source code at petsc4py/PETSc/KSP.pyx:650 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L650>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getCGObjectiveValue()
        Return the CG objective function value.

        Not collective.

        See also:
            KSPCGGetObjFcn <https://petsc.org/release/manualpages/KSP/KSPCGGetObjFcn.html>

    Source code at petsc4py/PETSc/KSP.pyx:1896 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1896>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getComputeEigenvalues()
        Return flag indicating whether eigenvalues will be calculated.

        Not collective.

        Return the flag indicating that the extreme eigenvalues values will be calculated via a Lanczos or Arnoldi process as the linear system is solved.

        See also:
            setComputeEigenvalues, KSPSetComputeEigenvalues <https://petsc.org/release/manualpages/KSP/KSPSetComputeEigenvalues.html>

    Source code at petsc4py/PETSc/KSP.pyx:1444 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1444>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getComputeSingularValues()
        Return flag indicating whether singular values will be calculated.

        Not collective.

        Return the flag indicating whether the extreme singular values will be calculated via a Lanczos or Arnoldi process as the linear system is solved.

        See also:
            setComputeSingularValues, KSPGetComputeSingularValues <https://petsc.org/release/manualpages/KSP/KSPGetComputeSingularValues.html>

    Source code at petsc4py/PETSc/KSP.pyx:1488 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1488>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getConvergedReason()
        Use reason property.

        Source code at petsc4py/PETSc/KSP.pyx:1890 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1890>

        Return type
            ConvergedReason <#petsc4py.PETSc.KSP.ConvergedReason>

    getConvergenceHistory()
        Return array containing the residual history.

        Not collective.

        See also:
            setConvergenceHistory, KSPGetResidualHistory <https://petsc.org/release/manualpages/KSP/KSPGetResidualHistory.html>

    Source code at petsc4py/PETSc/KSP.pyx:1202 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1202>

        Return type
            ArrayReal <#petsc4py.typing.ArrayReal>

    getConvergenceTest()
        Return the function to be used to determine convergence.

        Logically collective.

        See also:
            setTolerances, setConvergenceTest, KSPGetConvergenceTest <https://petsc.org/release/manualpages/KSP/KSPGetConvergenceTest.html>, KSPConvergedDefault <https://petsc.org/release/manualpages/KSP/KSPConvergedDefault.html>

    Source code at petsc4py/PETSc/KSP.pyx:1122 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1122>

        Return type
            KSPConvergenceTestFunction <#petsc4py.typing.KSPConvergenceTestFunction>

    getDM()
        Return the DM <#petsc4py.PETSc.DM> that may be used by some preconditioners.

        Not collective.

        See also:
            PETSc.KSP, DM <#petsc4py.PETSc.DM>, KSPGetDM <https://petsc.org/release/manualpages/KSP/KSPGetDM.html>

    Source code at petsc4py/PETSc/KSP.pyx:664 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L664>

        Return type
            DM <#petsc4py.PETSc.DM>

    getErrorIfNotConverged()
        Return the flag indicating the solver will error if divergent.

        Not collective.

        See also:
            KSPGetErrorIfNotConverged <https://petsc.org/release/manualpages/KSP/KSPGetErrorIfNotConverged.html>

    Source code at petsc4py/PETSc/KSP.pyx:1960 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1960>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getHPDDMType()
        Return the Krylov solver type.

        Not collective.

        See also:
            KSPHPDDMGetType <https://petsc.org/release/manualpages/KSP/KSPHPDDMGetType.html>

    Source code at petsc4py/PETSc/KSP.pyx:1928 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1928>

        Return type
            HPDDMType <#petsc4py.PETSc.KSP.HPDDMType>

    getInitialGuessKnoll()
        Determine whether the KSP solver is using the Knoll trick.

        Not collective.

        This uses the Knoll trick; using PC.apply <#petsc4py.PETSc.PC.apply> to compute the initial guess.

        See also:
            KSPGetInitialGuessKnoll <https://petsc.org/release/manualpages/KSP/KSPGetInitialGuessKnoll.html>

    Source code at petsc4py/PETSc/KSP.pyx:1564 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1564>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getInitialGuessNonzero()
        Determine whether the KSP solver uses a zero initial guess.

        Not collective.

        See also:
            KSPGetInitialGuessNonzero <https://petsc.org/release/manualpages/KSP/KSPGetInitialGuessNonzero.html>

    Source code at petsc4py/PETSc/KSP.pyx:1530 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1530>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getIterationNumber()
        Use its property.

        Source code at petsc4py/PETSc/KSP.pyx:1868 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1868>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getMonitor()
        Return function used to monitor the residual.

        Not collective.

        See also:
            Working with PETSc options <#petsc-options>, setMonitor, monitor, monitorCancel, KSPGetMonitorContext <https://petsc.org/release/manualpages/KSP/KSPGetMonitorContext.html>

    Source code at petsc4py/PETSc/KSP.pyx:1280 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1280>

        Return type
            KSPMonitorFunction <#petsc4py.typing.KSPMonitorFunction>

    getNormType()
        Return the norm that is used for convergence testing.

        Not collective.

        See also:
            NormType <#petsc4py.PETSc.KSP.NormType>, setNormType, KSPGetNormType <https://petsc.org/release/manualpages/KSP/KSPGetNormType.html>, KSPConvergedSkip <https://petsc.org/release/manualpages/KSP/KSPConvergedSkip.html>

    Source code at petsc4py/PETSc/KSP.pyx:1404 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1404>

        Return type
            NormType <#petsc4py.PETSc.NormType>

    getOperators()
        Return the matrix associated with the linear system.

        Collective.

        Return the matrix associated with the linear system and a (possibly) different one used to construct the preconditioner.

        Returns

            •   A (Mat <#petsc4py.PETSc.Mat>) -- Matrix that defines the linear system.

            •   P (Mat <#petsc4py.PETSc.Mat>) -- Matrix to be used in constructing the preconditioner, usually the same as A.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>]

    See also:
            PETSc.KSP, solve, setOperators, KSPGetOperators <https://petsc.org/release/manualpages/KSP/KSPGetOperators.html>

    Source code at petsc4py/PETSc/KSP.pyx:864 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L864>

    getOptionsPrefix()
        Return the prefix used for all KSP options in the database.

        Not collective.

        See also:
            KSPGetOptionsPrefix <https://petsc.org/release/manualpages/KSP/KSPGetOptionsPrefix.html>

    Source code at petsc4py/PETSc/KSP.pyx:571 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L571>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getPC()
        Return the preconditioner.

        Not collective.

        See also:
            PETSc.KSP, setPC, KSPGetPC <https://petsc.org/release/manualpages/KSP/KSPGetPC.html>

    Source code at petsc4py/PETSc/KSP.pyx:911 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L911>

        Return type
            PC <#petsc4py.PETSc.PC>

    getPCSide()
        Return the preconditioning side.

        Not collective.

        See also:
            Working with PETSc options <#petsc-options>, setPCSide, setNormType, getNormType, KSPGetPCSide <https://petsc.org/release/manualpages/KSP/KSPGetPCSide.html>

    Source code at petsc4py/PETSc/KSP.pyx:1363 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1363>

        Return type
            Side <#petsc4py.PETSc.PC.Side>

    getPythonContext()
        Return the instance of the class implementing Python methods.

        Not collective.

        See also:
            PETSc Python linear solver type <#petsc-python-ksp>, setPythonContext

    Source code at petsc4py/PETSc/KSP.pyx:2209 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2209>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getPythonType()
        Return the fully qualified Python name of the class used by the solver.

        Not collective.

        See also:
            PETSc Python linear solver type <#petsc-python-ksp>, setPythonContext, setPythonType, KSPPythonGetType <https://petsc.org/release/manualpages/KSP/KSPPythonGetType.html>

    Source code at petsc4py/PETSc/KSP.pyx:2239 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2239>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getResidualNorm()
        Use norm property.

        Source code at petsc4py/PETSc/KSP.pyx:1879 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1879>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getRhs()
        Return the right-hand side vector for the linear system.

        Not collective.

        See also:
            KSPGetRhs <https://petsc.org/release/manualpages/KSP/KSPGetRhs.html>

    Source code at petsc4py/PETSc/KSP.pyx:1974 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1974>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getSolution()
        Return the solution for the linear system to be solved.

        Not collective.

        Note that this may not be the solution that is stored during the iterative process.

        See also:
            KSPGetSolution <https://petsc.org/release/manualpages/KSP/KSPGetSolution.html>

    Source code at petsc4py/PETSc/KSP.pyx:1989 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1989>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getTolerances()
        Return various tolerances used by the KSP convergence tests.

        Not collective.

        Return the relative, absolute, divergence, and maximum iteration tolerances used by the default KSP convergence tests.

        Returns

            •   rtol (float <https://docs.python.org/3/library/functions.html#float>) -- The relative convergence tolerance

            •   atol (float <https://docs.python.org/3/library/functions.html#float>) -- The absolute convergence tolerance

            •   dtol (float <https://docs.python.org/3/library/functions.html#float>) -- The divergence tolerance

            •   maxits (int <https://docs.python.org/3/library/functions.html#int>) -- Maximum number of iterations

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            setTolerances, KSPGetTolerances <https://petsc.org/release/manualpages/KSP/KSPGetTolerances.html>

    Source code at petsc4py/PETSc/KSP.pyx:985 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L985>

    getType()
        Return the KSP type as a string from the KSP object.

        Not collective.

        See also:
            KSPGetType <https://petsc.org/release/manualpages/KSP/KSPGetType.html>

    Source code at petsc4py/PETSc/KSP.pyx:519 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L519>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getWorkVecs(right=None, left=None)
        Create working vectors.

        Collective.

        Parameters

            •   right (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Number of right hand vectors to allocate.

            •   left (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Number of left hand vectors to allocate.

        Returns

            •   R (list <https://docs.python.org/3/library/stdtypes.html#list> of Vec <#petsc4py.PETSc.Vec>) -- List of correctly allocated right hand vectors.

            •   L (list <https://docs.python.org/3/library/stdtypes.html#list> of Vec <#petsc4py.PETSc.Vec>) -- List of correctly allocated left hand vectors.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <#petsc4py.PETSc.Vec>], list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <#petsc4py.PETSc.Vec>]] | list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <#petsc4py.PETSc.Vec>] | None <https://docs.python.org/3/library/constants.html#None>

    Source code at petsc4py/PETSc/KSP.pyx:2007 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2007>

    logConvergenceHistory(rnorm)
        Add residual to convergence history.

        Logically collective.

        Parameters
            rnorm (float <https://docs.python.org/3/library/functions.html#float>) -- Residual norm to be added to convergence history.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Source code at petsc4py/PETSc/KSP.pyx:1217 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1217>

    matSolve(B, X)
        Solve a linear system with multiple right-hand sides.

        Collective.

        These are stored as a Mat.Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE>. Unlike solve, B and X must be different matrices.

        Parameters

            •   B (Mat <#petsc4py.PETSc.Mat>) -- Block of right-hand sides.

            •   X (Mat <#petsc4py.PETSc.Mat>) -- Block of solutions.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            solve, KSPMatSolve <https://petsc.org/release/manualpages/KSP/KSPMatSolve.html>

    Source code at petsc4py/PETSc/KSP.pyx:1822 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1822>

    matSolveTranspose(B, X)
        Solve the transpose of a linear system with multiple RHS.

        Collective.

        Parameters

            •   B (Mat <#petsc4py.PETSc.Mat>) -- Block of right-hand sides.

            •   X (Mat <#petsc4py.PETSc.Mat>) -- Block of solutions.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            solveTranspose, KSPMatSolve <https://petsc.org/release/manualpages/KSP/KSPMatSolve.html>

    Source code at petsc4py/PETSc/KSP.pyx:1844 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1844>

    monitor(its, rnorm)
        Run the user provided monitor routines, if they exist.

        Collective.

        Notes

        This routine is called by the KSP implementations. It does not typically need to be called by the user.

        See also:
            setMonitor, KSPMonitor <https://petsc.org/release/manualpages/KSP/KSPMonitor.html>

    Source code at petsc4py/PETSc/KSP.pyx:1308 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1308>

        Parameters

            •   its (int <https://docs.python.org/3/library/functions.html#int>)

            •   rnorm (float <https://docs.python.org/3/library/functions.html#float>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    monitorCancel()
        Clear all monitors for a KSP object.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, getMonitor, setMonitor, monitor, KSPMonitorCancel <https://petsc.org/release/manualpages/KSP/KSPMonitorCancel.html>

    Source code at petsc4py/PETSc/KSP.pyx:1293 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1293>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    reset()
        Resets a KSP context.

        Collective.

        Resets a KSP context to the kspsetupcalled = 0 state and removes any allocated Vecs and Mats.

        See also:
            KSPReset <https://petsc.org/release/manualpages/KSP/KSPReset.html>

    Source code at petsc4py/PETSc/KSP.pyx:1621 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1621>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setAppCtx(appctx)
        Set the optional user-defined context for the linear solver.

        Not collective.

        Parameters
            appctx (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- The user defined context

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    The user context is a way for users to attach any information to the KSP that they may need later when interacting with the solver.

    See also:
            getAppCtx

    Source code at petsc4py/PETSc/KSP.pyx:627 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L627>

    setComputeEigenvalues(flag)
        Set a flag to compute eigenvalues.

        Logically collective.

        Set a flag so that the extreme eigenvalues values will be calculated via a Lanczos or Arnoldi process as the linear system is solved.

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Boolean whether to compute eigenvalues (or not).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    Currently this option is not valid for all iterative methods.

    See also:
            getComputeEigenvalues, KSPSetComputeEigenvalues <https://petsc.org/release/manualpages/KSP/KSPSetComputeEigenvalues.html>

    Source code at petsc4py/PETSc/KSP.pyx:1418 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1418>

    setComputeOperators(operators, args=None, kargs=None)
        Set routine to compute the linear operators.

        Logically collective.

        Parameters

            •   operators (KSPOperatorsFunction <#petsc4py.typing.KSPOperatorsFunction>) -- Function which computes the operators.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for callback function operators.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for callback function operators.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    The user provided function Operators and delimiters <https://docs.python.org/3/reference/lexical_analysis.html#operators> will be called automatically at the very next call to solve. It will NOT be called at future solve calls unless either setComputeOperators or setOperators is called before that solve is called. This allows the same system to be solved several times with different right-hand side functions, but is a confusing API since one might expect it to be called for each solve.

    To reuse the same preconditioner for the next solve and not compute a new one based on the most recently computed matrix call KSPSetReusePreconditioner <https://petsc.org/release/manualpages/KSP/KSPSetReusePreconditioner.html>.

    See also:
            PETSc.KSP, solve, setOperators, KSPSetComputeOperators <https://petsc.org/release/manualpages/KSP/KSPSetComputeOperators.html>, KSPSetReusePreconditioner <https://petsc.org/release/manualpages/KSP/KSPSetReusePreconditioner.html>

    Source code at petsc4py/PETSc/KSP.pyx:775 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L775>

    setComputeRHS(rhs, args=None, kargs=None)
        Set routine to compute the right-hand side of the linear system.

        Logically collective.

        Parameters

            •   rhs (KSPRHSFunction <#petsc4py.typing.KSPRHSFunction>) -- Function which computes the right-hand side.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for callback function rhs.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for callback function rhs.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    The routine you provide will be called each time you call solve to prepare the new right-hand side for that solve.

    See also:
            PETSc.KSP, solve, KSPSetComputeRHS <https://petsc.org/release/manualpages/KSP/KSPSetComputeRHS.html>

    Source code at petsc4py/PETSc/KSP.pyx:741 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L741>

    setComputeSingularValues(flag)
        Set flag to calculate singular values.

        Logically collective.

        Set a flag so that the extreme singular values will be calculated via a Lanczos or Arnoldi process as the linear system is solved.

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Boolean whether to compute singular values (or not).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    Currently this option is not valid for all iterative methods.

    See also:
            getComputeSingularValues, KSPSetComputeSingularValues <https://petsc.org/release/manualpages/KSP/KSPSetComputeSingularValues.html>

    Source code at petsc4py/PETSc/KSP.pyx:1462 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1462>

    setConvergedReason(reason)
        Use reason property.

        Source code at petsc4py/PETSc/KSP.pyx:1885 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1885>

        Parameters
            reason (ConvergedReason <#petsc4py.PETSc.KSP.ConvergedReason>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setConvergenceHistory(length=None, reset=False)
        Set the array used to hold the residual history.

        Not collective.

        If set, this array will contain the residual norms computed at each iteration of the solver.

        Parameters

            •   length (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Length of array to store history in.

            •   reset (bool <https://docs.python.org/3/library/functions.html#bool>) -- True <https://docs.python.org/3/library/constants.html#True> indicates the history counter is reset to zero for each new linear solve.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    If length is not provided or None <https://docs.python.org/3/library/constants.html#None> then a default array of length 10000 is allocated.

    If the array is not long enough then once the iterations is longer than the array length solve stops recording the history.

    See also:
            getConvergenceHistory, KSPSetResidualHistory <https://petsc.org/release/manualpages/KSP/KSPSetResidualHistory.html>

    Source code at petsc4py/PETSc/KSP.pyx:1158 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1158>

    setConvergenceTest(converged, args=None, kargs=None)
        Set the function to be used to determine convergence.

        Logically collective.

        Parameters

            •   converged (KSPConvergenceTestFunction <#petsc4py.typing.KSPConvergenceTestFunction>) -- Callback which computes the convergence.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for callback function.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for callback function.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    Must be called after the KSP type has been set so put this after a call to setType, or setFromOptions.

    The default is a combination of relative and absolute tolerances. The residual value that is tested may be an approximation; routines that need exact values should compute them.

    See also:
            addConvergenceTest, ConvergedReason <#petsc4py.PETSc.KSP.ConvergedReason>, setTolerances, getConvergenceTest, buildResidual, KSPSetConvergenceTest <https://petsc.org/release/manualpages/KSP/KSPSetConvergenceTest.html>, KSPConvergedDefault <https://petsc.org/release/manualpages/KSP/KSPConvergedDefault.html>

    Source code at petsc4py/PETSc/KSP.pyx:1014 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1014>

    setDM(dm)
        Set the DM <#petsc4py.PETSc.DM> that may be used by some preconditioners.

        Logically collective.

        Parameters
            dm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM> object, cannot be None <https://docs.python.org/3/library/constants.html#None>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    If this is used then the KSP will attempt to use the DM <#petsc4py.PETSc.DM> to create the matrix and use the routine set with DM.setKSPComputeOperators <#petsc4py.PETSc.DM.setKSPComputeOperators>. Use setDMActive(KSP.DMActive.OPERATOR, False) to instead use the matrix you have provided with setOperators.

    A DM <#petsc4py.PETSc.DM> can only be used for solving one problem at a time because information about the problem is stored on the DM <#petsc4py.PETSc.DM>, even when not using interfaces like DM.setKSPComputeOperators <#petsc4py.PETSc.DM.setKSPComputeOperators>. Use DM.clone <#petsc4py.PETSc.DM.clone> to get a distinct DM <#petsc4py.PETSc.DM> when solving different problems using the same function space.

    See also:
            PETSc.KSP, DM <#petsc4py.PETSc.DM>, DM.setKSPComputeOperators <#petsc4py.PETSc.DM.setKSPComputeOperators>, setOperators, DM.clone <#petsc4py.PETSc.DM.clone>, KSPSetDM <https://petsc.org/release/manualpages/KSP/KSPSetDM.html>

    Source code at petsc4py/PETSc/KSP.pyx:681 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L681>

    setDMActive(dmactive, flag)
        DM <#petsc4py.PETSc.DM> should be used to generate system matrix & RHS vector.

        Logically collective.

        Parameters

            •   flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether to use the DM <#petsc4py.PETSc.DM>.

            •   dmactive (DMActive <#petsc4py.PETSc.KSP.DMActive>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    By default setDM sets the DM <#petsc4py.PETSc.DM> as active, call setDMActive(KSP.DMactive.ALL, False) after setDM(dm) to not have the KSP object use the DM <#petsc4py.PETSc.DM> to generate the matrices.

    See also:
            PETSc.KSP, DM <#petsc4py.PETSc.DM>, setDM, KSPSetDMActive <https://petsc.org/release/manualpages/KSP/KSPSetDMActive.html>

    Source code at petsc4py/PETSc/KSP.pyx:715 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L715>

    setErrorIfNotConverged(flag)
        Cause solve to generate an error if not converged.

        Logically collective.

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- True <https://docs.python.org/3/library/constants.html#True> enables this behavior.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSPSetErrorIfNotConverged <https://petsc.org/release/manualpages/KSP/KSPSetErrorIfNotConverged.html>

    Source code at petsc4py/PETSc/KSP.pyx:1942 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1942>

    setFromOptions()
        Set KSP options from the options database.

        Collective.

        This routine must be called before setUp if the user is to be allowed to set the Krylov type.

        See also:
            Working with PETSc options <#petsc-options>, KSPSetFromOptions <https://petsc.org/release/manualpages/KSP/KSPSetFromOptions.html>

    Source code at petsc4py/PETSc/KSP.pyx:610 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L610>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setGMRESRestart(restart)
        Set number of iterations at which KSP restarts.

        Logically collective.

        Suitable KSPs are: KSPGMRES, KSPFGMRES and KSPLGMRES.

        Parameters
            restart (int <https://docs.python.org/3/library/functions.html#int>) -- Integer restart value.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSPGMRESSetRestart <https://petsc.org/release/manualpages/KSP/KSPGMRESSetRestart.html>

    Source code at petsc4py/PETSc/KSP.pyx:2146 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2146>

    setHPDDMType(hpddm_type)
        Set the Krylov solver type.

        Collective.

        Parameters
            hpddm_type (HPDDMType <#petsc4py.PETSc.KSP.HPDDMType>) -- The type of Krylov solver to use.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSPHPDDMSetType <https://petsc.org/release/manualpages/KSP/KSPHPDDMSetType.html>

    Source code at petsc4py/PETSc/KSP.pyx:1910 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1910>

    setInitialGuessKnoll(flag)
        Tell solver to use PC.apply <#petsc4py.PETSc.PC.apply> to compute the initial guess.

        Logically collective.

        This is the Knoll trick.

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- True <https://docs.python.org/3/library/constants.html#True> uses Knoll trick.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSPSetInitialGuessKnoll <https://petsc.org/release/manualpages/KSP/KSPSetInitialGuessKnoll.html>

    Source code at petsc4py/PETSc/KSP.pyx:1544 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1544>

    setInitialGuessNonzero(flag)
        Tell the iterative solver that the initial guess is nonzero.

        Logically collective.

        Otherwise KSP assumes the initial guess is to be zero (and thus zeros it out before solving).

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- True <https://docs.python.org/3/library/constants.html#True> indicates the guess is non-zero, False <https://docs.python.org/3/library/constants.html#False> indicates the guess is zero.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSPSetInitialGuessNonzero <https://petsc.org/release/manualpages/KSP/KSPSetInitialGuessNonzero.html>

    Source code at petsc4py/PETSc/KSP.pyx:1508 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1508>

    setIterationNumber(its)
        Use its property.

        Source code at petsc4py/PETSc/KSP.pyx:1863 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1863>

        Parameters
            its (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setMonitor(monitor, args=None, kargs=None)
        Set additional function to monitor the residual.

        Logically collective.

        Set an ADDITIONAL function to be called at every iteration to monitor the residual/error etc.

        Parameters

            •   monitor (KSPMonitorFunction <#petsc4py.typing.KSPMonitorFunction>) -- Callback which monitors the convergence.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for callback function.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for callback function.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    The default is to do nothing. To print the residual, or preconditioned residual if setNormType(NORM_PRECONDITIONED) was called, use monitor as the monitoring routine, with a PETSc.Viewer.ASCII <#petsc4py.PETSc.Viewer.ASCII> as the context.

    Several different monitoring routines may be set by calling setMonitor multiple times; all will be called in the order in which they were set.

    See also:
            Working with PETSc options <#petsc-options>, getMonitor, monitor, monitorCancel, KSPMonitorSet <https://petsc.org/release/manualpages/KSP/KSPMonitorSet.html>

    Source code at petsc4py/PETSc/KSP.pyx:1233 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1233>

    setNormType(normtype)
        Set the norm that is used for convergence testing.

        Logically collective.

        Parameters
            normtype (NormType <#petsc4py.PETSc.NormType>) -- The norm type to use (see NormType <#petsc4py.PETSc.KSP.NormType>).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    Not all combinations of preconditioner side (see setPCSide) and norm type are supported by all Krylov methods. If only one is set, PETSc tries to automatically change the other to find a compatible pair. If no such combination is supported, PETSc will generate an error.

    See also:
            NormType <#petsc4py.PETSc.KSP.NormType>, Working with PETSc options <#petsc-options>, setUp, solve, destroy, setPCSide, getPCSide, NormType <#petsc4py.PETSc.KSP.NormType>, KSPSetNormType <https://petsc.org/release/manualpages/KSP/KSPSetNormType.html>, KSPConvergedSkip <https://petsc.org/release/manualpages/KSP/KSPConvergedSkip.html>, KSPSetCheckNormIteration <https://petsc.org/release/manualpages/KSP/KSPSetCheckNormIteration.html>

    Source code at petsc4py/PETSc/KSP.pyx:1377 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1377>

    setOperators(A=None, P=None)
        Set matrix associated with the linear system.

        Collective.

        Set the matrix associated with the linear system and a (possibly) different one from which the preconditioner will be built.

        Parameters

            •   A (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix that defines the linear system.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix to be used in constructing the preconditioner, usually the same as A.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    This is equivalent to pc = ksp.getPC(); pc.setOperators(A, P) but is the preferred approach.

    If you know the operator A has a null space you can use Mat.setNullSpace <#petsc4py.PETSc.Mat.setNullSpace> and Mat.setTransposeNullSpace <#petsc4py.PETSc.Mat.setTransposeNullSpace> to supply the null space to A and the KSP solvers will automatically use that null space as needed during the solution process.

    All future calls to setOperators must use the same size matrices!

    Passing None <https://docs.python.org/3/library/constants.html#None> for A or P removes the matrix that is currently used.

    See also:
            PETSc.KSP, solve, setComputeOperators, KSPSetOperators <https://petsc.org/release/manualpages/KSP/KSPSetOperators.html>

    Source code at petsc4py/PETSc/KSP.pyx:820 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L820>

    setOptionsPrefix(prefix)
        Set the prefix used for all KSP options in the database.

        Logically collective.

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The options prefix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen. For example, to distinguish between the runtime options for two different KSP contexts, one could call ` KSPSetOptionsPrefix(ksp1, "sys1_") KSPSetOptionsPrefix(ksp2, "sys2_") `

    This would enable use of different options for each system, such as ` -sys1_ksp_type gmres -sys1_ksp_rtol 1.e-3 -sys2_ksp_type bcgs -sys2_ksp_rtol 1.e-4 `

    See also:
            Working with PETSc options <#petsc-options>, KSPSetOptionsPrefix <https://petsc.org/release/manualpages/KSP/KSPSetOptionsPrefix.html>

    Source code at petsc4py/PETSc/KSP.pyx:533 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L533>

    setPC(pc)
        Set the preconditioner.

        Collective.

        Set the preconditioner to be used to calculate the application of the preconditioner on a vector.

        Parameters
            pc (PC <#petsc4py.PETSc.PC>) -- The preconditioner object

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PETSc.KSP, getPC, KSPSetPC <https://petsc.org/release/manualpages/KSP/KSPSetPC.html>

    Source code at petsc4py/PETSc/KSP.pyx:891 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L891>

    setPCSide(side)
        Set the preconditioning side.

        Logically collective.

        Parameters
            side (Side <#petsc4py.PETSc.PC.Side>) -- The preconditioning side (see PC.Side <#petsc4py.PETSc.PC.Side>).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    Left preconditioning is used by default for most Krylov methods except Type.FGMRES <#petsc4py.PETSc.KSP.Type.FGMRES> which only supports right preconditioning.

    For methods changing the side of the preconditioner changes the norm type that is used, see setNormType.

    Symmetric preconditioning is currently available only for the Type.QCG <#petsc4py.PETSc.KSP.Type.QCG> method. Note, however, that symmetric preconditioning can be emulated by using either right or left preconditioning and a pre or post processing step.

    Setting the PC side often affects the default norm type. See setNormType for details.

    See also:
            PC.Side <#petsc4py.PETSc.PC.Side>, Working with PETSc options <#petsc-options>, getPCSide, setNormType, getNormType, KSPSetPCSide <https://petsc.org/release/manualpages/KSP/KSPSetPCSide.html>

    Source code at petsc4py/PETSc/KSP.pyx:1329 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1329>

    setPostSolve(postsolve, args=None, kargs=None)
        Set the function that is called at the end of each KSP.solve.

        Logically collective.

        Parameters

            •   postsolve (KSPPostSolveFunction <#petsc4py.typing.KSPPostSolveFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The callback function.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback function.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback function.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            solve, KSPSetPreSolve <https://petsc.org/release/manualpages/KSP/KSPSetPreSolve.html>, KSPSetPostSolve <https://petsc.org/release/manualpages/KSP/KSPSetPostSolve.html>

    Source code at petsc4py/PETSc/KSP.pyx:1684 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1684>

    setPreSolve(presolve, args=None, kargs=None)
        Set the function that is called at the beginning of each KSP.solve.

        Logically collective.

        Parameters

            •   presolve (KSPPreSolveFunction <#petsc4py.typing.KSPPreSolveFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The callback function.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback function.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback function.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            solve, KSPSetPreSolve <https://petsc.org/release/manualpages/KSP/KSPSetPreSolve.html>, KSPSetPostSolve <https://petsc.org/release/manualpages/KSP/KSPSetPostSolve.html>

    Source code at petsc4py/PETSc/KSP.pyx:1651 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1651>

    setPythonContext(context=None)
        Set the instance of the class implementing Python methods.

        Not collective.

        See also:
            PETSc Python linear solver type <#petsc-python-ksp>, getPythonContext

    Source code at petsc4py/PETSc/KSP.pyx:2197 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2197>

        Parameters
            context (Any <https://docs.python.org/3/library/typing.html#typing.Any> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPythonType(py_type)
        Set the fully qualified Python name of the class to be used.

        Collective.

        See also:
            PETSc Python linear solver type <#petsc-python-ksp>, setPythonContext, getPythonType, KSPPythonSetType <https://petsc.org/release/manualpages/KSP/KSPPythonSetType.html>

    Source code at petsc4py/PETSc/KSP.pyx:2224 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2224>

        Parameters
            py_type (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setResidualNorm(rnorm)
        Use norm property.

        Source code at petsc4py/PETSc/KSP.pyx:1874 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1874>

        Parameters
            rnorm (float <https://docs.python.org/3/library/functions.html#float>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setTolerances(rtol=None, atol=None, divtol=None, max_it=None)
        Set various tolerances used by the KSP convergence testers.

        Logically collective.

        Set the relative, absolute, divergence, and maximum iteration tolerances used by the default KSP convergence testers.

        Parameters

            •   rtol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The relative convergence tolerance, relative decrease in the (possibly preconditioned) residual norm. Or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set.

            •   atol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The absolute convergence tolerance absolute size of the (possibly preconditioned) residual norm. Or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set.

            •   dtol -- The divergence tolerance, amount (possibly preconditioned) residual norm can increase before KSPConvergedDefault <https://petsc.org/release/manualpages/KSP/KSPConvergedDefault.html> concludes that the method is diverging. Or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set.

            •   max_it (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Maximum number of iterations to use. Or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set.

            •   divtol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    Use None <https://docs.python.org/3/library/constants.html#None> to retain the default value of any of the tolerances.

    See also:
            Working with PETSc options <#petsc-options>, getTolerances, setConvergenceTest, KSPSetTolerances <https://petsc.org/release/manualpages/KSP/KSPSetTolerances.html>, KSPConvergedDefault <https://petsc.org/release/manualpages/KSP/KSPConvergedDefault.html>

    Source code at petsc4py/PETSc/KSP.pyx:928 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L928>

    setType(ksp_type)
        Build the KSP data structure for a particular Type <#petsc4py.PETSc.KSP.Type>.

        Logically collective.

        Parameters
            ksp_type (Type <#petsc4py.PETSc.KSP.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- KSP Type object

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    See Type <#petsc4py.PETSc.KSP.Type> for available methods (for instance, Type.CG <#petsc4py.PETSc.KSP.Type.CG> or Type.GMRES <#petsc4py.PETSc.KSP.Type.GMRES>).

    Normally, it is best to use the setFromOptions command and then set the KSP type from the options database rather than by using this routine. Using the options database provides the user with maximum flexibility in evaluating the many different Krylov methods. This method is provided for those situations where it is necessary to set the iterative solver independently of the command line or options database. This might be the case, for example, when the choice of iterative solver changes during the execution of the program, and the user's application is taking responsibility for choosing the appropriate method. In other words, this routine is not for beginners.

    See also:
            KSPSetType <https://petsc.org/release/manualpages/KSP/KSPSetType.html>

    Source code at petsc4py/PETSc/KSP.pyx:483 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L483>

    setUp()
        Set up internal data structures for an iterative solver.

        Collective.

        See also:
            KSPSetUp <https://petsc.org/release/manualpages/KSP/KSPSetUp.html>

    Source code at petsc4py/PETSc/KSP.pyx:1609 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1609>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setUpOnBlocks()
        Set up the preconditioner for each block in a block method.

        Collective.

        Methods include: block Jacobi, block Gauss-Seidel, and overlapping Schwarz methods.

        See also:
            KSPSetUpOnBlocks <https://petsc.org/release/manualpages/KSP/KSPSetUpOnBlocks.html>

    Source code at petsc4py/PETSc/KSP.pyx:1636 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1636>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setUseFischerGuess(model, size)
        Use the Paul Fischer algorithm to compute initial guesses.

        Logically collective.

        Use the Paul Fischer algorithm or its variants to compute initial guesses for a set of solves with related right hand sides.

        Parameters

            •   model (int <https://docs.python.org/3/library/functions.html#int>) -- Use model 1, model 2, model 3, any other number to turn it off.

            •   size (int <https://docs.python.org/3/library/functions.html#int>) -- Size of subspace used to generate initial guess.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSPSetUseFischerGuess <https://petsc.org/release/manualpages/KSP/KSPSetUseFischerGuess.html>

    Source code at petsc4py/PETSc/KSP.pyx:1581 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1581>

    solve(b, x)
        Solve the linear system.

        Collective.

        Parameters

            •   b (Vec <#petsc4py.PETSc.Vec>) -- Right hand side vector.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Solution vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    If one uses setDM then x or b need not be passed. Use getSolution to access the solution in this case.

    The operator is specified with setOperators.

    solve will normally return without generating an error regardless of whether the linear system was solved or if constructing the preconditioner failed. Call getConvergedReason to determine if the solver converged or failed and why. The option -ksp_error_if_not_converged or function setErrorIfNotConverged will cause solve to error as soon as an error occurs in the linear solver. In inner solves, DIVERGED_MAX_IT is not treated as an error because when using nested solvers it may be fine that inner solvers in the preconditioner do not converge during the solution process.

    The number of iterations can be obtained from its.

    If you provide a matrix that has a Mat.setNullSpace <#petsc4py.PETSc.Mat.setNullSpace> and Mat.setTransposeNullSpace <#petsc4py.PETSc.Mat.setTransposeNullSpace> this will use that information to solve singular systems in the least squares sense with a norm minimizing solution.

    Ax = b where b = bₚ + bₜ where bₜ is not in the range of A (and hence by the fundamental theorem of linear algebra is in the nullspace(Aᵀ), see Mat.setNullSpace <#petsc4py.PETSc.Mat.setNullSpace>.

    KSP first removes bₜ producing the linear system Ax = bₚ (which has multiple solutions) and solves this to find the ∥x∥ minimizing solution (and hence it finds the solution x orthogonal to the nullspace(A). The algorithm is simply in each iteration of the Krylov method we remove the nullspace(A) from the search direction thus the solution which is a linear combination of the search directions has no component in the nullspace(A).

    We recommend always using Type.GMRES <#petsc4py.PETSc.KSP.Type.GMRES> for such singular systems. If nullspace(A) = nullspace(Aᵀ) (note symmetric matrices always satisfy this property) then both left and right preconditioning will work If nullspace(A) != nullspace(Aᵀ) then left preconditioning will work but right preconditioning may not work (or it may).

    If using a direct method (e.g., via the KSP solver Type.PREONLY <#petsc4py.PETSc.KSP.Type.PREONLY> and a preconditioner such as PC.Type.LU <#petsc4py.PETSc.PC.Type.LU> or PC.Type.ILU <#petsc4py.PETSc.PC.Type.ILU>, then its=1. See setTolerances for more details.

    Understanding Convergence

    The routines setMonitor and computeEigenvalues provide information on additional options to monitor convergence and print eigenvalue information.

    See also:
            create, setUp, destroy, setTolerances, is_converged, solveTranspose, its, Mat.setNullSpace <#petsc4py.PETSc.Mat.setNullSpace>, Mat.setTransposeNullSpace <#petsc4py.PETSc.Mat.setTransposeNullSpace>, Type <#petsc4py.PETSc.KSP.Type>, setErrorIfNotConverged, KSPSolve <https://petsc.org/release/manualpages/KSP/KSPSolve.html>

    Source code at petsc4py/PETSc/KSP.pyx:1717 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1717>

    solveTranspose(b, x)
        Solve the transpose of a linear system.

        Collective.

        Parameters

            •   b (Vec <#petsc4py.PETSc.Vec>) -- Right hand side vector.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Solution vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    For complex numbers this solve the non-Hermitian transpose system.

    See also:
            solve, KSPSolveTranspose <https://petsc.org/release/manualpages/KSP/KSPSolveTranspose.html>

    Source code at petsc4py/PETSc/KSP.pyx:1798 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L1798>

    view(viewer=None)
        Print the KSP data structure.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- Viewer used to display the KSP.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSPView <https://petsc.org/release/manualpages/KSP/KSPView.html>

    Source code at petsc4py/PETSc/KSP.pyx:435 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L435>

Attributes Documentation

    appctx
        The solver application context.

        Source code at petsc4py/PETSc/KSP.pyx:2256 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2256>

    atol
        The absolute tolerance of the solver.

        Source code at petsc4py/PETSc/KSP.pyx:2349 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2349>

    divtol
        The divergence tolerance of the solver.

        Source code at petsc4py/PETSc/KSP.pyx:2357 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2357>

    dm  The solver DM <#petsc4py.PETSc.DM>.

        Source code at petsc4py/PETSc/KSP.pyx:2266 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2266>

    guess_knoll
        Whether solver uses Knoll trick.

        Source code at petsc4py/PETSc/KSP.pyx:2308 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2308>

    guess_nonzero
        Whether guess is non-zero.

        Source code at petsc4py/PETSc/KSP.pyx:2300 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2300>

    history
        The convergence history of the solver.

        Source code at petsc4py/PETSc/KSP.pyx:2391 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2391>

    is_converged
        Boolean indicating if the solver has converged.

        Source code at petsc4py/PETSc/KSP.pyx:2411 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2411>

    is_diverged
        Boolean indicating if the solver has failed.

        Source code at petsc4py/PETSc/KSP.pyx:2416 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2416>

    is_iterating
        Boolean indicating if the solver has not converged yet.

        Source code at petsc4py/PETSc/KSP.pyx:2406 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2406>

    its The current number of iterations the solver has taken.

        Source code at petsc4py/PETSc/KSP.pyx:2375 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2375>

    mat_op
        The system matrix operator.

        Source code at petsc4py/PETSc/KSP.pyx:2288 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2288>

    mat_pc
        The preconditioner operator.

        Source code at petsc4py/PETSc/KSP.pyx:2293 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2293>

    max_it
        The maximum number of iteration the solver may take.

        Source code at petsc4py/PETSc/KSP.pyx:2365 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2365>

    norm
        The norm of the residual at the current iteration.

        Source code at petsc4py/PETSc/KSP.pyx:2383 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2383>

    norm_type
        The norm used by the solver.

        Source code at petsc4py/PETSc/KSP.pyx:2331 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2331>

    pc  The PC <#petsc4py.PETSc.PC> of the solver.

        Source code at petsc4py/PETSc/KSP.pyx:2318 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2318>

    pc_side
        The side on which preconditioning is performed.

        Source code at petsc4py/PETSc/KSP.pyx:2323 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2323>

    reason
        The converged reason.

        Source code at petsc4py/PETSc/KSP.pyx:2398 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2398>

    rtol
        The relative tolerance of the solver.

        Source code at petsc4py/PETSc/KSP.pyx:2341 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2341>

    vec_rhs
        The right-hand side vector.

        Source code at petsc4py/PETSc/KSP.pyx:2281 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2281>

    vec_sol
        The solution vector.

        Source code at petsc4py/PETSc/KSP.pyx:2276 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/KSP.pyx#L2276>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.KSPDMActive

    class petsc4py.PETSc.KSPDMActive
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Argument to KSPSetDMActive().

        Attributes Summary
        ALL | Constant ALL of type int <https://docs.python.org/3/library/functions.html#int>
        INITIAL_GUESS | Constant INITIAL_GUESS of type int <https://docs.python.org/3/library/functions.html#int>
        OPERATOR | Constant OPERATOR of type int <https://docs.python.org/3/library/functions.html#int>
        RHS | Constant RHS of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        ALL: int <https://docs.python.org/3/library/functions.html#int> = ALL
            Constant ALL of type int <https://docs.python.org/3/library/functions.html#int>

        INITIAL_GUESS: int <https://docs.python.org/3/library/functions.html#int> = INITIAL_GUESS
            Constant INITIAL_GUESS of type int <https://docs.python.org/3/library/functions.html#int>

        OPERATOR: int <https://docs.python.org/3/library/functions.html#int> = OPERATOR
            Constant OPERATOR of type int <https://docs.python.org/3/library/functions.html#int>

        RHS: int <https://docs.python.org/3/library/functions.html#int> = RHS
            Constant RHS of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.LGMap

    class petsc4py.PETSc.LGMap
        Bases: Object <#petsc4py.PETSc.Object>

        Mapping from a local to a global ordering.

        See also:
            ISLocalToGlobalMapping <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMapping.html>

    Enumerations
    MapMode <#petsc4py.PETSc.LGMap.MapMode> | Enum describing mapping behavior when global indices are missing.
    Type <#petsc4py.PETSc.LGMap.Type> | Local to global map types.

  petsc4py.PETSc.LGMap.MapMode

    class petsc4py.PETSc.LGMap.MapMode
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Enum describing mapping behavior when global indices are missing.

        MASK
            Give missing global indices a local index of -1.

        DROP
            Drop missing global indices.

    See also:
            ISGlobalToLocalMappingMode <https://petsc.org/release/manualpages/IS/ISGlobalToLocalMappingMode.html>

    Attributes Summary
    DROP | Constant DROP of type int <https://docs.python.org/3/library/functions.html#int>
    MASK | Constant MASK of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        DROP: int <https://docs.python.org/3/library/functions.html#int> = DROP
            Constant DROP of type int <https://docs.python.org/3/library/functions.html#int>

        MASK: int <https://docs.python.org/3/library/functions.html#int> = MASK
            Constant MASK of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.LGMap.Type

    class petsc4py.PETSc.LGMap.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Local to global map types.

        Attributes Summary
        BASIC | Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>
        HASH | Object HASH of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        BASIC: str <https://docs.python.org/3/library/stdtypes.html#str> = BASIC
            Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HASH: str <https://docs.python.org/3/library/stdtypes.html#str> = HASH
            Object HASH of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
apply(indices[, result]) | Convert a locally numbered list of integers to a global numbering.
applyBlock(indices[, result]) | Convert a local block numbering to a global block numbering.
applyBlockInverse(indices[, mode]) | Compute blocked local numbering from blocked global numbering.
applyIS(iset) | Create an index set with global numbering from a local numbering.
applyInverse(indices[, mode]) | Compute local numbering from global numbering.
create(indices[, bsize, comm]) | Create a local-to-global mapping.
createIS(iset) | Create a local-to-global mapping from an index set.
createSF(sf, start) | Create a local-to-global mapping from a star forest.
destroy() | Destroy the local-to-global mapping.
getBlockIndices() | Return the global indices for each local block.
getBlockInfo() | Determine the block indices shared with neighboring processes.
getBlockSize() | Return the block size of the local-to-global mapping.
getIndices() | Return the global indices for each local point in the mapping.
getInfo() | Determine the indices shared with neighboring processes.
getSize() | Return the local size of the local-to-global mapping.
load(viewer) | Load a local-to-global mapping.
setFromOptions() | Set mapping options from the options database.
setType(lgmap_type) | Set the type of the local-to-global map.
view([viewer]) | View the local-to-global mapping.

Attributes Summary
block_indices | The global indices for each local block in the mapping.
block_info | Mapping describing block indices shared with neighboring processes.
block_size | The block size.
indices | The global indices for each local point in the mapping.
info | Mapping describing indices shared with neighboring processes.
size | The local size.

Methods Documentation

    apply(indices, result=None)
        Convert a locally numbered list of integers to a global numbering.

        Not collective.

        Parameters

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Input indices in local numbering.

            •   result (ArrayInt <#petsc4py.typing.ArrayInt> | None <https://docs.python.org/3/library/constants.html#None>) -- Array to write the global numbering to. If None <https://docs.python.org/3/library/constants.html#None> then a new array will be allocated.

        Returns
            Indices in global numbering. If result is not None <https://docs.python.org/3/library/constants.html#None> then this is returned here.

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    See also:
            LGMap.applyBlock, ISLocalToGlobalMappingApply <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingApply.html>

    Source code at petsc4py/PETSc/IS.pyx:1495 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1495>

    applyBlock(indices, result=None)
        Convert a local block numbering to a global block numbering.

        Not collective.

        Parameters

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Input block indices in local numbering.

            •   result (ArrayInt <#petsc4py.typing.ArrayInt> | None <https://docs.python.org/3/library/constants.html#None>) -- Array to write the global numbering to. If None <https://docs.python.org/3/library/constants.html#None> then a new array will be allocated.

        Returns
            Block indices in global numbering. If result is not None <https://docs.python.org/3/library/constants.html#None> then this is returned here.

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    See also:
            LGMap.apply, ISLocalToGlobalMappingApplyBlock <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingApplyBlock.html>

    Source code at petsc4py/PETSc/IS.pyx:1532 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1532>

    applyBlockInverse(indices, mode=None)
        Compute blocked local numbering from blocked global numbering.

        Not collective.

        Parameters

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Indices with a global block numbering.

            •   mode (MapMode <#petsc4py.PETSc.LGMap.MapMode> | str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag indicating what to do with indices that have no local value, defaults to "mask".

        Returns
            Indices with a local block numbering.

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    See also:
            ISGlobalToLocalMappingApplyBlock <https://petsc.org/release/manualpages/IS/ISGlobalToLocalMappingApplyBlock.html>

    Source code at petsc4py/PETSc/IS.pyx:1633 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1633>

    applyIS(iset)
        Create an index set with global numbering from a local numbering.

        Collective.

        Parameters
            iset (IS <#petsc4py.PETSc.IS>) -- Index set with local numbering.

        Returns
            Index set with global numbering.

        Return type
            IS <#petsc4py.PETSc.IS>

    See also:
            ISLocalToGlobalMappingApplyIS <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingApplyIS.html>

    Source code at petsc4py/PETSc/IS.pyx:1569 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1569>

    applyInverse(indices, mode=None)
        Compute local numbering from global numbering.

        Not collective.

        Parameters

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Indices with a global numbering.

            •   mode (MapMode <#petsc4py.PETSc.LGMap.MapMode> | str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- Flag indicating what to do with indices that have no local value, defaults to "mask".

        Returns
            Indices with a local numbering.

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    See also:
            ISGlobalToLocalMappingApply <https://petsc.org/release/manualpages/IS/ISGlobalToLocalMappingApply.html>

    Source code at petsc4py/PETSc/IS.pyx:1594 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1594>

    create(indices, bsize=None, comm=None)
        Create a local-to-global mapping.

        Not collective.

        Parameters

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Global index for each local element.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Block size, defaults to 1.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            ISLocalToGlobalMappingCreate <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingCreate.html>

    Source code at petsc4py/PETSc/IS.pyx:1278 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1278>

    createIS(iset)
        Create a local-to-global mapping from an index set.

        Not collective.

        Parameters
            iset (IS <#petsc4py.PETSc.IS>) -- Index set containing the global numbers for each local number.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            ISLocalToGlobalMappingCreateIS <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingCreateIS.html>

    Source code at petsc4py/PETSc/IS.pyx:1313 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1313>

    createSF(sf, start)
        Create a local-to-global mapping from a star forest.

        Collective.

        Parameters

            •   sf (SF <#petsc4py.PETSc.SF>) -- Star forest mapping contiguous local indices to (rank, offset).

            •   start (int <https://docs.python.org/3/library/functions.html#int>) -- First global index on this process.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            ISLocalToGlobalMappingCreateSF <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingCreateSF.html>

    Source code at petsc4py/PETSc/IS.pyx:1334 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1334>

    destroy()
        Destroy the local-to-global mapping.

        Not collective.

        See also:
            ISLocalToGlobalMappingDestroy <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingDestroy.html>

    Source code at petsc4py/PETSc/IS.pyx:1265 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1265>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getBlockIndices()
        Return the global indices for each local block.

        Not collective.

        See also:
            ISLocalToGlobalMappingGetBlockIndices <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingGetBlockIndices.html>

    Source code at petsc4py/PETSc/IS.pyx:1409 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1409>

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    getBlockInfo()
        Determine the block indices shared with neighboring processes.

        Collective.

        Returns
            Mapping from neighboring processor number to an array of shared block indices (in local numbering).

        Return type
            dict <https://docs.python.org/3/library/stdtypes.html#dict>

    See also:
            ISLocalToGlobalMappingGetBlockInfo <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingGetBlockInfo.html>

    Source code at petsc4py/PETSc/IS.pyx:1464 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1464>

    getBlockSize()
        Return the block size of the local-to-global mapping.

        Not collective.

        See also:
            ISLocalToGlobalMappingGetBlockSize <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingGetBlockSize.html>

    Source code at petsc4py/PETSc/IS.pyx:1371 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1371>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getIndices()
        Return the global indices for each local point in the mapping.

        Not collective.

        See also:
            ISLocalToGlobalMappingGetIndices <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingGetIndices.html>

    Source code at petsc4py/PETSc/IS.pyx:1385 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1385>

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    getInfo()
        Determine the indices shared with neighboring processes.

        Collective.

        Returns
            Mapping from neighboring processor number to an array of shared indices (in local numbering).

        Return type
            dict <https://docs.python.org/3/library/stdtypes.html#dict>

    See also:
            ISLocalToGlobalMappingGetInfo <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingGetInfo.html>

    Source code at petsc4py/PETSc/IS.pyx:1435 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1435>

    getSize()
        Return the local size of the local-to-global mapping.

        Not collective.

        See also:
            ISLocalToGlobalMappingGetSize <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingGetSize.html>

    Source code at petsc4py/PETSc/IS.pyx:1357 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1357>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    load(viewer)
        Load a local-to-global mapping.

        Collective.

        See also:
            view, ISLocalToGlobalMappingLoad <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingLoad.html>

    Source code at petsc4py/PETSc/IS.pyx:1247 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1247>

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer>)

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    setFromOptions()
        Set mapping options from the options database.

        Not collective.

        See also:
            Working with PETSc options <#petsc-options>, ISLocalToGlobalMappingSetFromOptions <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingSetFromOptions.html>

    Source code at petsc4py/PETSc/IS.pyx:1216 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1216>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setType(lgmap_type)
        Set the type of the local-to-global map.

        Logically collective.

        Parameters
            lgmap_type (Type <#petsc4py.PETSc.LGMap.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of the local-to-global mapping.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    Use -islocaltoglobalmapping_type to set the type in the options database.

    See also:
            Working with PETSc options <#petsc-options>, ISLocalToGlobalMappingSetType <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingSetType.html>

    Source code at petsc4py/PETSc/IS.pyx:1192 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1192>

    view(viewer=None)
        View the local-to-global mapping.

        Not collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- Viewer instance, defaults to an instance of Viewer.Type.ASCII <#petsc4py.PETSc.Viewer.Type.ASCII>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            load, ISLocalToGlobalMappingView <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingView.html>

    Source code at petsc4py/PETSc/IS.pyx:1228 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1228>

Attributes Documentation

    block_indices
        The global indices for each local block in the mapping.

        Not collective.

        See also:
            LGMap.getBlockIndices, ISLocalToGlobalMappingGetBlockIndices <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingGetBlockIndices.html>

    Source code at petsc4py/PETSc/IS.pyx:1712 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1712>

    block_info
        Mapping describing block indices shared with neighboring processes.

        Collective.

        See also:
            LGMap.getBlockInfo, ISLocalToGlobalMappingGetBlockInfo <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingGetBlockInfo.html>

    Source code at petsc4py/PETSc/IS.pyx:1738 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1738>

    block_size
        The block size.

        Not collective.

        See also:
            LGMap.getBlockSize

    Source code at petsc4py/PETSc/IS.pyx:1686 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1686>

    indices
        The global indices for each local point in the mapping.

        Not collective.

        See also:
            LGMap.getIndices, ISLocalToGlobalMappingGetIndices <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingGetIndices.html>

    Source code at petsc4py/PETSc/IS.pyx:1699 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1699>

    info
        Mapping describing indices shared with neighboring processes.

        Collective.

        See also:
            LGMap.getInfo, ISLocalToGlobalMappingGetInfo <https://petsc.org/release/manualpages/IS/ISLocalToGlobalMappingGetInfo.html>

    Source code at petsc4py/PETSc/IS.pyx:1725 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1725>

    size
        The local size.

        Not collective.

        See also:
            LGMap.getSize

    Source code at petsc4py/PETSc/IS.pyx:1673 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/IS.pyx#L1673>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Log

    class petsc4py.PETSc.Log
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Logging support.

        Methods Summary
        Class(name) | Create a log class.
        Event(name[, klass]) | Create a log event.
        EventDecorator([name, klass]) | Decorate a function with a PETSc <#module-petsc4py.PETSc> event.
        Stage(name) | Create a log stage.
        addFlops(flops) | Add floating point operations to the current event.
        begin() | Turn on logging of objects and events.
        getCPUTime() | Return the CPU time.
        getFlops() | Return the number of flops used on this processor since the program began.
        getTime() | Return the current time of day in seconds.
        isActive() | Return whether logging is currently in progress.
        logFlops(flops) | Add floating point operations to the current event.
        view([viewer]) | Print the log.

        Methods Documentation

        classmethod Class(name)
            Create a log class.

            Not collective.

            Parameters
                name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- Class name.

            Returns
                klass -- The log class. If a class already exists with name name then it is reused.

            Return type
                LogClass <#petsc4py.PETSc.LogClass>

        See also:
                PetscClassIdRegister <https://petsc.org/release/manualpages/Log/PetscClassIdRegister.html>

        Source code at petsc4py/PETSc/Log.pyx:45 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L45>

        classmethod Event(name, klass=None)
            Create a log event.

            Not collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- Event name.

                •   klass (LogClass <#petsc4py.PETSc.LogClass> | None <https://docs.python.org/3/library/constants.html#None>) -- Log class. If None <https://docs.python.org/3/library/constants.html#None>, defaults to PETSC_OBJECT_CLASSID.

            Returns
                event -- The log event. If an event already exists with name name then it is reused.

            Return type
                LogEvent <#petsc4py.PETSc.LogEvent>

        See also:
                PetscLogEventRegister <https://petsc.org/release/manualpages/Log/PetscLogEventRegister.html>

        Source code at petsc4py/PETSc/Log.pyx:79 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L79>

        classmethod EventDecorator(name=None, klass=None)
            Decorate a function with a PETSc <#module-petsc4py.PETSc> event.

            Source code at petsc4py/PETSc/Log.pyx:240 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L240>

            Return type
                Any <https://docs.python.org/3/library/typing.html#typing.Any>

        classmethod Stage(name)
            Create a log stage.

            Not collective.

            Parameters
                name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- Stage name.

            Returns
                stage -- The log stage. If a stage already exists with name name then it is reused.

            Return type
                LogStage <#petsc4py.PETSc.LogStage>

        See also:
                PetscLogStageRegister <https://petsc.org/release/manualpages/Log/PetscLogStageRegister.html>

        Source code at petsc4py/PETSc/Log.pyx:11 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L11>

        classmethod addFlops(flops)
            Add floating point operations to the current event.

            Not collective.

            Parameters
                flops (float <https://docs.python.org/3/library/functions.html#float>) -- The number of flops to log.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        Notes

        This method exists for backward compatibility.

        See also:
                logFlops, PetscLogFlops <https://petsc.org/release/manualpages/Log/PetscLogFlops.html>

        Source code at petsc4py/PETSc/Log.pyx:170 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L170>

        classmethod begin()
            Turn on logging of objects and events.

            Collective.

            See also:
                PetscLogDefaultBegin <https://petsc.org/release/manualpages/Log/PetscLogDefaultBegin.html>

        Source code at petsc4py/PETSc/Log.pyx:117 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L117>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        classmethod getCPUTime()
            Return the CPU time.

            Source code at petsc4py/PETSc/Log.pyx:233 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L233>

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        classmethod getFlops()
            Return the number of flops used on this processor since the program began.

            Not collective.

            Returns
                Number of floating point operations.

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        See also:
                PetscGetFlops <https://petsc.org/release/manualpages/Log/PetscGetFlops.html>

        Source code at petsc4py/PETSc/Log.pyx:193 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L193>

        classmethod getTime()
            Return the current time of day in seconds.

            Collective.

            Returns
                wctime -- Current time.

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        See also:
                PetscTime <https://petsc.org/release/manualpages/Sys/PetscTime.html>

        Source code at petsc4py/PETSc/Log.pyx:213 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L213>

        classmethod isActive()
            Return whether logging is currently in progress.

            Not collective.

            See also:
                PetscLogIsActive <https://petsc.org/release/manualpages/Log/PetscLogIsActive.html>

        Source code at petsc4py/PETSc/Log.pyx:255 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L255>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        classmethod logFlops(flops)
            Add floating point operations to the current event.

            Not collective.

            Parameters
                flops (float <https://docs.python.org/3/library/functions.html#float>) -- The number of flops to log.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscLogFlops <https://petsc.org/release/manualpages/Log/PetscLogFlops.html>

        Source code at petsc4py/PETSc/Log.pyx:151 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L151>

        classmethod view(viewer=None)
            Print the log.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                Working with PETSc options <#petsc-options>, PetscLogView <https://petsc.org/release/manualpages/Log/PetscLogView.html>

        Source code at petsc4py/PETSc/Log.pyx:130 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L130>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.LogClass

    class petsc4py.PETSc.LogClass
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Logging support.

        Methods Summary
        activate() | Activate the log class.
        deactivate() | Deactivate the log class.
        getActive() | Not implemented.
        getName() | Return the log class name.
        setActive(flag) | Activate or deactivate the log class.

        Attributes Summary
        active | Log class activation.
        id | The log class identifier.
        name | The log class name.

        Methods Documentation

        activate()
            Activate the log class.

            Source code at petsc4py/PETSc/Log.pyx:493 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L493>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        deactivate()
            Deactivate the log class.

            Source code at petsc4py/PETSc/Log.pyx:497 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L497>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        getActive()
            Not implemented.

            Source code at petsc4py/PETSc/Log.pyx:501 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L501>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        getName()
            Return the log class name.

            Source code at petsc4py/PETSc/Log.pyx:476 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L476>

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        setActive(flag)
            Activate or deactivate the log class.

            Source code at petsc4py/PETSc/Log.pyx:506 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L506>

            Parameters
                flag (bool <https://docs.python.org/3/library/functions.html#bool>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

    Attributes Documentation

        active
            Log class activation.

            Source code at petsc4py/PETSc/Log.pyx:513 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L513>

        id  The log class identifier.

            Source code at petsc4py/PETSc/Log.pyx:463 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L463>

        name
            The log class name.

            Source code at petsc4py/PETSc/Log.pyx:482 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L482>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.LogEvent

    class petsc4py.PETSc.LogEvent
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Logging support.

        Methods Summary
        activate() | Indicate that the event should be logged.
        begin(*objs) | Log the beginning of a user event.
        deactivate() | Indicate that the event should not be logged.
        end(*objs) | Log the end of a user event.
        getActive() | Not implemented.
        getActiveAll() | Not implemented.
        getName() | The current event name.
        getPerfInfo([stage]) | Get the performance information about the given event in the given event.
        setActive(flag) | Indicate whether or not the event should be logged.
        setActiveAll(flag) | Turn on logging of all events.

        Attributes Summary
        active | Event activation.
        active_all | All events activation.
        id | The log event identifier.
        name | The current event name.

        Methods Documentation

        activate()
            Indicate that the event should be logged.

            Logically collective.

            See also:
                PetscLogEventActivate <https://petsc.org/release/manualpages/Log/PetscLogEventActivate.html>

        Source code at petsc4py/PETSc/Log.pyx:614 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L614>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        begin(*objs)
            Log the beginning of a user event.

            Collective.

            Parameters
                *objs -- objects associated with the event

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscLogEventBegin <https://petsc.org/release/manualpages/Log/PetscLogEventBegin.html>

        Source code at petsc4py/PETSc/Log.pyx:558 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L558>

        deactivate()
            Indicate that the event should not be logged.

            Logically collective.

            See also:
                PetscLogEventDeactivate <https://petsc.org/release/manualpages/Log/PetscLogEventDeactivate.html>

        Source code at petsc4py/PETSc/Log.pyx:626 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L626>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        end(*objs)
            Log the end of a user event.

            Collective.

            Parameters
                *objs -- Objects associated with the event.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscLogEventEnd <https://petsc.org/release/manualpages/Log/PetscLogEventEnd.html>

        Source code at petsc4py/PETSc/Log.pyx:577 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L577>

        getActive()
            Not implemented.

            Source code at petsc4py/PETSc/Log.pyx:638 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L638>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        getActiveAll()
            Not implemented.

            Source code at petsc4py/PETSc/Log.pyx:671 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L671>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        getName()
            The current event name.

            Source code at petsc4py/PETSc/Log.pyx:597 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L597>

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        getPerfInfo(stage=None)
            Get the performance information about the given event in the given event.

            Not collective.

            Parameters
                stage (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The stage number.

            Returns
                info -- This structure is filled with the performance information.

            Return type
                dict <https://docs.python.org/3/library/stdtypes.html#dict>

        See also:
                PetscLogEventGetPerfInfo <https://petsc.org/release/manualpages/Log/PetscLogEventGetPerfInfo.html>

        Source code at petsc4py/PETSc/Log.pyx:705 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L705>

        setActive(flag)
            Indicate whether or not the event should be logged.

            Logically collective.

            Parameters
                flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Activate or deactivate the event.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscLogEventDeactivate <https://petsc.org/release/manualpages/Log/PetscLogEventDeactivate.html>, PetscLogEventActivate <https://petsc.org/release/manualpages/Log/PetscLogEventActivate.html>

        Source code at petsc4py/PETSc/Log.pyx:643 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L643>

        setActiveAll(flag)
            Turn on logging of all events.

            Logically collective.

            Parameters
                flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Activate (if True <https://docs.python.org/3/library/constants.html#True>) or deactivate (if False <https://docs.python.org/3/library/constants.html#False>) the logging of all events.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscLogEventSetActiveAll <https://petsc.org/release/manualpages/Log/PetscLogEventSetActiveAll.html>

        Source code at petsc4py/PETSc/Log.pyx:676 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L676>

    Attributes Documentation

        active
            Event activation.

            Source code at petsc4py/PETSc/Log.pyx:663 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L663>

        active_all
            All events activation.

            Source code at petsc4py/PETSc/Log.pyx:695 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L695>

        id  The log event identifier.

            Source code at petsc4py/PETSc/Log.pyx:540 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L540>

        name
            The current event name.

            Source code at petsc4py/PETSc/Log.pyx:603 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L603>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.LogStage

    class petsc4py.PETSc.LogStage
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Logging support for different stages.

        Methods Summary
        activate() | Activate the stage.
        deactivate() | Deactivate the stage.
        getActive() | Check if the stage is activated.
        getName() | Return the current stage name.
        getVisible() | Return whether the stage is visible.
        pop() | Pop a stage from the logging stack.
        push() | Push a stage on the logging stack.
        setActive(flag) | Activate or deactivate the current stage.
        setVisible(flag) | Set the visibility of the stage.

        Attributes Summary
        active | Whether the stage is activate.
        id | The log stage identifier.
        name | The current stage name.
        visible | Whether the stage is visible.

        Methods Documentation

        activate()
            Activate the stage.

            Logically collective.

            See also:
                PetscLogStageSetActive <https://petsc.org/release/manualpages/Log/PetscLogStageSetActive.html>

        Source code at petsc4py/PETSc/Log.pyx:341 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L341>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        deactivate()
            Deactivate the stage.

            Logically collective.

            See also:
                PetscLogStageSetActive <https://petsc.org/release/manualpages/Log/PetscLogStageSetActive.html>

        Source code at petsc4py/PETSc/Log.pyx:353 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L353>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        getActive()
            Check if the stage is activated.

            Not collective.

            See also:
                PetscLogStageGetActive <https://petsc.org/release/manualpages/Log/PetscLogStageGetActive.html>

        Source code at petsc4py/PETSc/Log.pyx:365 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L365>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        getName()
            Return the current stage name.

            Source code at petsc4py/PETSc/Log.pyx:324 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L324>

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        getVisible()
            Return whether the stage is visible.

            Not collective.

            See also:
                LogStage.setVisible, PetscLogStageSetVisible <https://petsc.org/release/manualpages/Log/PetscLogStageSetVisible.html>

        Source code at petsc4py/PETSc/Log.pyx:403 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L403>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        pop()
            Pop a stage from the logging stack.

            Logically collective.

            See also:
                LogStage.push, PetscLogStagePop <https://petsc.org/release/manualpages/Log/PetscLogStagePop.html>

        Source code at petsc4py/PETSc/Log.pyx:309 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L309>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        push()
            Push a stage on the logging stack.

            Logically collective.

            See also:
                LogStage.pop, PetscLogStagePush <https://petsc.org/release/manualpages/Log/PetscLogStagePush.html>

        Source code at petsc4py/PETSc/Log.pyx:297 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L297>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setActive(flag)
            Activate or deactivate the current stage.

            Logically collective.

            See also:
                PetscLogStageSetActive <https://petsc.org/release/manualpages/Log/PetscLogStageSetActive.html>

        Source code at petsc4py/PETSc/Log.pyx:379 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L379>

            Parameters
                flag (bool <https://docs.python.org/3/library/functions.html#bool>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setVisible(flag)
            Set the visibility of the stage.

            Logically collective.

            Parameters
                flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- True <https://docs.python.org/3/library/constants.html#True> to make the stage visible, False <https://docs.python.org/3/library/constants.html#False> otherwise.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                LogStage.getVisible, PetscLogStageSetVisible <https://petsc.org/release/manualpages/Log/PetscLogStageSetVisible.html>

        Source code at petsc4py/PETSc/Log.pyx:417 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L417>

    Attributes Documentation

        active
            Whether the stage is activate.

            Source code at petsc4py/PETSc/Log.pyx:393 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L393>

        id  The log stage identifier.

            Source code at petsc4py/PETSc/Log.pyx:277 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L277>

        name
            The current stage name.

            Source code at petsc4py/PETSc/Log.pyx:330 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L330>

        visible
            Whether the stage is visible.

            Source code at petsc4py/PETSc/Log.pyx:436 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Log.pyx#L436>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Mat

    class petsc4py.PETSc.Mat
        Bases: Object <#petsc4py.PETSc.Object>

        Matrix object.

        Mat is described in the PETSc manual <https://petsc.org/release/manual/mat.html>.

        See also:
            Mat <https://petsc.org/release/manualpages/Mat/Mat.html>

    Enumerations
    AssemblyType <#petsc4py.PETSc.Mat.AssemblyType> | Matrix assembly type.
    DuplicateOption <#petsc4py.PETSc.Mat.DuplicateOption> | Matrix duplicate option.
    FactorShiftType <#petsc4py.PETSc.Mat.FactorShiftType> | Factored matrix shift type.
    InfoType <#petsc4py.PETSc.Mat.InfoType> | Matrix info type.
    Option <#petsc4py.PETSc.Mat.Option> | Matrix option.
    OrderingType <#petsc4py.PETSc.Mat.OrderingType> | Factored matrix ordering type.
    SORType <#petsc4py.PETSc.Mat.SORType> | Matrix SOR type.
    SolverType <#petsc4py.PETSc.Mat.SolverType> | Factored matrix solver type.
    Stencil <#petsc4py.PETSc.Mat.Stencil> | Associate structured grid coordinates with matrix indices.
    Structure <#petsc4py.PETSc.Mat.Structure> | Matrix modification structure.
    Type <#petsc4py.PETSc.Mat.Type> | Matrix type.

  petsc4py.PETSc.Mat.AssemblyType

    class petsc4py.PETSc.Mat.AssemblyType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Matrix assembly type.

        See also:
            MatAssemblyType <https://petsc.org/release/manualpages/Mat/MatAssemblyType.html>

    Attributes Summary
    FINAL | Constant FINAL of type int <https://docs.python.org/3/library/functions.html#int>
    FINAL_ASSEMBLY | Constant FINAL_ASSEMBLY of type int <https://docs.python.org/3/library/functions.html#int>
    FLUSH | Constant FLUSH of type int <https://docs.python.org/3/library/functions.html#int>
    FLUSH_ASSEMBLY | Constant FLUSH_ASSEMBLY of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        FINAL: int <https://docs.python.org/3/library/functions.html#int> = FINAL
            Constant FINAL of type int <https://docs.python.org/3/library/functions.html#int>

        FINAL_ASSEMBLY: int <https://docs.python.org/3/library/functions.html#int> = FINAL_ASSEMBLY
            Constant FINAL_ASSEMBLY of type int <https://docs.python.org/3/library/functions.html#int>

        FLUSH: int <https://docs.python.org/3/library/functions.html#int> = FLUSH
            Constant FLUSH of type int <https://docs.python.org/3/library/functions.html#int>

        FLUSH_ASSEMBLY: int <https://docs.python.org/3/library/functions.html#int> = FLUSH_ASSEMBLY
            Constant FLUSH_ASSEMBLY of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Mat.DuplicateOption

    class petsc4py.PETSc.Mat.DuplicateOption
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Matrix duplicate option.

        See also:
            MatDuplicateOption <https://petsc.org/release/manualpages/Mat/MatDuplicateOption.html>

    Attributes Summary
    COPY_VALUES | Constant COPY_VALUES of type int <https://docs.python.org/3/library/functions.html#int>
    DO_NOT_COPY_VALUES | Constant DO_NOT_COPY_VALUES of type int <https://docs.python.org/3/library/functions.html#int>
    SHARE_NONZERO_PATTERN | Constant SHARE_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        COPY_VALUES: int <https://docs.python.org/3/library/functions.html#int> = COPY_VALUES
            Constant COPY_VALUES of type int <https://docs.python.org/3/library/functions.html#int>

        DO_NOT_COPY_VALUES: int <https://docs.python.org/3/library/functions.html#int> = DO_NOT_COPY_VALUES
            Constant DO_NOT_COPY_VALUES of type int <https://docs.python.org/3/library/functions.html#int>

        SHARE_NONZERO_PATTERN: int <https://docs.python.org/3/library/functions.html#int> = SHARE_NONZERO_PATTERN
            Constant SHARE_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Mat.FactorShiftType

    class petsc4py.PETSc.Mat.FactorShiftType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Factored matrix shift type.

        See also:
            MatFactorShiftType <https://petsc.org/release/manualpages/Mat/MatFactorShiftType.html>

    Attributes Summary
    INBLOCKS | Constant INBLOCKS of type int <https://docs.python.org/3/library/functions.html#int>
    NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>
    NONZERO | Constant NONZERO of type int <https://docs.python.org/3/library/functions.html#int>
    NZ | Constant NZ of type int <https://docs.python.org/3/library/functions.html#int>
    PD | Constant PD of type int <https://docs.python.org/3/library/functions.html#int>
    POSITIVE_DEFINITE | Constant POSITIVE_DEFINITE of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        INBLOCKS: int <https://docs.python.org/3/library/functions.html#int> = INBLOCKS
            Constant INBLOCKS of type int <https://docs.python.org/3/library/functions.html#int>

        NONE: int <https://docs.python.org/3/library/functions.html#int> = NONE
            Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>

        NONZERO: int <https://docs.python.org/3/library/functions.html#int> = NONZERO
            Constant NONZERO of type int <https://docs.python.org/3/library/functions.html#int>

        NZ: int <https://docs.python.org/3/library/functions.html#int> = NZ
            Constant NZ of type int <https://docs.python.org/3/library/functions.html#int>

        PD: int <https://docs.python.org/3/library/functions.html#int> = PD
            Constant PD of type int <https://docs.python.org/3/library/functions.html#int>

        POSITIVE_DEFINITE: int <https://docs.python.org/3/library/functions.html#int> = POSITIVE_DEFINITE
            Constant POSITIVE_DEFINITE of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Mat.InfoType

    class petsc4py.PETSc.Mat.InfoType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Matrix info type.

        Attributes Summary
        GLOBAL_MAX | Constant GLOBAL_MAX of type int <https://docs.python.org/3/library/functions.html#int>
        GLOBAL_SUM | Constant GLOBAL_SUM of type int <https://docs.python.org/3/library/functions.html#int>
        LOCAL | Constant LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        GLOBAL_MAX: int <https://docs.python.org/3/library/functions.html#int> = GLOBAL_MAX
            Constant GLOBAL_MAX of type int <https://docs.python.org/3/library/functions.html#int>

        GLOBAL_SUM: int <https://docs.python.org/3/library/functions.html#int> = GLOBAL_SUM
            Constant GLOBAL_SUM of type int <https://docs.python.org/3/library/functions.html#int>

        LOCAL: int <https://docs.python.org/3/library/functions.html#int> = LOCAL
            Constant LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Mat.Option

    class petsc4py.PETSc.Mat.Option
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Matrix option.

        See also:
            MatOption <https://petsc.org/release/manualpages/Mat/MatOption.html>

    Attributes Summary
    ERROR_LOWER_TRIANGULAR | Constant ERROR_LOWER_TRIANGULAR of type int <https://docs.python.org/3/library/functions.html#int>
    FORCE_DIAGONAL_ENTRIES | Constant FORCE_DIAGONAL_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>
    GETROW_UPPERTRIANGULAR | Constant GETROW_UPPERTRIANGULAR of type int <https://docs.python.org/3/library/functions.html#int>
    HERMITIAN | Constant HERMITIAN of type int <https://docs.python.org/3/library/functions.html#int>
    IGNORE_LOWER_TRIANGULAR | Constant IGNORE_LOWER_TRIANGULAR of type int <https://docs.python.org/3/library/functions.html#int>
    IGNORE_OFF_PROC_ENTRIES | Constant IGNORE_OFF_PROC_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>
    IGNORE_ZERO_ENTRIES | Constant IGNORE_ZERO_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>
    KEEP_NONZERO_PATTERN | Constant KEEP_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>
    NEW_NONZERO_ALLOCATION_ERR | Constant NEW_NONZERO_ALLOCATION_ERR of type int <https://docs.python.org/3/library/functions.html#int>
    NEW_NONZERO_LOCATIONS | Constant NEW_NONZERO_LOCATIONS of type int <https://docs.python.org/3/library/functions.html#int>
    NEW_NONZERO_LOCATION_ERR | Constant NEW_NONZERO_LOCATION_ERR of type int <https://docs.python.org/3/library/functions.html#int>
    NO_OFF_PROC_ENTRIES | Constant NO_OFF_PROC_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>
    NO_OFF_PROC_ZERO_ROWS | Constant NO_OFF_PROC_ZERO_ROWS of type int <https://docs.python.org/3/library/functions.html#int>
    OPTION_MAX | Constant OPTION_MAX of type int <https://docs.python.org/3/library/functions.html#int>
    OPTION_MIN | Constant OPTION_MIN of type int <https://docs.python.org/3/library/functions.html#int>
    ROW_ORIENTED | Constant ROW_ORIENTED of type int <https://docs.python.org/3/library/functions.html#int>
    SORTED_FULL | Constant SORTED_FULL of type int <https://docs.python.org/3/library/functions.html#int>
    SPD | Constant SPD of type int <https://docs.python.org/3/library/functions.html#int>
    STRUCTURALLY_SYMMETRIC | Constant STRUCTURALLY_SYMMETRIC of type int <https://docs.python.org/3/library/functions.html#int>
    STRUCTURE_ONLY | Constant STRUCTURE_ONLY of type int <https://docs.python.org/3/library/functions.html#int>
    SUBMAT_SINGLEIS | Constant SUBMAT_SINGLEIS of type int <https://docs.python.org/3/library/functions.html#int>
    SUBSET_OFF_PROC_ENTRIES | Constant SUBSET_OFF_PROC_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>
    SYMMETRIC | Constant SYMMETRIC of type int <https://docs.python.org/3/library/functions.html#int>
    SYMMETRY_ETERNAL | Constant SYMMETRY_ETERNAL of type int <https://docs.python.org/3/library/functions.html#int>
    UNUSED_NONZERO_LOCATION_ERR | Constant UNUSED_NONZERO_LOCATION_ERR of type int <https://docs.python.org/3/library/functions.html#int>
    USE_HASH_TABLE | Constant USE_HASH_TABLE of type int <https://docs.python.org/3/library/functions.html#int>
    USE_INODES | Constant USE_INODES of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        ERROR_LOWER_TRIANGULAR: int <https://docs.python.org/3/library/functions.html#int> = ERROR_LOWER_TRIANGULAR
            Constant ERROR_LOWER_TRIANGULAR of type int <https://docs.python.org/3/library/functions.html#int>

        FORCE_DIAGONAL_ENTRIES: int <https://docs.python.org/3/library/functions.html#int> = FORCE_DIAGONAL_ENTRIES
            Constant FORCE_DIAGONAL_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>

        GETROW_UPPERTRIANGULAR: int <https://docs.python.org/3/library/functions.html#int> = GETROW_UPPERTRIANGULAR
            Constant GETROW_UPPERTRIANGULAR of type int <https://docs.python.org/3/library/functions.html#int>

        HERMITIAN: int <https://docs.python.org/3/library/functions.html#int> = HERMITIAN
            Constant HERMITIAN of type int <https://docs.python.org/3/library/functions.html#int>

        IGNORE_LOWER_TRIANGULAR: int <https://docs.python.org/3/library/functions.html#int> = IGNORE_LOWER_TRIANGULAR
            Constant IGNORE_LOWER_TRIANGULAR of type int <https://docs.python.org/3/library/functions.html#int>

        IGNORE_OFF_PROC_ENTRIES: int <https://docs.python.org/3/library/functions.html#int> = IGNORE_OFF_PROC_ENTRIES
            Constant IGNORE_OFF_PROC_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>

        IGNORE_ZERO_ENTRIES: int <https://docs.python.org/3/library/functions.html#int> = IGNORE_ZERO_ENTRIES
            Constant IGNORE_ZERO_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>

        KEEP_NONZERO_PATTERN: int <https://docs.python.org/3/library/functions.html#int> = KEEP_NONZERO_PATTERN
            Constant KEEP_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>

        NEW_NONZERO_ALLOCATION_ERR: int <https://docs.python.org/3/library/functions.html#int> = NEW_NONZERO_ALLOCATION_ERR
            Constant NEW_NONZERO_ALLOCATION_ERR of type int <https://docs.python.org/3/library/functions.html#int>

        NEW_NONZERO_LOCATIONS: int <https://docs.python.org/3/library/functions.html#int> = NEW_NONZERO_LOCATIONS
            Constant NEW_NONZERO_LOCATIONS of type int <https://docs.python.org/3/library/functions.html#int>

        NEW_NONZERO_LOCATION_ERR: int <https://docs.python.org/3/library/functions.html#int> = NEW_NONZERO_LOCATION_ERR
            Constant NEW_NONZERO_LOCATION_ERR of type int <https://docs.python.org/3/library/functions.html#int>

        NO_OFF_PROC_ENTRIES: int <https://docs.python.org/3/library/functions.html#int> = NO_OFF_PROC_ENTRIES
            Constant NO_OFF_PROC_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>

        NO_OFF_PROC_ZERO_ROWS: int <https://docs.python.org/3/library/functions.html#int> = NO_OFF_PROC_ZERO_ROWS
            Constant NO_OFF_PROC_ZERO_ROWS of type int <https://docs.python.org/3/library/functions.html#int>

        OPTION_MAX: int <https://docs.python.org/3/library/functions.html#int> = OPTION_MAX
            Constant OPTION_MAX of type int <https://docs.python.org/3/library/functions.html#int>

        OPTION_MIN: int <https://docs.python.org/3/library/functions.html#int> = OPTION_MIN
            Constant OPTION_MIN of type int <https://docs.python.org/3/library/functions.html#int>

        ROW_ORIENTED: int <https://docs.python.org/3/library/functions.html#int> = ROW_ORIENTED
            Constant ROW_ORIENTED of type int <https://docs.python.org/3/library/functions.html#int>

        SORTED_FULL: int <https://docs.python.org/3/library/functions.html#int> = SORTED_FULL
            Constant SORTED_FULL of type int <https://docs.python.org/3/library/functions.html#int>

        SPD: int <https://docs.python.org/3/library/functions.html#int> = SPD
            Constant SPD of type int <https://docs.python.org/3/library/functions.html#int>

        STRUCTURALLY_SYMMETRIC: int <https://docs.python.org/3/library/functions.html#int> = STRUCTURALLY_SYMMETRIC
            Constant STRUCTURALLY_SYMMETRIC of type int <https://docs.python.org/3/library/functions.html#int>

        STRUCTURE_ONLY: int <https://docs.python.org/3/library/functions.html#int> = STRUCTURE_ONLY
            Constant STRUCTURE_ONLY of type int <https://docs.python.org/3/library/functions.html#int>

        SUBMAT_SINGLEIS: int <https://docs.python.org/3/library/functions.html#int> = SUBMAT_SINGLEIS
            Constant SUBMAT_SINGLEIS of type int <https://docs.python.org/3/library/functions.html#int>

        SUBSET_OFF_PROC_ENTRIES: int <https://docs.python.org/3/library/functions.html#int> = SUBSET_OFF_PROC_ENTRIES
            Constant SUBSET_OFF_PROC_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>

        SYMMETRIC: int <https://docs.python.org/3/library/functions.html#int> = SYMMETRIC
            Constant SYMMETRIC of type int <https://docs.python.org/3/library/functions.html#int>

        SYMMETRY_ETERNAL: int <https://docs.python.org/3/library/functions.html#int> = SYMMETRY_ETERNAL
            Constant SYMMETRY_ETERNAL of type int <https://docs.python.org/3/library/functions.html#int>

        UNUSED_NONZERO_LOCATION_ERR: int <https://docs.python.org/3/library/functions.html#int> = UNUSED_NONZERO_LOCATION_ERR
            Constant UNUSED_NONZERO_LOCATION_ERR of type int <https://docs.python.org/3/library/functions.html#int>

        USE_HASH_TABLE: int <https://docs.python.org/3/library/functions.html#int> = USE_HASH_TABLE
            Constant USE_HASH_TABLE of type int <https://docs.python.org/3/library/functions.html#int>

        USE_INODES: int <https://docs.python.org/3/library/functions.html#int> = USE_INODES
            Constant USE_INODES of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Mat.OrderingType

    class petsc4py.PETSc.Mat.OrderingType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Factored matrix ordering type.

        See also:
            MatOrderingType <https://petsc.org/release/manualpages/Mat/MatOrderingType.html>

    Attributes Summary
    AMD | Object AMD of type str <https://docs.python.org/3/library/stdtypes.html#str>
    METISND | Object METISND of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NATURAL | Object NATURAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    ND | Object ND of type str <https://docs.python.org/3/library/stdtypes.html#str>
    OWD | Object OWD of type str <https://docs.python.org/3/library/stdtypes.html#str>
    QMD | Object QMD of type str <https://docs.python.org/3/library/stdtypes.html#str>
    RCM | Object RCM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    ROWLENGTH | Object ROWLENGTH of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SPECTRAL | Object SPECTRAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    WBM | Object WBM of type str <https://docs.python.org/3/library/stdtypes.html#str>

    Attributes Documentation

        AMD: str <https://docs.python.org/3/library/stdtypes.html#str> = AMD
            Object AMD of type str <https://docs.python.org/3/library/stdtypes.html#str>

        METISND: str <https://docs.python.org/3/library/stdtypes.html#str> = METISND
            Object METISND of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NATURAL: str <https://docs.python.org/3/library/stdtypes.html#str> = NATURAL
            Object NATURAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ND: str <https://docs.python.org/3/library/stdtypes.html#str> = ND
            Object ND of type str <https://docs.python.org/3/library/stdtypes.html#str>

        OWD: str <https://docs.python.org/3/library/stdtypes.html#str> = OWD
            Object OWD of type str <https://docs.python.org/3/library/stdtypes.html#str>

        QMD: str <https://docs.python.org/3/library/stdtypes.html#str> = QMD
            Object QMD of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RCM: str <https://docs.python.org/3/library/stdtypes.html#str> = RCM
            Object RCM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ROWLENGTH: str <https://docs.python.org/3/library/stdtypes.html#str> = ROWLENGTH
            Object ROWLENGTH of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SPECTRAL: str <https://docs.python.org/3/library/stdtypes.html#str> = SPECTRAL
            Object SPECTRAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        WBM: str <https://docs.python.org/3/library/stdtypes.html#str> = WBM
            Object WBM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Mat.SORType

    class petsc4py.PETSc.Mat.SORType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Matrix SOR type.

        See also:
            MatSORType <https://petsc.org/release/manualpages/Mat/MatSORType.html>

    Attributes Summary
    APPLY_LOWER | Constant APPLY_LOWER of type int <https://docs.python.org/3/library/functions.html#int>
    APPLY_UPPER | Constant APPLY_UPPER of type int <https://docs.python.org/3/library/functions.html#int>
    BACKWARD_SWEEP | Constant BACKWARD_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>
    EISENSTAT | Constant EISENSTAT of type int <https://docs.python.org/3/library/functions.html#int>
    FORWARD_SWEEP | Constant FORWARD_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>
    LOCAL_BACKWARD_SWEEP | Constant LOCAL_BACKWARD_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>
    LOCAL_FORWARD_SWEEP | Constant LOCAL_FORWARD_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>
    LOCAL_SYMMETRIC_SWEEP | Constant LOCAL_SYMMETRIC_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>
    SYMMETRY_SWEEP | Constant SYMMETRY_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>
    ZERO_INITIAL_GUESS | Constant ZERO_INITIAL_GUESS of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        APPLY_LOWER: int <https://docs.python.org/3/library/functions.html#int> = APPLY_LOWER
            Constant APPLY_LOWER of type int <https://docs.python.org/3/library/functions.html#int>

        APPLY_UPPER: int <https://docs.python.org/3/library/functions.html#int> = APPLY_UPPER
            Constant APPLY_UPPER of type int <https://docs.python.org/3/library/functions.html#int>

        BACKWARD_SWEEP: int <https://docs.python.org/3/library/functions.html#int> = BACKWARD_SWEEP
            Constant BACKWARD_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>

        EISENSTAT: int <https://docs.python.org/3/library/functions.html#int> = EISENSTAT
            Constant EISENSTAT of type int <https://docs.python.org/3/library/functions.html#int>

        FORWARD_SWEEP: int <https://docs.python.org/3/library/functions.html#int> = FORWARD_SWEEP
            Constant FORWARD_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>

        LOCAL_BACKWARD_SWEEP: int <https://docs.python.org/3/library/functions.html#int> = LOCAL_BACKWARD_SWEEP
            Constant LOCAL_BACKWARD_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>

        LOCAL_FORWARD_SWEEP: int <https://docs.python.org/3/library/functions.html#int> = LOCAL_FORWARD_SWEEP
            Constant LOCAL_FORWARD_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>

        LOCAL_SYMMETRIC_SWEEP: int <https://docs.python.org/3/library/functions.html#int> = LOCAL_SYMMETRIC_SWEEP
            Constant LOCAL_SYMMETRIC_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>

        SYMMETRY_SWEEP: int <https://docs.python.org/3/library/functions.html#int> = SYMMETRY_SWEEP
            Constant SYMMETRY_SWEEP of type int <https://docs.python.org/3/library/functions.html#int>

        ZERO_INITIAL_GUESS: int <https://docs.python.org/3/library/functions.html#int> = ZERO_INITIAL_GUESS
            Constant ZERO_INITIAL_GUESS of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Mat.SolverType

    class petsc4py.PETSc.Mat.SolverType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Factored matrix solver type.

        See also:
            MatSolverType <https://petsc.org/release/manualpages/Mat/MatSolverType.html>

    Attributes Summary
    BAS | Object BAS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CHOLMOD | Object CHOLMOD of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CUDA | Object CUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CUSPARSE | Object CUSPARSE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    ELEMENTAL | Object ELEMENTAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    ESSL | Object ESSL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    KLU | Object KLU of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LUSOL | Object LUSOL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MATLAB | Object MATLAB of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MKL_CPARDISO | Object MKL_CPARDISO of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MKL_PARDISO | Object MKL_PARDISO of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MUMPS | Object MUMPS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PASTIX | Object PASTIX of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PETSC | Object PETSC of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SCALAPACK | Object SCALAPACK of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SPQR | Object SPQR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    STRUMPACK | Object STRUMPACK of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SUPERLU | Object SUPERLU of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SUPERLU_DIST | Object SUPERLU_DIST of type str <https://docs.python.org/3/library/stdtypes.html#str>
    UMFPACK | Object UMFPACK of type str <https://docs.python.org/3/library/stdtypes.html#str>

    Attributes Documentation

        BAS: str <https://docs.python.org/3/library/stdtypes.html#str> = BAS
            Object BAS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CHOLMOD: str <https://docs.python.org/3/library/stdtypes.html#str> = CHOLMOD
            Object CHOLMOD of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CUDA: str <https://docs.python.org/3/library/stdtypes.html#str> = CUDA
            Object CUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CUSPARSE: str <https://docs.python.org/3/library/stdtypes.html#str> = CUSPARSE
            Object CUSPARSE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ELEMENTAL: str <https://docs.python.org/3/library/stdtypes.html#str> = ELEMENTAL
            Object ELEMENTAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ESSL: str <https://docs.python.org/3/library/stdtypes.html#str> = ESSL
            Object ESSL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        KLU: str <https://docs.python.org/3/library/stdtypes.html#str> = KLU
            Object KLU of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LUSOL: str <https://docs.python.org/3/library/stdtypes.html#str> = LUSOL
            Object LUSOL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MATLAB: str <https://docs.python.org/3/library/stdtypes.html#str> = MATLAB
            Object MATLAB of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MKL_CPARDISO: str <https://docs.python.org/3/library/stdtypes.html#str> = MKL_CPARDISO
            Object MKL_CPARDISO of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MKL_PARDISO: str <https://docs.python.org/3/library/stdtypes.html#str> = MKL_PARDISO
            Object MKL_PARDISO of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MUMPS: str <https://docs.python.org/3/library/stdtypes.html#str> = MUMPS
            Object MUMPS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PASTIX: str <https://docs.python.org/3/library/stdtypes.html#str> = PASTIX
            Object PASTIX of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PETSC: str <https://docs.python.org/3/library/stdtypes.html#str> = PETSC
            Object PETSC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SCALAPACK: str <https://docs.python.org/3/library/stdtypes.html#str> = SCALAPACK
            Object SCALAPACK of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SPQR: str <https://docs.python.org/3/library/stdtypes.html#str> = SPQR
            Object SPQR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        STRUMPACK: str <https://docs.python.org/3/library/stdtypes.html#str> = STRUMPACK
            Object STRUMPACK of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SUPERLU: str <https://docs.python.org/3/library/stdtypes.html#str> = SUPERLU
            Object SUPERLU of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SUPERLU_DIST: str <https://docs.python.org/3/library/stdtypes.html#str> = SUPERLU_DIST
            Object SUPERLU_DIST of type str <https://docs.python.org/3/library/stdtypes.html#str>

        UMFPACK: str <https://docs.python.org/3/library/stdtypes.html#str> = UMFPACK
            Object UMFPACK of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Mat.Stencil

    class petsc4py.PETSc.Mat.Stencil
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Associate structured grid coordinates with matrix indices.

        See also:
            MatStencil <https://petsc.org/release/manualpages/Mat/MatStencil.html>

    Attributes Summary
    c | Field component.
    field | Field component.
    i | First logical grid coordinate.
    index | Logical grid coordinates (i, j, k).
    j | Second logical grid coordinate.
    k | Third logical grid coordinate.

    Attributes Documentation

        c   Field component.

            Source code at petsc4py/PETSc/Mat.pyx:321 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L321>

        field
            Field component.

            Source code at petsc4py/PETSc/Mat.pyx:340 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L340>

        i   First logical grid coordinate.

            Source code at petsc4py/PETSc/Mat.pyx:297 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L297>

        index
            Logical grid coordinates (i, j, k).

            Source code at petsc4py/PETSc/Mat.pyx:329 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L329>

        j   Second logical grid coordinate.

            Source code at petsc4py/PETSc/Mat.pyx:305 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L305>

        k   Third logical grid coordinate.

            Source code at petsc4py/PETSc/Mat.pyx:313 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L313>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Mat.Structure

    class petsc4py.PETSc.Mat.Structure
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Matrix modification structure.

        See also:
            MatStructure <https://petsc.org/release/manualpages/Mat/MatStructure.html>

    Attributes Summary
    DIFFERENT | Constant DIFFERENT of type int <https://docs.python.org/3/library/functions.html#int>
    DIFFERENT_NONZERO_PATTERN | Constant DIFFERENT_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>
    DIFFERENT_NZ | Constant DIFFERENT_NZ of type int <https://docs.python.org/3/library/functions.html#int>
    SAME | Constant SAME of type int <https://docs.python.org/3/library/functions.html#int>
    SAME_NONZERO_PATTERN | Constant SAME_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>
    SAME_NZ | Constant SAME_NZ of type int <https://docs.python.org/3/library/functions.html#int>
    SUBSET | Constant SUBSET of type int <https://docs.python.org/3/library/functions.html#int>
    SUBSET_NONZERO_PATTERN | Constant SUBSET_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>
    SUBSET_NZ | Constant SUBSET_NZ of type int <https://docs.python.org/3/library/functions.html#int>
    UNKNOWN | Constant UNKNOWN of type int <https://docs.python.org/3/library/functions.html#int>
    UNKNOWN_NONZERO_PATTERN | Constant UNKNOWN_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>
    UNKNOWN_NZ | Constant UNKNOWN_NZ of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        DIFFERENT: int <https://docs.python.org/3/library/functions.html#int> = DIFFERENT
            Constant DIFFERENT of type int <https://docs.python.org/3/library/functions.html#int>

        DIFFERENT_NONZERO_PATTERN: int <https://docs.python.org/3/library/functions.html#int> = DIFFERENT_NONZERO_PATTERN
            Constant DIFFERENT_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>

        DIFFERENT_NZ: int <https://docs.python.org/3/library/functions.html#int> = DIFFERENT_NZ
            Constant DIFFERENT_NZ of type int <https://docs.python.org/3/library/functions.html#int>

        SAME: int <https://docs.python.org/3/library/functions.html#int> = SAME
            Constant SAME of type int <https://docs.python.org/3/library/functions.html#int>

        SAME_NONZERO_PATTERN: int <https://docs.python.org/3/library/functions.html#int> = SAME_NONZERO_PATTERN
            Constant SAME_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>

        SAME_NZ: int <https://docs.python.org/3/library/functions.html#int> = SAME_NZ
            Constant SAME_NZ of type int <https://docs.python.org/3/library/functions.html#int>

        SUBSET: int <https://docs.python.org/3/library/functions.html#int> = SUBSET
            Constant SUBSET of type int <https://docs.python.org/3/library/functions.html#int>

        SUBSET_NONZERO_PATTERN: int <https://docs.python.org/3/library/functions.html#int> = SUBSET_NONZERO_PATTERN
            Constant SUBSET_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>

        SUBSET_NZ: int <https://docs.python.org/3/library/functions.html#int> = SUBSET_NZ
            Constant SUBSET_NZ of type int <https://docs.python.org/3/library/functions.html#int>

        UNKNOWN: int <https://docs.python.org/3/library/functions.html#int> = UNKNOWN
            Constant UNKNOWN of type int <https://docs.python.org/3/library/functions.html#int>

        UNKNOWN_NONZERO_PATTERN: int <https://docs.python.org/3/library/functions.html#int> = UNKNOWN_NONZERO_PATTERN
            Constant UNKNOWN_NONZERO_PATTERN of type int <https://docs.python.org/3/library/functions.html#int>

        UNKNOWN_NZ: int <https://docs.python.org/3/library/functions.html#int> = UNKNOWN_NZ
            Constant UNKNOWN_NZ of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Mat.Type

    class petsc4py.PETSc.Mat.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Matrix type.

        See also:
            MatType <https://petsc.org/release/manualpages/Mat/MatType.html>

    Attributes Summary
    AIJ | Object AIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    AIJCRL | Object AIJCRL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    AIJCUSPARSE | Object AIJCUSPARSE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    AIJMKL | Object AIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    AIJPERM | Object AIJPERM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    AIJSELL | Object AIJSELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    AIJVIENNACL | Object AIJVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BAIJ | Object BAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BAIJMKL | Object BAIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BLOCKMAT | Object BLOCKMAT of type str <https://docs.python.org/3/library/stdtypes.html#str>
    COMPOSITE | Object COMPOSITE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CONSTANTDIAGONAL | Object CONSTANTDIAGONAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    DENSE | Object DENSE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    DENSECUDA | Object DENSECUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>
    DENSEHIP | Object DENSEHIP of type str <https://docs.python.org/3/library/stdtypes.html#str>
    DIAGONAL | Object DIAGONAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    DUMMY | Object DUMMY of type str <https://docs.python.org/3/library/stdtypes.html#str>
    ELEMENTAL | Object ELEMENTAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    FFT | Object FFT of type str <https://docs.python.org/3/library/stdtypes.html#str>
    FFTW | Object FFTW of type str <https://docs.python.org/3/library/stdtypes.html#str>
    H2OPUS | Object H2OPUS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    HERMITIANTRANSPOSE | Object HERMITIANTRANSPOSE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    HTOOL | Object HTOOL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    HYPRE | Object HYPRE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    HYPRESSTRUCT | Object HYPRESSTRUCT of type str <https://docs.python.org/3/library/stdtypes.html#str>
    HYPRESTRUCT | Object HYPRESTRUCT of type str <https://docs.python.org/3/library/stdtypes.html#str>
    IS | Object IS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    KAIJ | Object KAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVM | Object LMVM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVMBADBROYDEN | Object LMVMBADBROYDEN of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVMBFGS | Object LMVMBFGS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVMBROYDEN | Object LMVMBROYDEN of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVMDBFGS | Object LMVMDBFGS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVMDDFP | Object LMVMDDFP of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVMDFP | Object LMVMDFP of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVMDIAGBBROYDEN | Object LMVMDIAGBBROYDEN of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVMDQN | Object LMVMDQN of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVMSR1 | Object LMVMSR1 of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVMSYMBADBROYDEN | Object LMVMSYMBADBROYDEN of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVMSYMBROYDEN | Object LMVMSYMBROYDEN of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LOCALREF | Object LOCALREF of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LRC | Object LRC of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MAIJ | Object MAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MFFD | Object MFFD of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIADJ | Object MPIADJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIAIJ | Object MPIAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIAIJCRL | Object MPIAIJCRL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIAIJCUSPARSE | Object MPIAIJCUSPARSE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIAIJMKL | Object MPIAIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIAIJPERM | Object MPIAIJPERM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIAIJSELL | Object MPIAIJSELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIAIJVIENNACL | Object MPIAIJVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIBAIJ | Object MPIBAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIBAIJMKL | Object MPIBAIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIDENSE | Object MPIDENSE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIDENSECUDA | Object MPIDENSECUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIDENSEHIP | Object MPIDENSEHIP of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIKAIJ | Object MPIKAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPIMAIJ | Object MPIMAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPISBAIJ | Object MPISBAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MPISELL | Object MPISELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NEST | Object NEST of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NORMAL | Object NORMAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NORMALHERMITIAN | Object NORMALHERMITIAN of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PREALLOCATOR | Object PREALLOCATOR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PYTHON | Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SAME | Object SAME of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SBAIJ | Object SBAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SCATTER | Object SCATTER of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SCHURCOMPLEMENT | Object SCHURCOMPLEMENT of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SELL | Object SELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQAIJ | Object SEQAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQAIJCRL | Object SEQAIJCRL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQAIJCUSPARSE | Object SEQAIJCUSPARSE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQAIJMKL | Object SEQAIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQAIJPERM | Object SEQAIJPERM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQAIJSELL | Object SEQAIJSELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQAIJVIENNACL | Object SEQAIJVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQBAIJ | Object SEQBAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQBAIJMKL | Object SEQBAIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQCUFFT | Object SEQCUFFT of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQDENSE | Object SEQDENSE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQDENSECUDA | Object SEQDENSECUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQDENSEHIP | Object SEQDENSEHIP of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQKAIJ | Object SEQKAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQMAIJ | Object SEQMAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQSBAIJ | Object SEQSBAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SEQSELL | Object SEQSELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SHELL | Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SUBMATRIX | Object SUBMATRIX of type str <https://docs.python.org/3/library/stdtypes.html#str>
    TRANSPOSE | Object TRANSPOSE of type str <https://docs.python.org/3/library/stdtypes.html#str>

    Attributes Documentation

        AIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = AIJ
            Object AIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        AIJCRL: str <https://docs.python.org/3/library/stdtypes.html#str> = AIJCRL
            Object AIJCRL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        AIJCUSPARSE: str <https://docs.python.org/3/library/stdtypes.html#str> = AIJCUSPARSE
            Object AIJCUSPARSE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        AIJMKL: str <https://docs.python.org/3/library/stdtypes.html#str> = AIJMKL
            Object AIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        AIJPERM: str <https://docs.python.org/3/library/stdtypes.html#str> = AIJPERM
            Object AIJPERM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        AIJSELL: str <https://docs.python.org/3/library/stdtypes.html#str> = AIJSELL
            Object AIJSELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        AIJVIENNACL: str <https://docs.python.org/3/library/stdtypes.html#str> = AIJVIENNACL
            Object AIJVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = BAIJ
            Object BAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BAIJMKL: str <https://docs.python.org/3/library/stdtypes.html#str> = BAIJMKL
            Object BAIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BLOCKMAT: str <https://docs.python.org/3/library/stdtypes.html#str> = BLOCKMAT
            Object BLOCKMAT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        COMPOSITE: str <https://docs.python.org/3/library/stdtypes.html#str> = COMPOSITE
            Object COMPOSITE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CONSTANTDIAGONAL: str <https://docs.python.org/3/library/stdtypes.html#str> = CONSTANTDIAGONAL
            Object CONSTANTDIAGONAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DENSE: str <https://docs.python.org/3/library/stdtypes.html#str> = DENSE
            Object DENSE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DENSECUDA: str <https://docs.python.org/3/library/stdtypes.html#str> = DENSECUDA
            Object DENSECUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DENSEHIP: str <https://docs.python.org/3/library/stdtypes.html#str> = DENSEHIP
            Object DENSEHIP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIAGONAL: str <https://docs.python.org/3/library/stdtypes.html#str> = DIAGONAL
            Object DIAGONAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DUMMY: str <https://docs.python.org/3/library/stdtypes.html#str> = DUMMY
            Object DUMMY of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ELEMENTAL: str <https://docs.python.org/3/library/stdtypes.html#str> = ELEMENTAL
            Object ELEMENTAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        FFT: str <https://docs.python.org/3/library/stdtypes.html#str> = FFT
            Object FFT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        FFTW: str <https://docs.python.org/3/library/stdtypes.html#str> = FFTW
            Object FFTW of type str <https://docs.python.org/3/library/stdtypes.html#str>

        H2OPUS: str <https://docs.python.org/3/library/stdtypes.html#str> = H2OPUS
            Object H2OPUS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HERMITIANTRANSPOSE: str <https://docs.python.org/3/library/stdtypes.html#str> = HERMITIANTRANSPOSE
            Object HERMITIANTRANSPOSE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HTOOL: str <https://docs.python.org/3/library/stdtypes.html#str> = HTOOL
            Object HTOOL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HYPRE: str <https://docs.python.org/3/library/stdtypes.html#str> = HYPRE
            Object HYPRE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HYPRESSTRUCT: str <https://docs.python.org/3/library/stdtypes.html#str> = HYPRESSTRUCT
            Object HYPRESSTRUCT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HYPRESTRUCT: str <https://docs.python.org/3/library/stdtypes.html#str> = HYPRESTRUCT
            Object HYPRESTRUCT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        IS: str <https://docs.python.org/3/library/stdtypes.html#str> = IS
            Object IS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        KAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = KAIJ
            Object KAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVM: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVM
            Object LMVM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVMBADBROYDEN: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVMBADBROYDEN
            Object LMVMBADBROYDEN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVMBFGS: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVMBFGS
            Object LMVMBFGS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVMBROYDEN: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVMBROYDEN
            Object LMVMBROYDEN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVMDBFGS: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVMDBFGS
            Object LMVMDBFGS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVMDDFP: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVMDDFP
            Object LMVMDDFP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVMDFP: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVMDFP
            Object LMVMDFP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVMDIAGBBROYDEN: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVMDIAGBBROYDEN
            Object LMVMDIAGBBROYDEN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVMDQN: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVMDQN
            Object LMVMDQN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVMSR1: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVMSR1
            Object LMVMSR1 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVMSYMBADBROYDEN: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVMSYMBADBROYDEN
            Object LMVMSYMBADBROYDEN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVMSYMBROYDEN: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVMSYMBROYDEN
            Object LMVMSYMBROYDEN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LOCALREF: str <https://docs.python.org/3/library/stdtypes.html#str> = LOCALREF
            Object LOCALREF of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LRC: str <https://docs.python.org/3/library/stdtypes.html#str> = LRC
            Object LRC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = MAIJ
            Object MAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MFFD: str <https://docs.python.org/3/library/stdtypes.html#str> = MFFD
            Object MFFD of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIADJ: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIADJ
            Object MPIADJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIAIJ
            Object MPIAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIAIJCRL: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIAIJCRL
            Object MPIAIJCRL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIAIJCUSPARSE: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIAIJCUSPARSE
            Object MPIAIJCUSPARSE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIAIJMKL: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIAIJMKL
            Object MPIAIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIAIJPERM: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIAIJPERM
            Object MPIAIJPERM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIAIJSELL: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIAIJSELL
            Object MPIAIJSELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIAIJVIENNACL: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIAIJVIENNACL
            Object MPIAIJVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIBAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIBAIJ
            Object MPIBAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIBAIJMKL: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIBAIJMKL
            Object MPIBAIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIDENSE: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIDENSE
            Object MPIDENSE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIDENSECUDA: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIDENSECUDA
            Object MPIDENSECUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIDENSEHIP: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIDENSEHIP
            Object MPIDENSEHIP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIKAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIKAIJ
            Object MPIKAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIMAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIMAIJ
            Object MPIMAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPISBAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = MPISBAIJ
            Object MPISBAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPISELL: str <https://docs.python.org/3/library/stdtypes.html#str> = MPISELL
            Object MPISELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NEST: str <https://docs.python.org/3/library/stdtypes.html#str> = NEST
            Object NEST of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NORMAL: str <https://docs.python.org/3/library/stdtypes.html#str> = NORMAL
            Object NORMAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NORMALHERMITIAN: str <https://docs.python.org/3/library/stdtypes.html#str> = NORMALHERMITIAN
            Object NORMALHERMITIAN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PREALLOCATOR: str <https://docs.python.org/3/library/stdtypes.html#str> = PREALLOCATOR
            Object PREALLOCATOR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PYTHON: str <https://docs.python.org/3/library/stdtypes.html#str> = PYTHON
            Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SAME: str <https://docs.python.org/3/library/stdtypes.html#str> = SAME
            Object SAME of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SBAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = SBAIJ
            Object SBAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SCATTER: str <https://docs.python.org/3/library/stdtypes.html#str> = SCATTER
            Object SCATTER of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SCHURCOMPLEMENT: str <https://docs.python.org/3/library/stdtypes.html#str> = SCHURCOMPLEMENT
            Object SCHURCOMPLEMENT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SELL: str <https://docs.python.org/3/library/stdtypes.html#str> = SELL
            Object SELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQAIJ
            Object SEQAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQAIJCRL: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQAIJCRL
            Object SEQAIJCRL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQAIJCUSPARSE: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQAIJCUSPARSE
            Object SEQAIJCUSPARSE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQAIJMKL: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQAIJMKL
            Object SEQAIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQAIJPERM: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQAIJPERM
            Object SEQAIJPERM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQAIJSELL: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQAIJSELL
            Object SEQAIJSELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQAIJVIENNACL: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQAIJVIENNACL
            Object SEQAIJVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQBAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQBAIJ
            Object SEQBAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQBAIJMKL: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQBAIJMKL
            Object SEQBAIJMKL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQCUFFT: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQCUFFT
            Object SEQCUFFT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQDENSE: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQDENSE
            Object SEQDENSE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQDENSECUDA: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQDENSECUDA
            Object SEQDENSECUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQDENSEHIP: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQDENSEHIP
            Object SEQDENSEHIP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQKAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQKAIJ
            Object SEQKAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQMAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQMAIJ
            Object SEQMAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQSBAIJ: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQSBAIJ
            Object SEQSBAIJ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQSELL: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQSELL
            Object SEQSELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SHELL: str <https://docs.python.org/3/library/stdtypes.html#str> = SHELL
            Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SUBMATRIX: str <https://docs.python.org/3/library/stdtypes.html#str> = SUBMATRIX
            Object SUBMATRIX of type str <https://docs.python.org/3/library/stdtypes.html#str>

        TRANSPOSE: str <https://docs.python.org/3/library/stdtypes.html#str> = TRANSPOSE
            Object TRANSPOSE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
H2OpusCompress(tol) | Compress a hierarchical matrix.
H2OpusLowRankUpdate(U[, V, s]) | Perform a low-rank update of the form self += sUVᵀ.
H2OpusOrthogonalize() | Orthogonalize the basis tree of a hierarchical matrix.
HtoolGetPermutationSource() | Get the permutation of source (column) indices computed by Htool.
HtoolGetPermutationTarget() | Get the permutation of target (row) indices computed by Htool.
HtoolUsePermutation(use) | Set whether to use the permutation computed by Htool.
HtoolUseRecompression(use) | Set whether to recompress the matrix after assembly.
SOR(b, x[, omega, sortype, shift, its, lits]) | Compute relaxation (SOR, Gauss-Seidel) sweeps.
allocateLMVM(x, f) | Allocate all necessary common memory LMVM matrix.
appendOptionsPrefix([prefix]) | Append to the prefix used for searching for options in the database.
assemble([assembly]) | Assemble the matrix.
assemblyBegin([assembly]) | Begin an assembling stage of the matrix.
assemblyEnd([assembly]) | Complete an assembling stage of the matrix initiated with assemblyBegin.
axpy(alpha, X[, structure]) | Perform the matrix summation self + = ɑ·X.
aypx(alpha, X[, structure]) | Perform the matrix summation self = ɑ·self + X.
bindToCPU(flg) | Mark a matrix to temporarily stay on the CPU.
boundToCPU() | Query if a matrix is bound to the CPU.
chop(tol) | Set entries smallest of tol (in absolute values) to zero.
conjugate([out]) | Return the conjugate matrix.
convert([mat_type, out]) | Convert the matrix type.
copy([result, structure]) | Return a copy of the matrix.
create([comm]) | Create the matrix.
createAIJ(size[, bsize, nnz, csr, comm]) | Create a sparse Type.AIJ <#petsc4py.PETSc.Mat.Type.AIJ> matrix, optionally preallocating.
createAIJCRL(size[, bsize, nnz, csr, comm]) | Create a sparse Type.AIJCRL <#petsc4py.PETSc.Mat.Type.AIJCRL> matrix.
createAIJWithArrays(size, csr[, bsize, comm]) | Create a sparse Type.AIJ <#petsc4py.PETSc.Mat.Type.AIJ> matrix with data in CSR format.
createBAIJ(size, bsize[, nnz, csr, comm]) | Create a sparse blocked Type.BAIJ <#petsc4py.PETSc.Mat.Type.BAIJ> matrix, optionally preallocating.
createConstantDiagonal(size, diag[, comm]) | Create a diagonal matrix of type Type.CONSTANTDIAGONAL <#petsc4py.PETSc.Mat.Type.CONSTANTDIAGONAL>.
createDense(size[, bsize, array, comm]) | Create a Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE> matrix.
createDenseCUDA(size[, bsize, array, ...]) | Create a Type.DENSECUDA <#petsc4py.PETSc.Mat.Type.DENSECUDA> matrix with optional host and device data.
createDiagonal(diag) | Create a diagonal matrix of type Type.DIAGONAL <#petsc4py.PETSc.Mat.Type.DIAGONAL>.
createH2OpusFromMat(A[, coordinates, dist, ...]) | Create a hierarchical Type.H2OPUS <#petsc4py.PETSc.Mat.Type.H2OPUS> matrix sampling from a provided operator.
createHermitianTranspose(mat) | Create a Type.HERMITIANTRANSPOSE <#petsc4py.PETSc.Mat.Type.HERMITIANTRANSPOSE> matrix that behaves like (A*)ᵀ.
createHtoolFromKernel(size, spacedim, ...[, ...]) | Create a Type.HTOOL <#petsc4py.PETSc.Mat.Type.HTOOL> matrix using a kernel function defined in Python.
createIS(size[, bsize, lgmapr, lgmapc, comm]) | Create a Type.IS <#petsc4py.PETSc.Mat.Type.IS> matrix representing globally unassembled operators.
createLRC(A, U, c, V) | Create a low-rank correction Type.LRC <#petsc4py.PETSc.Mat.Type.LRC> matrix representing A + UCVᵀ.
createNest(mats[, isrows, iscols, comm]) | Create a Type.NEST <#petsc4py.PETSc.Mat.Type.NEST> matrix containing multiple submatrices.
createNormal(mat) | Create a Type.NORMAL <#petsc4py.PETSc.Mat.Type.NORMAL> matrix representing AᵀA.
createNormalHermitian(mat) | Create a Type.NORMALHERMITIAN <#petsc4py.PETSc.Mat.Type.NORMALHERMITIAN> matrix representing (A*)ᵀA.
createPython(size[, context, comm]) | Create a Type.PYTHON <#petsc4py.PETSc.Mat.Type.PYTHON> matrix.
createSBAIJ(size, bsize[, nnz, csr, comm]) | Create a sparse Type.SBAIJ <#petsc4py.PETSc.Mat.Type.SBAIJ> matrix in symmetric block format.
createScatter(scatter[, comm]) | Create a Type.SCATTER <#petsc4py.PETSc.Mat.Type.SCATTER> matrix from a vector scatter.
createSchurComplement(A00, Ap00, A01, A10[, A11]) | Create a Type.SCHURCOMPLEMENT <#petsc4py.PETSc.Mat.Type.SCHURCOMPLEMENT> matrix.
createSubMatrices(isrows[, iscols, submats]) | Return several sequential submatrices.
createSubMatrix(isrow[, iscol, submat]) | Return a submatrix.
createSubMatrixVirtual(A, isrow[, iscol]) | Create a Type.SUBMATRIX <#petsc4py.PETSc.Mat.Type.SUBMATRIX> matrix that acts as a submatrix.
createTranspose(mat) | Create a Type.TRANSPOSE <#petsc4py.PETSc.Mat.Type.TRANSPOSE> matrix that behaves like Aᵀ.
createVecLeft() | Return a left vector, a vector that the matrix vector product can be stored in.
createVecRight() | Return a right vector, a vector that the matrix can be multiplied against.
createVecs([side]) | Return vectors that can be used in matrix vector products.
destroy() | Destroy the matrix.
diagonalScale([L, R]) | Perform left and/or right diagonal scaling of the matrix.
duplicate([copy]) | Return a clone of the matrix.
equal(mat) | Return the result of matrix comparison.
factorCholesky(isperm[, options]) | Perform an in-place Cholesky factorization.
factorICC(isperm[, options]) | Perform an in-place an incomplete Cholesky factorization.
factorILU(isrow, iscol[, options]) | Perform an in-place ILU factorization.
factorLU(isrow, iscol[, options]) | Perform an in-place LU factorization.
factorNumericCholesky(mat[, options]) | Not implemented.
factorNumericLU(mat[, options]) | Not implemented.
factorSymbolicCholesky(isperm[, options]) | Not implemented.
factorSymbolicICC(isperm[, options]) | Not implemented.
factorSymbolicILU(isrow, iscol[, options]) | Not implemented.
factorSymbolicLU(mat, isrow, iscol[, options]) | Not implemented.
findZeroRows() | Return the index set of empty rows.
fixISLocalEmpty([fix]) | Compress out zero local rows from the local matrices.
getBlockSize() | Return the matrix block size.
getBlockSizes() | Return the row and column block sizes.
getColumnIJ([symmetric, compressed]) | Return the CSC representation of the local sparsity pattern.
getColumnVector(column[, result]) | Return the columnᵗʰ column vector of the matrix.
getDM() | Return the DM defining the data layout of the matrix.
getDenseArray([readonly]) | Return the array where the data is stored.
getDenseColumnVec(i[, mode]) | Return the iᵗʰ column vector of the dense matrix.
getDenseLDA() | Return the leading dimension of the array used by the dense matrix.
getDenseLocalMatrix() | Return the local part of the dense matrix.
getDenseSubMatrix([rbegin, rend, cbegin, cend]) | Get access to a submatrix of a Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE> matrix.
getDiagonal([result]) | Return the diagonal of the matrix.
getDiagonalBlock() | Return the part of the matrix associated with the on-process coupling.
getISAllowRepeated() | Get the flag for repeated entries in the local to global map.
getISLocalMat() | Return the local matrix stored inside a Type.IS <#petsc4py.PETSc.Mat.Type.IS> matrix.
getInertia() | Return the inertia from a factored matrix.
getInfo([info]) | Return summary information.
getLGMap() | Return the local-to-global mappings.
getLMVMJ0() | Get the initial Jacobian of the LMVM matrix.
getLMVMJ0KSP() | Get the KSP of the LMVM matrix.
getLRCMats() | Return the constituents of a Type.LRC <#petsc4py.PETSc.Mat.Type.LRC> matrix.
getLocalSize() | Return the local number of rows and columns.
getLocalSubMatrix(isrow, iscol[, submat]) | Return a reference to a submatrix specified in local numbering.
getMumpsCntl(icntl) | Return the MUMPS parameter, CNTL[icntl].
getMumpsIcntl(icntl) | Return the MUMPS parameter, ICNTL[icntl].
getMumpsInfo(icntl) | Return the MUMPS parameter, INFO[icntl].
getMumpsInfog(icntl) | Return the MUMPS parameter, INFOG[icntl].
getMumpsRinfo(icntl) | Return the MUMPS parameter, RINFO[icntl].
getMumpsRinfog(icntl) | Return the MUMPS parameter, RINFOG[icntl].
getNearNullSpace() | Return the near-nullspace.
getNestISs() | Return the index sets representing the row and column spaces.
getNestLocalISs() | Return the local index sets representing the row and column spaces.
getNestSize() | Return the number of rows and columns of the matrix.
getNestSubMatrix(i, j) | Return a single submatrix.
getNullSpace() | Return the nullspace.
getOption(option) | Return the option value.
getOptionsPrefix() | Return the prefix used for searching for options in the database.
getOrdering(ord_type) | Return a reordering for a matrix to improve a LU factorization.
getOwnershipIS() | Return the ranges of rows and columns owned by each process as index sets.
getOwnershipRange() | Return the locally owned range of rows.
getOwnershipRangeColumn() | Return the locally owned range of columns.
getOwnershipRanges() | Return the range of rows owned by each process.
getOwnershipRangesColumn() | Return the range of columns owned by each process.
getPythonContext() | Return the instance of the class implementing the required Python methods.
getPythonType() | Return the fully qualified Python name of the class used by the matrix.
getRedundantMatrix(nsubcomm[, subcomm, out]) | Return redundant matrices on subcommunicators.
getRow(row) | Return the column indices and values for the requested row.
getRowIJ([symmetric, compressed]) | Return the CSR representation of the local sparsity pattern.
getRowSum([result]) | Return the row-sum vector.
getSchurComplementSubMatrices() | Return Schur complement sub-matrices.
getSize() | Return the global number of rows and columns.
getSizes() | Return the tuple of matrix layouts.
getTransposeMat() | Return the internal matrix of a Type.TRANSPOSE <#petsc4py.PETSc.Mat.Type.TRANSPOSE> matrix.
getTransposeNullSpace() | Return the transpose nullspace.
getType() | Return the type of the matrix.
getValue(row, col) | Return the value in the (row, col) position.
getValues(rows, cols[, values]) | Return the values in the zip(rows, cols) positions.
getValuesCSR() | Return the CSR representation of the local part of the matrix.
getVecType() | Return the vector type used by the matrix.
hermitianTranspose([out]) | Return the transposed Hermitian matrix.
imagPart([out]) | Return the imaginary part of the matrix.
increaseOverlap(iset[, overlap]) | Increase the overlap of a index set.
invertBlockDiagonal() | Return the inverse of the block-diagonal entries.
isAssembled() | The boolean flag indicating if the matrix is assembled.
isHermitian([tol]) | Return the boolean indicating if the matrix is Hermitian.
isHermitianKnown() | Return the 2-tuple indicating if the matrix is known to be Hermitian.
isLinear([n]) | Return whether the Mat is a linear operator.
isStructurallySymmetric() | Return the boolean indicating if the matrix is structurally symmetric.
isSymmetric([tol]) | Return the boolean indicating if the matrix is symmetric.
isSymmetricKnown() | Return the 2-tuple indicating if the matrix is known to be symmetric.
isTranspose([mat, tol]) | Return the result of matrix comparison with transposition.
kron(mat[, result]) | Compute C, the Kronecker product of A and B.
load(viewer) | Load a matrix.
matMatMult(B, C[, result, fill]) | Perform matrix-matrix-matrix multiplication D=ABC.
matMult(mat[, result, fill]) | Perform matrix-matrix multiplication C=AB.
matSolve(B, X) | Solve AX=B, given a factored matrix A.
matTransposeMult(mat[, result, fill]) | Perform matrix-matrix multiplication C=ABᵀ.
mult(x, y) | Perform the matrix vector product y = A @ x.
multAdd(x, v, y) | Perform the matrix vector product with addition y = A @ x + v.
multHermitian(x, y) | Perform the Hermitian matrix vector product y = A^H @ x.
multHermitianAdd(x, v, y) | Perform the Hermitian matrix vector product with addition y = A^H @ x + v.
multTranspose(x, y) | Perform the transposed matrix vector product y = A^T @ x.
multTransposeAdd(x, v, y) | Perform the transposed matrix vector product with addition y = A^T @ x + v.
norm([norm_type]) | Compute the requested matrix norm.
permute(row, col) | Return the permuted matrix.
preallocatorPreallocate(A[, fill]) | Preallocate memory for a matrix using a preallocator matrix.
ptap(P[, result, fill]) | Creates the matrix product C = PᵀAP.
rart(R[, result, fill]) | Create the matrix product C = RARᵀ.
realPart([out]) | Return the real part of the matrix.
reorderForNonzeroDiagonal(isrow, iscol[, atol]) | Change a matrix ordering to remove zeros from the diagonal.
resetLMVM([destructive]) | Flushes all of the accumulated updates out of the LMVM matrix.
restoreDenseColumnVec(i[, mode, V]) | Restore the iᵗʰ column vector of the dense matrix.
restoreDenseSubMatrix(mat) | Restore access to a submatrix of a Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE> matrix.
restoreISLocalMat(local) | Restore the local matrix obtained with getISLocalMat.
restoreLocalSubMatrix(isrow, iscol, submat) | Restore a reference to a submatrix obtained with getLocalSubMatrix.
retrieveValues() | Retrieve a copy of the matrix values previously stored with storeValues.
scale(alpha) | Scale the matrix.
setBlockSize(bsize) | Set the matrix block size (same for rows and columns).
setBlockSizes(row_bsize, col_bsize) | Set the row and column block sizes.
setDM(dm) | Set the DM defining the data layout of the matrix.
setDenseLDA(lda) | Set the leading dimension of the array used by the dense matrix.
setDiagonal(diag[, addv]) | Set the diagonal values of the matrix.
setFromOptions() | Configure the matrix from the options database.
setISAllowRepeated([allow]) | Allow repeated entries in the local to global map.
setISLocalMat(local) | Set the local matrix stored inside a Type.IS <#petsc4py.PETSc.Mat.Type.IS>.
setISPreallocation(nnz, onnz) | Preallocate memory for a Type.IS <#petsc4py.PETSc.Mat.Type.IS> parallel matrix.
setLGMap(rmap[, cmap]) | Set the local-to-global mappings.
setLMVMJ0(J0) | Set the initial Jacobian of the LMVM matrix.
setLMVMJ0KSP(ksp) | Set the KSP of the LMVM matrix.
setLRCMats(A, U[, c, V]) | Set the constituents of a Type.LRC <#petsc4py.PETSc.Mat.Type.LRC> matrix.
setMumpsCntl(icntl, val) | Set a MUMPS parameter, CNTL[icntl] = val.
setMumpsIcntl(icntl, ival) | Set a MUMPS parameter, ICNTL[icntl] = ival.
setNearNullSpace(nsp) | Set the near-nullspace.
setNestVecType(vec_type) | Set the vector type for a Type.NEST <#petsc4py.PETSc.Mat.Type.NEST> matrix.
setNullSpace(nsp) | Set the nullspace.
setOption(option, flag) | Set option.
setOptionsPrefix([prefix]) | Set the prefix used for searching for options in the database.
setPreallocationCOO(coo_i, coo_j) | Set preallocation using coordinate format with global indices.
setPreallocationCOOLocal(coo_i, coo_j) | Set preallocation using coordinate format with local indices.
setPreallocationCSR(csr) | Preallocate memory for the matrix with a CSR layout.
setPreallocationDense(array) | Set the array used for storing matrix elements for a dense matrix.
setPreallocationNNZ(nnz) | Preallocate memory for the matrix with a non-zero pattern.
setPythonContext(context) | Set the instance of the class implementing the required Python methods.
setPythonType(py_type) | Set the fully qualified Python name of the class to be used.
setRandom([random]) | Set random values in the matrix.
setSizes(size[, bsize]) | Set the local, global and block sizes.
setStencil(dims[, starts, dof]) | Set matrix stencil.
setTransposeNullSpace(nsp) | Set the transpose nullspace.
setTransposePrecursor(out) | Set transpose precursor.
setType(mat_type) | Set the matrix type.
setUnfactored() | Set a factored matrix to be treated as unfactored.
setUp() | Set up the internal data structures for using the matrix.
setValue(row, col, value[, addv]) | Set a value to the (row, col) entry of the matrix.
setValueBlockedStagStencil(row, col, value) | Not implemented.
setValueBlockedStencil(row, col, value[, addv]) | Set a block of values to row and col stencil.
setValueLocal(row, col, value[, addv]) | Set a value to the (row, col) entry of the matrix in local ordering.
setValueStagStencil(row, col, value[, addv]) | Not implemented.
setValueStencil(row, col, value[, addv]) | Set a value to row and col stencil.
setValues(rows, cols, values[, addv]) | Set values to the rows ⊗ cols entries of the matrix.
setValuesBlocked(rows, cols, values[, addv]) | Set values to the rows ⊗ col block entries of the matrix.
setValuesBlockedCSR(I, J, V[, addv]) | Set values stored in block CSR format.
setValuesBlockedIJV(I, J, V[, addv, rowmap]) | Set a subset of values stored in block CSR format.
setValuesBlockedLocal(rows, cols, values[, addv]) | Set values to the rows ⊗ col block entries of the matrix in local ordering.
setValuesBlockedLocalCSR(I, J, V[, addv]) | Set values stored in block CSR format.
setValuesBlockedLocalIJV(I, J, V[, addv, rowmap]) | Set a subset of values stored in block CSR format.
setValuesBlockedLocalRCV(R, C, V[, addv]) | Undocumented.
setValuesBlockedRCV(R, C, V[, addv]) | Undocumented.
setValuesCOO(coo_v[, addv]) | Set values after preallocation with coordinate format.
setValuesCSR(I, J, V[, addv]) | Set values stored in CSR format.
setValuesIJV(I, J, V[, addv, rowmap]) | Set a subset of values stored in CSR format.
setValuesLocal(rows, cols, values[, addv]) | Set values to the rows ⊗ col entries of the matrix in local ordering.
setValuesLocalCSR(I, J, V[, addv]) | Set values stored in CSR format.
setValuesLocalIJV(I, J, V[, addv, rowmap]) | Set a subset of values stored in CSR format.
setValuesLocalRCV(R, C, V[, addv]) | Undocumented.
setValuesRCV(R, C, V[, addv]) | Undocumented.
setVariableBlockSizes(blocks) | Set diagonal point-blocks of the matrix.
setVecType(vec_type) | Set the vector type.
shift(alpha) | Shift the matrix.
solve(b, x) | Solve Ax=b, given a factored matrix.
solveAdd(b, y, x) | Solve x=y+A⁻¹b, given a factored matrix.
solveBackward(b, x) | Solve Ux=b, given a factored matrix A=LU.
solveForward(b, x) | Solve Lx = b, given a factored matrix A = LU.
solveTranspose(b, x) | Solve Aᵀx=b, given a factored matrix.
solveTransposeAdd(b, y, x) | Solve x=y+A⁻ᵀb, given a factored matrix.
storeValues() | Stash a copy of the matrix values.
toDLPack([mode]) | Return a DLPack PyCapsule <https://docs.python.org/3/c-api/capsule.html#c.PyCapsule> wrapping the vector data.
transpose([out]) | Return the transposed matrix.
transposeMatMult(mat[, result, fill]) | Perform matrix-matrix multiplication C=AᵀB.
updateLMVM(x, f) | Adds (X-Xprev) and (F-Fprev) updates to LMVM matrix.
view([viewer]) | View the matrix.
zeroEntries() | Zero the entries of the matrix.
zeroRows(rows[, diag, x, b]) | Zero selected rows of the matrix.
zeroRowsColumns(rows[, diag, x, b]) | Zero selected rows and columns of the matrix.
zeroRowsColumnsLocal(rows[, diag, x, b]) | Zero selected rows and columns of the matrix in local ordering.
zeroRowsColumnsStencil(rows[, diag, x, b]) | Zero selected rows and columns of the matrix.
zeroRowsLocal(rows[, diag, x, b]) | Zero selected rows of the matrix in local ordering.

Attributes Summary
assembled | The boolean flag indicating if the matrix is assembled.
block_size | Matrix block size.
block_sizes | Matrix row and column block sizes.
hermitian | The boolean flag indicating if the matrix is Hermitian.
local_size | Matrix local size.
owner_range | Matrix local row range.
owner_ranges | Matrix row ranges.
size | Matrix global size.
sizes | Matrix local and global sizes.
structsymm | The boolean flag indicating if the matrix is structurally symmetric.
symmetric | The boolean flag indicating if the matrix is symmetric.

Methods Documentation

    H2OpusCompress(tol)
        Compress a hierarchical matrix.

        Collective.

        Parameters
            tol (float <https://docs.python.org/3/library/functions.html#float>) -- The absolute truncation threshold.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            MatH2OpusCompress <https://petsc.org/release/manualpages/Mat/MatH2OpusCompress.html>

    Source code at petsc4py/PETSc/Mat.pyx:5239 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5239>

    H2OpusLowRankUpdate(U, V=None, s=1.0)
        Perform a low-rank update of the form self += sUVᵀ.

        Collective.

        Parameters

            •   U (Mat <#petsc4py.PETSc.Mat>) -- The dense low-rank update matrix.

            •   V (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The dense low-rank update matrix. If None <https://docs.python.org/3/library/constants.html#None>, V = U.

            •   s (float <https://docs.python.org/3/library/functions.html#float>) -- The scaling factor.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            MatH2OpusLowRankUpdate <https://petsc.org/release/manualpages/Mat/MatH2OpusLowRankUpdate.html>

    Source code at petsc4py/PETSc/Mat.pyx:5258 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5258>

    H2OpusOrthogonalize()
        Orthogonalize the basis tree of a hierarchical matrix.

        Collective.

        See also:
            MatH2OpusOrthogonalize <https://petsc.org/release/manualpages/Mat/MatH2OpusOrthogonalize.html>

    Source code at petsc4py/PETSc/Mat.pyx:5226 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5226>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    HtoolGetPermutationSource()
        Get the permutation of source (column) indices computed by Htool.

        Not collective.

        Returns
            The permutation index set for source indices.

        Return type
            IS <#petsc4py.PETSc.IS>

    See also:
            HtoolGetPermutationTarget, MatHtoolGetPermutationSource <https://petsc.org/release/manualpages/Mat/MatHtoolGetPermutationSource.html>

    Source code at petsc4py/PETSc/Mat.pyx:5286 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5286>

    HtoolGetPermutationTarget()
        Get the permutation of target (row) indices computed by Htool.

        Not collective.

        Returns
            The permutation index set for target indices.

        Return type
            IS <#petsc4py.PETSc.IS>

    See also:
            HtoolGetPermutationSource, MatHtoolGetPermutationTarget <https://petsc.org/release/manualpages/Mat/MatHtoolGetPermutationTarget.html>

    Source code at petsc4py/PETSc/Mat.pyx:5305 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5305>

    HtoolUsePermutation(use)
        Set whether to use the permutation computed by Htool.

        Logically collective.

        Parameters
            use (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether to use the permutation.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            MatHtoolUsePermutation <https://petsc.org/release/manualpages/Mat/MatHtoolUsePermutation.html>

    Source code at petsc4py/PETSc/Mat.pyx:5324 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5324>

    HtoolUseRecompression(use)
        Set whether to recompress the matrix after assembly.

        Logically collective.

        Parameters
            use (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether to use recompression.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            MatHtoolUseRecompression <https://petsc.org/release/manualpages/Mat/MatHtoolUseRecompression.html>

    Source code at petsc4py/PETSc/Mat.pyx:5343 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5343>

    SOR(b, x, omega=1.0, sortype=None, shift=0.0, its=1, lits=1)
        Compute relaxation (SOR, Gauss-Seidel) sweeps.

        Neighborwise collective.

        See also:
            MatSOR <https://petsc.org/release/manualpages/Mat/MatSOR.html>

    Source code at petsc4py/PETSc/Mat.pyx:4072 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4072>

        Parameters

            •   b (Vec <#petsc4py.PETSc.Vec>)

            •   x (Vec <#petsc4py.PETSc.Vec>)

            •   omega (float <https://docs.python.org/3/library/functions.html#float>)

            •   sortype (SORType <#petsc4py.PETSc.Mat.SORType> | None <https://docs.python.org/3/library/constants.html#None>)

            •   shift (float <https://docs.python.org/3/library/functions.html#float>)

            •   its (int <https://docs.python.org/3/library/functions.html#int>)

            •   lits (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    allocateLMVM(x, f)
        Allocate all necessary common memory LMVM matrix.

        Logically collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Solution vector.

            •   f (Vec <#petsc4py.PETSc.Vec>) -- Function vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatLMVMAllocate <https://petsc.org/release/manualpages/KSP/MatLMVMAllocate.html>

    Source code at petsc4py/PETSc/Mat.pyx:5426 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5426>

    appendOptionsPrefix(prefix=None)
        Append to the prefix used for searching for options in the database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, setOptionsPrefix, MatAppendOptionsPrefix <https://petsc.org/release/manualpages/Mat/MatAppendOptionsPrefix.html>

    Source code at petsc4py/PETSc/Mat.pyx:1960 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1960>

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    assemble(assembly=None)
        Assemble the matrix.

        Collective.

        Parameters
            assembly (MatAssemblySpec <#petsc4py.typing.MatAssemblySpec>) -- The assembly type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            assemblyBegin, assemblyEnd

    Source code at petsc4py/PETSc/Mat.pyx:3585 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3585>

    assemblyBegin(assembly=None)
        Begin an assembling stage of the matrix.

        Collective.

        Parameters
            assembly (MatAssemblySpec <#petsc4py.typing.MatAssemblySpec>) -- The assembly type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            assemblyEnd, assemble, MatAssemblyBegin <https://petsc.org/release/manualpages/Mat/MatAssemblyBegin.html>

    Source code at petsc4py/PETSc/Mat.pyx:3549 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3549>

    assemblyEnd(assembly=None)
        Complete an assembling stage of the matrix initiated with assemblyBegin.

        Collective.

        Parameters
            assembly (MatAssemblySpec <#petsc4py.typing.MatAssemblySpec>) -- The assembly type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            assemblyBegin, assemble, MatAssemblyEnd <https://petsc.org/release/manualpages/Mat/MatAssemblyEnd.html>

    Source code at petsc4py/PETSc/Mat.pyx:3567 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3567>

    axpy(alpha, X, structure=None)
        Perform the matrix summation self + = ɑ·X.

        Collective.

        Parameters

            •   alpha (Scalar <#petsc4py.typing.Scalar>) -- The scalar.

            •   X (Mat <#petsc4py.PETSc.Mat>) -- The matrix to be added.

            •   structure (Structure <#petsc4py.PETSc.Mat.Structure> | None <https://docs.python.org/3/library/constants.html#None>) -- The structure of the operation.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatAXPY <https://petsc.org/release/manualpages/Mat/MatAXPY.html>

    Source code at petsc4py/PETSc/Mat.pyx:4400 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4400>

    aypx(alpha, X, structure=None)
        Perform the matrix summation self = ɑ·self + X.

        Collective.

        Parameters

            •   alpha (Scalar <#petsc4py.typing.Scalar>) -- The scalar.

            •   X (Mat <#petsc4py.PETSc.Mat>) -- The matrix to be added.

            •   structure (Structure <#petsc4py.PETSc.Mat.Structure> | None <https://docs.python.org/3/library/constants.html#None>) -- The structure of the operation.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatAYPX <https://petsc.org/release/manualpages/Mat/MatAYPX.html>

    Source code at petsc4py/PETSc/Mat.pyx:4423 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4423>

    bindToCPU(flg)
        Mark a matrix to temporarily stay on the CPU.

        Collective.

        Once marked, perform computations on the CPU.

        Parameters
            flg (bool <https://docs.python.org/3/library/functions.html#bool>) -- Bind to the CPU if True <https://docs.python.org/3/library/constants.html#True>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatBindToCPU <https://petsc.org/release/manualpages/Mat/MatBindToCPU.html>

    Source code at petsc4py/PETSc/Mat.pyx:4767 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4767>

    boundToCPU()
        Query if a matrix is bound to the CPU.

        Not collective.

        See also:
            MatBoundToCPU <https://petsc.org/release/manualpages/Mat/MatBoundToCPU.html>

    Source code at petsc4py/PETSc/Mat.pyx:4787 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4787>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    chop(tol)
        Set entries smallest of tol (in absolute values) to zero.

        Collective.

        See also:
            MatFilter <https://petsc.org/release/manualpages/Mat/MatFilter.html>

    Source code at petsc4py/PETSc/Mat.pyx:4368 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4368>

        Parameters
            tol (float <https://docs.python.org/3/library/functions.html#float>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    conjugate(out=None)
        Return the conjugate matrix.

        Collective.

        Parameters
            out (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional return matrix. If None <https://docs.python.org/3/library/constants.html#None>, the operation is performed in-place. Otherwise, the operation is performed on out.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            realPart, imagPart, MatConjugate <https://petsc.org/release/manualpages/Mat/MatConjugate.html>

    Source code at petsc4py/PETSc/Mat.pyx:2422 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2422>

    convert(mat_type=None, out=None)
        Convert the matrix type.

        Collective.

        Parameters

            •   mat_type (Type <#petsc4py.PETSc.Mat.Type> | str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The type of the new matrix. If None <https://docs.python.org/3/library/constants.html#None> uses Type.SAME <#petsc4py.PETSc.Mat.Type.SAME>.

            •   out (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional return matrix. If None <https://docs.python.org/3/library/constants.html#None>, inplace conversion is performed. Otherwise, the matrix is reused.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            MatConvert <https://petsc.org/release/manualpages/Mat/MatConvert.html>

    Source code at petsc4py/PETSc/Mat.pyx:2278 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2278>

    copy(result=None, structure=None)
        Return a copy of the matrix.

        Collective.

        Parameters

            •   result (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional return matrix. If None <https://docs.python.org/3/library/constants.html#None>, it is internally created.

            •   structure (Structure <#petsc4py.PETSc.Mat.Structure> | None <https://docs.python.org/3/library/constants.html#None>) -- The copy structure. Only relevant if result is not None <https://docs.python.org/3/library/constants.html#None>.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            MatCopy <https://petsc.org/release/manualpages/Mat/MatCopy.html>, MatDuplicate <https://petsc.org/release/manualpages/Mat/MatDuplicate.html>

    Source code at petsc4py/PETSc/Mat.pyx:2233 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2233>

    create(comm=None)
        Create the matrix.

        Collective.

        Once created, the user should call setType or setFromOptions before using the matrix. Alternatively, specific creation routines such as createAIJ or createBAIJ can be used.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            destroy, MatCreate <https://petsc.org/release/manualpages/Mat/MatCreate.html>

    Source code at petsc4py/PETSc/Mat.pyx:516 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L516>

    createAIJ(size, bsize=None, nnz=None, csr=None, comm=None)
        Create a sparse Type.AIJ <#petsc4py.PETSc.Mat.Type.AIJ> matrix, optionally preallocating.

        Collective.

        To preallocate the matrix the user can either pass nnz or csr describing the sparsity. If neither is set then preallocation will not occur. Consult the PETSc manual <https://petsc.org/release/manual/mat.html#sec-matsparse> for more information.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   bsize (MatBlockSizeSpec <#petsc4py.typing.MatBlockSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix block size. If None <https://docs.python.org/3/library/constants.html#None>, a block size of 1 is set.

            •   nnz (NNZSpec <#petsc4py.typing.NNZSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional non-zeros preallocation pattern.

            •   csr (CSRSpec <#petsc4py.typing.CSRSpec> | CSRIndicesSpec <#petsc4py.typing.CSRIndicesSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional compressed sparse row layout information. If provided, it takes precedence on nnz.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            setSizes, createBAIJ, MATAIJ <https://petsc.org/release/manualpages/Mat/MATAIJ.html>, MATSEQAIJ <https://petsc.org/release/manualpages/Mat/MATSEQAIJ.html>, MATMPIAIJ <https://petsc.org/release/manualpages/Mat/MATMPIAIJ.html>, MatCreateAIJ <https://petsc.org/release/manualpages/Mat/MatCreateAIJ.html>, MatSeqAIJSetPreallocation <https://petsc.org/release/manualpages/Mat/MatSeqAIJSetPreallocation.html>, MatSeqAIJSetPreallocationCSR <https://petsc.org/release/manualpages/Mat/MatSeqAIJSetPreallocationCSR.html>

    Source code at petsc4py/PETSc/Mat.pyx:721 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L721>

    createAIJCRL(size, bsize=None, nnz=None, csr=None, comm=None)
        Create a sparse Type.AIJCRL <#petsc4py.PETSc.Mat.Type.AIJCRL> matrix.

        Collective.

        This is similar to Type.AIJ <#petsc4py.PETSc.Mat.Type.AIJ> matrices but stores some additional information that improves vectorization for the matrix-vector product.

        To preallocate the matrix the user can either pass nnz or csr describing the sparsity. If neither is set then preallocation will not occur. Consult the PETSc manual <https://petsc.org/release/manual/mat.html#sec-matsparse> for more information.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   bsize (MatBlockSizeSpec <#petsc4py.typing.MatBlockSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix block size. If None <https://docs.python.org/3/library/constants.html#None>, a block size of 1 is set.

            •   nnz (NNZSpec <#petsc4py.typing.NNZSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional non-zeros preallocation pattern.

            •   csr (CSRSpec <#petsc4py.typing.CSRSpec> | CSRIndicesSpec <#petsc4py.typing.CSRIndicesSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional compressed sparse row layout information. If provided, it takes precedence on nnz.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createAIJ, createBAIJ, MatCreateSeqAIJCRL <https://petsc.org/release/manualpages/Mat/MatCreateSeqAIJCRL.html>, MatCreateMPIAIJCRL <https://petsc.org/release/manualpages/Mat/MatCreateMPIAIJCRL.html>

    Source code at petsc4py/PETSc/Mat.pyx:854 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L854>

    createAIJWithArrays(size, csr, bsize=None, comm=None)
        Create a sparse Type.AIJ <#petsc4py.PETSc.Mat.Type.AIJ> matrix with data in CSR format.

        Collective.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   csr (CSRSpec <#petsc4py.typing.CSRSpec> | tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[CSRSpec <#petsc4py.typing.CSRSpec>, CSRSpec <#petsc4py.typing.CSRSpec>]) -- Local matrix data in compressed sparse row format.

            •   bsize (MatBlockSizeSpec <#petsc4py.typing.MatBlockSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix block size. If None <https://docs.python.org/3/library/constants.html#None>, a block size of 1 is set.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Notes

    For Type.SEQAIJ <#petsc4py.PETSc.Mat.Type.SEQAIJ> matrices, the csr data is not copied. For Type.MPIAIJ <#petsc4py.PETSc.Mat.Type.MPIAIJ> matrices, the csr data is not copied only in the case it represents on-process and off-process information.

    See also:
            createAIJ, MatCreateSeqAIJWithArrays <https://petsc.org/release/manualpages/Mat/MatCreateSeqAIJWithArrays.html>, MatCreateMPIAIJWithArrays <https://petsc.org/release/manualpages/Mat/MatCreateMPIAIJWithArrays.html>, MatCreateMPIAIJWithSplitArrays <https://petsc.org/release/manualpages/Mat/MatCreateMPIAIJWithSplitArrays.html>

    Source code at petsc4py/PETSc/Mat.pyx:1048 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1048>

    createBAIJ(size, bsize, nnz=None, csr=None, comm=None)
        Create a sparse blocked Type.BAIJ <#petsc4py.PETSc.Mat.Type.BAIJ> matrix, optionally preallocating.

        Collective.

        To preallocate the matrix the user can either pass nnz or csr describing the sparsity. If neither is set then preallocation will not occur. Consult the PETSc manual <https://petsc.org/release/manual/mat.html#sec-matsparse> for more information.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   bsize (MatBlockSizeSpec <#petsc4py.typing.MatBlockSizeSpec>) -- Matrix block size.

            •   nnz (NNZSpec <#petsc4py.typing.NNZSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional non-zeros preallocation pattern for block rows.

            •   csr (CSRSpec <#petsc4py.typing.CSRSpec> | CSRIndicesSpec <#petsc4py.typing.CSRIndicesSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional block-compressed sparse row layout information. If provided, it takes precedence on nnz.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            setSizes, createAIJ, MATBAIJ <https://petsc.org/release/manualpages/Mat/MATBAIJ.html>, MATSEQBAIJ <https://petsc.org/release/manualpages/Mat/MATSEQBAIJ.html>, MATMPIBAIJ <https://petsc.org/release/manualpages/Mat/MATMPIBAIJ.html>, MatCreateBAIJ <https://petsc.org/release/manualpages/Mat/MatCreateBAIJ.html>

    Source code at petsc4py/PETSc/Mat.pyx:766 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L766>

    createConstantDiagonal(size, diag, comm=None)
        Create a diagonal matrix of type Type.CONSTANTDIAGONAL <#petsc4py.PETSc.Mat.Type.CONSTANTDIAGONAL>.

        Collective.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   diag (float <https://docs.python.org/3/library/functions.html#float>) -- The diagonal value.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createDiagonal

    Source code at petsc4py/PETSc/Mat.pyx:1770 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1770>

    createDense(size, bsize=None, array=None, comm=None)
        Create a Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE> matrix.

        Collective.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   bsize (MatBlockSizeSpec <#petsc4py.typing.MatBlockSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix block size. If None <https://docs.python.org/3/library/constants.html#None>, a block size of 1 is set.

            •   array (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>] | None <https://docs.python.org/3/library/constants.html#None>) -- Optional matrix data. If None <https://docs.python.org/3/library/constants.html#None>, memory is internally allocated.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createDenseCUDA, MATDENSE <https://petsc.org/release/manualpages/Mat/MATDENSE.html>, MatCreateDense <https://petsc.org/release/manualpages/Mat/MatCreateDense.html>

    Source code at petsc4py/PETSc/Mat.pyx:1139 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1139>

    createDenseCUDA(size, bsize=None, array=None, cudahandle=None, comm=None)
        Create a Type.DENSECUDA <#petsc4py.PETSc.Mat.Type.DENSECUDA> matrix with optional host and device data.

        Collective.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   bsize (MatBlockSizeSpec <#petsc4py.typing.MatBlockSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix block size. If None <https://docs.python.org/3/library/constants.html#None>, a block size of 1 is set.

            •   array (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>] | None <https://docs.python.org/3/library/constants.html#None>) -- Host data. Will be lazily allocated if None <https://docs.python.org/3/library/constants.html#None>.

            •   cudahandle (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Address of the array on the GPU. Will be lazily allocated if None <https://docs.python.org/3/library/constants.html#None>. If cudahandle is provided, array will be ignored.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createDense, MatCreateDenseCUDA <https://petsc.org/release/manualpages/Mat/MatCreateDenseCUDA.html>

    Source code at petsc4py/PETSc/Mat.pyx:1175 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1175>

    createDiagonal(diag)
        Create a diagonal matrix of type Type.DIAGONAL <#petsc4py.PETSc.Mat.Type.DIAGONAL>.

        Collective.

        Parameters
            diag (Vec <#petsc4py.PETSc.Vec>) -- The vector holding diagonal values.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createConstantDiagonal

    Source code at petsc4py/PETSc/Mat.pyx:1803 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1803>

    createH2OpusFromMat(A, coordinates=None, dist=None, eta=None, leafsize=None, maxrank=None, bs=None, rtol=None)
        Create a hierarchical Type.H2OPUS <#petsc4py.PETSc.Mat.Type.H2OPUS> matrix sampling from a provided operator.

        Collective.

        Parameters

            •   A (Mat <#petsc4py.PETSc.Mat>) -- Matrix to be sampled.

            •   coordinates (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>] | None <https://docs.python.org/3/library/constants.html#None>) -- Coordinates of the points.

            •   dist (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Whether or not coordinates are distributed, defaults to False <https://docs.python.org/3/library/constants.html#False>.

            •   eta (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Admissibility condition tolerance, defaults to DECIDE <#petsc4py.PETSc.DECIDE>.

            •   leafsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Leaf size in cluster tree, defaults to DECIDE <#petsc4py.PETSc.DECIDE>.

            •   maxrank (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Maximum rank permitted, defaults to DECIDE <#petsc4py.PETSc.DECIDE>.

            •   bs (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Maximum number of samples to take concurrently, defaults to DECIDE <#petsc4py.PETSc.DECIDE>.

            •   rtol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Relative tolerance for construction, defaults to DECIDE <#petsc4py.PETSc.DECIDE>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Notes

    See MatCreateH2OpusFromMat <https://petsc.org/release/manualpages/Mat/MatCreateH2OpusFromMat.html> for the appropriate database options.

    See also:
            Working with PETSc options <#petsc-options>, MatCreateH2OpusFromMat <https://petsc.org/release/manualpages/Mat/MatCreateH2OpusFromMat.html>

    Source code at petsc4py/PETSc/Mat.pyx:1546 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1546>

    createHermitianTranspose(mat)
        Create a Type.HERMITIANTRANSPOSE <#petsc4py.PETSc.Mat.Type.HERMITIANTRANSPOSE> matrix that behaves like (A*)ᵀ.

        Collective.

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>) -- Matrix A to represent the Hermitian transpose of.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Notes

    The Hermitian transpose is never actually formed.

    See also:
            createNormal, createNormalHermitian, MATHERMITIANTRANSPOSEVIRTUAL <https://petsc.org/release/manualpages/Mat/MATHERMITIANTRANSPOSEVIRTUAL.html>, MatCreateHermitianTranspose <https://petsc.org/release/manualpages/Mat/MatCreateHermitianTranspose.html>

    Source code at petsc4py/PETSc/Mat.pyx:1375 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1375>

    createHtoolFromKernel(size, spacedim, coords_target, coords_source, kernel, kernelctx=None, comm=None)
        Create a Type.HTOOL <#petsc4py.PETSc.Mat.Type.HTOOL> matrix using a kernel function defined in Python.

        Collective.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   spacedim (int <https://docs.python.org/3/library/functions.html#int>) -- Dimension of the coordinate space.

            •   coords_target (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- Local target (row) coordinates, shape (m, spacedim).

            •   coords_source (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- Local source (column) coordinates, shape (n, spacedim).

            •   kernel (MatHtoolKernelFunction <#petsc4py.typing.MatHtoolKernelFunction>) -- Python callable with signature kernel(sdim, M, N, rows, cols, v, ctx) that fills the submatrix v[i, j] for target index rows[i] and source index cols[j]. v has shape (M, N) in column-major order.

            •   kernelctx (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- Optional context passed as the last argument to kernel.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Notes

    This function is called while the Python Global Interpreter Lock (GIL) is held. As a result, pure Python implementations will not scale with multithreading. For better performance, users should delegate heavy computations to compiled code that releases the GIL. This allows parallel execution inside threaded regions. For maximum performance, consider implementing the generator directly in C or C++ instead of using the Python interface. See MatCreateHtoolFromKernel <https://petsc.org/release/manualpages/Mat/MatCreateHtoolFromKernel.html> for the appropriate database options.

    See also:
            Working with PETSc options <#petsc-options>, MatCreateHtoolFromKernel <https://petsc.org/release/manualpages/Mat/MatCreateHtoolFromKernel.html>, HtoolGetPermutationSource, HtoolGetPermutationTarget, HtoolUsePermutation, HtoolUseRecompression

    Source code at petsc4py/PETSc/Mat.pyx:1627 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1627>

    createIS(size, bsize=None, lgmapr=None, lgmapc=None, comm=None)
        Create a Type.IS <#petsc4py.PETSc.Mat.Type.IS> matrix representing globally unassembled operators.

        Collective.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   bsize (MatBlockSizeSpec <#petsc4py.typing.MatBlockSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix block size. If None <https://docs.python.org/3/library/constants.html#None>, a block size of 1 is set.

            •   lgmapr (LGMap <#petsc4py.PETSc.LGMap> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional local-to-global mapping for the rows. If None <https://docs.python.org/3/library/constants.html#None>, the local row space matches the global row space.

            •   lgmapc (LGMap <#petsc4py.PETSc.LGMap> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional local-to-global mapping for the columns. If None <https://docs.python.org/3/library/constants.html#None>, the local column space matches the global column space.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            MATIS <https://petsc.org/release/manualpages/Mat/MATIS.html>

    Source code at petsc4py/PETSc/Mat.pyx:1717 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1717>

    createLRC(A, U, c, V)
        Create a low-rank correction Type.LRC <#petsc4py.PETSc.Mat.Type.LRC> matrix representing A + UCVᵀ.

        Collective.

        Parameters

            •   A (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Sparse matrix, can be None <https://docs.python.org/3/library/constants.html#None>.

            •   U (Mat <#petsc4py.PETSc.Mat>) -- Dense rectangular matrix.

            •   c (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector containing the diagonal of C, can be None <https://docs.python.org/3/library/constants.html#None>.

            •   V (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Dense rectangular matrix, can be set to U or 'None'.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Notes

    The matrix A + UCVᵀ is never actually formed.

    C is a diagonal matrix (represented as a vector) of order k, where k is the number of columns of both U and V.

    If A is None <https://docs.python.org/3/library/constants.html#None> then the new object behaves like a low-rank matrix UCVᵀ.

    Use the same matrix for V and U (or V=None) for a symmetric low-rank correction, A + UCUᵀ.

    If c is None <https://docs.python.org/3/library/constants.html#None> then the low-rank correction is just U*Vᵀ. If a sequential c vector is used for a parallel matrix, PETSc assumes that the values of the vector are consistently set across processors.

    See also:
            MATLRC <https://petsc.org/release/manualpages/Mat/MATLRC.html>, MatCreateLRC <https://petsc.org/release/manualpages/Mat/MatCreateLRC.html>

    Source code at petsc4py/PETSc/Mat.pyx:1400 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1400>

    createNest(mats, isrows=None, iscols=None, comm=None)
        Create a Type.NEST <#petsc4py.PETSc.Mat.Type.NEST> matrix containing multiple submatrices.

        Collective.

        Parameters

            •   mats (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Mat <#petsc4py.PETSc.Mat>]]) -- Iterable of matrix block rows with size len(isrows). Each matrix block row must be of size len(iscols). Empty submatrices can be set with None <https://docs.python.org/3/library/constants.html#None>.

            •   isrows (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>) -- Index set for each nested row block, defaults to contiguous ordering.

            •   iscols (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>) -- Index set for each nested column block, defaults to contiguous ordering.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            MatCreateNest <https://petsc.org/release/manualpages/Mat/MatCreateNest.html>, MATNEST <https://petsc.org/release/manualpages/Mat/MATNEST.html>

    Source code at petsc4py/PETSc/Mat.pyx:1479 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1479>

    createNormal(mat)
        Create a Type.NORMAL <#petsc4py.PETSc.Mat.Type.NORMAL> matrix representing AᵀA.

        Collective.

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>) -- The (possibly rectangular) matrix A.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Notes

    The product AᵀA is never actually formed. Instead A and Aᵀ are used during mult and various other matrix operations.

    See also:
            MATNORMAL <https://petsc.org/release/manualpages/Mat/MATNORMAL.html>, MatCreateNormal <https://petsc.org/release/manualpages/Mat/MatCreateNormal.html>

    Source code at petsc4py/PETSc/Mat.pyx:1280 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1280>

    createNormalHermitian(mat)
        Create a Type.NORMALHERMITIAN <#petsc4py.PETSc.Mat.Type.NORMALHERMITIAN> matrix representing (A*)ᵀA.

        Collective.

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>) -- The (possibly rectangular) matrix A.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Notes

    The product (A*)ᵀA is never actually formed.

    See also:
            createHermitianTranspose, MATNORMAL <https://petsc.org/release/manualpages/Mat/MATNORMAL.html>, MATNORMALHERMITIAN <https://petsc.org/release/manualpages/Mat/MATNORMALHERMITIAN.html>, MatCreateNormalHermitian <https://petsc.org/release/manualpages/Mat/MatCreateNormalHermitian.html>

    Source code at petsc4py/PETSc/Mat.pyx:1350 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1350>

    createPython(size, context=None, comm=None)
        Create a Type.PYTHON <#petsc4py.PETSc.Mat.Type.PYTHON> matrix.

        Collective.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   context (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- An instance of the Python class implementing the required methods.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PETSc Python matrix type <#petsc-python-mat>, setType, setPythonContext, Type.PYTHON <#petsc4py.PETSc.Mat.Type.PYTHON>

    Source code at petsc4py/PETSc/Mat.pyx:1826 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1826>

    createSBAIJ(size, bsize, nnz=None, csr=None, comm=None)
        Create a sparse Type.SBAIJ <#petsc4py.PETSc.Mat.Type.SBAIJ> matrix in symmetric block format.

        Collective.

        To preallocate the matrix the user can either pass nnz or csr describing the sparsity. If neither is set then preallocation will not occur. Consult the PETSc manual <https://petsc.org/release/manual/mat.html#sec-matsparse> for more information.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   bsize (MatBlockSizeSpec <#petsc4py.typing.MatBlockSizeSpec>) -- Matrix block size.

            •   nnz (NNZSpec <#petsc4py.typing.NNZSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional upper-triangular (including diagonal) non-zeros preallocation pattern for block rows.

            •   csr (CSRSpec <#petsc4py.typing.CSRSpec> | CSRIndicesSpec <#petsc4py.typing.CSRIndicesSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional block-compressed sparse row layout information. If provided, it takes precedence on nnz.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createAIJ, createBAIJ, MatCreateSBAIJ <https://petsc.org/release/manualpages/Mat/MatCreateSBAIJ.html>

    Source code at petsc4py/PETSc/Mat.pyx:810 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L810>

    createScatter(scatter, comm=None)
        Create a Type.SCATTER <#petsc4py.PETSc.Mat.Type.SCATTER> matrix from a vector scatter.

        Collective.

        Parameters

            •   scatter (Scatter <#petsc4py.PETSc.Scatter>) -- Vector scatter.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            MATSCATTER <https://petsc.org/release/manualpages/Mat/MATSCATTER.html>, MatCreateScatter <https://petsc.org/release/manualpages/Mat/MatCreateScatter.html>

    Source code at petsc4py/PETSc/Mat.pyx:1256 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1256>

    createSchurComplement(A00, Ap00, A01, A10, A11=None)
        Create a Type.SCHURCOMPLEMENT <#petsc4py.PETSc.Mat.Type.SCHURCOMPLEMENT> matrix.

        Collective.

        Parameters

            •   A00 (Mat <#petsc4py.PETSc.Mat>) -- the upper-left block of the original matrix A = [A00 A01; A10 A11].

            •   Ap00 (Mat <#petsc4py.PETSc.Mat>) -- used to construct the preconditioner used in ksp(A00,Ap00) to approximate the action of A00^{-1}.

            •   A01 (Mat <#petsc4py.PETSc.Mat>) -- the upper-right block of the original matrix A = [A00 A01; A10 A11].

            •   A10 (Mat <#petsc4py.PETSc.Mat>) -- the lower-left block of the original matrix A = [A00 A01; A10 A11].

            •   A11 (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional lower-right block of the original matrix A = [A00 A01; A10 A11].

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            MatCreateSchurComplement <https://petsc.org/release/manualpages/KSP/MatCreateSchurComplement.html>

    Source code at petsc4py/PETSc/Mat.pyx:4216 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4216>

    createSubMatrices(isrows, iscols=None, submats=None)
        Return several sequential submatrices.

        Collective.

        Parameters

            •   isrows (IS <#petsc4py.PETSc.IS> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>]) -- Row index sets.

            •   iscols (IS <#petsc4py.PETSc.IS> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>) -- Column index sets. If None <https://docs.python.org/3/library/constants.html#None>, iscols = isrows.

            •   submats (Mat <#petsc4py.PETSc.Mat> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Mat <#petsc4py.PETSc.Mat>] | None <https://docs.python.org/3/library/constants.html#None>) -- Optional resultant matrices. When None <https://docs.python.org/3/library/constants.html#None>, new matrices are created, and MAT_INITIAL_MATRIX is used. When not None <https://docs.python.org/3/library/constants.html#None>, the matrices are reused with MAT_REUSE_MATRIX.

        Return type
            Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Mat <#petsc4py.PETSc.Mat>]

    See also:
            MatCreateSubMatrices <https://petsc.org/release/manualpages/Mat/MatCreateSubMatrices.html>

    Source code at petsc4py/PETSc/Mat.pyx:4159 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4159>

    createSubMatrix(isrow, iscol=None, submat=None)
        Return a submatrix.

        Collective.

        Parameters

            •   isrow (IS <#petsc4py.PETSc.IS>) -- Row index set.

            •   iscol (IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>) -- Column index set. If None <https://docs.python.org/3/library/constants.html#None>, iscol = isrow.

            •   submat (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional resultant matrix. When None <https://docs.python.org/3/library/constants.html#None>, a new matrix is created, and MAT_INITIAL_MATRIX is used. When not None <https://docs.python.org/3/library/constants.html#None>, the matrix is reused with MAT_REUSE_MATRIX.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            MatCreateSubMatrix <https://petsc.org/release/manualpages/Mat/MatCreateSubMatrix.html>

    Source code at petsc4py/PETSc/Mat.pyx:4129 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4129>

    createSubMatrixVirtual(A, isrow, iscol=None)
        Create a Type.SUBMATRIX <#petsc4py.PETSc.Mat.Type.SUBMATRIX> matrix that acts as a submatrix.

        Collective.

        Parameters

            •   A (Mat <#petsc4py.PETSc.Mat>) -- Matrix to extract submatrix from.

            •   isrow (IS <#petsc4py.PETSc.IS>) -- Rows present in the submatrix.

            •   iscol (IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>) -- Columns present in the submatrix, defaults to isrow.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            MatCreateSubMatrixVirtual <https://petsc.org/release/manualpages/Mat/MatCreateSubMatrixVirtual.html>

    Source code at petsc4py/PETSc/Mat.pyx:1454 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1454>

    createTranspose(mat)
        Create a Type.TRANSPOSE <#petsc4py.PETSc.Mat.Type.TRANSPOSE> matrix that behaves like Aᵀ.

        Collective.

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>) -- Matrix A to represent the transpose of.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Notes

    The transpose is never actually formed. Instead multTranspose is called whenever the matrix-vector product is computed.

    See also:
            createNormal, MatCreateTranspose <https://petsc.org/release/manualpages/Mat/MatCreateTranspose.html>

    Source code at petsc4py/PETSc/Mat.pyx:1305 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1305>

    createVecLeft()
        Return a left vector, a vector that the matrix vector product can be stored in.

        Collective.

        See also:
            createVecs, createVecRight, MatCreateVecs <https://petsc.org/release/manualpages/Mat/MatCreateVecs.html>

    Source code at petsc4py/PETSc/Mat.pyx:3685 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3685>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    createVecRight()
        Return a right vector, a vector that the matrix can be multiplied against.

        Collective.

        See also:
            createVecs, createVecLeft, MatCreateVecs <https://petsc.org/release/manualpages/Mat/MatCreateVecs.html>

    Source code at petsc4py/PETSc/Mat.pyx:3671 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3671>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    createVecs(side=None)
        Return vectors that can be used in matrix vector products.

        Collective.

        Parameters
            side (Literal <https://docs.python.org/3/library/typing.html#typing.Literal>['r', 'R', 'right', 'Right', 'RIGHT', 'l', 'L', 'left', 'Left', 'LEFT'] | None) -- If None <https://docs.python.org/3/library/constants.html#None> returns a 2-tuple of vectors (right, left). Otherwise it just returns a left or right vector.

        Return type
            Vec <#petsc4py.PETSc.Vec> | tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>]

    Notes

    right is a vector that the matrix can be multiplied against. left is a vector that the matrix-vector product can be stored in.

    See also:
            createVecLeft, createVecRight, MatCreateVecs <https://petsc.org/release/manualpages/Mat/MatCreateVecs.html>

    Source code at petsc4py/PETSc/Mat.pyx:3632 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3632>

    destroy()
        Destroy the matrix.

        Collective.

        See also:
            create, MatDestroy <https://petsc.org/release/manualpages/Mat/MatDestroy.html>

    Source code at petsc4py/PETSc/Mat.pyx:503 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L503>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    diagonalScale(L=None, R=None)
        Perform left and/or right diagonal scaling of the matrix.

        Collective.

        Parameters

            •   L (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional left scaling vector.

            •   R (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional right scaling vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatDiagonalScale <https://petsc.org/release/manualpages/Mat/MatDiagonalScale.html>

    Source code at petsc4py/PETSc/Mat.pyx:3824 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3824>

    duplicate(copy=False)
        Return a clone of the matrix.

        Collective.

        Parameters
            copy (DuplicateOption <#petsc4py.PETSc.Mat.DuplicateOption> | bool <https://docs.python.org/3/library/functions.html#bool>) -- If True <https://docs.python.org/3/library/constants.html#True>, it also copies the values.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            MatDuplicate <https://petsc.org/release/manualpages/Mat/MatDuplicate.html>

    Source code at petsc4py/PETSc/Mat.pyx:2213 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2213>

    equal(mat)
        Return the result of matrix comparison.

        Collective.

        See also:
            MatEqual <https://petsc.org/release/manualpages/Mat/MatEqual.html>

    Source code at petsc4py/PETSc/Mat.pyx:2466 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2466>

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>)

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    factorCholesky(isperm, options=None)
        Perform an in-place Cholesky factorization.

        Collective.

        Parameters

            •   isperm (IS <#petsc4py.PETSc.IS>) -- The row and column permutations.

            •   options (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- An optional dictionary of options for the factorization. These include fill, the expected fill as a ratio of the original fill.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            factorLU, MatCholeskyFactor <https://petsc.org/release/manualpages/Mat/MatCholeskyFactor.html>

    Source code at petsc4py/PETSc/Mat.pyx:4931 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4931>

    factorICC(isperm, options=None)
        Perform an in-place an incomplete Cholesky factorization.

        Collective.

        Parameters

            •   isperm (IS <#petsc4py.PETSc.IS>) -- The row and column permutations

            •   options (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- An optional dictionary of options for the factorization. These include fill, the expected fill as a ratio of the original fill.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            factorILU, MatICCFactor <https://petsc.org/release/manualpages/Mat/MatICCFactor.html>

    Source code at petsc4py/PETSc/Mat.pyx:4964 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4964>

    factorILU(isrow, iscol, options=None)
        Perform an in-place ILU factorization.

        Collective.

        Parameters

            •   isrow (IS <#petsc4py.PETSc.IS>) -- The row permutation.

            •   iscol (IS <#petsc4py.PETSc.IS>) -- The column permutation.

            •   options (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- An optional dictionary of options for the factorization. These include levels, the number of levels of fill, fill, the expected fill as a ratio of the original fill, and dtcol, the pivot tolerance where 0 indicates no pivot and 1 indicates full column pivoting.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatILUFactor <https://petsc.org/release/manualpages/Mat/MatILUFactor.html>

    Source code at petsc4py/PETSc/Mat.pyx:4897 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4897>

    factorLU(isrow, iscol, options=None)
        Perform an in-place LU factorization.

        Collective.

        Parameters

            •   isrow (IS <#petsc4py.PETSc.IS>) -- The row permutation.

            •   iscol (IS <#petsc4py.PETSc.IS>) -- The column permutation.

            •   options (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- An optional dictionary of options for the factorization. These include fill, the expected fill as a ratio of the original fill and dtcol, the pivot tolerance where 0 indicates no pivot and 1 indicates full column pivoting.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatLUFactor <https://petsc.org/release/manualpages/Mat/MatLUFactor.html>

    Source code at petsc4py/PETSc/Mat.pyx:4859 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4859>

    factorNumericCholesky(mat, options=None)
        Not implemented.

        Source code at petsc4py/PETSc/Mat.pyx:4960 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4960>

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    factorNumericLU(mat, options=None)
        Not implemented.

        Source code at petsc4py/PETSc/Mat.pyx:4893 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4893>

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    factorSymbolicCholesky(isperm, options=None)
        Not implemented.

        Source code at petsc4py/PETSc/Mat.pyx:4956 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4956>

        Parameters
            isperm (IS <#petsc4py.PETSc.IS>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    factorSymbolicICC(isperm, options=None)
        Not implemented.

        Source code at petsc4py/PETSc/Mat.pyx:4989 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4989>

        Parameters
            isperm (IS <#petsc4py.PETSc.IS>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    factorSymbolicILU(isrow, iscol, options=None)
        Not implemented.

        Source code at petsc4py/PETSc/Mat.pyx:4927 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4927>

        Parameters

            •   isrow (IS <#petsc4py.PETSc.IS>)

            •   iscol (IS <#petsc4py.PETSc.IS>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    factorSymbolicLU(mat, isrow, iscol, options=None)
        Not implemented.

        Source code at petsc4py/PETSc/Mat.pyx:4889 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4889>

        Parameters

            •   mat (Mat <#petsc4py.PETSc.Mat>)

            •   isrow (IS <#petsc4py.PETSc.IS>)

            •   iscol (IS <#petsc4py.PETSc.IS>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    findZeroRows()
        Return the index set of empty rows.

        Collective.

        See also:
            MatFindZeroRows <https://petsc.org/release/manualpages/Mat/MatFindZeroRows.html>

    Source code at petsc4py/PETSc/Mat.pyx:3618 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3618>

        Return type
            IS <#petsc4py.PETSc.IS>

    fixISLocalEmpty(fix=True)
        Compress out zero local rows from the local matrices.

        Collective.

        Parameters
            fix (bool <https://docs.python.org/3/library/functions.html#bool>) -- When True <https://docs.python.org/3/library/constants.html#True>, new local matrices and local to global maps are generated during the final assembly process.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatISFixLocalEmpty <https://petsc.org/release/manualpages/Mat/MatISFixLocalEmpty.html>

    Source code at petsc4py/PETSc/Mat.pyx:5064 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5064>

    getBlockSize()
        Return the matrix block size.

        Not collective.

        See also:
            getBlockSize, MatGetBlockSize <https://petsc.org/release/manualpages/Mat/MatGetBlockSize.html>

    Source code at petsc4py/PETSc/Mat.pyx:2083 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2083>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getBlockSizes()
        Return the row and column block sizes.

        Not collective.

        See also:
            getBlockSize, MatGetBlockSizes <https://petsc.org/release/manualpages/Mat/MatGetBlockSizes.html>

    Source code at petsc4py/PETSc/Mat.pyx:2097 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2097>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    getColumnIJ(symmetric=False, compressed=False)
        Return the CSC representation of the local sparsity pattern.

        Collective.

        Parameters

            •   symmetric (bool <https://docs.python.org/3/library/functions.html#bool>) -- If True <https://docs.python.org/3/library/constants.html#True>, return the symmetrized graph.

            •   compressed (bool <https://docs.python.org/3/library/functions.html#bool>) -- If True <https://docs.python.org/3/library/constants.html#True>, return the compressed graph.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayInt <#petsc4py.typing.ArrayInt>, ArrayInt <#petsc4py.typing.ArrayInt>]

    See also:
            MatGetRowIJ <https://petsc.org/release/manualpages/Mat/MatGetRowIJ.html>

    Source code at petsc4py/PETSc/Mat.pyx:2744 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2744>

    getColumnVector(column, result=None)
        Return the columnᵗʰ column vector of the matrix.

        Collective.

        Parameters

            •   column (int <https://docs.python.org/3/library/functions.html#int>) -- Column index.

            •   result (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional vector to store the result.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            MatGetColumnVector <https://petsc.org/release/manualpages/Mat/MatGetColumnVector.html>

    Source code at petsc4py/PETSc/Mat.pyx:3705 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3705>

    getDM()
        Return the DM defining the data layout of the matrix.

        Not collective.

        See also:
            MatGetDM <https://petsc.org/release/manualpages/DM/MatGetDM.html>

    Source code at petsc4py/PETSc/Mat.pyx:6079 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6079>

        Return type
            DM <#petsc4py.PETSc.DM>

    getDenseArray(readonly=False)
        Return the array where the data is stored.

        Not collective.

        Parameters
            readonly (bool <https://docs.python.org/3/library/functions.html#bool>) -- Enable to obtain a read only array.

        Return type
            ArrayScalar <#petsc4py.typing.ArrayScalar>

    See also:
            MatDenseGetArrayRead <https://petsc.org/release/manualpages/Mat/MatDenseGetArrayRead.html>, MatDenseGetArray <https://petsc.org/release/manualpages/Mat/MatDenseGetArray.html>

    Source code at petsc4py/PETSc/Mat.pyx:5821 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5821>

    getDenseColumnVec(i, mode='rw')
        Return the iᵗʰ column vector of the dense matrix.

        Collective.

        Parameters

            •   i (int <https://docs.python.org/3/library/functions.html#int>) -- The column index to access.

            •   mode (AccessModeSpec <#petsc4py.typing.AccessModeSpec>) -- The access type of the vector to be returned.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            restoreDenseColumnVec, MatDenseGetColumnVec <https://petsc.org/release/manualpages/Mat/MatDenseGetColumnVec.html>, MatDenseGetColumnVecRead <https://petsc.org/release/manualpages/Mat/MatDenseGetColumnVecRead.html>, MatDenseGetColumnVecWrite <https://petsc.org/release/manualpages/Mat/MatDenseGetColumnVecWrite.html>

    Source code at petsc4py/PETSc/Mat.pyx:5930 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5930>

    getDenseLDA()
        Return the leading dimension of the array used by the dense matrix.

        Not collective.

        See also:
            MatDenseGetLDA <https://petsc.org/release/manualpages/Mat/MatDenseGetLDA.html>

    Source code at petsc4py/PETSc/Mat.pyx:5807 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5807>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getDenseLocalMatrix()
        Return the local part of the dense matrix.

        Not collective.

        See also:
            MatDenseGetLocalMatrix <https://petsc.org/release/manualpages/Mat/MatDenseGetLocalMatrix.html>

    Source code at petsc4py/PETSc/Mat.pyx:5862 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5862>

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getDenseSubMatrix(rbegin=DECIDE, rend=DECIDE, cbegin=DECIDE, cend=DECIDE)
        Get access to a submatrix of a Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE> matrix.

        Collective.

        Parameters

            •   rbegin (int <https://docs.python.org/3/library/functions.html#int>) -- the first global row index.

            •   rend (int <https://docs.python.org/3/library/functions.html#int>) -- the global row index past the last one.

            •   cbegin (int <https://docs.python.org/3/library/functions.html#int>) -- the first global column index.

            •   cend (int <https://docs.python.org/3/library/functions.html#int>) -- the global column index past the last one.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            restoreDenseSubMatrix, MatDenseGetSubMatrix <https://petsc.org/release/manualpages/Mat/MatDenseGetSubMatrix.html>

    Source code at petsc4py/PETSc/Mat.pyx:5877 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5877>

    getDiagonal(result=None)
        Return the diagonal of the matrix.

        Collective.

        Parameters
            result (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional vector to store the result.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            setDiagonal, MatGetDiagonal <https://petsc.org/release/manualpages/Mat/MatGetDiagonal.html>

    Source code at petsc4py/PETSc/Mat.pyx:3760 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3760>

    getDiagonalBlock()
        Return the part of the matrix associated with the on-process coupling.

        Not collective.

        See also:
            MatGetDiagonalBlock <https://petsc.org/release/manualpages/Mat/MatGetDiagonalBlock.html>

    Source code at petsc4py/PETSc/Mat.pyx:4101 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4101>

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getISAllowRepeated()
        Get the flag for repeated entries in the local to global map.

        Not collective.

        See also:
            setISAllowRepeated, MatISGetAllowRepeated <https://petsc.org/release/manualpages/Mat/MatISGetAllowRepeated.html>

    Source code at petsc4py/PETSc/Mat.pyx:5050 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5050>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getISLocalMat()
        Return the local matrix stored inside a Type.IS <#petsc4py.PETSc.Mat.Type.IS> matrix.

        Not collective.

        See also:
            MatISGetLocalMat <https://petsc.org/release/manualpages/Mat/MatISGetLocalMat.html>

    Source code at petsc4py/PETSc/Mat.pyx:5083 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5083>

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getInertia()
        Return the inertia from a factored matrix.

        Collective.

        The matrix must have been factored by calling factorCholesky.

        Returns

            •   n (int <https://docs.python.org/3/library/functions.html#int>) -- The number of negative eigenvalues.

            •   z (int <https://docs.python.org/3/library/functions.html#int>) -- The number of zero eigenvalues.

            •   p (int <https://docs.python.org/3/library/functions.html#int>) -- The number of positive eigenvalues.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            MatGetInertia <https://petsc.org/release/manualpages/Mat/MatGetInertia.html>

    Source code at petsc4py/PETSc/Mat.pyx:4993 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4993>

    getInfo(info=None)
        Return summary information.

        Collective.

        Parameters
            info (InfoType <#petsc4py.PETSc.Mat.InfoType> | None <https://docs.python.org/3/library/constants.html#None>) -- If None <https://docs.python.org/3/library/constants.html#None>, it uses InfoType.GLOBAL_SUM <#petsc4py.PETSc.Mat.InfoType.GLOBAL_SUM>.

        Return type
            dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            MatInfo <https://petsc.org/release/manualpages/Mat/MatInfo.html>, MatGetInfo <https://petsc.org/release/manualpages/Mat/MatGetInfo.html>

    Source code at petsc4py/PETSc/Mat.pyx:2193 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2193>

    getLGMap()
        Return the local-to-global mappings.

        Not collective.

        See also:
            setLGMap, MatGetLocalToGlobalMapping <https://petsc.org/release/manualpages/Mat/MatGetLocalToGlobalMapping.html>

    Source code at petsc4py/PETSc/Mat.pyx:3031 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3031>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[LGMap <#petsc4py.PETSc.LGMap>, LGMap <#petsc4py.PETSc.LGMap>]

    getLMVMJ0()
        Get the initial Jacobian of the LMVM matrix.

        Not collective.

        See also:
            setLMVMJ0, MatLMVMGetJ0 <https://petsc.org/release/manualpages/KSP/MatLMVMGetJ0.html>

    Source code at petsc4py/PETSc/Mat.pyx:5364 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5364>

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getLMVMJ0KSP()
        Get the KSP of the LMVM matrix.

        Not collective.

        See also:
            setLMVMJ0KSP, MatLMVMGetJ0KSP <https://petsc.org/release/manualpages/KSP/MatLMVMGetJ0KSP.html>

    Source code at petsc4py/PETSc/Mat.pyx:5395 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5395>

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getLRCMats()
        Return the constituents of a Type.LRC <#petsc4py.PETSc.Mat.Type.LRC> matrix.

        Not collective.

        Returns

            •   A (Mat) -- The A matrix.

            •   U (Mat) -- The first dense rectangular matrix.

            •   c (Vec <#petsc4py.PETSc.Vec>) -- The sequential vector containing the diagonal of C.

            •   V (Mat) -- The second dense rectangular matrix.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>, Vec <#petsc4py.PETSc.Vec>, Mat <#petsc4py.PETSc.Mat>]

    See also:
            MatLRCGetMats <https://petsc.org/release/manualpages/Mat/MatLRCGetMats.html>

    Source code at petsc4py/PETSc/Mat.pyx:5165 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5165>

    getLocalSize()
        Return the local number of rows and columns.

        Not collective.

        See also:
            getSize, MatGetLocalSize <https://petsc.org/release/manualpages/Mat/MatGetLocalSize.html>

    Source code at petsc4py/PETSc/Mat.pyx:2053 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2053>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    getLocalSubMatrix(isrow, iscol, submat=None)
        Return a reference to a submatrix specified in local numbering.

        Collective.

        Parameters

            •   isrow (IS <#petsc4py.PETSc.IS>) -- Row index set.

            •   iscol (IS <#petsc4py.PETSc.IS>) -- Column index set.

            •   submat (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional resultant matrix. When None <https://docs.python.org/3/library/constants.html#None>, a new matrix is created. When not None <https://docs.python.org/3/library/constants.html#None>, the matrix is first destroyed and then recreated.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            restoreLocalSubMatrix, MatGetLocalSubMatrix <https://petsc.org/release/manualpages/Mat/MatGetLocalSubMatrix.html>

    Source code at petsc4py/PETSc/Mat.pyx:4271 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4271>

    getMumpsCntl(icntl)
        Return the MUMPS parameter, CNTL[icntl].

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, MatMumpsGetCntl <https://petsc.org/release/manualpages/Mat/MatMumpsGetCntl.html>

    Source code at petsc4py/PETSc/Mat.pyx:5542 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5542>

        Parameters
            icntl (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getMumpsIcntl(icntl)
        Return the MUMPS parameter, ICNTL[icntl].

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, MatMumpsGetIcntl <https://petsc.org/release/manualpages/Mat/MatMumpsGetIcntl.html>

    Source code at petsc4py/PETSc/Mat.pyx:5506 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5506>

        Parameters
            icntl (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getMumpsInfo(icntl)
        Return the MUMPS parameter, INFO[icntl].

        Logically collective.

        Parameters
            icntl (int <https://docs.python.org/3/library/functions.html#int>) -- The index of the MUMPS INFO array.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            MatMumpsGetInfo <https://petsc.org/release/manualpages/Mat/MatMumpsGetInfo.html>

    Source code at petsc4py/PETSc/Mat.pyx:5557 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5557>

    getMumpsInfog(icntl)
        Return the MUMPS parameter, INFOG[icntl].

        Logically collective.

        Parameters
            icntl (int <https://docs.python.org/3/library/functions.html#int>) -- The index of the MUMPS INFOG array.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            MatMumpsGetInfog <https://petsc.org/release/manualpages/Mat/MatMumpsGetInfog.html>

    Source code at petsc4py/PETSc/Mat.pyx:5577 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5577>

    getMumpsRinfo(icntl)
        Return the MUMPS parameter, RINFO[icntl].

        Logically collective.

        Parameters
            icntl (int <https://docs.python.org/3/library/functions.html#int>) -- The index of the MUMPS RINFO array.

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    See also:
            MatMumpsGetRinfo <https://petsc.org/release/manualpages/Mat/MatMumpsGetRinfo.html>

    Source code at petsc4py/PETSc/Mat.pyx:5597 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5597>

    getMumpsRinfog(icntl)
        Return the MUMPS parameter, RINFOG[icntl].

        Logically collective.

        Parameters
            icntl (int <https://docs.python.org/3/library/functions.html#int>) -- The index of the MUMPS RINFOG array.

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    See also:
            MatMumpsGetRinfog <https://petsc.org/release/manualpages/Mat/MatMumpsGetRinfog.html>

    Source code at petsc4py/PETSc/Mat.pyx:5617 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5617>

    getNearNullSpace()
        Return the near-nullspace.

        Not collective.

        See also:
            getNullSpace, setNearNullSpace, MatSetNearNullSpace <https://petsc.org/release/manualpages/Mat/MatSetNearNullSpace.html>

    Source code at petsc4py/PETSc/Mat.pyx:3933 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3933>

        Return type
            NullSpace <#petsc4py.PETSc.NullSpace>

    getNestISs()
        Return the index sets representing the row and column spaces.

        Not collective.

        See also:
            MatNestGetISs <https://petsc.org/release/manualpages/Mat/MatNestGetISs.html>

    Source code at petsc4py/PETSc/Mat.pyx:6011 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6011>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[list <https://docs.python.org/3/library/stdtypes.html#list>[IS <#petsc4py.PETSc.IS>], list <https://docs.python.org/3/library/stdtypes.html#list>[IS <#petsc4py.PETSc.IS>]]

    getNestLocalISs()
        Return the local index sets representing the row and column spaces.

        Not collective.

        See also:
            MatNestGetLocalISs <https://petsc.org/release/manualpages/Mat/MatNestGetLocalISs.html>

    Source code at petsc4py/PETSc/Mat.pyx:6032 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6032>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[list <https://docs.python.org/3/library/stdtypes.html#list>[IS <#petsc4py.PETSc.IS>], list <https://docs.python.org/3/library/stdtypes.html#list>[IS <#petsc4py.PETSc.IS>]]

    getNestSize()
        Return the number of rows and columns of the matrix.

        Not collective.

        See also:
            MatNestGetSize <https://petsc.org/release/manualpages/Mat/MatNestGetSize.html>

    Source code at petsc4py/PETSc/Mat.pyx:5997 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5997>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    getNestSubMatrix(i, j)
        Return a single submatrix.

        Not collective.

        Parameters

            •   i (int <https://docs.python.org/3/library/functions.html#int>) -- The first index of the matrix within the nesting.

            •   j (int <https://docs.python.org/3/library/functions.html#int>) -- The second index of the matrix within the nesting.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            MatNestGetSubMat <https://petsc.org/release/manualpages/Mat/MatNestGetSubMat.html>

    Source code at petsc4py/PETSc/Mat.pyx:6053 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6053>

    getNullSpace()
        Return the nullspace.

        Not collective.

        See also:
            setNullSpace, MatGetNullSpace <https://petsc.org/release/manualpages/Mat/MatGetNullSpace.html>

    Source code at petsc4py/PETSc/Mat.pyx:3879 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3879>

        Return type
            NullSpace <#petsc4py.PETSc.NullSpace>

    getOption(option)
        Return the option value.

        Not collective.

        See also:
            setOption, MatGetOption <https://petsc.org/release/manualpages/Mat/MatGetOption.html>

    Source code at petsc4py/PETSc/Mat.pyx:2011 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2011>

        Parameters
            option (Option <#petsc4py.PETSc.Mat.Option>)

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getOptionsPrefix()
        Return the prefix used for searching for options in the database.

        Not collective.

        See also:
            Working with PETSc options <#petsc-options>, setOptionsPrefix, MatGetOptionsPrefix <https://petsc.org/release/manualpages/Mat/MatGetOptionsPrefix.html>

    Source code at petsc4py/PETSc/Mat.pyx:1946 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1946>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getOrdering(ord_type)
        Return a reordering for a matrix to improve a LU factorization.

        Collective.

        Parameters
            ord_type (OrderingType <#petsc4py.PETSc.Mat.OrderingType>) -- The type of reordering.

        Returns

            •   rp (IS <#petsc4py.PETSc.IS>) -- The row permutation indices.

            •   cp (IS <#petsc4py.PETSc.IS>) -- The column permutation indices.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[IS <#petsc4py.PETSc.IS>, IS <#petsc4py.PETSc.IS>]

    See also:
            MatGetOrdering <https://petsc.org/release/manualpages/MatGraphOperations/MatGetOrdering.html>

    Source code at petsc4py/PETSc/Mat.pyx:4803 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4803>

    getOwnershipIS()
        Return the ranges of rows and columns owned by each process as index sets.

        Not collective.

        See also:
            getOwnershipRanges, getOwnershipRangesColumn, MatGetOwnershipIS <https://petsc.org/release/manualpages/Mat/MatGetOwnershipIS.html>

    Source code at petsc4py/PETSc/Mat.pyx:2178 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2178>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[IS <#petsc4py.PETSc.IS>, IS <#petsc4py.PETSc.IS>]

    getOwnershipRange()
        Return the locally owned range of rows.

        Not collective.

        See also:
            getOwnershipRanges, getOwnershipRangeColumn, MatGetOwnershipRange <https://petsc.org/release/manualpages/Mat/MatGetOwnershipRange.html>

    Source code at petsc4py/PETSc/Mat.pyx:2111 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2111>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    getOwnershipRangeColumn()
        Return the locally owned range of columns.

        Not collective.

        See also:
            getOwnershipRangesColumn, getOwnershipRange, MatGetOwnershipRangeColumn <https://petsc.org/release/manualpages/Mat/MatGetOwnershipRangeColumn.html>

    Source code at petsc4py/PETSc/Mat.pyx:2145 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2145>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    getOwnershipRanges()
        Return the range of rows owned by each process.

        Not collective.

        The returned array is the result of exclusive scan of the local sizes.

        See also:
            getOwnershipRange, MatGetOwnershipRanges <https://petsc.org/release/manualpages/Mat/MatGetOwnershipRanges.html>

    Source code at petsc4py/PETSc/Mat.pyx:2125 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2125>

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    getOwnershipRangesColumn()
        Return the range of columns owned by each process.

        Not collective.

        See also:
            getOwnershipRangeColumn, MatGetOwnershipRangesColumn <https://petsc.org/release/manualpages/Mat/MatGetOwnershipRangesColumn.html>

    Source code at petsc4py/PETSc/Mat.pyx:2160 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2160>

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    getPythonContext()
        Return the instance of the class implementing the required Python methods.

        Not collective.

        See also:
            PETSc Python matrix type <#petsc-python-mat>, setPythonContext

    Source code at petsc4py/PETSc/Mat.pyx:1880 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1880>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getPythonType()
        Return the fully qualified Python name of the class used by the matrix.

        Not collective.

        See also:
            PETSc Python matrix type <#petsc-python-mat>, setPythonContext, setPythonType, MatPythonGetType <https://petsc.org/release/manualpages/Mat/MatPythonGetType.html>

    Source code at petsc4py/PETSc/Mat.pyx:1915 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1915>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getRedundantMatrix(nsubcomm, subcomm=None, out=None)
        Return redundant matrices on subcommunicators.

        Collective.

        Parameters

            •   nsubcomm (int <https://docs.python.org/3/library/functions.html#int>) -- The number of subcommunicators.

            •   subcomm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- Communicator split or None <https://docs.python.org/3/library/constants.html#None> for the null communicator.

            •   out (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional resultant matrix. When None <https://docs.python.org/3/library/constants.html#None>, a new matrix is created, and MAT_INITIAL_MATRIX is used. When not None <https://docs.python.org/3/library/constants.html#None>, the matrix is reused with MAT_REUSE_MATRIX.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            MatCreateRedundantMatrix <https://petsc.org/release/manualpages/Mat/MatCreateRedundantMatrix.html>

    Source code at petsc4py/PETSc/Mat.pyx:3730 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3730>

    getRow(row)
        Return the column indices and values for the requested row.

        Not collective.

        See also:
            MatGetRow <https://petsc.org/release/manualpages/Mat/MatGetRow.html>

    Source code at petsc4py/PETSc/Mat.pyx:2693 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2693>

        Parameters
            row (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayInt <#petsc4py.typing.ArrayInt>, ArrayScalar <#petsc4py.typing.ArrayScalar>]

    getRowIJ(symmetric=False, compressed=False)
        Return the CSR representation of the local sparsity pattern.

        Collective.

        Parameters

            •   symmetric (bool <https://docs.python.org/3/library/functions.html#bool>) -- If True <https://docs.python.org/3/library/constants.html#True>, return the symmetrized graph.

            •   compressed (bool <https://docs.python.org/3/library/functions.html#bool>) -- If True <https://docs.python.org/3/library/constants.html#True>, return the compressed graph.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayInt <#petsc4py.typing.ArrayInt>, ArrayInt <#petsc4py.typing.ArrayInt>]

    See also:
            MatGetRowIJ <https://petsc.org/release/manualpages/Mat/MatGetRowIJ.html>

    Source code at petsc4py/PETSc/Mat.pyx:2713 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2713>

    getRowSum(result=None)
        Return the row-sum vector.

        Collective.

        Parameters
            result (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional vector to store the result.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            MatGetRowSum <https://petsc.org/release/manualpages/Mat/MatGetRowSum.html>

    Source code at petsc4py/PETSc/Mat.pyx:3782 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3782>

    getSchurComplementSubMatrices()
        Return Schur complement sub-matrices.

        Collective.

        See also:
            MatSchurComplementGetSubMatrices <https://petsc.org/release/manualpages/KSP/MatSchurComplementGetSubMatrices.html>

    Source code at petsc4py/PETSc/Mat.pyx:4250 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4250>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>]

    getSize()
        Return the global number of rows and columns.

        Not collective.

        See also:
            getLocalSize, getSizes, MatGetSize <https://petsc.org/release/manualpages/Mat/MatGetSize.html>

    Source code at petsc4py/PETSc/Mat.pyx:2039 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2039>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    getSizes()
        Return the tuple of matrix layouts.

        Not collective.

        See also:
            getLocalSize, getSize

    Source code at petsc4py/PETSc/Mat.pyx:2067 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2067>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec>, LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec>]

    getTransposeMat()
        Return the internal matrix of a Type.TRANSPOSE <#petsc4py.PETSc.Mat.Type.TRANSPOSE> matrix.

        Not collective.

        Parameters
            mat -- Matrix A of type Type.TRANSPOSE <#petsc4py.PETSc.Mat.Type.TRANSPOSE>.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            MatTransposeGetMat <https://petsc.org/release/manualpages/Mat/MatTransposeGetMat.html>

    Source code at petsc4py/PETSc/Mat.pyx:1330 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1330>

    getTransposeNullSpace()
        Return the transpose nullspace.

        Not collective.

        See also:
            getNullSpace, setTransposeNullSpace, MatGetTransposeNullSpace <https://petsc.org/release/manualpages/Mat/MatGetTransposeNullSpace.html>

    Source code at petsc4py/PETSc/Mat.pyx:3906 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3906>

        Return type
            NullSpace <#petsc4py.PETSc.NullSpace>

    getType()
        Return the type of the matrix.

        Not collective.

        See also:
            setType, Type <#petsc4py.PETSc.Mat.Type>, MatGetType <https://petsc.org/release/manualpages/Mat/MatGetType.html>

    Source code at petsc4py/PETSc/Mat.pyx:2025 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2025>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getValue(row, col)
        Return the value in the (row, col) position.

        Not collective.

        See also:
            MatGetValues <https://petsc.org/release/manualpages/Mat/MatGetValues.html>

    Source code at petsc4py/PETSc/Mat.pyx:2618 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2618>

        Return type
            Scalar <#petsc4py.typing.Scalar>

    getValues(rows, cols, values=None)
        Return the values in the zip(rows, cols) positions.

        Not collective.

        Parameters

            •   rows (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Row indices.

            •   cols (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Column indices.

            •   values (ArrayScalar <#petsc4py.typing.ArrayScalar> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional array where to store the values.

        Return type
            ArrayScalar <#petsc4py.typing.ArrayScalar>

    See also:
            MatGetValues <https://petsc.org/release/manualpages/Mat/MatGetValues.html>

    Source code at petsc4py/PETSc/Mat.pyx:2634 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2634>

    getValuesCSR()
        Return the CSR representation of the local part of the matrix.

        Not collective.

        See also:
            MatGetRow <https://petsc.org/release/manualpages/Mat/MatGetRow.html>

    Source code at petsc4py/PETSc/Mat.pyx:2655 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2655>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayInt <#petsc4py.typing.ArrayInt>, ArrayInt <#petsc4py.typing.ArrayInt>, ArrayScalar <#petsc4py.typing.ArrayScalar>]

    getVecType()
        Return the vector type used by the matrix.

        Not collective.

        See also:
            setVecType, MatGetVecType <https://petsc.org/release/manualpages/Mat/MatGetVecType.html>

    Source code at petsc4py/PETSc/Mat.pyx:686 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L686>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    hermitianTranspose(out=None)
        Return the transposed Hermitian matrix.

        Collective.

        Parameters
            out (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional return matrix. If None <https://docs.python.org/3/library/constants.html#None>, inplace transposition is performed. Otherwise, the matrix is reused.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            MatHermitianTranspose <https://petsc.org/release/manualpages/Mat/MatHermitianTranspose.html>

    Source code at petsc4py/PETSc/Mat.pyx:2349 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2349>

    imagPart(out=None)
        Return the imaginary part of the matrix.

        Collective.

        Parameters
            out (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional return matrix. If None <https://docs.python.org/3/library/constants.html#None>, the operation is performed in-place. Otherwise, the operation is performed on out.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            realPart, conjugate, MatImaginaryPart <https://petsc.org/release/manualpages/Mat/MatImaginaryPart.html>

    Source code at petsc4py/PETSc/Mat.pyx:2399 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2399>

    increaseOverlap(iset, overlap=1)
        Increase the overlap of a index set.

        Collective.

        See also:
            MatIncreaseOverlap <https://petsc.org/release/manualpages/Mat/MatIncreaseOverlap.html>

    Source code at petsc4py/PETSc/Mat.pyx:4116 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4116>

        Parameters

            •   iset (IS <#petsc4py.PETSc.IS>)

            •   overlap (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    invertBlockDiagonal()
        Return the inverse of the block-diagonal entries.

        Collective.

        See also:
            MatInvertBlockDiagonal <https://petsc.org/release/manualpages/Mat/MatInvertBlockDiagonal.html>

    Source code at petsc4py/PETSc/Mat.pyx:3846 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3846>

        Return type
            ArrayScalar <#petsc4py.typing.ArrayScalar>

    isAssembled()
        The boolean flag indicating if the matrix is assembled.

        Not collective.

        See also:
            assemble, MatAssembled <https://petsc.org/release/manualpages/Mat/MatAssembled.html>

    Source code at petsc4py/PETSc/Mat.pyx:3604 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3604>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    isHermitian(tol=0)
        Return the boolean indicating if the matrix is Hermitian.

        Collective.

        Parameters
            tol (float <https://docs.python.org/3/library/functions.html#float>) -- Tolerance for comparison.

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    See also:
            MatIsHermitian <https://petsc.org/release/manualpages/Mat/MatIsHermitian.html>

    Source code at petsc4py/PETSc/Mat.pyx:2538 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2538>

    isHermitianKnown()
        Return the 2-tuple indicating if the matrix is known to be Hermitian.

        Not collective.

        See also:
            MatIsHermitianKnown <https://petsc.org/release/manualpages/Mat/MatIsHermitianKnown.html>

    Source code at petsc4py/PETSc/Mat.pyx:2558 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2558>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[bool <https://docs.python.org/3/library/functions.html#bool>, bool <https://docs.python.org/3/library/functions.html#bool>]

    isLinear(n=1)
        Return whether the Mat is a linear operator.

        Collective.

        Parameters
            n (int <https://docs.python.org/3/library/functions.html#int>) -- Number of random vectors to be tested.

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    See also:
            MatIsLinear <https://petsc.org/release/manualpages/Mat/MatIsLinear.html>

    Source code at petsc4py/PETSc/Mat.pyx:2587 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2587>

    isStructurallySymmetric()
        Return the boolean indicating if the matrix is structurally symmetric.

        Not collective.

        See also:
            MatIsStructurallySymmetric <https://petsc.org/release/manualpages/Mat/MatIsStructurallySymmetric.html>

    Source code at petsc4py/PETSc/Mat.pyx:2573 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2573>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    isSymmetric(tol=0)
        Return the boolean indicating if the matrix is symmetric.

        Collective.

        Parameters
            tol (float <https://docs.python.org/3/library/functions.html#float>) -- Tolerance for comparison.

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    See also:
            MatIsSymmetric <https://petsc.org/release/manualpages/Mat/MatIsSymmetric.html>

    Source code at petsc4py/PETSc/Mat.pyx:2503 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2503>

    isSymmetricKnown()
        Return the 2-tuple indicating if the matrix is known to be symmetric.

        Not collective.

        See also:
            MatIsSymmetricKnown <https://petsc.org/release/manualpages/Mat/MatIsSymmetricKnown.html>

    Source code at petsc4py/PETSc/Mat.pyx:2523 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2523>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[bool <https://docs.python.org/3/library/functions.html#bool>, bool <https://docs.python.org/3/library/functions.html#bool>]

    isTranspose(mat=None, tol=0)
        Return the result of matrix comparison with transposition.

        Collective.

        Parameters

            •   mat (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix to compare against. Uses self if None <https://docs.python.org/3/library/constants.html#None>.

            •   tol (float <https://docs.python.org/3/library/functions.html#float>) -- Tolerance for comparison.

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    See also:
            MatIsTranspose <https://petsc.org/release/manualpages/Mat/MatIsTranspose.html>

    Source code at petsc4py/PETSc/Mat.pyx:2480 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2480>

    kron(mat, result=None)
        Compute C, the Kronecker product of A and B.

        Collective.

        Parameters

            •   mat (Mat <#petsc4py.PETSc.Mat>) -- The right hand matrix B.

            •   result (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional resultant matrix. When None <https://docs.python.org/3/library/constants.html#None>, a new matrix is created, and MAT_INITIAL_MATRIX is used. When it is not None <https://docs.python.org/3/library/constants.html#None>, the matrix is reused with MAT_REUSE_MATRIX.

        Returns
            result -- The resultant matrix C, the Kronecker product of A and B.

        Return type
            Mat

    See also:
            MatSeqAIJKron <https://petsc.org/release/manualpages/Mat/MatSeqAIJKron.html>, MatReuse <https://petsc.org/release/manualpages/Mat/MatReuse.html>

    Source code at petsc4py/PETSc/Mat.pyx:4732 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4732>

    load(viewer)
        Load a matrix.

        Collective.

        See also:
            MatLoad <https://petsc.org/release/manualpages/Mat/MatLoad.html>

    Source code at petsc4py/PETSc/Mat.pyx:2260 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2260>

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer>)

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    matMatMult(B, C, result=None, fill=None)
        Perform matrix-matrix-matrix multiplication D=ABC.

        Neighborwise collective.

        Parameters

            •   B (Mat <#petsc4py.PETSc.Mat>) -- The middle matrix B.

            •   C (Mat <#petsc4py.PETSc.Mat>) -- The right hand matrix C.

            •   result (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional resultant matrix D. When None <https://docs.python.org/3/library/constants.html#None>, a new matrix is created, and MAT_INITIAL_MATRIX is used. When D is not None <https://docs.python.org/3/library/constants.html#None>, the matrix is reused with MAT_REUSE_MATRIX.

            •   fill (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Expected fill as ratio of nnz(C)/nnz(A), use None <https://docs.python.org/3/library/constants.html#None> if you do not have a good estimate. If the result is a dense matrix this is irrelevant.

        Returns
            result -- The resultant product matrix D.

        Return type
            Mat

    See also:
            MatMatMatMult <https://petsc.org/release/manualpages/Mat/MatMatMatMult.html>, MatReuse <https://petsc.org/release/manualpages/Mat/MatReuse.html>

    Source code at petsc4py/PETSc/Mat.pyx:4687 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4687>

    matMult(mat, result=None, fill=None)
        Perform matrix-matrix multiplication C=AB.

        Neighborwise collective.

        Parameters

            •   mat (Mat <#petsc4py.PETSc.Mat>) -- The right hand matrix B.

            •   result (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional resultant matrix C. When None <https://docs.python.org/3/library/constants.html#None>, a new matrix is created, and MAT_INITIAL_MATRIX is used. When C is not None <https://docs.python.org/3/library/constants.html#None>, the matrix is reused with MAT_REUSE_MATRIX.

            •   fill (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Expected fill as ratio of nnz(C)/(nnz(A) + nnz(B)), use None <https://docs.python.org/3/library/constants.html#None> if you do not have a good estimate. If the result is a dense matrix this is irrelevant.

        Returns
            result -- The resultant product matrix C.

        Return type
            Mat

    Notes

    To determine the correct fill value, run with -info and search for the string "Fill ratio" to see the value actually needed.

    See also:
            MatMatMult <https://petsc.org/release/manualpages/Mat/MatMatMult.html>, MatReuse <https://petsc.org/release/manualpages/Mat/MatReuse.html>

    Source code at petsc4py/PETSc/Mat.pyx:4448 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4448>

    matSolve(B, X)
        Solve AX=B, given a factored matrix A.

        Neighborwise collective.

        Parameters

            •   B (Mat <#petsc4py.PETSc.Mat>) -- The right-hand side matrix of type Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE>. Can be of type Type.AIJ <#petsc4py.PETSc.Mat.Type.AIJ> if using MUMPS.

            •   X (Mat <#petsc4py.PETSc.Mat>) -- The output solution matrix, must be different than B.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSP.create <#petsc4py.PETSc.KSP.create>, MatMatSolve <https://petsc.org/release/manualpages/Mat/MatMatSolve.html>

    Source code at petsc4py/PETSc/Mat.pyx:5767 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5767>

    matTransposeMult(mat, result=None, fill=None)
        Perform matrix-matrix multiplication C=ABᵀ.

        Neighborwise collective.

        Parameters

            •   mat (Mat <#petsc4py.PETSc.Mat>) -- The right hand matrix B.

            •   result (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional resultant matrix C. When None <https://docs.python.org/3/library/constants.html#None>, a new matrix is created, and MAT_INITIAL_MATRIX is used. When C is not None <https://docs.python.org/3/library/constants.html#None>, the matrix is reused with MAT_REUSE_MATRIX.

            •   fill (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Expected fill as ratio of nnz(C)/(nnz(A) + nnz(B)), use None <https://docs.python.org/3/library/constants.html#None> if you do not have a good estimate. If the result is a dense matrix this is irrelevant.

        Returns
            result -- The resultant product matrix C.

        Return type
            Mat

    Notes

    To determine the correct fill value, run with -info and search for the string "Fill ratio" to see the value actually needed.

    See also:
            MatMatTransposeMult <https://petsc.org/release/manualpages/Mat/MatMatTransposeMult.html>, MatReuse <https://petsc.org/release/manualpages/Mat/MatReuse.html>

    Source code at petsc4py/PETSc/Mat.pyx:4495 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4495>

    mult(x, y)
        Perform the matrix vector product y = A @ x.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input vector.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The output vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatMult <https://petsc.org/release/manualpages/Mat/MatMult.html>

    Source code at petsc4py/PETSc/Mat.pyx:3950 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3950>

    multAdd(x, v, y)
        Perform the matrix vector product with addition y = A @ x + v.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input vector for the matrix-vector product.

            •   v (Vec <#petsc4py.PETSc.Vec>) -- The input vector to be added to.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The output vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatMultAdd <https://petsc.org/release/manualpages/Mat/MatMultAdd.html>

    Source code at petsc4py/PETSc/Mat.pyx:3969 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3969>

    multHermitian(x, y)
        Perform the Hermitian matrix vector product y = A^H @ x.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input vector for the Hermitian matrix-vector product.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The output vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatMultHermitianTranspose <https://petsc.org/release/manualpages/Mat/MatMultHermitianTranspose.html>

    Source code at petsc4py/PETSc/Mat.pyx:4030 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4030>

    multHermitianAdd(x, v, y)
        Perform the Hermitian matrix vector product with addition y = A^H @ x + v.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input vector for the Hermitian matrix-vector product.

            •   v (Vec <#petsc4py.PETSc.Vec>) -- The input vector to be added to.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The output vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatMultHermitianTransposeAdd <https://petsc.org/release/manualpages/Mat/MatMultHermitianTransposeAdd.html>

    Source code at petsc4py/PETSc/Mat.pyx:4049 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4049>

    multTranspose(x, y)
        Perform the transposed matrix vector product y = A^T @ x.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input vector.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The output vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatMultTranspose <https://petsc.org/release/manualpages/Mat/MatMultTranspose.html>

    Source code at petsc4py/PETSc/Mat.pyx:3990 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3990>

    multTransposeAdd(x, v, y)
        Perform the transposed matrix vector product with addition y = A^T @ x + v.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input vector for the transposed matrix-vector product.

            •   v (Vec <#petsc4py.PETSc.Vec>) -- The input vector to be added to.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The output vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatMultTransposeAdd <https://petsc.org/release/manualpages/Mat/MatMultTransposeAdd.html>

    Source code at petsc4py/PETSc/Mat.pyx:4009 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4009>

    norm(norm_type=None)
        Compute the requested matrix norm.

        Collective.

        A 2-tuple is returned if NormType.NORM_1_AND_2 <#petsc4py.PETSc.NormType.NORM_1_AND_2> is specified.

        See also:
            MatNorm <https://petsc.org/release/manualpages/Mat/MatNorm.html>, NormType <https://petsc.org/release/manualpages/Vec/NormType.html>

    Source code at petsc4py/PETSc/Mat.pyx:4320 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4320>

        Parameters
            norm_type (NormTypeSpec <#petsc4py.typing.NormTypeSpec>)

        Return type
            float <https://docs.python.org/3/library/functions.html#float> | tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    permute(row, col)
        Return the permuted matrix.

        Collective.

        Parameters

            •   row (IS <#petsc4py.PETSc.IS>) -- Row permutation.

            •   col (IS <#petsc4py.PETSc.IS>) -- Column permutation.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            MatPermute <https://petsc.org/release/manualpages/Mat/MatPermute.html>

    Source code at petsc4py/PETSc/Mat.pyx:2445 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2445>

    preallocatorPreallocate(A, fill=True)
        Preallocate memory for a matrix using a preallocator matrix.

        Collective.

        The current matrix (self) must be of type Type.PREALLOCATOR <#petsc4py.PETSc.Mat.Type.PREALLOCATOR>.

        Parameters

            •   A (Mat <#petsc4py.PETSc.Mat>) -- The matrix to be preallocated.

            •   fill (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag indicating whether or not to insert zeros into the newly allocated matrix, defaults to True <https://docs.python.org/3/library/constants.html#True>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatPreallocatorPreallocate <https://petsc.org/release/manualpages/Mat/MatPreallocatorPreallocate.html>

    Source code at petsc4py/PETSc/Mat.pyx:1025 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1025>

    ptap(P, result=None, fill=None)
        Creates the matrix product C = PᵀAP.

        Neighborwise collective.

        Parameters

            •   P (Mat <#petsc4py.PETSc.Mat>) -- The matrix P.

            •   result (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional resultant matrix C. When None <https://docs.python.org/3/library/constants.html#None>, a new matrix is created, and MAT_INITIAL_MATRIX is used. When C is not None <https://docs.python.org/3/library/constants.html#None>, the matrix is reused with MAT_REUSE_MATRIX.

            •   fill (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Expected fill as ratio of nnz(C)/(nnz(A) + nnz(P)), use None <https://docs.python.org/3/library/constants.html#None> if you do not have a good estimate. If the result is a dense matrix this is irrelevant.

        Returns
            result -- The resultant product matrix C.

        Return type
            Mat

    Notes

    To determine the correct fill value, run with -info and search for the string "Fill ratio" to see the value actually needed.

    An alternative approach to this function is to use MatProductCreate <https://petsc.org/release/manualpages/Mat/MatProductCreate.html> and set the desired options before the computation is done.

    See also:
            MatPtAP <https://petsc.org/release/manualpages/Mat/MatPtAP.html>, MatReuse <https://petsc.org/release/manualpages/Mat/MatReuse.html>

    Source code at petsc4py/PETSc/Mat.pyx:4589 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4589>

    rart(R, result=None, fill=None)
        Create the matrix product C = RARᵀ.

        Neighborwise collective.

        Parameters

            •   R (Mat <#petsc4py.PETSc.Mat>) -- The projection matrix.

            •   result (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional resultant matrix C. When None <https://docs.python.org/3/library/constants.html#None>, a new matrix is created, and MAT_INITIAL_MATRIX is used. When C is not None <https://docs.python.org/3/library/constants.html#None>, the matrix is reused with MAT_REUSE_MATRIX.

            •   fill (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Expected fill as ratio of nnz(C)/nnz(A), use None <https://docs.python.org/3/library/constants.html#None> if you do not have a good estimate. If the result is a dense matrix this is irrelevant.

        Returns
            result -- The resultant product matrix C.

        Return type
            Mat

    Notes

    To determine the correct fill value, run with -info and search for the string "Fill ratio" to see the value actually needed.

    See also:
            MatRARt <https://petsc.org/release/manualpages/Mat/MatRARt.html>, MatReuse <https://petsc.org/release/manualpages/Mat/MatReuse.html>

    Source code at petsc4py/PETSc/Mat.pyx:4640 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4640>

    realPart(out=None)
        Return the real part of the matrix.

        Collective.

        Parameters
            out (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional return matrix. If None <https://docs.python.org/3/library/constants.html#None>, the operation is performed in-place. Otherwise, the operation is performed on out.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            imagPart, conjugate, MatRealPart <https://petsc.org/release/manualpages/Mat/MatRealPart.html>

    Source code at petsc4py/PETSc/Mat.pyx:2376 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2376>

    reorderForNonzeroDiagonal(isrow, iscol, atol=0)
        Change a matrix ordering to remove zeros from the diagonal.

        Collective.

        Parameters

            •   isrow (IS <#petsc4py.PETSc.IS>) -- The row reordering.

            •   iscol (IS <#petsc4py.PETSc.IS>) -- The column reordering.

            •   atol (float <https://docs.python.org/3/library/functions.html#float>) -- The absolute tolerance. Values along the diagonal whose absolute value are smaller than this tolerance are moved off the diagonal.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getOrdering, MatReorderForNonzeroDiagonal <https://petsc.org/release/manualpages/Mat/MatReorderForNonzeroDiagonal.html>

    Source code at petsc4py/PETSc/Mat.pyx:4831 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4831>

    resetLMVM(destructive=False)
        Flushes all of the accumulated updates out of the LMVM matrix.

        Logically collective.

        Parameters
            destructive (bool <https://docs.python.org/3/library/functions.html#bool>) -- Flag for enabling destruction of data structures.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatLMVMReset <https://petsc.org/release/manualpages/KSP/MatLMVMReset.html>

    Source code at petsc4py/PETSc/Mat.pyx:5466 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5466>

    restoreDenseColumnVec(i, mode='rw', V=None)
        Restore the iᵗʰ column vector of the dense matrix.

        Collective.

        Parameters

            •   i (int <https://docs.python.org/3/library/functions.html#int>) -- The column index to be restored.

            •   mode (AccessModeSpec <#petsc4py.typing.AccessModeSpec>) -- The access type of the vector to be restored.

            •   V (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The vector obtained from calling getDenseColumnVec.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getDenseColumnVec, MatDenseRestoreColumnVec <https://petsc.org/release/manualpages/Mat/MatDenseRestoreColumnVec.html>, MatDenseRestoreColumnVecRead <https://petsc.org/release/manualpages/Mat/MatDenseRestoreColumnVecRead.html>, MatDenseRestoreColumnVecWrite <https://petsc.org/release/manualpages/Mat/MatDenseRestoreColumnVecWrite.html>

    Source code at petsc4py/PETSc/Mat.pyx:5962 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5962>

    restoreDenseSubMatrix(mat)
        Restore access to a submatrix of a Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE> matrix.

        Collective.

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>) -- the matrix obtained from getDenseSubMatrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getDenseSubMatrix, MatDenseRestoreSubMatrix <https://petsc.org/release/manualpages/Mat/MatDenseRestoreSubMatrix.html>

    Source code at petsc4py/PETSc/Mat.pyx:5911 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5911>

    restoreISLocalMat(local)
        Restore the local matrix obtained with getISLocalMat.

        Not collective.

        Parameters
            local (Mat <#petsc4py.PETSc.Mat>) -- The local matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatISRestoreLocalMat <https://petsc.org/release/manualpages/Mat/MatISRestoreLocalMat.html>

    Source code at petsc4py/PETSc/Mat.pyx:5098 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5098>

    restoreLocalSubMatrix(isrow, iscol, submat)
        Restore a reference to a submatrix obtained with getLocalSubMatrix.

        Collective.

        Parameters

            •   isrow (IS <#petsc4py.PETSc.IS>) -- Row index set.

            •   iscol (IS <#petsc4py.PETSc.IS>) -- Column index set.

            •   submat (Mat <#petsc4py.PETSc.Mat>) -- The submatrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getLocalSubMatrix, MatRestoreLocalSubMatrix <https://petsc.org/release/manualpages/Mat/MatRestoreLocalSubMatrix.html>

    Source code at petsc4py/PETSc/Mat.pyx:4297 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4297>

    retrieveValues()
        Retrieve a copy of the matrix values previously stored with storeValues.

        Collective.

        See also:
            storeValues, MatRetrieveValues <https://petsc.org/release/manualpages/Mat/MatRetrieveValues.html>

    Source code at petsc4py/PETSc/Mat.pyx:3537 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3537>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    scale(alpha)
        Scale the matrix.

        Collective.

        See also:
            MatScale <https://petsc.org/release/manualpages/Mat/MatScale.html>

    Source code at petsc4py/PETSc/Mat.pyx:4342 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4342>

        Parameters
            alpha (Scalar <#petsc4py.typing.Scalar>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setBlockSize(bsize)
        Set the matrix block size (same for rows and columns).

        Logically collective.

        Parameters
            bsize (int <https://docs.python.org/3/library/functions.html#int>) -- Block size.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setBlockSizes, setSizes, MatSetBlockSize <https://petsc.org/release/manualpages/Mat/MatSetBlockSize.html>

    Source code at petsc4py/PETSc/Mat.pyx:614 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L614>

    setBlockSizes(row_bsize, col_bsize)
        Set the row and column block sizes.

        Logically collective.

        Parameters

            •   row_bsize (int <https://docs.python.org/3/library/functions.html#int>) -- Row block size.

            •   col_bsize (int <https://docs.python.org/3/library/functions.html#int>) -- Column block size.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setBlockSize, setSizes, MatSetBlockSizes <https://petsc.org/release/manualpages/Mat/MatSetBlockSizes.html>

    Source code at petsc4py/PETSc/Mat.pyx:632 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L632>

    setDM(dm)
        Set the DM defining the data layout of the matrix.

        Not collective.

        Parameters
            dm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetDM <https://petsc.org/release/manualpages/DM/MatSetDM.html>

    Source code at petsc4py/PETSc/Mat.pyx:6096 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6096>

    setDenseLDA(lda)
        Set the leading dimension of the array used by the dense matrix.

        Not collective.

        Parameters
            lda (int <https://docs.python.org/3/library/functions.html#int>) -- The leading dimension.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatDenseSetLDA <https://petsc.org/release/manualpages/Mat/MatDenseSetLDA.html>

    Source code at petsc4py/PETSc/Mat.pyx:5789 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5789>

    setDiagonal(diag, addv=None)
        Set the diagonal values of the matrix.

        Collective.

        Parameters

            •   diag (Vec <#petsc4py.PETSc.Vec>) -- Vector storing diagonal values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getDiagonal, MatDiagonalSet <https://petsc.org/release/manualpages/Mat/MatDiagonalSet.html>

    Source code at petsc4py/PETSc/Mat.pyx:3804 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3804>

    setFromOptions()
        Configure the matrix from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, MatSetFromOptions <https://petsc.org/release/manualpages/Mat/MatSetFromOptions.html>

    Source code at petsc4py/PETSc/Mat.pyx:1974 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1974>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setISAllowRepeated(allow=True)
        Allow repeated entries in the local to global map.

        Logically collective.

        Parameters
            allow (bool <https://docs.python.org/3/library/functions.html#bool>) -- When True <https://docs.python.org/3/library/constants.html#True>, local dofs are allowed to map to the same global dof.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getISAllowRepeated, MatISSetAllowRepeated <https://petsc.org/release/manualpages/Mat/MatISSetAllowRepeated.html>

    Source code at petsc4py/PETSc/Mat.pyx:5032 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5032>

    setISLocalMat(local)
        Set the local matrix stored inside a Type.IS <#petsc4py.PETSc.Mat.Type.IS>.

        Not collective.

        Parameters
            local (Mat <#petsc4py.PETSc.Mat>) -- The local matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatISSetLocalMat <https://petsc.org/release/manualpages/Mat/MatISSetLocalMat.html>

    Source code at petsc4py/PETSc/Mat.pyx:5115 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5115>

    setISPreallocation(nnz, onnz)
        Preallocate memory for a Type.IS <#petsc4py.PETSc.Mat.Type.IS> parallel matrix.

        Collective.

        Parameters

            •   nnz (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- The sequence whose length corresponds to the number of local rows and values which represent the number of nonzeros in the various rows of the diagonal of the local submatrix.

            •   onnz (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- The sequence whose length corresponds to the number of local rows and values which represent the number of nonzeros in the various rows of the off-diagonal of the local submatrix.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            MatISSetPreallocation <https://petsc.org/release/manualpages/Mat/MatISSetPreallocation.html>

    Source code at petsc4py/PETSc/Mat.pyx:5132 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5132>

    setLGMap(rmap, cmap=None)
        Set the local-to-global mappings.

        Collective.

        Parameters

            •   rmap (LGMap <#petsc4py.PETSc.LGMap>) -- Row mapping.

            •   cmap (LGMap <#petsc4py.PETSc.LGMap> | None <https://docs.python.org/3/library/constants.html#None>) -- Column mapping. If None <https://docs.python.org/3/library/constants.html#None>, cmap = rmap.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getLGMap, MatSetLocalToGlobalMapping <https://petsc.org/release/manualpages/Mat/MatSetLocalToGlobalMapping.html>

    Source code at petsc4py/PETSc/Mat.pyx:3011 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3011>

    setLMVMJ0(J0)
        Set the initial Jacobian of the LMVM matrix.

        Logically collective.

        Parameters
            J0 (Mat <#petsc4py.PETSc.Mat>) -- The initial Jacobian matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getLMVMJ0, MatLMVMSetJ0 <https://petsc.org/release/manualpages/KSP/MatLMVMSetJ0.html>

    Source code at petsc4py/PETSc/Mat.pyx:5378 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5378>

    setLMVMJ0KSP(ksp)
        Set the KSP of the LMVM matrix.

        Logically collective.

        Parameters
            ksp (KSP <#petsc4py.PETSc.KSP>) -- The KSP.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getLMVMJ0KSP, MatLMVMSetJ0KSP <https://petsc.org/release/manualpages/KSP/MatLMVMSetJ0KSP.html>

    Source code at petsc4py/PETSc/Mat.pyx:5409 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5409>

    setLRCMats(A, U, c=None, V=None)
        Set the constituents of a Type.LRC <#petsc4py.PETSc.Mat.Type.LRC> matrix.

        Logically collective.

        Parameters

            •   A (Mat) -- The A matrix, or None <https://docs.python.org/3/library/constants.html#None> to omit A.

            •   U (Mat) -- The first dense rectangular matrix.

            •   c (Vec <#petsc4py.PETSc.Vec>) -- The sequential vector containing the diagonal of C, or None <https://docs.python.org/3/library/constants.html#None> for all ones.

            •   V (Mat) -- The second dense rectangular matrix, or None <https://docs.python.org/3/library/constants.html#None> for a copy of U.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatLRCSetMats <https://petsc.org/release/manualpages/Mat/MatLRCSetMats.html>

    Source code at petsc4py/PETSc/Mat.pyx:5197 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5197>

    setMumpsCntl(icntl, val)
        Set a MUMPS parameter, CNTL[icntl] = val.

        Logically collective.

        Parameters

            •   icntl (int <https://docs.python.org/3/library/functions.html#int>) -- The index of the MUMPS parameter array.

            •   val (float <https://docs.python.org/3/library/functions.html#float>) -- The value to set.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            Working with PETSc options <#petsc-options>, MatMumpsSetCntl <https://petsc.org/release/manualpages/Mat/MatMumpsSetCntl.html>

    Source code at petsc4py/PETSc/Mat.pyx:5521 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5521>

    setMumpsIcntl(icntl, ival)
        Set a MUMPS parameter, ICNTL[icntl] = ival.

        Logically collective.

        Parameters

            •   icntl (int <https://docs.python.org/3/library/functions.html#int>) -- The index of the MUMPS parameter array.

            •   ival (int <https://docs.python.org/3/library/functions.html#int>) -- The value to set.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            Working with PETSc options <#petsc-options>, MatMumpsSetIcntl <https://petsc.org/release/manualpages/Mat/MatMumpsSetIcntl.html>

    Source code at petsc4py/PETSc/Mat.pyx:5485 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5485>

    setNearNullSpace(nsp)
        Set the near-nullspace.

        Collective.

        See also:
            setNullSpace, getNearNullSpace, MatSetNearNullSpace <https://petsc.org/release/manualpages/Mat/MatSetNearNullSpace.html>

    Source code at petsc4py/PETSc/Mat.pyx:3921 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3921>

        Parameters
            nsp (NullSpace <#petsc4py.PETSc.NullSpace>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setNestVecType(vec_type)
        Set the vector type for a Type.NEST <#petsc4py.PETSc.Mat.Type.NEST> matrix.

        Collective.

        Parameters
            vec_type (Type <#petsc4py.PETSc.Vec.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- Vector type used when creating vectors with createVecs.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getVecType, MatNestSetVecType <https://petsc.org/release/manualpages/Mat/MatNestSetVecType.html>

    Source code at petsc4py/PETSc/Mat.pyx:700 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L700>

    setNullSpace(nsp)
        Set the nullspace.

        Collective.

        See also:
            getNullSpace, MatSetNullSpace <https://petsc.org/release/manualpages/Mat/MatSetNullSpace.html>

    Source code at petsc4py/PETSc/Mat.pyx:3867 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3867>

        Parameters
            nsp (NullSpace <#petsc4py.PETSc.NullSpace>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setOption(option, flag)
        Set option.

        Collective.

        See also:
            getOption, MatSetOption <https://petsc.org/release/manualpages/Mat/MatSetOption.html>

    Source code at petsc4py/PETSc/Mat.pyx:1999 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1999>

        Parameters

            •   option (Option <#petsc4py.PETSc.Mat.Option>)

            •   flag (bool <https://docs.python.org/3/library/functions.html#bool>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setOptionsPrefix(prefix=None)
        Set the prefix used for searching for options in the database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, getOptionsPrefix, MatSetOptionsPrefix <https://petsc.org/release/manualpages/Mat/MatSetOptionsPrefix.html>

    Source code at petsc4py/PETSc/Mat.pyx:1932 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1932>

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPreallocationCOO(coo_i, coo_j)
        Set preallocation using coordinate format with global indices.

        Collective.

        Parameters

            •   coo_i (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Row indices in COO format.

            •   coo_j (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Column indices in COO format.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            setValuesCOO, setPreallocationNNZ, setPreallocationCSR, MatSetPreallocationCOO <https://petsc.org/release/manualpages/Mat/MatSetPreallocationCOO.html>

    Source code at petsc4py/PETSc/Mat.pyx:927 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L927>

    setPreallocationCOOLocal(coo_i, coo_j)
        Set preallocation using coordinate format with local indices.

        Collective.

        Parameters

            •   coo_i (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Row indices in COO format.

            •   coo_j (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Column indices in COO format.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            setPreallocationCOO, setValuesCOO, setLGMap, MatSetPreallocationCOOLocal <https://petsc.org/release/manualpages/Mat/MatSetPreallocationCOOLocal.html>, MatSetPreallocationCOOLocal <https://petsc.org/release/manualpages/Mat/MatSetPreallocationCOOLocal.html>

    Source code at petsc4py/PETSc/Mat.pyx:959 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L959>

    setPreallocationCSR(csr)
        Preallocate memory for the matrix with a CSR layout.

        Collective.

        Correct preallocation can result in a dramatic reduction in matrix assembly time.

        Parameters
            csr (CSRSpec <#petsc4py.typing.CSRSpec> | CSRIndicesSpec <#petsc4py.typing.CSRIndicesSpec>) -- Local matrix data in compressed sparse row layout format.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Notes

    Must use the block-compressed form with Type.BAIJ <#petsc4py.PETSc.Mat.Type.BAIJ> and Type.SBAIJ <#petsc4py.PETSc.Mat.Type.SBAIJ>.

    See also:
            setPreallocationNNZ, createAIJ, createBAIJ, createSBAIJ, MatSeqAIJSetPreallocationCSR <https://petsc.org/release/manualpages/Mat/MatSeqAIJSetPreallocationCSR.html>, MatMPIAIJSetPreallocationCSR <https://petsc.org/release/manualpages/Mat/MatMPIAIJSetPreallocationCSR.html>, MatSeqBAIJSetPreallocationCSR <https://petsc.org/release/manualpages/Mat/MatSeqBAIJSetPreallocationCSR.html>, MatMPIBAIJSetPreallocationCSR <https://petsc.org/release/manualpages/Mat/MatMPIBAIJSetPreallocationCSR.html>, MatSeqSBAIJSetPreallocationCSR <https://petsc.org/release/manualpages/Mat/MatSeqSBAIJSetPreallocationCSR.html>, MatMPISBAIJSetPreallocationCSR <https://petsc.org/release/manualpages/Mat/MatMPISBAIJSetPreallocationCSR.html>

    Source code at petsc4py/PETSc/Mat.pyx:991 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L991>

    setPreallocationDense(array)
        Set the array used for storing matrix elements for a dense matrix.

        Collective.

        Parameters
            array (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- Array that will be used to store matrix data.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            MatSeqDenseSetPreallocation <https://petsc.org/release/manualpages/Mat/MatSeqDenseSetPreallocation.html>, MatMPIDenseSetPreallocation <https://petsc.org/release/manualpages/Mat/MatMPIDenseSetPreallocation.html>

    Source code at petsc4py/PETSc/Mat.pyx:1232 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1232>

    setPreallocationNNZ(nnz)
        Preallocate memory for the matrix with a non-zero pattern.

        Collective.

        Correct preallocation can result in a dramatic reduction in matrix assembly time.

        Parameters
            nnz (NNZSpec <#petsc4py.typing.NNZSpec>) -- The number of non-zeros per row for the local portion of the matrix, or a 2-tuple for the on-process and off-process part of the matrix.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            setPreallocationCSR, createAIJ, MatSeqAIJSetPreallocation <https://petsc.org/release/manualpages/Mat/MatSeqAIJSetPreallocation.html>, MatMPIAIJSetPreallocation <https://petsc.org/release/manualpages/Mat/MatMPIAIJSetPreallocation.html>

    Source code at petsc4py/PETSc/Mat.pyx:901 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L901>

    setPythonContext(context)
        Set the instance of the class implementing the required Python methods.

        Logically collective.

        Notes

        In order to use the matrix, Mat.setUp must be called after having set the context. Pass None <https://docs.python.org/3/library/constants.html#None> to reset the matrix to its initial state.

        See also:
            PETSc Python matrix type <#petsc-python-mat>, getPythonContext, setPythonType

    Source code at petsc4py/PETSc/Mat.pyx:1863 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1863>

        Parameters
            context (Any <https://docs.python.org/3/library/typing.html#typing.Any>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPythonType(py_type)
        Set the fully qualified Python name of the class to be used.

        Collective.

        Notes

        In order to use the matrix, Mat.setUp must be called after having set the type.

        See also:
            PETSc Python matrix type <#petsc-python-mat>, setPythonContext, getPythonType, MatPythonSetType <https://petsc.org/release/manualpages/Mat/MatPythonSetType.html>

    Source code at petsc4py/PETSc/Mat.pyx:1895 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1895>

        Parameters
            py_type (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setRandom(random=None)
        Set random values in the matrix.

        Collective.

        Parameters
            random (Random <#petsc4py.PETSc.Random> | None <https://docs.python.org/3/library/constants.html#None>) -- The random number generator object or None <https://docs.python.org/3/library/constants.html#None> for the default.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetRandom <https://petsc.org/release/manualpages/Mat/MatSetRandom.html>

    Source code at petsc4py/PETSc/Mat.pyx:4381 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4381>

    setSizes(size, bsize=None)
        Set the local, global and block sizes.

        Collective.

        Parameters

            •   size (MatSizeSpec <#petsc4py.typing.MatSizeSpec>) -- Matrix size.

            •   bsize (MatBlockSizeSpec <#petsc4py.typing.MatBlockSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix block size. If None <https://docs.python.org/3/library/constants.html#None>, a block size of 1 is set.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Examples

    Create a Mat with n rows and columns and the same local and global sizes.

        >>> mat = PETSc.Mat().create()
        >>> mat.setFromOptions()
        >>> mat.setSizes(n)

    Create a Mat with nr rows, nc columns and the same local and global sizes.

        >>> mat = PETSc.Mat().create()
        >>> mat.setFromOptions()
        >>> mat.setSizes([nr, nc])

    Create a Mat with nrl local rows, nrg global rows, ncl local columns and ncg global columns.

        >>> mat = PETSc.Mat().create()
        >>> mat.setFromOptions()
        >>> mat.setSizes([[nrl, nrg], [ncl, ncg]])

    See also:
            setBlockSize, setBlockSizes, MatSetSizes <https://petsc.org/release/manualpages/Mat/MatSetSizes.html>, MatSetBlockSize <https://petsc.org/release/manualpages/Mat/MatSetBlockSize.html>, MatSetBlockSizes <https://petsc.org/release/manualpages/Mat/MatSetBlockSizes.html>

    Source code at petsc4py/PETSc/Mat.pyx:561 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L561>

    setStencil(dims, starts=None, dof=1)
        Set matrix stencil.

        Not collective.

        See also:
            MatSetStencil <https://petsc.org/release/manualpages/Mat/MatSetStencil.html>

    Source code at petsc4py/PETSc/Mat.pyx:3269 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3269>

        Parameters

            •   dims (DimsSpec <#petsc4py.typing.DimsSpec>)

            •   starts (DimsSpec <#petsc4py.typing.DimsSpec> | None <https://docs.python.org/3/library/constants.html#None>)

            •   dof (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setTransposeNullSpace(nsp)
        Set the transpose nullspace.

        Collective.

        See also:
            setNullSpace, getTransposeNullSpace, MatSetTransposeNullSpace <https://petsc.org/release/manualpages/Mat/MatSetTransposeNullSpace.html>

    Source code at petsc4py/PETSc/Mat.pyx:3894 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3894>

        Parameters
            nsp (NullSpace <#petsc4py.PETSc.NullSpace>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setTransposePrecursor(out)
        Set transpose precursor.

        Logically collective.

        See also:
            MatTransposeSetPrecursor <https://petsc.org/release/manualpages/Mat/MatTransposeSetPrecursor.html>

    Source code at petsc4py/PETSc/Mat.pyx:2337 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2337>

        Parameters
            out (Mat <#petsc4py.PETSc.Mat>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setType(mat_type)
        Set the matrix type.

        Collective.

        Parameters
            mat_type (Type <#petsc4py.PETSc.Mat.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The matrix type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            create, getType, MatSetType <https://petsc.org/release/manualpages/Mat/MatSetType.html>

    Source code at petsc4py/PETSc/Mat.pyx:542 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L542>

    setUnfactored()
        Set a factored matrix to be treated as unfactored.

        Logically collective.

        See also:
            MatSetUnfactored <https://petsc.org/release/manualpages/Mat/MatSetUnfactored.html>

    Source code at petsc4py/PETSc/Mat.pyx:5018 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5018>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setUp()
        Set up the internal data structures for using the matrix.

        Collective.

        See also:
            MatSetUp <https://petsc.org/release/manualpages/Mat/MatSetUp.html>

    Source code at petsc4py/PETSc/Mat.pyx:1986 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L1986>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    setValue(row, col, value, addv=None)
        Set a value to the (row, col) entry of the matrix.

        Not collective.

        Parameters

            •   row (int <https://docs.python.org/3/library/functions.html#int>) -- Row index.

            •   col (int <https://docs.python.org/3/library/functions.html#int>) -- Column index.

            •   value (Scalar <#petsc4py.typing.Scalar>) -- The scalar value.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValues <https://petsc.org/release/manualpages/Mat/MatSetValues.html>

    Source code at petsc4py/PETSc/Mat.pyx:2774 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2774>

    setValueBlockedStagStencil(row, col, value, addv=None)
        Not implemented.

        Source code at petsc4py/PETSc/Mat.pyx:3353 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3353>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setValueBlockedStencil(row, col, value, addv=None)
        Set a block of values to row and col stencil.

        Not collective.

        Parameters

            •   row (Stencil <#petsc4py.PETSc.Mat.Stencil>) -- Row stencil.

            •   col (Stencil <#petsc4py.PETSc.Mat.Stencil>) -- Column stencil.

            •   value (Sequence[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesBlockedStencil <https://petsc.org/release/manualpages/Mat/MatSetValuesBlockedStencil.html>

    Source code at petsc4py/PETSc/Mat.pyx:3323 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3323>

    setValueLocal(row, col, value, addv=None)
        Set a value to the (row, col) entry of the matrix in local ordering.

        Not collective.

        Parameters

            •   row (int <https://docs.python.org/3/library/functions.html#int>) -- Local row index.

            •   col (int <https://docs.python.org/3/library/functions.html#int>) -- Local column index.

            •   value (Scalar <#petsc4py.typing.Scalar>) -- The scalar value.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesLocal <https://petsc.org/release/manualpages/Mat/MatSetValuesLocal.html>

    Source code at petsc4py/PETSc/Mat.pyx:3048 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3048>

    setValueStagStencil(row, col, value, addv=None)
        Not implemented.

        Source code at petsc4py/PETSc/Mat.pyx:3319 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3319>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setValueStencil(row, col, value, addv=None)
        Set a value to row and col stencil.

        Not collective.

        Parameters

            •   row (Stencil <#petsc4py.PETSc.Mat.Stencil>) -- Row stencil.

            •   col (Stencil <#petsc4py.PETSc.Mat.Stencil>) -- Column stencil.

            •   value (Sequence[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesStencil <https://petsc.org/release/manualpages/Mat/MatSetValuesStencil.html>

    Source code at petsc4py/PETSc/Mat.pyx:3289 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3289>

    setValues(rows, cols, values, addv=None)
        Set values to the rows ⊗ cols entries of the matrix.

        Not collective.

        Parameters

            •   rows (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Row indices.

            •   cols (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Column indices.

            •   values (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values. A sequence of length at least len(rows) * len(cols).

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValues <https://petsc.org/release/manualpages/Mat/MatSetValues.html>

    Source code at petsc4py/PETSc/Mat.pyx:2806 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2806>

    setValuesBlocked(rows, cols, values, addv=None)
        Set values to the rows ⊗ col block entries of the matrix.

        Not collective.

        Parameters

            •   rows (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Block row indices.

            •   cols (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Block column indices.

            •   values (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values. A sequence of length at least len(rows) * len(cols) * bs * bs, where bs is the block size of the matrix.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesBlocked <https://petsc.org/release/manualpages/Mat/MatSetValuesBlocked.html>

    Source code at petsc4py/PETSc/Mat.pyx:2918 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2918>

    setValuesBlockedCSR(I, J, V, addv=None)
        Set values stored in block CSR format.

        Not collective.

        Parameters

            •   I (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Block row pointers.

            •   J (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Block column indices.

            •   V (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesBlocked <https://petsc.org/release/manualpages/Mat/MatSetValuesBlocked.html>

    Source code at petsc4py/PETSc/Mat.pyx:2983 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2983>

    setValuesBlockedIJV(I, J, V, addv=None, rowmap=None)
        Set a subset of values stored in block CSR format.

        Not collective.

        Parameters

            •   I (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Block row pointers.

            •   J (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Block column indices.

            •   V (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

            •   rowmap (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- Optional iterable indicating which block row to insert.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesBlocked <https://petsc.org/release/manualpages/Mat/MatSetValuesBlocked.html>

    Source code at petsc4py/PETSc/Mat.pyx:2952 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2952>

    setValuesBlockedLocal(rows, cols, values, addv=None)
        Set values to the rows ⊗ col block entries of the matrix in local ordering.

        Not collective.

        Parameters

            •   rows (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Local block row indices.

            •   cols (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Local block column indices.

            •   values (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values. A sequence of length at least len(rows) * len(cols) * bs * bs, where bs is the block size of the matrix.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesBlockedLocal <https://petsc.org/release/manualpages/Mat/MatSetValuesBlockedLocal.html>

    Source code at petsc4py/PETSc/Mat.pyx:3172 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3172>

    setValuesBlockedLocalCSR(I, J, V, addv=None)
        Set values stored in block CSR format.

        Not collective.

        Parameters

            •   I (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Block row pointers.

            •   J (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Local block column indices.

            •   V (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesBlockedLocal <https://petsc.org/release/manualpages/Mat/MatSetValuesBlockedLocal.html>

    Source code at petsc4py/PETSc/Mat.pyx:3237 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3237>

    setValuesBlockedLocalIJV(I, J, V, addv=None, rowmap=None)
        Set a subset of values stored in block CSR format.

        Not collective.

        Parameters

            •   I (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Block row pointers.

            •   J (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Local block column indices.

            •   V (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

            •   rowmap (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- Optional iterable indicating which block row to insert.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesBlockedLocal <https://petsc.org/release/manualpages/Mat/MatSetValuesBlockedLocal.html>

    Source code at petsc4py/PETSc/Mat.pyx:3206 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3206>

    setValuesBlockedLocalRCV(R, C, V, addv=None)
        Undocumented.

        Source code at petsc4py/PETSc/Mat.pyx:3202 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3202>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setValuesBlockedRCV(R, C, V, addv=None)
        Undocumented.

        Source code at petsc4py/PETSc/Mat.pyx:2948 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2948>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setValuesCOO(coo_v, addv=None)
        Set values after preallocation with coordinate format.

        Collective.

        Parameters

            •   coo_v (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The matrix values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setPreallocationCOO, MatSetValuesCOO <https://petsc.org/release/manualpages/Mat/MatSetValuesCOO.html>

    Source code at petsc4py/PETSc/Mat.pyx:2869 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2869>

    setValuesCSR(I, J, V, addv=None)
        Set values stored in CSR format.

        Not collective.

        Parameters

            •   I (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Row pointers.

            •   J (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Column indices.

            •   V (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValues <https://petsc.org/release/manualpages/Mat/MatSetValues.html>

    Source code at petsc4py/PETSc/Mat.pyx:2890 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2890>

    setValuesIJV(I, J, V, addv=None, rowmap=None)
        Set a subset of values stored in CSR format.

        Not collective.

        Parameters

            •   I (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Row pointers.

            •   J (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Column indices.

            •   V (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

            •   rowmap (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- Optional iterable indicating which row to insert.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValues <https://petsc.org/release/manualpages/Mat/MatSetValues.html>

    Source code at petsc4py/PETSc/Mat.pyx:2838 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2838>

    setValuesLocal(rows, cols, values, addv=None)
        Set values to the rows ⊗ col entries of the matrix in local ordering.

        Not collective.

        Parameters

            •   rows (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Local row indices.

            •   cols (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Local column indices.

            •   values (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values. A sequence of length at least len(rows) * len(cols).

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesLocal <https://petsc.org/release/manualpages/Mat/MatSetValuesLocal.html>

    Source code at petsc4py/PETSc/Mat.pyx:3081 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3081>

    setValuesLocalCSR(I, J, V, addv=None)
        Set values stored in CSR format.

        Not collective.

        Parameters

            •   I (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Row pointers.

            •   J (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Local column indices.

            •   V (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesLocal <https://petsc.org/release/manualpages/Mat/MatSetValuesLocal.html>

    Source code at petsc4py/PETSc/Mat.pyx:3144 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3144>

    setValuesLocalIJV(I, J, V, addv=None, rowmap=None)
        Set a subset of values stored in CSR format.

        Not collective.

        Parameters

            •   I (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Row pointers.

            •   J (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Local column indices.

            •   V (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- The scalar values.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

            •   rowmap (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- Optional iterable indicating which row to insert.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatSetValuesLocal <https://petsc.org/release/manualpages/Mat/MatSetValuesLocal.html>

    Source code at petsc4py/PETSc/Mat.pyx:3113 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3113>

    setValuesLocalRCV(R, C, V, addv=None)
        Undocumented.

        Source code at petsc4py/PETSc/Mat.pyx:3109 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3109>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setValuesRCV(R, C, V, addv=None)
        Undocumented.

        Source code at petsc4py/PETSc/Mat.pyx:2834 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2834>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setVariableBlockSizes(blocks)
        Set diagonal point-blocks of the matrix.

        Not collective.

        See also:
            setBlockSize, MatSetVariableBlockSizes <https://petsc.org/release/manualpages/Mat/MatSetVariableBlockSizes.html>

    Source code at petsc4py/PETSc/Mat.pyx:653 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L653>

        Parameters
            blocks (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>])

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setVecType(vec_type)
        Set the vector type.

        Collective.

        Parameters
            vec_type (Type <#petsc4py.PETSc.Vec.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- Vector type used when creating vectors with createVecs.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getVecType, MatSetVecType <https://petsc.org/release/manualpages/Mat/MatSetVecType.html>

    Source code at petsc4py/PETSc/Mat.pyx:667 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L667>

    shift(alpha)
        Shift the matrix.

        Collective.

        See also:
            MatShift <https://petsc.org/release/manualpages/Mat/MatShift.html>

    Source code at petsc4py/PETSc/Mat.pyx:4355 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4355>

        Parameters
            alpha (Scalar <#petsc4py.typing.Scalar>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    solve(b, x)
        Solve Ax=b, given a factored matrix.

        Neighborwise collective.

        The vectors b and x cannot be the same. Most users should employ the KSP <#petsc4py.PETSc.KSP> interface for linear solvers instead of working directly with matrix algebra routines.

        Parameters

            •   b (Vec <#petsc4py.PETSc.Vec>) -- The right-hand side vector.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The output solution vector, must be different than b.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSP.create <#petsc4py.PETSc.KSP.create>, solveTranspose, MatSolve <https://petsc.org/release/manualpages/Mat/MatSolve.html>

    Source code at petsc4py/PETSc/Mat.pyx:5677 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5677>

    solveAdd(b, y, x)
        Solve x=y+A⁻¹b, given a factored matrix.

        Neighborwise collective.

        The vectors b and x cannot be the same.

        Parameters

            •   b (Vec <#petsc4py.PETSc.Vec>) -- The right-hand side vector.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The vector to be added

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The output solution vector, must be different than b.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSP.create <#petsc4py.PETSc.KSP.create>, MatSolve <https://petsc.org/release/manualpages/Mat/MatSolve.html>, MatSolveAdd <https://petsc.org/release/manualpages/Mat/MatSolveAdd.html>

    Source code at petsc4py/PETSc/Mat.pyx:5721 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5721>

    solveBackward(b, x)
        Solve Ux=b, given a factored matrix A=LU.

        Neighborwise collective.

        Parameters

            •   b (Vec <#petsc4py.PETSc.Vec>) -- The right-hand side vector.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The output solution vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatBackwardSolve <https://petsc.org/release/manualpages/Mat/MatBackwardSolve.html>

    Source code at petsc4py/PETSc/Mat.pyx:5658 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5658>

    solveForward(b, x)
        Solve Lx = b, given a factored matrix A = LU.

        Neighborwise collective.

        Parameters

            •   b (Vec <#petsc4py.PETSc.Vec>) -- The right-hand side vector.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The output solution vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatForwardSolve <https://petsc.org/release/manualpages/Mat/MatForwardSolve.html>

    Source code at petsc4py/PETSc/Mat.pyx:5639 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5639>

    solveTranspose(b, x)
        Solve Aᵀx=b, given a factored matrix.

        Neighborwise collective.

        The vectors b and x cannot be the same.

        Parameters

            •   b (Vec <#petsc4py.PETSc.Vec>) -- The right-hand side vector.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The output solution vector, must be different than b.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSP.create <#petsc4py.PETSc.KSP.create>, MatSolve <https://petsc.org/release/manualpages/Mat/MatSolve.html>, MatSolveTranspose <https://petsc.org/release/manualpages/Mat/MatSolveTranspose.html>

    Source code at petsc4py/PETSc/Mat.pyx:5700 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5700>

    solveTransposeAdd(b, y, x)
        Solve x=y+A⁻ᵀb, given a factored matrix.

        Neighborwise collective.

        The vectors b and x cannot be the same.

        Parameters

            •   b (Vec <#petsc4py.PETSc.Vec>) -- The right-hand side vector.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The vector to be added

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The output solution vector, must be different than b.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            KSP.create <#petsc4py.PETSc.KSP.create>, MatSolve <https://petsc.org/release/manualpages/Mat/MatSolve.html>, MatSolveTransposeAdd <https://petsc.org/release/manualpages/Mat/MatSolveTransposeAdd.html>

    Source code at petsc4py/PETSc/Mat.pyx:5744 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5744>

    storeValues()
        Stash a copy of the matrix values.

        Collective.

        See also:
            retrieveValues, MatStoreValues <https://petsc.org/release/manualpages/Mat/MatStoreValues.html>

    Source code at petsc4py/PETSc/Mat.pyx:3525 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3525>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    toDLPack(mode='rw')
        Return a DLPack PyCapsule <https://docs.python.org/3/c-api/capsule.html#c.PyCapsule> wrapping the vector data.

        Source code at petsc4py/PETSc/Mat.pyx:6184 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6184>

        Parameters
            mode (AccessModeSpec <#petsc4py.typing.AccessModeSpec>)

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    transpose(out=None)
        Return the transposed matrix.

        Collective.

        Parameters
            out (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional return matrix. If None <https://docs.python.org/3/library/constants.html#None>, inplace transposition is performed. Otherwise, the matrix is reused.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            MatTranspose <https://petsc.org/release/manualpages/Mat/MatTranspose.html>

    Source code at petsc4py/PETSc/Mat.pyx:2310 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2310>

    transposeMatMult(mat, result=None, fill=None)
        Perform matrix-matrix multiplication C=AᵀB.

        Neighborwise collective.

        Parameters

            •   mat (Mat <#petsc4py.PETSc.Mat>) -- The right hand matrix B.

            •   result (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional resultant matrix C. When None <https://docs.python.org/3/library/constants.html#None>, a new matrix is created, and MAT_INITIAL_MATRIX is used. When C is not None <https://docs.python.org/3/library/constants.html#None>, the matrix is reused with MAT_REUSE_MATRIX.

            •   fill (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Expected fill as ratio of nnz(C)/(nnz(A) + nnz(B)), use None <https://docs.python.org/3/library/constants.html#None> if you do not have a good estimate. If the result is a dense matrix this is irrelevant.

        Returns
            result -- The resultant product matrix C.

        Return type
            Mat

    Notes

    To determine the correct fill value, run with -info and search for the string "Fill ratio" to see the value actually needed.

    See also:
            MatTransposeMatMult <https://petsc.org/release/manualpages/Mat/MatTransposeMatMult.html>, MatReuse <https://petsc.org/release/manualpages/Mat/MatReuse.html>

    Source code at petsc4py/PETSc/Mat.pyx:4542 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L4542>

    updateLMVM(x, f)
        Adds (X-Xprev) and (F-Fprev) updates to LMVM matrix.

        Logically collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Solution vector.

            •   f (Vec <#petsc4py.PETSc.Vec>) -- Function vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatLMVMUpdate <https://petsc.org/release/manualpages/KSP/MatLMVMUpdate.html>

    Source code at petsc4py/PETSc/Mat.pyx:5446 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L5446>

    view(viewer=None)
        View the matrix.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    Viewers with type Viewer.Type.ASCII <#petsc4py.PETSc.Viewer.Type.ASCII> are only recommended for small matrices on small numbers of processes. Larger matrices should use a binary format like Viewer.Type.BINARY <#petsc4py.PETSc.Viewer.Type.BINARY>.

    See also:
            load, Viewer <#petsc4py.PETSc.Viewer>, MatView <https://petsc.org/release/manualpages/Mat/MatView.html>

    Source code at petsc4py/PETSc/Mat.pyx:478 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L478>

    zeroEntries()
        Zero the entries of the matrix.

        Collective.

        See also:
            MatZeroEntries <https://petsc.org/release/manualpages/Mat/MatZeroEntries.html>

    Source code at petsc4py/PETSc/Mat.pyx:2606 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L2606>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    zeroRows(rows, diag=1.0, x=None, b=None)
        Zero selected rows of the matrix.

        Collective.

        Parameters

            •   rows (IS <#petsc4py.PETSc.IS> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Row indices to be zeroed.

            •   diag (Scalar <#petsc4py.typing.Scalar>) -- Scalar value to be inserted into the diagonal.

            •   x (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional solution vector to be modified for zeroed rows.

            •   b (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional right-hand side vector to be modified. It will be adjusted with provided solution entries.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            zeroRowsLocal, MatZeroRows <https://petsc.org/release/manualpages/Mat/MatZeroRows.html>, MatZeroRowsIS <https://petsc.org/release/manualpages/Mat/MatZeroRowsIS.html>

    Source code at petsc4py/PETSc/Mat.pyx:3357 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3357>

    zeroRowsColumns(rows, diag=1.0, x=None, b=None)
        Zero selected rows and columns of the matrix.

        Collective.

        Parameters

            •   rows (IS <#petsc4py.PETSc.IS> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Row/column indices to be zeroed.

            •   diag (Scalar <#petsc4py.typing.Scalar>) -- Scalar value to be inserted into the diagonal.

            •   x (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional solution vector to be modified for zeroed rows.

            •   b (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional right-hand side vector to be modified. It will be adjusted with provided solution entries.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            zeroRowsColumnsLocal, zeroRows, MatZeroRowsColumns <https://petsc.org/release/manualpages/Mat/MatZeroRowsColumns.html>, MatZeroRowsColumnsIS <https://petsc.org/release/manualpages/Mat/MatZeroRowsColumnsIS.html>

    Source code at petsc4py/PETSc/Mat.pyx:3423 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3423>

    zeroRowsColumnsLocal(rows, diag=1.0, x=None, b=None)
        Zero selected rows and columns of the matrix in local ordering.

        Collective.

        Parameters

            •   rows (IS <#petsc4py.PETSc.IS> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Local row/column indices to be zeroed.

            •   diag (Scalar <#petsc4py.typing.Scalar>) -- Scalar value to be inserted into the diagonal.

            •   x (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional solution vector to be modified for zeroed rows.

            •   b (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional right-hand side vector to be modified. It will be adjusted with provided solution entries.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            zeroRowsLocal, zeroRowsColumns, MatZeroRowsColumnsLocal <https://petsc.org/release/manualpages/Mat/MatZeroRowsColumnsLocal.html>, MatZeroRowsColumnsLocalIS <https://petsc.org/release/manualpages/Mat/MatZeroRowsColumnsLocalIS.html>

    Source code at petsc4py/PETSc/Mat.pyx:3457 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3457>

    zeroRowsColumnsStencil(rows, diag=1.0, x=None, b=None)
        Zero selected rows and columns of the matrix.

        Collective.

        Parameters

            •   rows (Sequence[Stencil <#petsc4py.PETSc.Mat.Stencil>]) -- Iterable of stencil rows and columns.

            •   diag (Scalar <#petsc4py.typing.Scalar>) -- Scalar value to be inserted into the diagonal.

            •   x (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional solution vector to be modified for zeroed rows.

            •   b (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional right-hand side vector to be modified. It will be adjusted with provided solution entries.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            zeroRowsLocal, zeroRowsColumns, MatZeroRowsColumnsStencil <https://petsc.org/release/manualpages/Mat/MatZeroRowsColumnsStencil.html>

    Source code at petsc4py/PETSc/Mat.pyx:3491 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3491>

    zeroRowsLocal(rows, diag=1.0, x=None, b=None)
        Zero selected rows of the matrix in local ordering.

        Collective.

        Parameters

            •   rows (IS <#petsc4py.PETSc.IS> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Local row indices to be zeroed.

            •   diag (Scalar <#petsc4py.typing.Scalar>) -- Scalar value to be inserted into the diagonal.

            •   x (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional solution vector to be modified for zeroed rows.

            •   b (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional right-hand side vector to be modified. It will be adjusted with provided solution entries.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            zeroRows, MatZeroRowsLocal <https://petsc.org/release/manualpages/Mat/MatZeroRowsLocal.html>, MatZeroRowsLocalIS <https://petsc.org/release/manualpages/Mat/MatZeroRowsLocalIS.html>

    Source code at petsc4py/PETSc/Mat.pyx:3390 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L3390>

Attributes Documentation

    assembled
        The boolean flag indicating if the matrix is assembled.

        Source code at petsc4py/PETSc/Mat.pyx:6159 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6159>

    block_size
        Matrix block size.

        Source code at petsc4py/PETSc/Mat.pyx:6137 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6137>

    block_sizes
        Matrix row and column block sizes.

        Source code at petsc4py/PETSc/Mat.pyx:6142 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6142>

    hermitian
        The boolean flag indicating if the matrix is Hermitian.

        Source code at petsc4py/PETSc/Mat.pyx:6167 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6167>

    local_size
        Matrix local size.

        Source code at petsc4py/PETSc/Mat.pyx:6132 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6132>

    owner_range
        Matrix local row range.

        Source code at petsc4py/PETSc/Mat.pyx:6147 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6147>

    owner_ranges
        Matrix row ranges.

        Source code at petsc4py/PETSc/Mat.pyx:6152 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6152>

    size
        Matrix global size.

        Source code at petsc4py/PETSc/Mat.pyx:6127 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6127>

    sizes
        Matrix local and global sizes.

        Source code at petsc4py/PETSc/Mat.pyx:6119 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6119>

    structsymm
        The boolean flag indicating if the matrix is structurally symmetric.

        Source code at petsc4py/PETSc/Mat.pyx:6171 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6171>

    symmetric
        The boolean flag indicating if the matrix is symmetric.

        Source code at petsc4py/PETSc/Mat.pyx:6163 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6163>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.MatPartitioning

    class petsc4py.PETSc.MatPartitioning
        Bases: Object <#petsc4py.PETSc.Object>

        Object for managing the partitioning of a matrix or graph.

        Enumerations
        Type <#petsc4py.PETSc.MatPartitioning.Type> | The partitioning types.

  petsc4py.PETSc.MatPartitioning.Type

    class petsc4py.PETSc.MatPartitioning.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The partitioning types.

        Attributes Summary
        PARTITIONINGAVERAGE | Object PARTITIONINGAVERAGE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PARTITIONINGCHACO | Object PARTITIONINGCHACO of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PARTITIONINGCURRENT | Object PARTITIONINGCURRENT of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PARTITIONINGHIERARCH | Object PARTITIONINGHIERARCH of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PARTITIONINGPARMETIS | Object PARTITIONINGPARMETIS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PARTITIONINGPARTY | Object PARTITIONINGPARTY of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PARTITIONINGPTSCOTCH | Object PARTITIONINGPTSCOTCH of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PARTITIONINGSQUARE | Object PARTITIONINGSQUARE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        PARTITIONINGAVERAGE: str <https://docs.python.org/3/library/stdtypes.html#str> = PARTITIONINGAVERAGE
            Object PARTITIONINGAVERAGE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PARTITIONINGCHACO: str <https://docs.python.org/3/library/stdtypes.html#str> = PARTITIONINGCHACO
            Object PARTITIONINGCHACO of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PARTITIONINGCURRENT: str <https://docs.python.org/3/library/stdtypes.html#str> = PARTITIONINGCURRENT
            Object PARTITIONINGCURRENT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PARTITIONINGHIERARCH: str <https://docs.python.org/3/library/stdtypes.html#str> = PARTITIONINGHIERARCH
            Object PARTITIONINGHIERARCH of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PARTITIONINGPARMETIS: str <https://docs.python.org/3/library/stdtypes.html#str> = PARTITIONINGPARMETIS
            Object PARTITIONINGPARMETIS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PARTITIONINGPARTY: str <https://docs.python.org/3/library/stdtypes.html#str> = PARTITIONINGPARTY
            Object PARTITIONINGPARTY of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PARTITIONINGPTSCOTCH: str <https://docs.python.org/3/library/stdtypes.html#str> = PARTITIONINGPTSCOTCH
            Object PARTITIONINGPTSCOTCH of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PARTITIONINGSQUARE: str <https://docs.python.org/3/library/stdtypes.html#str> = PARTITIONINGSQUARE
            Object PARTITIONINGSQUARE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
apply(partitioning) | Return a partitioning for the graph represented by a sparse matrix.
create([comm]) | Create a partitioning context.
destroy() | Destroy the partitioning context.
getType() | Return the partitioning method.
setAdjacency(adj) | Set the adjacency graph (matrix) of the thing to be partitioned.
setFromOptions() | Set parameters in the partitioner from the options database.
setType(matpartitioning_type) | Set the type of the partitioner to use.
view([viewer]) | View the partitioning data structure.

Methods Documentation

    apply(partitioning)
        Return a partitioning for the graph represented by a sparse matrix.

        Collective.

        For each local node this tells the processor number that that node is assigned to.

        See also:
            MatPartitioningApply <https://petsc.org/release/manualpages/MatGraphOperations/MatPartitioningApply.html>

    Source code at petsc4py/PETSc/MatPartitioning.pyx:144 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/MatPartitioning.pyx#L144>

        Parameters
            partitioning (IS <#petsc4py.PETSc.IS>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    create(comm=None)
        Create a partitioning context.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            destroy, MatPartitioningCreate <https://petsc.org/release/manualpages/MatGraphOperations/MatPartitioningCreate.html>

    Source code at petsc4py/PETSc/MatPartitioning.pyx:62 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/MatPartitioning.pyx#L62>

    destroy()
        Destroy the partitioning context.

        Collective.

        See also:
            create, MatPartitioningDestroy <https://petsc.org/release/manualpages/MatGraphOperations/MatPartitioningDestroy.html>

    Source code at petsc4py/PETSc/MatPartitioning.pyx:49 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/MatPartitioning.pyx#L49>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getType()
        Return the partitioning method.

        Not collective.

        See also:
            setType, MatPartitioningGetType <https://petsc.org/release/manualpages/MatGraphOperations/MatPartitioningGetType.html>

    Source code at petsc4py/PETSc/MatPartitioning.pyx:100 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/MatPartitioning.pyx#L100>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    setAdjacency(adj)
        Set the adjacency graph (matrix) of the thing to be partitioned.

        Collective.

        Parameters
            adj (Mat <#petsc4py.PETSc.Mat>) -- The adjacency matrix, this can be any Mat.Type <#petsc4py.PETSc.Mat.Type> but the natural representation is Mat.Type.MPIADJ <#petsc4py.PETSc.Mat.Type.MPIADJ>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatPartitioningSetAdjacency <https://petsc.org/release/manualpages/MatGraphOperations/MatPartitioningSetAdjacency.html>

    Source code at petsc4py/PETSc/MatPartitioning.pyx:126 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/MatPartitioning.pyx#L126>

    setFromOptions()
        Set parameters in the partitioner from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, MatPartitioningSetFromOptions <https://petsc.org/release/manualpages/MatGraphOperations/MatPartitioningSetFromOptions.html>

    Source code at petsc4py/PETSc/MatPartitioning.pyx:114 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/MatPartitioning.pyx#L114>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setType(matpartitioning_type)
        Set the type of the partitioner to use.

        Collective.

        Parameters
            matpartitioning_type (Type <#petsc4py.PETSc.MatPartitioning.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The partitioner type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getType, MatPartitioningSetType <https://petsc.org/release/manualpages/MatGraphOperations/MatPartitioningSetType.html>

    Source code at petsc4py/PETSc/MatPartitioning.pyx:81 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/MatPartitioning.pyx#L81>

    view(viewer=None)
        View the partitioning data structure.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> to display the graph.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            MatPartitioningView <https://petsc.org/release/manualpages/MatGraphOperations/MatPartitioningView.html>

    Source code at petsc4py/PETSc/MatPartitioning.pyx:29 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/MatPartitioning.pyx#L29>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.NormType

    class petsc4py.PETSc.NormType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Norm type.

        Commonly used norm types:

        N1  The one norm.

        N2  The two norm.

        FROBENIUS
            The Frobenius norm.

        INFINITY
            The infinity norm.

    See also:
            NormType <https://petsc.org/release/manualpages/Vec/NormType.html>

    Attributes Summary
    FRB | Constant FRB of type int <https://docs.python.org/3/library/functions.html#int>
    FROBENIUS | Constant FROBENIUS of type int <https://docs.python.org/3/library/functions.html#int>
    INF | Constant INF of type int <https://docs.python.org/3/library/functions.html#int>
    INFINITY | Constant INFINITY of type int <https://docs.python.org/3/library/functions.html#int>
    MAX | Constant MAX of type int <https://docs.python.org/3/library/functions.html#int>
    N1 | Constant N1 of type int <https://docs.python.org/3/library/functions.html#int>
    N12 | Constant N12 of type int <https://docs.python.org/3/library/functions.html#int>
    N2 | Constant N2 of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_1 | Constant NORM_1 of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_1_AND_2 | Constant NORM_1_AND_2 of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_2 | Constant NORM_2 of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_FROBENIUS | Constant NORM_FROBENIUS of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_INFINITY | Constant NORM_INFINITY of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_MAX | Constant NORM_MAX of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        FRB: int <https://docs.python.org/3/library/functions.html#int> = FRB
            Constant FRB of type int <https://docs.python.org/3/library/functions.html#int>

        FROBENIUS: int <https://docs.python.org/3/library/functions.html#int> = FROBENIUS
            Constant FROBENIUS of type int <https://docs.python.org/3/library/functions.html#int>

        INF: int <https://docs.python.org/3/library/functions.html#int> = INF
            Constant INF of type int <https://docs.python.org/3/library/functions.html#int>

        INFINITY: int <https://docs.python.org/3/library/functions.html#int> = INFINITY
            Constant INFINITY of type int <https://docs.python.org/3/library/functions.html#int>

        MAX: int <https://docs.python.org/3/library/functions.html#int> = MAX
            Constant MAX of type int <https://docs.python.org/3/library/functions.html#int>

        N1: int <https://docs.python.org/3/library/functions.html#int> = N1
            Constant N1 of type int <https://docs.python.org/3/library/functions.html#int>

        N12: int <https://docs.python.org/3/library/functions.html#int> = N12
            Constant N12 of type int <https://docs.python.org/3/library/functions.html#int>

        N2: int <https://docs.python.org/3/library/functions.html#int> = N2
            Constant N2 of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_1: int <https://docs.python.org/3/library/functions.html#int> = NORM_1
            Constant NORM_1 of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_1_AND_2: int <https://docs.python.org/3/library/functions.html#int> = NORM_1_AND_2
            Constant NORM_1_AND_2 of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_2: int <https://docs.python.org/3/library/functions.html#int> = NORM_2
            Constant NORM_2 of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_FROBENIUS: int <https://docs.python.org/3/library/functions.html#int> = NORM_FROBENIUS
            Constant NORM_FROBENIUS of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_INFINITY: int <https://docs.python.org/3/library/functions.html#int> = NORM_INFINITY
            Constant NORM_INFINITY of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_MAX: int <https://docs.python.org/3/library/functions.html#int> = NORM_MAX
            Constant NORM_MAX of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.NullSpace

    class petsc4py.PETSc.NullSpace
        Bases: Object <#petsc4py.PETSc.Object>

        Nullspace object.

        See also:
            MatNullSpace <https://petsc.org/release/manualpages/Mat/MatNullSpace.html>

    Methods Summary
    create([constant, vectors, comm]) | Create the null space.
    createRigidBody(coords) | Create rigid body modes from coordinates.
    destroy() | Destroy the null space.
    getFunction() | Return the callback to remove the nullspace.
    getVecs() | Return the vectors defining the null space.
    hasConstant() | Return whether the null space contains the constant.
    remove(vec) | Remove all components of a null space from a vector.
    setFunction(function[, args, kargs]) | Set the callback to remove the nullspace.
    test(mat) | Return if the claimed null space is valid for a matrix.
    view([viewer]) | View the null space.

    Methods Documentation

        create(constant=False, vectors=(), comm=None)
            Create the null space.

            Collective.

            Parameters

                •   constant (bool <https://docs.python.org/3/library/functions.html#bool>) -- A flag to indicate the null space contains the constant vector.

                •   vectors (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- The sequence of vectors that span the null space.

                •   comm -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                destroy, MatNullSpaceCreate <https://petsc.org/release/manualpages/Mat/MatNullSpaceCreate.html>

        Source code at petsc4py/PETSc/Mat.pyx:6308 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6308>

        createRigidBody(coords)
            Create rigid body modes from coordinates.

            Collective.

            Parameters
                coords (Vec <#petsc4py.PETSc.Vec>) -- The block coordinates of each node. Requires the block size to have been set.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                MatNullSpaceCreateRigidBody <https://petsc.org/release/manualpages/Mat/MatNullSpaceCreateRigidBody.html>

        Source code at petsc4py/PETSc/Mat.pyx:6344 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6344>

        destroy()
            Destroy the null space.

            Collective.

            See also:
                create, MatNullSpaceDestroy <https://petsc.org/release/manualpages/Mat/MatNullSpaceDestroy.html>

        Source code at petsc4py/PETSc/Mat.pyx:6295 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6295>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        getFunction()
            Return the callback to remove the nullspace.

            Not collective.

            See also:
                setFunction

        Source code at petsc4py/PETSc/Mat.pyx:6435 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6435>

            Return type
                MatNullFunction <#petsc4py.typing.MatNullFunction>

        getVecs()
            Return the vectors defining the null space.

            Not collective.

            See also:
                MatNullSpaceGetVecs <https://petsc.org/release/manualpages/Mat/MatNullSpaceGetVecs.html>

        Source code at petsc4py/PETSc/Mat.pyx:6413 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6413>

            Return type
                list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <#petsc4py.PETSc.Vec>]

        hasConstant()
            Return whether the null space contains the constant.

            Not collective.

            See also:
                MatNullSpaceGetVecs <https://petsc.org/release/manualpages/Mat/MatNullSpaceGetVecs.html>

        Source code at petsc4py/PETSc/Mat.pyx:6399 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6399>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        remove(vec)
            Remove all components of a null space from a vector.

            Collective.

            Parameters
                vec (Vec <#petsc4py.PETSc.Vec>) -- The vector from which the null space is removed.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                MatNullSpaceRemove <https://petsc.org/release/manualpages/Mat/MatNullSpaceRemove.html>

        Source code at petsc4py/PETSc/Mat.pyx:6449 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6449>

        setFunction(function, args=None, kargs=None)
            Set the callback to remove the nullspace.

            Logically collective.

            Parameters

                •   function (MatNullFunction <#petsc4py.typing.MatNullFunction>) -- The callback.

                •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

                •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getFunction, MatNullSpaceSetFunction <https://petsc.org/release/manualpages/Mat/MatNullSpaceSetFunction.html>

        Source code at petsc4py/PETSc/Mat.pyx:6365 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6365>

        test(mat)
            Return if the claimed null space is valid for a matrix.

            Collective.

            Parameters
                mat (Mat <#petsc4py.PETSc.Mat>) -- The matrix to check.

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        See also:
                MatNullSpaceTest <https://petsc.org/release/manualpages/Mat/MatNullSpaceTest.html>

        Source code at petsc4py/PETSc/Mat.pyx:6466 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6466>

        view(viewer=None)
            View the null space.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                Viewer <#petsc4py.PETSc.Viewer>, MatNullSpaceView <https://petsc.org/release/manualpages/Mat/MatNullSpaceView.html>

        Source code at petsc4py/PETSc/Mat.pyx:6276 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Mat.pyx#L6276>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Object

    class petsc4py.PETSc.Object
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Base class wrapping a PETSc object.

        See also:
            PetscObject <https://petsc.org/release/manualpages/Sys/PetscObject.html>

    Methods Summary
    appendOptionsPrefix(prefix) | Append to the prefix used for searching for options in the database.
    compose(name, obj) | Associate a PETSc object using a key string.
    decRef() | Decrement the object reference count.
    destroy() | Destroy the object.
    destroyOptionsHandlers() | Clear all the option handlers.
    getAttr(name) | Return the attribute associated with a given name.
    getClassId() | Return the class identifier of the object.
    getClassName() | Return the class name of the object.
    getComm() | Return the communicator of the object.
    getDict() | Return the dictionary of attributes.
    getId() | Return the unique identifier of the object.
    getName() | Return the name of the object.
    getOptionsPrefix() | Return the prefix used for searching for options in the database.
    getRefCount() | Return the reference count of the object.
    getTabLevel() | Return the PETSc object tab level.
    getType() | Return the object type name.
    incRef() | Increment the object reference count.
    incrementTabLevel(tab[, parent]) | Increment the PETSc object tab level.
    query(name) | Query for the PETSc object associated with a key string.
    setAttr(name, attr) | Set an the attribute associated with a given name.
    setFromOptions() | Configure the object from the options database.
    setName(name) | Associate a name to the object.
    setOptionsHandler(handler) | Set the callback for processing extra options.
    setOptionsPrefix(prefix) | Set the prefix used for searching for options in the database.
    setTabLevel(level) | Set the PETSc object tab level.
    stateGet() | Return the PETSc object state.
    stateIncrease() | Increment the PETSc object state.
    stateSet(state) | Set the PETSc object state.
    view([viewer]) | Display the object.
    viewFromOptions(name[, objpre]) | View the object via command line options.

    Attributes Summary
    classid | The class identifier.
    comm | The object communicator.
    fortran | Fortran handle.
    handle | Handle for ctypes support.
    id | The object identifier.
    klass | The class name.
    name | The object name.
    prefix | Options prefix.
    refcount | Reference count.
    type | Object type.

    Methods Documentation

        appendOptionsPrefix(prefix)
            Append to the prefix used for searching for options in the database.

            Logically collective.

            See also:
                Working with PETSc options <#petsc-options>, setOptionsPrefix, PetscObjectAppendOptionsPrefix <https://petsc.org/release/manualpages/Sys/PetscObjectAppendOptionsPrefix.html>

        Source code at petsc4py/PETSc/Object.pyx:138 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L138>

            Parameters
                prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        compose(name, obj)
            Associate a PETSc object using a key string.

            Logically collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The string identifying the object to be composed.

                •   obj (Object <#petsc4py.PETSc.Object>) -- The object to be composed.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                query, PetscObjectCompose <https://petsc.org/release/manualpages/Sys/PetscObjectCompose.html>

        Source code at petsc4py/PETSc/Object.pyx:329 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L329>

        decRef()
            Decrement the object reference count.

            Logically collective.

            See also:
                getRefCount, PetscObjectDereference <https://petsc.org/release/manualpages/Sys/PetscObjectDereference.html>

        Source code at petsc4py/PETSc/Object.pyx:389 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L389>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        destroy()
            Destroy the object.

            Collective.

            See also:
                PetscObjectDestroy <https://petsc.org/release/manualpages/Sys/PetscObjectDestroy.html>

        Source code at petsc4py/PETSc/Object.pyx:81 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L81>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        destroyOptionsHandlers()
            Clear all the option handlers.

            Collective.

            See also:
                Working with PETSc options <#petsc-options>, setOptionsHandler, PetscObjectDestroyOptionsHandlers <https://petsc.org/release/manualpages/Sys/PetscObjectDestroyOptionsHandlers.html>

        Source code at petsc4py/PETSc/Object.pyx:213 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L213>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        getAttr(name)
            Return the attribute associated with a given name.

            Not collective.

            See also:
                setAttr, getDict

        Source code at petsc4py/PETSc/Object.pyx:408 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L408>

            Parameters
                name (str <https://docs.python.org/3/library/stdtypes.html#str>)

            Return type
                object <https://docs.python.org/3/library/functions.html#object>

        getClassId()
            Return the class identifier of the object.

            Not collective.

            See also:
                PetscObjectGetClassId <https://petsc.org/release/manualpages/Sys/PetscObjectGetClassId.html>

        Source code at petsc4py/PETSc/Object.pyx:270 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L270>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getClassName()
            Return the class name of the object.

            Not collective.

            See also:
                PetscObjectGetClassName <https://petsc.org/release/manualpages/Sys/PetscObjectGetClassName.html>

        Source code at petsc4py/PETSc/Object.pyx:284 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L284>

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        getComm()
            Return the communicator of the object.

            Not collective.

            See also:
                PetscObjectGetComm <https://petsc.org/release/manualpages/Sys/PetscObjectGetComm.html>

        Source code at petsc4py/PETSc/Object.pyx:228 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L228>

            Return type
                Comm <#petsc4py.PETSc.Comm>

        getDict()
            Return the dictionary of attributes.

            Not collective.

            See also:
                setAttr, getAttr

        Source code at petsc4py/PETSc/Object.pyx:436 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L436>

            Return type
                dict <https://docs.python.org/3/library/stdtypes.html#dict>

        getId()
            Return the unique identifier of the object.

            Not collective.

            See also:
                PetscObjectGetId <https://petsc.org/release/manualpages/Sys/PetscObjectGetId.html>

        Source code at petsc4py/PETSc/Object.pyx:313 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L313>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getName()
            Return the name of the object.

            Not collective.

            See also:
                PetscObjectGetName <https://petsc.org/release/manualpages/Sys/PetscObjectGetName.html>

        Source code at petsc4py/PETSc/Object.pyx:242 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L242>

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        getOptionsPrefix()
            Return the prefix used for searching for options in the database.

            Not collective.

            See also:
                Working with PETSc options <#petsc-options>, setOptionsPrefix, PetscObjectGetOptionsPrefix <https://petsc.org/release/manualpages/Sys/PetscObjectGetOptionsPrefix.html>

        Source code at petsc4py/PETSc/Object.pyx:124 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L124>

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        getRefCount()
            Return the reference count of the object.

            Not collective.

            See also:
                PetscObjectGetReference <https://petsc.org/release/manualpages/Sys/PetscObjectGetReference.html>

        Source code at petsc4py/PETSc/Object.pyx:298 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L298>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getTabLevel()
            Return the PETSc object tab level.

            Not collective.

            See also:
                setTabLevel, incrementTabLevel, PetscObjectGetTabLevel <https://petsc.org/release/manualpages/Sys/PetscObjectGetTabLevel.html>

        Source code at petsc4py/PETSc/Object.pyx:518 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L518>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        getType()
            Return the object type name.

            Not collective.

            See also:
                PetscObjectGetType <https://petsc.org/release/manualpages/Sys/PetscObjectGetType.html>

        Source code at petsc4py/PETSc/Object.pyx:94 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L94>

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        incRef()
            Increment the object reference count.

            Logically collective.

            See also:
                getRefCount, PetscObjectReference <https://petsc.org/release/manualpages/Sys/PetscObjectReference.html>

        Source code at petsc4py/PETSc/Object.pyx:372 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L372>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        incrementTabLevel(tab, parent=None)
            Increment the PETSc object tab level.

            Logically collective.

            See also:
                setTabLevel, getTabLevel, PetscObjectIncrementTabLevel <https://petsc.org/release/manualpages/Sys/PetscObjectIncrementTabLevel.html>

        Source code at petsc4py/PETSc/Object.pyx:491 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L491>

            Parameters

                •   tab (int <https://docs.python.org/3/library/functions.html#int>)

                •   parent (Object <#petsc4py.PETSc.Object> | None <https://docs.python.org/3/library/constants.html#None>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        query(name)
            Query for the PETSc object associated with a key string.

            Not collective.

            See also:
                compose, PetscObjectQuery <https://petsc.org/release/manualpages/Sys/PetscObjectQuery.html>

        Source code at petsc4py/PETSc/Object.pyx:352 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L352>

            Parameters
                name (str <https://docs.python.org/3/library/stdtypes.html#str>)

            Return type
                Object <#petsc4py.PETSc.Object>

        setAttr(name, attr)
            Set an the attribute associated with a given name.

            Not collective.

            See also:
                getAttr, getDict

        Source code at petsc4py/PETSc/Object.pyx:422 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L422>

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>)

                •   attr (object <https://docs.python.org/3/library/functions.html#object>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setFromOptions()
            Configure the object from the options database.

            Collective.

            Classes that do not implement setFromOptions use this method that, in turn, calls PetscObjectSetFromOptions <https://petsc.org/release/manualpages/Sys/PetscObjectSetFromOptions.html>.

            See also:
                Working with PETSc options <#petsc-options>, PetscObjectSetFromOptions <https://petsc.org/release/manualpages/Sys/PetscObjectSetFromOptions.html>

        Source code at petsc4py/PETSc/Object.pyx:152 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L152>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setName(name)
            Associate a name to the object.

            Not collective.

            See also:
                PetscObjectSetName <https://petsc.org/release/manualpages/Sys/PetscObjectSetName.html>

        Source code at petsc4py/PETSc/Object.pyx:256 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L256>

            Parameters
                name (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setOptionsHandler(handler)
            Set the callback for processing extra options.

            Logically collective.

            Parameters
                handler (PetscOptionsHandlerFunction <#petsc4py.typing.PetscOptionsHandlerFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The callback function, called at the end of a setFromOptions invocation for the given class.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                Working with PETSc options <#petsc-options>, Mat.setFromOptions <#petsc4py.PETSc.Mat.setFromOptions>, KSP.setFromOptions <#petsc4py.PETSc.KSP.setFromOptions>, PetscObjectAddOptionsHandler <https://petsc.org/release/manualpages/Sys/PetscObjectAddOptionsHandler.html>

        Source code at petsc4py/PETSc/Object.pyx:190 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L190>

        setOptionsPrefix(prefix)
            Set the prefix used for searching for options in the database.

            Logically collective.

            See also:
                Working with PETSc options <#petsc-options>, getOptionsPrefix, PetscObjectSetOptionsPrefix <https://petsc.org/release/manualpages/Sys/PetscObjectSetOptionsPrefix.html>

        Source code at petsc4py/PETSc/Object.pyx:110 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L110>

            Parameters
                prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setTabLevel(level)
            Set the PETSc object tab level.

            Logically collective.

            See also:
                incrementTabLevel, getTabLevel, PetscObjectSetTabLevel <https://petsc.org/release/manualpages/Sys/PetscObjectSetTabLevel.html>

        Source code at petsc4py/PETSc/Object.pyx:505 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L505>

            Parameters
                level (int <https://docs.python.org/3/library/functions.html#int>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        stateGet()
            Return the PETSc object state.

            Not collective.

            See also:
                stateSet, stateIncrease, PetscObjectStateGet <https://petsc.org/release/manualpages/Sys/PetscObjectStateGet.html>

        Source code at petsc4py/PETSc/Object.pyx:462 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L462>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        stateIncrease()
            Increment the PETSc object state.

            Logically collective.

            See also:
                stateGet, stateSet, PetscObjectStateIncrease <https://petsc.org/release/manualpages/Sys/PetscObjectStateIncrease.html>

        Source code at petsc4py/PETSc/Object.pyx:450 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L450>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        stateSet(state)
            Set the PETSc object state.

            Logically collective.

            See also:
                stateIncrease, stateGet, PetscObjectStateSet <https://petsc.org/release/manualpages/Sys/PetscObjectStateSet.html>

        Source code at petsc4py/PETSc/Object.pyx:476 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L476>

            Parameters
                state (int <https://docs.python.org/3/library/functions.html#int>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        view(viewer=None)
            Display the object.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscObjectView <https://petsc.org/release/manualpages/Sys/PetscObjectView.html>

        Source code at petsc4py/PETSc/Object.pyx:62 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L62>

        viewFromOptions(name, objpre=None)
            View the object via command line options.

            Collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The command line option.

                •   objpre (Object <#petsc4py.PETSc.Object> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional object that provides prefix.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                Working with PETSc options <#petsc-options>, PetscObjectViewFromOptions <https://petsc.org/release/manualpages/Sys/PetscObjectViewFromOptions.html>

        Source code at petsc4py/PETSc/Object.pyx:167 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L167>

    Attributes Documentation

        classid
            The class identifier.

            Source code at petsc4py/PETSc/Object.pyx:563 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L563>

        comm
            The object communicator.

            Source code at petsc4py/PETSc/Object.pyx:550 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L550>

        fortran
            Fortran handle.

            Source code at petsc4py/PETSc/Object.pyx:593 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L593>

        handle
            Handle for ctypes support.

            Source code at petsc4py/PETSc/Object.pyx:585 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L585>

        id  The object identifier.

            Source code at petsc4py/PETSc/Object.pyx:568 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L568>

        klass
            The class name.

            Source code at petsc4py/PETSc/Object.pyx:573 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L573>

        name
            The object name.

            Source code at petsc4py/PETSc/Object.pyx:555 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L555>

        prefix
            Options prefix.

            Source code at petsc4py/PETSc/Object.pyx:542 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L542>

        refcount
            Reference count.

            Source code at petsc4py/PETSc/Object.pyx:578 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L578>

        type
            Object type.

            Source code at petsc4py/PETSc/Object.pyx:534 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Object.pyx#L534>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Options

    class petsc4py.PETSc.Options
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The options database object.

        A dictionary-like object to store and operate with command line options.

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str>, optional) -- Optional string to prepend to all the options.

    Examples

    Create an option database and operate with it.

        >>> from petsc4py import PETSc
        >>> opts = PETSc.Options()
        >>> opts['a'] = 1 # insert the command-line option '-a 1'
        >>> if 'a' in opts: # if the option is present
        >>>     val = opts['a'] # return the option value as 'str'
        >>> a_int = opts.getInt('a') # return the option value as 'int'
        >>> a_bool = opts.getBool('a') # return the option value as 'bool'

    Read command line and use default values.

        >>> from petsc4py import PETSc
        >>> opts = PETSc.Options()
        >>> b_float = opts.getReal('b', 1) # return the value or 1.0 if not present

    Read command line options prepended with a prefix.

        >>> from petsc4py import PETSc
        >>> opts = PETSc.Options('prefix_')
        >>> opts.getString('b', 'some_default_string') # read -prefix_b xxx

    See also:
            Working with PETSc options <#petsc-options>

    Methods Summary
    clear() | Clear an options database.
    create() | Create an options database.
    delValue(name) | Delete an option from the database.
    destroy() | Destroy an options database.
    getAll() | Return all the options and their values.
    getBool(name[, default]) | Return the boolean value associated with the option.
    getBoolArray(name[, default]) | Return the boolean values associated with the option.
    getInt(name[, default]) | Return the integer value associated with the option.
    getIntArray(name[, default]) | Return the integer array associated with the option.
    getReal(name[, default]) | Return the real value associated with the option.
    getRealArray(name[, default]) | Return the real array associated with the option.
    getScalar(name[, default]) | Return the scalar value associated with the option.
    getScalarArray(name[, default]) | Return the scalar array associated with the option.
    getString(name[, default]) | Return the string associated with the option.
    hasName(name) | Return the boolean indicating if the option is in the database.
    insertString(string) | Insert a string in the options database.
    prefixPop() | Pop a prefix for the options database.
    prefixPush(prefix) | Push a prefix for the options database.
    setValue(name, value) | Set a value for an option.
    used(name) | Return the boolean indicating if the option was queried from the database.
    view([viewer]) | View the options database.

    Attributes Summary
    prefix | Prefix for options.

    Methods Documentation

        clear()
            Clear an options database.

            Source code at petsc4py/PETSc/Options.pyx:91 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L91>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        create()
            Create an options database.

            Source code at petsc4py/PETSc/Options.pyx:79 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L79>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        delValue(name)
            Delete an option from the database.

            Logically collective.

            See also:
                setValue, PetscOptionsClearValue <https://petsc.org/release/manualpages/Sys/PetscOptionsClearValue.html>

        Source code at petsc4py/PETSc/Options.pyx:203 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L203>

            Parameters
                name (str <https://docs.python.org/3/library/stdtypes.html#str>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        destroy()
            Destroy an options database.

            Source code at petsc4py/PETSc/Options.pyx:85 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L85>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        getAll()
            Return all the options and their values.

            Not collective.

            See also:
                PetscOptionsGetAll <https://petsc.org/release/manualpages/Sys/PetscOptionsGetAll.html>

        Source code at petsc4py/PETSc/Options.pyx:422 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L422>

            Return type
                dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, str <https://docs.python.org/3/library/stdtypes.html#str>]

        getBool(name, default=None)
            Return the boolean value associated with the option.

            Not collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The option name.

                •   default -- The default value. If None <https://docs.python.org/3/library/constants.html#None>, it raises a KeyError <https://docs.python.org/3/library/exceptions.html#KeyError> if the option is not found.

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        See also:
                getBoolArray, PetscOptionsGetBool <https://petsc.org/release/manualpages/Sys/PetscOptionsGetBool.html>

        Source code at petsc4py/PETSc/Options.pyx:226 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L226>

        getBoolArray(name, default=None)
            Return the boolean values associated with the option.

            Not collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The option name.

                •   default -- The default value. If None <https://docs.python.org/3/library/constants.html#None>, it raises a KeyError <https://docs.python.org/3/library/exceptions.html#KeyError> if the option is not found.

            Return type
                ArrayBool <#petsc4py.typing.ArrayBool>

        See also:
                getBool, PetscOptionsGetBoolArray <https://petsc.org/release/manualpages/Sys/PetscOptionsGetBoolArray.html>

        Source code at petsc4py/PETSc/Options.pyx:246 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L246>

        getInt(name, default=None)
            Return the integer value associated with the option.

            Not collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The option name.

                •   default -- The default value. If None <https://docs.python.org/3/library/constants.html#None>, it raises a KeyError <https://docs.python.org/3/library/exceptions.html#KeyError> if the option is not found.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                getIntArray, PetscOptionsGetInt <https://petsc.org/release/manualpages/Sys/PetscOptionsGetInt.html>

        Source code at petsc4py/PETSc/Options.pyx:266 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L266>

        getIntArray(name, default=None)
            Return the integer array associated with the option.

            Not collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The option name.

                •   default -- The default value. If None <https://docs.python.org/3/library/constants.html#None>, it raises a KeyError <https://docs.python.org/3/library/exceptions.html#KeyError> if the option is not found.

            Return type
                ArrayInt <#petsc4py.typing.ArrayInt>

        See also:
                getInt, PetscOptionsGetIntArray <https://petsc.org/release/manualpages/Sys/PetscOptionsGetIntArray.html>

        Source code at petsc4py/PETSc/Options.pyx:286 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L286>

        getReal(name, default=None)
            Return the real value associated with the option.

            Not collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The option name.

                •   default -- The default value. If None <https://docs.python.org/3/library/constants.html#None>, it raises a KeyError <https://docs.python.org/3/library/exceptions.html#KeyError> if the option is not found.

            Return type
                float <https://docs.python.org/3/library/functions.html#float>

        See also:
                getRealArray, PetscOptionsGetReal <https://petsc.org/release/manualpages/Sys/PetscOptionsGetReal.html>

        Source code at petsc4py/PETSc/Options.pyx:306 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L306>

        getRealArray(name, default=None)
            Return the real array associated with the option.

            Not collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The option name.

                •   default -- The default value. If None <https://docs.python.org/3/library/constants.html#None>, it raises a KeyError <https://docs.python.org/3/library/exceptions.html#KeyError> if the option is not found.

            Return type
                ArrayReal <#petsc4py.typing.ArrayReal>

        See also:
                getReal, PetscOptionsGetRealArray <https://petsc.org/release/manualpages/Sys/PetscOptionsGetRealArray.html>

        Source code at petsc4py/PETSc/Options.pyx:326 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L326>

        getScalar(name, default=None)
            Return the scalar value associated with the option.

            Not collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The option name.

                •   default -- The default value. If None <https://docs.python.org/3/library/constants.html#None>, it raises a KeyError <https://docs.python.org/3/library/exceptions.html#KeyError> if the option is not found.

            Return type
                Scalar <#petsc4py.typing.Scalar>

        See also:
                getScalarArray, PetscOptionsGetScalar <https://petsc.org/release/manualpages/Sys/PetscOptionsGetScalar.html>

        Source code at petsc4py/PETSc/Options.pyx:346 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L346>

        getScalarArray(name, default=None)
            Return the scalar array associated with the option.

            Not collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The option name.

                •   default -- The default value. If None <https://docs.python.org/3/library/constants.html#None>, it raises a KeyError <https://docs.python.org/3/library/exceptions.html#KeyError> if the option is not found.

            Return type
                ArrayScalar <#petsc4py.typing.ArrayScalar>

        See also:
                getScalar, PetscOptionsGetScalarArray <https://petsc.org/release/manualpages/Sys/PetscOptionsGetScalarArray.html>

        Source code at petsc4py/PETSc/Options.pyx:366 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L366>

        getString(name, default=None)
            Return the string associated with the option.

            Not collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The option name.

                •   default -- The default value. If None <https://docs.python.org/3/library/constants.html#None>, it raises a KeyError <https://docs.python.org/3/library/exceptions.html#KeyError> if the option is not found.

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        See also:
                PetscOptionsGetString <https://petsc.org/release/manualpages/Sys/PetscOptionsGetString.html>

        Source code at petsc4py/PETSc/Options.pyx:386 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L386>

        hasName(name)
            Return the boolean indicating if the option is in the database.

            Source code at petsc4py/PETSc/Options.pyx:144 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L144>

            Parameters
                name (str <https://docs.python.org/3/library/stdtypes.html#str>)

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        insertString(string)
            Insert a string in the options database.

            Logically collective.

            See also:
                PetscOptionsInsertString <https://petsc.org/release/manualpages/Sys/PetscOptionsInsertString.html>

        Source code at petsc4py/PETSc/Options.pyx:408 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L408>

            Parameters
                string (str <https://docs.python.org/3/library/stdtypes.html#str>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        prefixPop()
            Pop a prefix for the options database.

            Logically collective.

            See also:
                prefixPush, PetscOptionsPrefixPop <https://petsc.org/release/manualpages/Sys/PetscOptionsPrefixPop.html>

        Source code at petsc4py/PETSc/Options.pyx:131 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L131>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        prefixPush(prefix)
            Push a prefix for the options database.

            Logically collective.

            See also:
                prefixPop, PetscOptionsPrefixPush <https://petsc.org/release/manualpages/Sys/PetscOptionsPrefixPush.html>

        Source code at petsc4py/PETSc/Options.pyx:116 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L116>

            Parameters
                prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | Options <#petsc4py.PETSc.Options> | Object <#petsc4py.PETSc.Object> | None <https://docs.python.org/3/library/constants.html#None>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setValue(name, value)
            Set a value for an option.

            Logically collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The string identifying the option.

                •   value (bool <https://docs.python.org/3/library/functions.html#bool> | int <https://docs.python.org/3/library/functions.html#int> | float <https://docs.python.org/3/library/functions.html#float> | Scalar <#petsc4py.typing.Scalar> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[bool <https://docs.python.org/3/library/functions.html#bool>] | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>] | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>] | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The option value.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                delValue, PetscOptionsSetValue <https://petsc.org/release/manualpages/Sys/PetscOptionsSetValue.html>

        Source code at petsc4py/PETSc/Options.pyx:161 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L161>

        used(name)
            Return the boolean indicating if the option was queried from the database.

            Source code at petsc4py/PETSc/Options.pyx:153 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L153>

            Parameters
                name (str <https://docs.python.org/3/library/stdtypes.html#str>)

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        view(viewer=None)
            View the options database.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                Viewer <#petsc4py.PETSc.Viewer>, PetscOptionsView <https://petsc.org/release/manualpages/Sys/PetscOptionsView.html>

        Source code at petsc4py/PETSc/Options.pyx:97 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L97>

    Attributes Documentation

        prefix
            Prefix for options.

            Source code at petsc4py/PETSc/Options.pyx:67 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Options.pyx#L67>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC

    class petsc4py.PETSc.PC
        Bases: Object <#petsc4py.PETSc.Object>

        Preconditioners.

        PC is described in the PETSc manual <https://petsc.org/release/manual/ksp.html#sec-ksppc>. Calling the PC with a vector as an argument will apply the preconditioner as shown in the example below.

        Examples

            >>> from petsc4py import PETSc
            >>> v = PETSc.Vec().createWithArray([1, 2])
            >>> m = PETSc.Mat().createDense(2, array=[[1, 0], [0, 1]])
            >>> pc = PETSc.PC().create()
            >>> pc.setOperators(m)
            >>> u = pc(v) # u is created internally
            >>> pc.apply(v, u) # u can also be passed as second argument

        See also:
            PC <https://petsc.org/release/manualpages/PC/PC.html>

    Enumerations
    ASMType <#petsc4py.PETSc.PC.ASMType> | The ASM subtype.
    CompositeType <#petsc4py.PETSc.PC.CompositeType> | The composite type.
    DeflationSpaceType <#petsc4py.PETSc.PC.DeflationSpaceType> | The deflation space subtype.
    FailedReason <#petsc4py.PETSc.PC.FailedReason> | The reason the preconditioner has failed.
    FieldSplitSchurFactType <#petsc4py.PETSc.PC.FieldSplitSchurFactType> | The field split Schur factorization type.
    FieldSplitSchurPreType <#petsc4py.PETSc.PC.FieldSplitSchurPreType> | The field split Schur subtype.
    GAMGType <#petsc4py.PETSc.PC.GAMGType> | The GAMG subtype.
    GASMType <#petsc4py.PETSc.PC.GASMType> | The GASM subtype.
    HPDDMCoarseCorrectionType <#petsc4py.PETSc.PC.HPDDMCoarseCorrectionType> | The HPDDM coarse correction type.
    MGCycleType <#petsc4py.PETSc.PC.MGCycleType> | The MG cycle type.
    MGType <#petsc4py.PETSc.PC.MGType> | The MG subtype.
    PatchConstructType <#petsc4py.PETSc.PC.PatchConstructType> | The patch construction type.
    Side <#petsc4py.PETSc.PC.Side> | The manner in which the preconditioner is applied.
    Type <#petsc4py.PETSc.PC.Type> | The preconditioner method.

  petsc4py.PETSc.PC.ASMType

    class petsc4py.PETSc.PC.ASMType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The ASM subtype.

        Attributes Summary
        BASIC | Constant BASIC of type int <https://docs.python.org/3/library/functions.html#int>
        INTERPOLATE | Constant INTERPOLATE of type int <https://docs.python.org/3/library/functions.html#int>
        NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>
        RESTRICT | Constant RESTRICT of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        BASIC: int <https://docs.python.org/3/library/functions.html#int> = BASIC
            Constant BASIC of type int <https://docs.python.org/3/library/functions.html#int>

        INTERPOLATE: int <https://docs.python.org/3/library/functions.html#int> = INTERPOLATE
            Constant INTERPOLATE of type int <https://docs.python.org/3/library/functions.html#int>

        NONE: int <https://docs.python.org/3/library/functions.html#int> = NONE
            Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>

        RESTRICT: int <https://docs.python.org/3/library/functions.html#int> = RESTRICT
            Constant RESTRICT of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.CompositeType

    class petsc4py.PETSc.PC.CompositeType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The composite type.

        Attributes Summary
        ADDITIVE | Constant ADDITIVE of type int <https://docs.python.org/3/library/functions.html#int>
        MULTIPLICATIVE | Constant MULTIPLICATIVE of type int <https://docs.python.org/3/library/functions.html#int>
        SCHUR | Constant SCHUR of type int <https://docs.python.org/3/library/functions.html#int>
        SPECIAL | Constant SPECIAL of type int <https://docs.python.org/3/library/functions.html#int>
        SYMMETRIC_MULTIPLICATIVE | Constant SYMMETRIC_MULTIPLICATIVE of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        ADDITIVE: int <https://docs.python.org/3/library/functions.html#int> = ADDITIVE
            Constant ADDITIVE of type int <https://docs.python.org/3/library/functions.html#int>

        MULTIPLICATIVE: int <https://docs.python.org/3/library/functions.html#int> = MULTIPLICATIVE
            Constant MULTIPLICATIVE of type int <https://docs.python.org/3/library/functions.html#int>

        SCHUR: int <https://docs.python.org/3/library/functions.html#int> = SCHUR
            Constant SCHUR of type int <https://docs.python.org/3/library/functions.html#int>

        SPECIAL: int <https://docs.python.org/3/library/functions.html#int> = SPECIAL
            Constant SPECIAL of type int <https://docs.python.org/3/library/functions.html#int>

        SYMMETRIC_MULTIPLICATIVE: int <https://docs.python.org/3/library/functions.html#int> = SYMMETRIC_MULTIPLICATIVE
            Constant SYMMETRIC_MULTIPLICATIVE of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.DeflationSpaceType

    class petsc4py.PETSc.PC.DeflationSpaceType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The deflation space subtype.

        Attributes Summary
        AGGREGATION | Constant AGGREGATION of type int <https://docs.python.org/3/library/functions.html#int>
        BIORTH22 | Constant BIORTH22 of type int <https://docs.python.org/3/library/functions.html#int>
        DB16 | Constant DB16 of type int <https://docs.python.org/3/library/functions.html#int>
        DB2 | Constant DB2 of type int <https://docs.python.org/3/library/functions.html#int>
        DB4 | Constant DB4 of type int <https://docs.python.org/3/library/functions.html#int>
        DB8 | Constant DB8 of type int <https://docs.python.org/3/library/functions.html#int>
        HAAR | Constant HAAR of type int <https://docs.python.org/3/library/functions.html#int>
        MEYER | Constant MEYER of type int <https://docs.python.org/3/library/functions.html#int>
        USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        AGGREGATION: int <https://docs.python.org/3/library/functions.html#int> = AGGREGATION
            Constant AGGREGATION of type int <https://docs.python.org/3/library/functions.html#int>

        BIORTH22: int <https://docs.python.org/3/library/functions.html#int> = BIORTH22
            Constant BIORTH22 of type int <https://docs.python.org/3/library/functions.html#int>

        DB16: int <https://docs.python.org/3/library/functions.html#int> = DB16
            Constant DB16 of type int <https://docs.python.org/3/library/functions.html#int>

        DB2: int <https://docs.python.org/3/library/functions.html#int> = DB2
            Constant DB2 of type int <https://docs.python.org/3/library/functions.html#int>

        DB4: int <https://docs.python.org/3/library/functions.html#int> = DB4
            Constant DB4 of type int <https://docs.python.org/3/library/functions.html#int>

        DB8: int <https://docs.python.org/3/library/functions.html#int> = DB8
            Constant DB8 of type int <https://docs.python.org/3/library/functions.html#int>

        HAAR: int <https://docs.python.org/3/library/functions.html#int> = HAAR
            Constant HAAR of type int <https://docs.python.org/3/library/functions.html#int>

        MEYER: int <https://docs.python.org/3/library/functions.html#int> = MEYER
            Constant MEYER of type int <https://docs.python.org/3/library/functions.html#int>

        USER: int <https://docs.python.org/3/library/functions.html#int> = USER
            Constant USER of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.FailedReason

    class petsc4py.PETSc.PC.FailedReason
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The reason the preconditioner has failed.

        Attributes Summary
        FACTOR_NUMERIC_ZEROPIVOT | Constant FACTOR_NUMERIC_ZEROPIVOT of type int <https://docs.python.org/3/library/functions.html#int>
        FACTOR_OTHER | Constant FACTOR_OTHER of type int <https://docs.python.org/3/library/functions.html#int>
        FACTOR_OUTMEMORY | Constant FACTOR_OUTMEMORY of type int <https://docs.python.org/3/library/functions.html#int>
        FACTOR_STRUCT_ZEROPIVOT | Constant FACTOR_STRUCT_ZEROPIVOT of type int <https://docs.python.org/3/library/functions.html#int>
        NOERROR | Constant NOERROR of type int <https://docs.python.org/3/library/functions.html#int>
        SETUP_ERROR | Constant SETUP_ERROR of type int <https://docs.python.org/3/library/functions.html#int>
        SUBPC_ERROR | Constant SUBPC_ERROR of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        FACTOR_NUMERIC_ZEROPIVOT: int <https://docs.python.org/3/library/functions.html#int> = FACTOR_NUMERIC_ZEROPIVOT
            Constant FACTOR_NUMERIC_ZEROPIVOT of type int <https://docs.python.org/3/library/functions.html#int>

        FACTOR_OTHER: int <https://docs.python.org/3/library/functions.html#int> = FACTOR_OTHER
            Constant FACTOR_OTHER of type int <https://docs.python.org/3/library/functions.html#int>

        FACTOR_OUTMEMORY: int <https://docs.python.org/3/library/functions.html#int> = FACTOR_OUTMEMORY
            Constant FACTOR_OUTMEMORY of type int <https://docs.python.org/3/library/functions.html#int>

        FACTOR_STRUCT_ZEROPIVOT: int <https://docs.python.org/3/library/functions.html#int> = FACTOR_STRUCT_ZEROPIVOT
            Constant FACTOR_STRUCT_ZEROPIVOT of type int <https://docs.python.org/3/library/functions.html#int>

        NOERROR: int <https://docs.python.org/3/library/functions.html#int> = NOERROR
            Constant NOERROR of type int <https://docs.python.org/3/library/functions.html#int>

        SETUP_ERROR: int <https://docs.python.org/3/library/functions.html#int> = SETUP_ERROR
            Constant SETUP_ERROR of type int <https://docs.python.org/3/library/functions.html#int>

        SUBPC_ERROR: int <https://docs.python.org/3/library/functions.html#int> = SUBPC_ERROR
            Constant SUBPC_ERROR of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.FieldSplitSchurFactType

    class petsc4py.PETSc.PC.FieldSplitSchurFactType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The field split Schur factorization type.

        Attributes Summary
        DIAG | Constant DIAG of type int <https://docs.python.org/3/library/functions.html#int>
        FULL | Constant FULL of type int <https://docs.python.org/3/library/functions.html#int>
        LOWER | Constant LOWER of type int <https://docs.python.org/3/library/functions.html#int>
        UPPER | Constant UPPER of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        DIAG: int <https://docs.python.org/3/library/functions.html#int> = DIAG
            Constant DIAG of type int <https://docs.python.org/3/library/functions.html#int>

        FULL: int <https://docs.python.org/3/library/functions.html#int> = FULL
            Constant FULL of type int <https://docs.python.org/3/library/functions.html#int>

        LOWER: int <https://docs.python.org/3/library/functions.html#int> = LOWER
            Constant LOWER of type int <https://docs.python.org/3/library/functions.html#int>

        UPPER: int <https://docs.python.org/3/library/functions.html#int> = UPPER
            Constant UPPER of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.FieldSplitSchurPreType

    class petsc4py.PETSc.PC.FieldSplitSchurPreType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The field split Schur subtype.

        Attributes Summary
        A11 | Constant A11 of type int <https://docs.python.org/3/library/functions.html#int>
        FULL | Constant FULL of type int <https://docs.python.org/3/library/functions.html#int>
        SELF | Constant SELF of type int <https://docs.python.org/3/library/functions.html#int>
        SELFP | Constant SELFP of type int <https://docs.python.org/3/library/functions.html#int>
        USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        A11: int <https://docs.python.org/3/library/functions.html#int> = A11
            Constant A11 of type int <https://docs.python.org/3/library/functions.html#int>

        FULL: int <https://docs.python.org/3/library/functions.html#int> = FULL
            Constant FULL of type int <https://docs.python.org/3/library/functions.html#int>

        SELF: int <https://docs.python.org/3/library/functions.html#int> = SELF
            Constant SELF of type int <https://docs.python.org/3/library/functions.html#int>

        SELFP: int <https://docs.python.org/3/library/functions.html#int> = SELFP
            Constant SELFP of type int <https://docs.python.org/3/library/functions.html#int>

        USER: int <https://docs.python.org/3/library/functions.html#int> = USER
            Constant USER of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.GAMGType

    class petsc4py.PETSc.PC.GAMGType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The GAMG subtype.

        Attributes Summary
        AGG | Object AGG of type str <https://docs.python.org/3/library/stdtypes.html#str>
        CLASSICAL | Object CLASSICAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GEO | Object GEO of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        AGG: str <https://docs.python.org/3/library/stdtypes.html#str> = AGG
            Object AGG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CLASSICAL: str <https://docs.python.org/3/library/stdtypes.html#str> = CLASSICAL
            Object CLASSICAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GEO: str <https://docs.python.org/3/library/stdtypes.html#str> = GEO
            Object GEO of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.GASMType

    class petsc4py.PETSc.PC.GASMType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The GASM subtype.

        Attributes Summary
        BASIC | Constant BASIC of type int <https://docs.python.org/3/library/functions.html#int>
        INTERPOLATE | Constant INTERPOLATE of type int <https://docs.python.org/3/library/functions.html#int>
        NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>
        RESTRICT | Constant RESTRICT of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        BASIC: int <https://docs.python.org/3/library/functions.html#int> = BASIC
            Constant BASIC of type int <https://docs.python.org/3/library/functions.html#int>

        INTERPOLATE: int <https://docs.python.org/3/library/functions.html#int> = INTERPOLATE
            Constant INTERPOLATE of type int <https://docs.python.org/3/library/functions.html#int>

        NONE: int <https://docs.python.org/3/library/functions.html#int> = NONE
            Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>

        RESTRICT: int <https://docs.python.org/3/library/functions.html#int> = RESTRICT
            Constant RESTRICT of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.HPDDMCoarseCorrectionType

    class petsc4py.PETSc.PC.HPDDMCoarseCorrectionType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The HPDDM coarse correction type.

        Attributes Summary
        ADDITIVE | Constant ADDITIVE of type int <https://docs.python.org/3/library/functions.html#int>
        BALANCED | Constant BALANCED of type int <https://docs.python.org/3/library/functions.html#int>
        DEFLATED | Constant DEFLATED of type int <https://docs.python.org/3/library/functions.html#int>
        NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        ADDITIVE: int <https://docs.python.org/3/library/functions.html#int> = ADDITIVE
            Constant ADDITIVE of type int <https://docs.python.org/3/library/functions.html#int>

        BALANCED: int <https://docs.python.org/3/library/functions.html#int> = BALANCED
            Constant BALANCED of type int <https://docs.python.org/3/library/functions.html#int>

        DEFLATED: int <https://docs.python.org/3/library/functions.html#int> = DEFLATED
            Constant DEFLATED of type int <https://docs.python.org/3/library/functions.html#int>

        NONE: int <https://docs.python.org/3/library/functions.html#int> = NONE
            Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.MGCycleType

    class petsc4py.PETSc.PC.MGCycleType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The MG cycle type.

        Attributes Summary
        V | Constant V of type int <https://docs.python.org/3/library/functions.html#int>
        W | Constant W of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        V: int <https://docs.python.org/3/library/functions.html#int> = V
            Constant V of type int <https://docs.python.org/3/library/functions.html#int>

        W: int <https://docs.python.org/3/library/functions.html#int> = W
            Constant W of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.MGType

    class petsc4py.PETSc.PC.MGType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The MG subtype.

        Attributes Summary
        ADDITIVE | Constant ADDITIVE of type int <https://docs.python.org/3/library/functions.html#int>
        FULL | Constant FULL of type int <https://docs.python.org/3/library/functions.html#int>
        KASKADE | Constant KASKADE of type int <https://docs.python.org/3/library/functions.html#int>
        MULTIPLICATIVE | Constant MULTIPLICATIVE of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        ADDITIVE: int <https://docs.python.org/3/library/functions.html#int> = ADDITIVE
            Constant ADDITIVE of type int <https://docs.python.org/3/library/functions.html#int>

        FULL: int <https://docs.python.org/3/library/functions.html#int> = FULL
            Constant FULL of type int <https://docs.python.org/3/library/functions.html#int>

        KASKADE: int <https://docs.python.org/3/library/functions.html#int> = KASKADE
            Constant KASKADE of type int <https://docs.python.org/3/library/functions.html#int>

        MULTIPLICATIVE: int <https://docs.python.org/3/library/functions.html#int> = MULTIPLICATIVE
            Constant MULTIPLICATIVE of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.PatchConstructType

    class petsc4py.PETSc.PC.PatchConstructType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The patch construction type.

        Attributes Summary
        PARDECOMP | Constant PARDECOMP of type int <https://docs.python.org/3/library/functions.html#int>
        PYTHON | Constant PYTHON of type int <https://docs.python.org/3/library/functions.html#int>
        STAR | Constant STAR of type int <https://docs.python.org/3/library/functions.html#int>
        USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int>
        VANKA | Constant VANKA of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        PARDECOMP: int <https://docs.python.org/3/library/functions.html#int> = PARDECOMP
            Constant PARDECOMP of type int <https://docs.python.org/3/library/functions.html#int>

        PYTHON: int <https://docs.python.org/3/library/functions.html#int> = PYTHON
            Constant PYTHON of type int <https://docs.python.org/3/library/functions.html#int>

        STAR: int <https://docs.python.org/3/library/functions.html#int> = STAR
            Constant STAR of type int <https://docs.python.org/3/library/functions.html#int>

        USER: int <https://docs.python.org/3/library/functions.html#int> = USER
            Constant USER of type int <https://docs.python.org/3/library/functions.html#int>

        VANKA: int <https://docs.python.org/3/library/functions.html#int> = VANKA
            Constant VANKA of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.Side

    class petsc4py.PETSc.PC.Side
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The manner in which the preconditioner is applied.

        Attributes Summary
        L | Constant L of type int <https://docs.python.org/3/library/functions.html#int>
        LEFT | Constant LEFT of type int <https://docs.python.org/3/library/functions.html#int>
        R | Constant R of type int <https://docs.python.org/3/library/functions.html#int>
        RIGHT | Constant RIGHT of type int <https://docs.python.org/3/library/functions.html#int>
        S | Constant S of type int <https://docs.python.org/3/library/functions.html#int>
        SYMMETRIC | Constant SYMMETRIC of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        L: int <https://docs.python.org/3/library/functions.html#int> = L
            Constant L of type int <https://docs.python.org/3/library/functions.html#int>

        LEFT: int <https://docs.python.org/3/library/functions.html#int> = LEFT
            Constant LEFT of type int <https://docs.python.org/3/library/functions.html#int>

        R: int <https://docs.python.org/3/library/functions.html#int> = R
            Constant R of type int <https://docs.python.org/3/library/functions.html#int>

        RIGHT: int <https://docs.python.org/3/library/functions.html#int> = RIGHT
            Constant RIGHT of type int <https://docs.python.org/3/library/functions.html#int>

        S: int <https://docs.python.org/3/library/functions.html#int> = S
            Constant S of type int <https://docs.python.org/3/library/functions.html#int>

        SYMMETRIC: int <https://docs.python.org/3/library/functions.html#int> = SYMMETRIC
            Constant SYMMETRIC of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.PC.Type

    class petsc4py.PETSc.PC.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The preconditioner method.

        Attributes Summary
        ASM | Object ASM of type str <https://docs.python.org/3/library/stdtypes.html#str>
        BDDC | Object BDDC of type str <https://docs.python.org/3/library/stdtypes.html#str>
        BJACOBI | Object BJACOBI of type str <https://docs.python.org/3/library/stdtypes.html#str>
        CHOLESKY | Object CHOLESKY of type str <https://docs.python.org/3/library/stdtypes.html#str>
        CHOWILUVIENNACL | Object CHOWILUVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        COMPOSITE | Object COMPOSITE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        CP | Object CP of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DEFLATION | Object DEFLATION of type str <https://docs.python.org/3/library/stdtypes.html#str>
        EISENSTAT | Object EISENSTAT of type str <https://docs.python.org/3/library/stdtypes.html#str>
        EXOTIC | Object EXOTIC of type str <https://docs.python.org/3/library/stdtypes.html#str>
        FIELDSPLIT | Object FIELDSPLIT of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GALERKIN | Object GALERKIN of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GAMG | Object GAMG of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GASM | Object GASM of type str <https://docs.python.org/3/library/stdtypes.html#str>
        H2OPUS | Object H2OPUS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        HMG | Object HMG of type str <https://docs.python.org/3/library/stdtypes.html#str>
        HPDDM | Object HPDDM of type str <https://docs.python.org/3/library/stdtypes.html#str>
        HYPRE | Object HYPRE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ICC | Object ICC of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ILU | Object ILU of type str <https://docs.python.org/3/library/stdtypes.html#str>
        JACOBI | Object JACOBI of type str <https://docs.python.org/3/library/stdtypes.html#str>
        KACZMARZ | Object KACZMARZ of type str <https://docs.python.org/3/library/stdtypes.html#str>
        KSP | Object KSP of type str <https://docs.python.org/3/library/stdtypes.html#str>
        LMVM | Object LMVM of type str <https://docs.python.org/3/library/stdtypes.html#str>
        LSC | Object LSC of type str <https://docs.python.org/3/library/stdtypes.html#str>
        LU | Object LU of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MAT | Object MAT of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MG | Object MG of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ML | Object ML of type str <https://docs.python.org/3/library/stdtypes.html#str>
        NN | Object NN of type str <https://docs.python.org/3/library/stdtypes.html#str>
        NONE | Object NONE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PARMS | Object PARMS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PATCH | Object PATCH of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PBJACOBI | Object PBJACOBI of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PFMG | Object PFMG of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PYTHON | Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>
        QR | Object QR of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REDISTRIBUTE | Object REDISTRIBUTE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        REDUNDANT | Object REDUNDANT of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ROWSCALINGVIENNACL | Object ROWSCALINGVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SAVIENNACL | Object SAVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SHELL | Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SOR | Object SOR of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SPAI | Object SPAI of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SVD | Object SVD of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SYSPFMG | Object SYSPFMG of type str <https://docs.python.org/3/library/stdtypes.html#str>
        TELESCOPE | Object TELESCOPE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        TFS | Object TFS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        VPBJACOBI | Object VPBJACOBI of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        ASM: str <https://docs.python.org/3/library/stdtypes.html#str> = ASM
            Object ASM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BDDC: str <https://docs.python.org/3/library/stdtypes.html#str> = BDDC
            Object BDDC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BJACOBI: str <https://docs.python.org/3/library/stdtypes.html#str> = BJACOBI
            Object BJACOBI of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CHOLESKY: str <https://docs.python.org/3/library/stdtypes.html#str> = CHOLESKY
            Object CHOLESKY of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CHOWILUVIENNACL: str <https://docs.python.org/3/library/stdtypes.html#str> = CHOWILUVIENNACL
            Object CHOWILUVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        COMPOSITE: str <https://docs.python.org/3/library/stdtypes.html#str> = COMPOSITE
            Object COMPOSITE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CP: str <https://docs.python.org/3/library/stdtypes.html#str> = CP
            Object CP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DEFLATION: str <https://docs.python.org/3/library/stdtypes.html#str> = DEFLATION
            Object DEFLATION of type str <https://docs.python.org/3/library/stdtypes.html#str>

        EISENSTAT: str <https://docs.python.org/3/library/stdtypes.html#str> = EISENSTAT
            Object EISENSTAT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        EXOTIC: str <https://docs.python.org/3/library/stdtypes.html#str> = EXOTIC
            Object EXOTIC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        FIELDSPLIT: str <https://docs.python.org/3/library/stdtypes.html#str> = FIELDSPLIT
            Object FIELDSPLIT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GALERKIN: str <https://docs.python.org/3/library/stdtypes.html#str> = GALERKIN
            Object GALERKIN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GAMG: str <https://docs.python.org/3/library/stdtypes.html#str> = GAMG
            Object GAMG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GASM: str <https://docs.python.org/3/library/stdtypes.html#str> = GASM
            Object GASM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        H2OPUS: str <https://docs.python.org/3/library/stdtypes.html#str> = H2OPUS
            Object H2OPUS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HMG: str <https://docs.python.org/3/library/stdtypes.html#str> = HMG
            Object HMG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HPDDM: str <https://docs.python.org/3/library/stdtypes.html#str> = HPDDM
            Object HPDDM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HYPRE: str <https://docs.python.org/3/library/stdtypes.html#str> = HYPRE
            Object HYPRE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ICC: str <https://docs.python.org/3/library/stdtypes.html#str> = ICC
            Object ICC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ILU: str <https://docs.python.org/3/library/stdtypes.html#str> = ILU
            Object ILU of type str <https://docs.python.org/3/library/stdtypes.html#str>

        JACOBI: str <https://docs.python.org/3/library/stdtypes.html#str> = JACOBI
            Object JACOBI of type str <https://docs.python.org/3/library/stdtypes.html#str>

        KACZMARZ: str <https://docs.python.org/3/library/stdtypes.html#str> = KACZMARZ
            Object KACZMARZ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        KSP: str <https://docs.python.org/3/library/stdtypes.html#str> = KSP
            Object KSP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVM: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVM
            Object LMVM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LSC: str <https://docs.python.org/3/library/stdtypes.html#str> = LSC
            Object LSC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LU: str <https://docs.python.org/3/library/stdtypes.html#str> = LU
            Object LU of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MAT: str <https://docs.python.org/3/library/stdtypes.html#str> = MAT
            Object MAT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MG: str <https://docs.python.org/3/library/stdtypes.html#str> = MG
            Object MG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ML: str <https://docs.python.org/3/library/stdtypes.html#str> = ML
            Object ML of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NN: str <https://docs.python.org/3/library/stdtypes.html#str> = NN
            Object NN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NONE: str <https://docs.python.org/3/library/stdtypes.html#str> = NONE
            Object NONE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PARMS: str <https://docs.python.org/3/library/stdtypes.html#str> = PARMS
            Object PARMS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PATCH: str <https://docs.python.org/3/library/stdtypes.html#str> = PATCH
            Object PATCH of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PBJACOBI: str <https://docs.python.org/3/library/stdtypes.html#str> = PBJACOBI
            Object PBJACOBI of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PFMG: str <https://docs.python.org/3/library/stdtypes.html#str> = PFMG
            Object PFMG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PYTHON: str <https://docs.python.org/3/library/stdtypes.html#str> = PYTHON
            Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        QR: str <https://docs.python.org/3/library/stdtypes.html#str> = QR
            Object QR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REDISTRIBUTE: str <https://docs.python.org/3/library/stdtypes.html#str> = REDISTRIBUTE
            Object REDISTRIBUTE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        REDUNDANT: str <https://docs.python.org/3/library/stdtypes.html#str> = REDUNDANT
            Object REDUNDANT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ROWSCALINGVIENNACL: str <https://docs.python.org/3/library/stdtypes.html#str> = ROWSCALINGVIENNACL
            Object ROWSCALINGVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SAVIENNACL: str <https://docs.python.org/3/library/stdtypes.html#str> = SAVIENNACL
            Object SAVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SHELL: str <https://docs.python.org/3/library/stdtypes.html#str> = SHELL
            Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SOR: str <https://docs.python.org/3/library/stdtypes.html#str> = SOR
            Object SOR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SPAI: str <https://docs.python.org/3/library/stdtypes.html#str> = SPAI
            Object SPAI of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SVD: str <https://docs.python.org/3/library/stdtypes.html#str> = SVD
            Object SVD of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SYSPFMG: str <https://docs.python.org/3/library/stdtypes.html#str> = SYSPFMG
            Object SYSPFMG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        TELESCOPE: str <https://docs.python.org/3/library/stdtypes.html#str> = TELESCOPE
            Object TELESCOPE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        TFS: str <https://docs.python.org/3/library/stdtypes.html#str> = TFS
            Object TFS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        VPBJACOBI: str <https://docs.python.org/3/library/stdtypes.html#str> = VPBJACOBI
            Object VPBJACOBI of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
addCompositePCType(pc_type) | Add a PC of the given type to the composite PC.
appendOptionsPrefix(prefix) | Append to the prefix used for all the PC options.
apply(x, y) | Apply the PC to a vector.
applySymmetricLeft(x, y) | Apply the left part of a symmetric PC to a vector.
applySymmetricRight(x, y) | Apply the right part of a symmetric PC to a vector.
applyTranspose(x, y) | Apply the transpose of the PC to a vector.
create([comm]) | Create an empty PC.
createPython([context, comm]) | Create a preconditioner of Python type.
destroy() | Destroy the PC that was created with create.
getASMSubKSP() | Return the local KSP <#petsc4py.PETSc.KSP> object for all blocks on this process.
getBJacobiSubKSP() | Return the local KSP <#petsc4py.PETSc.KSP> object for all blocks on this process.
getCompositePC(n) | Return a component of the composite PC.
getDM() | Return the DM <#petsc4py.PETSc.DM> associated with the PC.
getDeflationCoarseKSP() | Return the coarse problem KSP <#petsc4py.PETSc.KSP>.
getDeflationPC() | Return the additional preconditioner.
getFactorMatrix() | Return the factored matrix.
getFactorSolverType() | Return the solver package used to perform the factorization.
getFailedReason() | Return the reason the PC terminated.
getFieldSplitSchurGetSubKSP() | Return the KSP <#petsc4py.PETSc.KSP> for the Schur complement based splits.
getFieldSplitSubIS(splitname) | Return the IS <#petsc4py.PETSc.IS> associated with a given name.
getFieldSplitSubKSP() | Return the KSP <#petsc4py.PETSc.KSP> for all splits.
getHPDDMCoarseCorrectionType() | Return the coarse correction type.
getHPDDMComplexities() | Compute the grid and operator complexities.
getHPDDMSTShareSubKSP() | Return true if the KSP <#petsc4py.PETSc.KSP> in SLEPc ST and the subdomain solver is shared.
getHYPREType() | Return the Type.HYPRE <#petsc4py.PETSc.PC.Type.HYPRE> type.
getKSP() | Return the KSP <#petsc4py.PETSc.KSP> if the PC is Type.KSP <#petsc4py.PETSc.PC.Type.KSP>.
getMGCoarseSolve() | Return the KSP <#petsc4py.PETSc.KSP> used on the coarse grid.
getMGInterpolation(level) | Return the interpolation operator for the given level.
getMGLevels() | Return the number of MG <#petsc4py.PETSc.PC.Type.MG> levels.
getMGRScale(level) | Return the pointwise scaling for the restriction operator on the given level.
getMGRestriction(level) | Return the restriction operator for the given level.
getMGSmoother(level) | Return the KSP <#petsc4py.PETSc.KSP> to be used as a smoother.
getMGSmootherDown(level) | Return the KSP <#petsc4py.PETSc.KSP> to be used as a smoother before coarse grid correction.
getMGSmootherUp(level) | Return the KSP <#petsc4py.PETSc.KSP> to be used as a smoother after coarse grid correction.
getMGType() | Return the form of multigrid.
getOperators() | Return the matrices associated with a linear system.
getOptionsPrefix() | Return the prefix used for all the PC options.
getPatchSubKSP() | Return the local KSP <#petsc4py.PETSc.KSP> object for all blocks on this process.
getPythonContext() | Return the instance of the class implementing the required Python methods.
getPythonType() | Return the fully qualified Python name of the class used by the preconditioner.
getType() | Return the preconditioner type.
getUseAmat() | Return the flag to indicate if PC is applied to A or P.
matApply(x, y) | Apply the PC to many vectors stored as Mat.Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE>.
matApplyTranspose(x, y) | Apply the transpose of the PC to many vectors stored as Mat.Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE>.
reset() | Reset the PC, removing any allocated vectors and matrices.
setASMLocalSubdomains(nsd[, is_sub, is_local]) | Set the local subdomains.
setASMOverlap(overlap) | Set the overlap between a pair of subdomains.
setASMSortIndices(dosort) | Set to sort subdomain indices.
setASMTotalSubdomains(nsd[, is_sub, is_local]) | Set the subdomains for all processes.
setASMType(asmtype) | Set the type of restriction and interpolation.
setBDDCChangeOfBasisMat(T[, interior]) | Set a user defined change of basis for degrees of freedom.
setBDDCCoarseningRatio(cratio) | Set the coarsening ratio used in the multilevel version.
setBDDCDirichletBoundaries(bndr) | Set the IS <#petsc4py.PETSc.IS> defining Dirichlet boundaries for the global problem.
setBDDCDirichletBoundariesLocal(bndr) | Set the IS <#petsc4py.PETSc.IS> defining Dirichlet boundaries in local ordering.
setBDDCDiscreteGradient(G[, order, field, ...]) | Set the discrete gradient.
setBDDCDivergenceMat(div[, trans, l2l]) | Set the linear operator representing ∫ div(u)•p dx.
setBDDCDofsSplitting(isfields) | Set the index set(s) defining fields of the global matrix.
setBDDCDofsSplittingLocal(isfields) | Set the index set(s) defining fields of the local subdomain matrix.
setBDDCLevels(levels) | Set the maximum number of additional levels allowed.
setBDDCLocalAdjacency(csr) | Provide a custom connectivity graph for local dofs.
setBDDCNeumannBoundaries(bndr) | Set the IS <#petsc4py.PETSc.IS> defining Neumann boundaries for the global problem.
setBDDCNeumannBoundariesLocal(bndr) | Set the IS <#petsc4py.PETSc.IS> defining Neumann boundaries in local ordering.
setBDDCPrimalVerticesIS(primv) | Set additional user defined primal vertices.
setBDDCPrimalVerticesLocalIS(primv) | Set additional user defined primal vertices.
setCompositeType(ctype) | Set the type of composite preconditioner.
setCoordinates(coordinates) | Set the coordinates for the nodes on the local process.
setDM(dm) | Set the DM <#petsc4py.PETSc.DM> that may be used by some preconditioners.
setDeflationCoarseMat(mat) | Set the coarse problem matrix.
setDeflationCorrectionFactor(fact) | Set the coarse problem correction factor.
setDeflationInitOnly(flg) | Set to only perform the initialization.
setDeflationLevels(levels) | Set the maximum level of deflation nesting.
setDeflationProjectionNullSpaceMat(mat) | Set the projection null space matrix.
setDeflationReductionFactor(red) | Set the reduction factor for the preconditioner.
setDeflationSpace(W, transpose) | Set the deflation space matrix or its (Hermitian) transpose.
setDeflationSpaceToCompute(space_type, size) | Set the deflation space type.
setFactorLevels(levels) | Set the number of levels of fill.
setFactorOrdering([ord_type, nzdiag, reuse]) | Set options for the matrix factorization reordering.
setFactorPivot([zeropivot, inblocks]) | Set options for matrix factorization pivoting.
setFactorSetUpSolverType() | Set up the factorization solver.
setFactorShift([shift_type, amount]) | Set options for shifting diagonal entries of a matrix.
setFactorSolverType(solver) | Set the solver package used to perform the factorization.
setFailedReason(reason) | Set the reason the PC terminated.
setFieldSplitFields(bsize, *fields) | Sets the elements for the field split.
setFieldSplitIS(*fields) | Set the elements for the field split by IS <#petsc4py.PETSc.IS>.
setFieldSplitSchurFactType(ctype) | Set the type of approximate block factorization.
setFieldSplitSchurPreType(ptype[, pre]) | Set from what operator the PC is constructed.
setFieldSplitType(ctype) | Set the type of composition of a field split preconditioner.
setFromOptions() | Set various PC parameters from user options.
setGAMGLevels(levels) | Set the maximum number of levels.
setGAMGSmooths(smooths) | Set the number of smoothing steps used on all levels.
setGAMGType(gamgtype) | Set the type of algorithm.
setGASMOverlap(overlap) | Set the overlap between a pair of subdomains.
setGASMType(gasmtype) | Set the type of restriction and interpolation.
setHPDDMAuxiliaryMat(uis, uaux) | Set the auxiliary matrix used by the preconditioner.
setHPDDMCoarseCorrectionType(correction_type) | Set the coarse correction type.
setHPDDMDeflationMat(uis, U) | Set the deflation space used to assemble a coarse operator.
setHPDDMHasNeumannMat(has) | Set to indicate that the Mat <#petsc4py.PETSc.Mat> passed to the PC is the local Neumann matrix.
setHPDDMRHSMat(B) | Set the right-hand side matrix of the preconditioner.
setHYPREAMSSetInteriorNodes(interior) | Set the list of interior nodes to a zero conductivity region.
setHYPREDiscreteCurl(mat) | Set the discrete curl matrix.
setHYPREDiscreteGradient(mat) | Set the discrete gradient matrix.
setHYPRESetAlphaPoissonMatrix(mat) | Set the vector Poisson matrix.
setHYPRESetBetaPoissonMatrix([mat]) | Set the Posson matrix.
setHYPRESetEdgeConstantVectors(ozz, zoz[, zzo]) | Set the representation of the constant vector fields in the edge element basis.
setHYPRESetInterpolations(dim[, RT_Pi_Full, ...]) | Set the interpolation matrices.
setHYPREType(hypretype) | Set the Type.HYPRE <#petsc4py.PETSc.PC.Type.HYPRE> type.
setMGCycleType(cycle_type) | Set the type of cycles.
setMGCycleTypeOnLevel(level, cycle_type) | Set the type of cycle on the given level.
setMGInterpolation(level, mat) | Set the interpolation operator for the given level.
setMGLevels(levels) | Set the number of MG <#petsc4py.PETSc.PC.Type.MG> levels.
setMGR(level, r) | Set the vector where the residual is stored.
setMGRScale(level, rscale) | Set the pointwise scaling for the restriction operator on the given level.
setMGRestriction(level, mat) | Set the restriction operator for the given level.
setMGRhs(level, rhs) | Set the vector where the right-hand side is stored.
setMGType(mgtype) | Set the form of multigrid.
setMGX(level, x) | Set the vector where the solution is stored.
setOperators([A, P]) | Set the matrices associated with the linear system.
setOptionsPrefix(prefix) | Set the prefix used for all the PC options.
setPatchCellNumbering(sec) | Set the cell numbering.
setPatchComputeFunction(function[, args, kargs]) | Set compute operator callbacks.
setPatchComputeFunctionInteriorFacets(function) | Set compute operator callbacks.
setPatchComputeOperator(operator[, args, kargs]) | Set compute operator callbacks.
setPatchComputeOperatorInteriorFacets(operator) | Set compute operator callbacks.
setPatchConstructType(typ[, operator, args, ...]) | Set compute operator callbacks.
setPatchDiscretisationInfo(dms, bs, ...) | Set discretisation info.
setPythonContext(context) | Set the instance of the class implementing the required Python methods.
setPythonType(py_type) | Set the fully qualified Python name of the class to be used.
setReusePreconditioner(flag) | Set to indicate the preconditioner is to be reused.
setSPAIBlockSize(n) | Set the block size of the preconditioner.
setSPAICacheSize(size) | Set the cache size.
setSPAIEpsilon(val) | Set the tolerance for the preconditioner.
setSPAIMax(maxval) | Set the size of working buffers in the preconditioner.
setSPAIMaxNew(maxval) | Set the maximum number of new non-zero candidates per step.
setSPAINBSteps(nbsteps) | Set the maximum number of improvement steps per row.
setSPAISp(sym) | Set to specify a symmetric sparsity pattern.
setSPAIVerbose(level) | Set the verbosity level.
setType(pc_type) | Set the preconditioner type.
setUp() | Set up the internal data structures for the PC.
setUpOnBlocks() | Set up the PC for each block.
setUseAmat(flag) | Set to indicate to apply PC to A and not P.
view([viewer]) | View the PC object.

Methods Documentation

    addCompositePCType(pc_type)
        Add a PC of the given type to the composite PC.

        Collective.

        Parameters
            pc_type (Type <#petsc4py.PETSc.PC.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of the preconditioner to add.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCCompositeAddPCType <https://petsc.org/release/manualpages/PC/PCCompositeAddPCType.html>

    Source code at petsc4py/PETSc/PC.pyx:1705 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1705>

    appendOptionsPrefix(prefix)
        Append to the prefix used for all the PC options.

        Logically collective.

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The prefix to append to the current prefix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            Working with PETSc options <#petsc-options>, PCAppendOptionsPrefix <https://petsc.org/release/manualpages/PC/PCAppendOptionsPrefix.html>

    Source code at petsc4py/PETSc/PC.pyx:354 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L354>

    apply(x, y)
        Apply the PC to a vector.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input vector.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The output vector, cannot be the same as x.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCApply <https://petsc.org/release/manualpages/PC/PCApply.html>

    Source code at petsc4py/PETSc/PC.pyx:585 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L585>

    applySymmetricLeft(x, y)
        Apply the left part of a symmetric PC to a vector.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input vector.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The output vector, cannot be the same as x.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCApplySymmetricLeft <https://petsc.org/release/manualpages/PC/PCApplySymmetricLeft.html>

    Source code at petsc4py/PETSc/PC.pyx:664 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L664>

    applySymmetricRight(x, y)
        Apply the right part of a symmetric PC to a vector.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input vector.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The output vector, cannot be the same as x.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCApplySymmetricRight <https://petsc.org/release/manualpages/PC/PCApplySymmetricRight.html>

    Source code at petsc4py/PETSc/PC.pyx:683 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L683>

    applyTranspose(x, y)
        Apply the transpose of the PC to a vector.

        Collective.

        For complex numbers this applies the non-Hermitian transpose.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input vector.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The output vector, cannot be the same as x.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCApply <https://petsc.org/release/manualpages/PC/PCApply.html>

    Source code at petsc4py/PETSc/PC.pyx:623 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L623>

    create(comm=None)
        Create an empty PC.

        Collective.

        The default preconditioner for sparse matrices is ILU <#petsc4py.PETSc.PC.Type.ILU> or ICC <#petsc4py.PETSc.PC.Type.ICC> with 0 fill on one process and block Jacobi (BJACOBI <#petsc4py.PETSc.PC.Type.BJACOBI>) with ILU <#petsc4py.PETSc.PC.Type.ILU> or ICC <#petsc4py.PETSc.PC.Type.ICC> in parallel. For dense matrices it is always None <https://docs.python.org/3/library/constants.html#None>.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            destroy, PCCreate <https://petsc.org/release/manualpages/PC/PCCreate.html>

    Source code at petsc4py/PETSc/PC.pyx:263 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L263>

    createPython(context=None, comm=None)
        Create a preconditioner of Python type.

        Collective.

        Parameters

            •   context (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- An instance of the Python class implementing the required methods.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PETSc Python preconditioner type <#petsc-python-pc>, setType, setPythonContext, PC.Type.PYTHON <#petsc4py.PETSc.PC.Type.PYTHON>

    Source code at petsc4py/PETSc/PC.pyx:765 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L765>

    destroy()
        Destroy the PC that was created with create.

        Collective.

        See also:
            PCDestroy <https://petsc.org/release/manualpages/PC/PCDestroy.html>

    Source code at petsc4py/PETSc/PC.pyx:249 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L249>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getASMSubKSP()
        Return the local KSP <#petsc4py.PETSc.KSP> object for all blocks on this process.

        Not collective.

        See also:
            PCASMGetSubKSP <https://petsc.org/release/manualpages/PC/PCASMGetSubKSP.html>

    Source code at petsc4py/PETSc/PC.pyx:986 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L986>

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[KSP <#petsc4py.PETSc.KSP>]

    getBJacobiSubKSP()
        Return the local KSP <#petsc4py.PETSc.KSP> object for all blocks on this process.

        Not collective.

        See also:
            PCBJacobiGetSubKSP <https://petsc.org/release/manualpages/PC/PCBJacobiGetSubKSP.html>

    Source code at petsc4py/PETSc/PC.pyx:847 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L847>

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[KSP <#petsc4py.PETSc.KSP>]

    getCompositePC(n)
        Return a component of the composite PC.

        Not collective.

        Parameters
            n (int <https://docs.python.org/3/library/functions.html#int>) -- The index of the PC in the composition.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCCompositeGetPC <https://petsc.org/release/manualpages/PC/PCCompositeGetPC.html>

    Source code at petsc4py/PETSc/PC.pyx:1684 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1684>

    getDM()
        Return the DM <#petsc4py.PETSc.DM> associated with the PC.

        Not collective.

        See also:
            PCGetDM <https://petsc.org/release/manualpages/PC/PCGetDM.html>

    Source code at petsc4py/PETSc/PC.pyx:704 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L704>

        Return type
            DM <#petsc4py.PETSc.DM>

    getDeflationCoarseKSP()
        Return the coarse problem KSP <#petsc4py.PETSc.KSP>.

        Not collective.

        See also:
            PCDeflationGetCoarseKSP <https://petsc.org/release/manualpages/PC/PCDeflationGetCoarseKSP.html>

    Source code at petsc4py/PETSc/PC.pyx:2950 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2950>

        Return type
            KSP <#petsc4py.PETSc.KSP>

    getDeflationPC()
        Return the additional preconditioner.

        Not collective.

        See also:
            PCDeflationGetPC <https://petsc.org/release/manualpages/PC/PCDeflationGetPC.html>

    Source code at petsc4py/PETSc/PC.pyx:2965 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2965>

        Return type
            PC <#petsc4py.PETSc.PC>

    getFactorMatrix()
        Return the factored matrix.

        Not collective.

        See also:
            PCFactorGetMatrix <https://petsc.org/release/manualpages/PC/PCFactorGetMatrix.html>

    Source code at petsc4py/PETSc/PC.pyx:1474 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1474>

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getFactorSolverType()
        Return the solver package used to perform the factorization.

        Not collective.

        See also:
            PCFactorGetMatSolverType <https://petsc.org/release/manualpages/PC/PCFactorGetMatSolverType.html>

    Source code at petsc4py/PETSc/PC.pyx:1330 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1330>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getFailedReason()
        Return the reason the PC terminated.

        Not collective.

        After a call to KSPCheckDot() or KSPCheckNorm() inside a KSPSolve(), or after a call to PCReduceFailedReason() this is the maximum reason over all ranks in the PC communicator and hence logically collective. Otherwise it is the local value.

        See also:
            PCGetFailedReason <https://petsc.org/release/manualpages/PC/PCGetFailedReason.html>

    Source code at petsc4py/PETSc/PC.pyx:524 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L524>

        Return type
            FailedReason <#petsc4py.PETSc.PC.FailedReason>

    getFieldSplitSchurGetSubKSP()
        Return the KSP <#petsc4py.PETSc.KSP> for the Schur complement based splits.

        Not collective.

        See also:
            PCFieldSplitSchurGetSubKSP <https://petsc.org/release/manualpages/PC/PCFieldSplitSchurGetSubKSP.html>, PCFieldSplitGetSubKSP <https://petsc.org/release/manualpages/PC/PCFieldSplitGetSubKSP.html>

    Source code at petsc4py/PETSc/PC.pyx:1585 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1585>

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[KSP <#petsc4py.PETSc.KSP>]

    getFieldSplitSubIS(splitname)
        Return the IS <#petsc4py.PETSc.IS> associated with a given name.

        Not collective.

        See also:
            PCFieldSplitGetIS <https://petsc.org/release/manualpages/PC/PCFieldSplitGetIS.html>

    Source code at petsc4py/PETSc/PC.pyx:1605 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1605>

        Parameters
            splitname (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            IS <#petsc4py.PETSc.IS>

    getFieldSplitSubKSP()
        Return the KSP <#petsc4py.PETSc.KSP> for all splits.

        Not collective.

        See also:
            PCFieldSplitGetSubKSP <https://petsc.org/release/manualpages/PC/PCFieldSplitGetSubKSP.html>

    Source code at petsc4py/PETSc/PC.pyx:1565 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1565>

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[KSP <#petsc4py.PETSc.KSP>]

    getHPDDMCoarseCorrectionType()
        Return the coarse correction type.

        Not collective.

        See also:
            PCHPDDMGetCoarseCorrectionType <https://petsc.org/release/manualpages/PC/PCHPDDMGetCoarseCorrectionType.html>

    Source code at petsc4py/PETSc/PC.pyx:2602 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2602>

        Return type
            HPDDMCoarseCorrectionType <#petsc4py.PETSc.PC.HPDDMCoarseCorrectionType>

    getHPDDMComplexities()
        Compute the grid and operator complexities.

        Collective.

        See also:
            PCHPDDMGetComplexities <https://petsc.org/release/manualpages/PC/PCHPDDMGetComplexities.html>

    Source code at petsc4py/PETSc/PC.pyx:2552 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2552>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    getHPDDMSTShareSubKSP()
        Return true if the KSP <#petsc4py.PETSc.KSP> in SLEPc ST and the subdomain solver is shared.

        Not collective.

        See also:
            PCHPDDMGetSTShareSubKSP <https://petsc.org/release/manualpages/PC/PCHPDDMGetSTShareSubKSP.html>

    Source code at petsc4py/PETSc/PC.pyx:2616 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2616>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getHYPREType()
        Return the Type.HYPRE <#petsc4py.PETSc.PC.Type.HYPRE> type.

        Not collective.

        See also:
            PCHYPREGetType <https://petsc.org/release/manualpages/PC/PCHYPREGetType.html>

    Source code at petsc4py/PETSc/PC.pyx:1116 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1116>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getKSP()
        Return the KSP <#petsc4py.PETSc.KSP> if the PC is Type.KSP <#petsc4py.PETSc.PC.Type.KSP>.

        Not collective.

        See also:
            PCKSPGetKSP <https://petsc.org/release/manualpages/PC/PCKSPGetKSP.html>

    Source code at petsc4py/PETSc/PC.pyx:1726 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1726>

        Return type
            KSP <#petsc4py.PETSc.KSP>

    getMGCoarseSolve()
        Return the KSP <#petsc4py.PETSc.KSP> used on the coarse grid.

        Not collective.

        See also:
            PCMGGetCoarseSolve <https://petsc.org/release/manualpages/PC/PCMGGetCoarseSolve.html>

    Source code at petsc4py/PETSc/PC.pyx:1802 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1802>

        Return type
            KSP <#petsc4py.PETSc.KSP>

    getMGInterpolation(level)
        Return the interpolation operator for the given level.

        Logically collective.

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>) -- The level where interpolation is defined from level-1 to level.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            PCMGGetInterpolation <https://petsc.org/release/manualpages/PC/PCMGGetInterpolation.html>

    Source code at petsc4py/PETSc/PC.pyx:1837 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1837>

    getMGLevels()
        Return the number of MG <#petsc4py.PETSc.PC.Type.MG> levels.

        Not collective.

        See also:
            PCMGGetLevels <https://petsc.org/release/manualpages/PC/PCMGGetLevels.html>

    Source code at petsc4py/PETSc/PC.pyx:1770 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1770>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getMGRScale(level)
        Return the pointwise scaling for the restriction operator on the given level.

        Logically collective.

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>) -- The level where restriction is defined from level to level-1.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            PCMGGetRScale <https://petsc.org/release/manualpages/PC/PCMGGetRScale.html>

    Source code at petsc4py/PETSc/PC.pyx:1919 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1919>

    getMGRestriction(level)
        Return the restriction operator for the given level.

        Logically collective.

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>) -- The level where restriction is defined from level to level-1.

        Return type
            Mat <#petsc4py.PETSc.Mat>

    See also:
            PCMGGetRestriction <https://petsc.org/release/manualpages/PC/PCMGGetRestriction.html>

    Source code at petsc4py/PETSc/PC.pyx:1878 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1878>

    getMGSmoother(level)
        Return the KSP <#petsc4py.PETSc.KSP> to be used as a smoother.

        Not collective.

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>) -- The level of the smoother.

        Return type
            KSP <#petsc4py.PETSc.KSP>

    See also:
            getMGSmootherDown, getMGSmootherUp, PCMGGetSmoother <https://petsc.org/release/manualpages/PC/PCMGGetSmoother.html>

    Source code at petsc4py/PETSc/PC.pyx:1940 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1940>

    getMGSmootherDown(level)
        Return the KSP <#petsc4py.PETSc.KSP> to be used as a smoother before coarse grid correction.

        Not collective.

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>) -- The level of the smoother.

        Return type
            KSP <#petsc4py.PETSc.KSP>

    See also:
            getMGSmoother, getMGSmootherUp, PCMGGetSmootherDown <https://petsc.org/release/manualpages/PC/PCMGGetSmootherDown.html>

    Source code at petsc4py/PETSc/PC.pyx:1961 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1961>

    getMGSmootherUp(level)
        Return the KSP <#petsc4py.PETSc.KSP> to be used as a smoother after coarse grid correction.

        Not collective.

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>) -- The level of the smoother.

        Return type
            KSP <#petsc4py.PETSc.KSP>

    See also:
            getMGSmootherDown, getMGSmoother, PCMGGetSmootherUp <https://petsc.org/release/manualpages/PC/PCMGGetSmootherUp.html>

    Source code at petsc4py/PETSc/PC.pyx:1982 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1982>

    getMGType()
        Return the form of multigrid.

        Logically collective.

        See also:
            PCMGGetType <https://petsc.org/release/manualpages/PC/PCMGGetType.html>

    Source code at petsc4py/PETSc/PC.pyx:1743 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1743>

        Return type
            MGType <#petsc4py.PETSc.PC.MGType>

    getOperators()
        Return the matrices associated with a linear system.

        Not collective.

        See also:
            setOperators, PCGetOperators <https://petsc.org/release/manualpages/PC/PCGetOperators.html>

    Source code at petsc4py/PETSc/PC.pyx:420 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L420>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>]

    getOptionsPrefix()
        Return the prefix used for all the PC options.

        Not collective.

        See also:
            Working with PETSc options <#petsc-options>, PCGetOptionsPrefix <https://petsc.org/release/manualpages/PC/PCGetOptionsPrefix.html>

    Source code at petsc4py/PETSc/PC.pyx:340 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L340>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getPatchSubKSP()
        Return the local KSP <#petsc4py.PETSc.KSP> object for all blocks on this process.

        Not collective.

        Source code at petsc4py/PETSc/PC.pyx:2412 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2412>

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[KSP <#petsc4py.PETSc.KSP>]

    getPythonContext()
        Return the instance of the class implementing the required Python methods.

        Not collective.

        See also:
            PETSc Python preconditioner type <#petsc-python-pc>, setPythonContext

    Source code at petsc4py/PETSc/PC.pyx:802 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L802>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getPythonType()
        Return the fully qualified Python name of the class used by the preconditioner.

        Not collective.

        See also:
            PETSc Python preconditioner type <#petsc-python-pc>, setPythonContext, setPythonType, PCPythonGetType <https://petsc.org/release/manualpages/PC/PCPythonGetType.html>

    Source code at petsc4py/PETSc/PC.pyx:831 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L831>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getType()
        Return the preconditioner type.

        Not collective.

        See also:
            setType, PCGetType <https://petsc.org/release/manualpages/PC/PCGetType.html>

    Source code at petsc4py/PETSc/PC.pyx:307 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L307>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getUseAmat()
        Return the flag to indicate if PC is applied to A or P.

        Logically collective.

        Returns
            flag -- True if A is used and False if P.

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    See also:
            setUseAmat, PCGetUseAmat <https://petsc.org/release/manualpages/PC/PCGetUseAmat.html>

    Source code at petsc4py/PETSc/PC.pyx:462 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L462>

    matApply(x, y)
        Apply the PC to many vectors stored as Mat.Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE>.

        Collective.

        Parameters

            •   x (Mat <#petsc4py.PETSc.Mat>) -- The input matrix.

            •   y (Mat <#petsc4py.PETSc.Mat>) -- The output matrix, cannot be the same as x.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCMatApply <https://petsc.org/release/manualpages/PC/PCMatApply.html>, PCApply <https://petsc.org/release/manualpages/PC/PCApply.html>

    Source code at petsc4py/PETSc/PC.pyx:604 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L604>

    matApplyTranspose(x, y)
        Apply the transpose of the PC to many vectors stored as Mat.Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE>.

        Collective.

        Parameters

            •   x (Mat <#petsc4py.PETSc.Mat>) -- The input matrix.

            •   y (Mat <#petsc4py.PETSc.Mat>) -- The output matrix, cannot be the same as x.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCMatApply <https://petsc.org/release/manualpages/PC/PCMatApply.html>, PCMatApplyTranspose <https://petsc.org/release/manualpages/PC/PCMatApplyTranspose.html>

    Source code at petsc4py/PETSc/PC.pyx:645 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L645>

    reset()
        Reset the PC, removing any allocated vectors and matrices.

        Collective.

        See also:
            PCReset <https://petsc.org/release/manualpages/PC/PCReset.html>

    Source code at petsc4py/PETSc/PC.pyx:557 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L557>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setASMLocalSubdomains(nsd, is_sub=None, is_local=None)
        Set the local subdomains.

        Collective.

        Parameters

            •   nsd (int <https://docs.python.org/3/library/functions.html#int>) -- The number of subdomains for this process.

            •   is_sub (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>) -- Defines the subdomains for this process or None <https://docs.python.org/3/library/constants.html#None> to determine internally.

            •   is_local (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>) -- Defines the local part of the subdomains for this process, only used for PC.ASMType.RESTRICT <#petsc4py.PETSc.PC.ASMType.RESTRICT>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setASMTotalSubdomains, PCASMSetLocalSubdomains <https://petsc.org/release/manualpages/PC/PCASMSetLocalSubdomains.html>

    Source code at petsc4py/PETSc/PC.pyx:900 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L900>

    setASMOverlap(overlap)
        Set the overlap between a pair of subdomains.

        Logically collective.

        Parameters
            overlap (int <https://docs.python.org/3/library/functions.html#int>) -- The amount of overlap between subdomains.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCASMSetOverlap <https://petsc.org/release/manualpages/PC/PCASMSetOverlap.html>

    Source code at petsc4py/PETSc/PC.pyx:882 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L882>

    setASMSortIndices(dosort)
        Set to sort subdomain indices.

        Logically collective.

        Parameters
            dosort (bool <https://docs.python.org/3/library/functions.html#bool>) -- Set to True <https://docs.python.org/3/library/constants.html#True> to sort indices

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCASMSetSortIndices <https://petsc.org/release/manualpages/PC/PCASMSetSortIndices.html>

    Source code at petsc4py/PETSc/PC.pyx:1001 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1001>

    setASMTotalSubdomains(nsd, is_sub=None, is_local=None)
        Set the subdomains for all processes.

        Collective.

        Parameters

            •   nsd (int <https://docs.python.org/3/library/functions.html#int>) -- The number of subdomains for all processes.

            •   is_sub (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>) -- Defines the subdomains for all processes or None <https://docs.python.org/3/library/constants.html#None> to determine internally.

            •   is_local (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>) -- Defines the local part of the subdomains for this process, only used for PC.ASMType.RESTRICT <#petsc4py.PETSc.PC.ASMType.RESTRICT>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setASMLocalSubdomains, PCASMSetTotalSubdomains <https://petsc.org/release/manualpages/PC/PCASMSetTotalSubdomains.html>

    Source code at petsc4py/PETSc/PC.pyx:943 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L943>

    setASMType(asmtype)
        Set the type of restriction and interpolation.

        Logically collective.

        Parameters
            asmtype (ASMType <#petsc4py.PETSc.PC.ASMType>) -- The type of ASM you wish to use.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCASMSetType <https://petsc.org/release/manualpages/PC/PCASMSetType.html>

    Source code at petsc4py/PETSc/PC.pyx:864 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L864>

    setBDDCChangeOfBasisMat(T, interior=False)
        Set a user defined change of basis for degrees of freedom.

        Collective.

        Parameters

            •   T (Mat <#petsc4py.PETSc.Mat>) -- The matrix representing the change of basis.

            •   interior (bool <https://docs.python.org/3/library/functions.html#bool>) -- Enable to indicate the change of basis affects interior degrees of freedom.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetChangeOfBasisMat <https://petsc.org/release/manualpages/PC/PCBDDCSetChangeOfBasisMat.html>

    Source code at petsc4py/PETSc/PC.pyx:2205 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2205>

    setBDDCCoarseningRatio(cratio)
        Set the coarsening ratio used in the multilevel version.

        Logically collective.

        Parameters
            cratio (int <https://docs.python.org/3/library/functions.html#int>) -- The coarsening ratio at the coarse level

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetCoarseningRatio <https://petsc.org/release/manualpages/PC/PCBDDCSetCoarseningRatio.html>

    Source code at petsc4py/PETSc/PC.pyx:2260 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2260>

    setBDDCDirichletBoundaries(bndr)
        Set the IS <#petsc4py.PETSc.IS> defining Dirichlet boundaries for the global problem.

        Collective.

        Parameters
            bndr (IS <#petsc4py.PETSc.IS>) -- The parallel IS <#petsc4py.PETSc.IS> defining Dirichlet boundaries.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetDirichletBoundaries <https://petsc.org/release/manualpages/PC/PCBDDCSetDirichletBoundaries.html>

    Source code at petsc4py/PETSc/PC.pyx:2296 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2296>

    setBDDCDirichletBoundariesLocal(bndr)
        Set the IS <#petsc4py.PETSc.IS> defining Dirichlet boundaries in local ordering.

        Collective.

        Parameters
            bndr (IS <#petsc4py.PETSc.IS>) -- The parallel IS <#petsc4py.PETSc.IS> defining Dirichlet boundaries in local ordering.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setBDDCDirichletBoundaries, PCBDDCSetDirichletBoundariesLocal <https://petsc.org/release/manualpages/PC/PCBDDCSetDirichletBoundariesLocal.html>

    Source code at petsc4py/PETSc/PC.pyx:2313 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2313>

    setBDDCDiscreteGradient(G, order=1, field=1, gord=True, conforming=True)
        Set the discrete gradient.

        Collective.

        Parameters

            •   G (Mat <#petsc4py.PETSc.Mat>) -- The discrete gradient matrix in Mat.Type.AIJ <#petsc4py.PETSc.Mat.Type.AIJ> format.

            •   order (int <https://docs.python.org/3/library/functions.html#int>) -- The order of the Nedelec space.

            •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number of the Nedelec degrees of freedom. This is not used if no fields have been specified.

            •   gord (bool <https://docs.python.org/3/library/functions.html#bool>) -- Enable to use global ordering in the rows of G.

            •   conforming (bool <https://docs.python.org/3/library/functions.html#bool>) -- Enable if the mesh is conforming.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetDiscreteGradient <https://petsc.org/release/manualpages/PC/PCBDDCSetDiscreteGradient.html>

    Source code at petsc4py/PETSc/PC.pyx:2169 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2169>

    setBDDCDivergenceMat(div, trans=False, l2l=None)
        Set the linear operator representing ∫ div(u)•p dx.

        Collective.

        Parameters

            •   div (Mat <#petsc4py.PETSc.Mat>) -- The matrix in Mat.Type.IS <#petsc4py.PETSc.Mat.Type.IS> format.

            •   trans (bool <https://docs.python.org/3/library/functions.html#bool>) -- If True <https://docs.python.org/3/library/constants.html#True>, the pressure/velocity is in the trial/test space respectively. If False <https://docs.python.org/3/library/constants.html#False> the pressure/velocity is in the test/trial space.

            •   l2l (IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional IS <#petsc4py.PETSc.IS> describing the local to local map for velocities.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetDivergenceMat <https://petsc.org/release/manualpages/PC/PCBDDCSetDivergenceMat.html>

    Source code at petsc4py/PETSc/PC.pyx:2143 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2143>

    setBDDCDofsSplitting(isfields)
        Set the index set(s) defining fields of the global matrix.

        Collective.

        Parameters
            isfields (IS <#petsc4py.PETSc.IS> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>]) -- The sequence of IS <#petsc4py.PETSc.IS> describing the fields in global ordering.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetDofsSplitting <https://petsc.org/release/manualpages/PC/PCBDDCSetDofsSplitting.html>

    Source code at petsc4py/PETSc/PC.pyx:2364 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2364>

    setBDDCDofsSplittingLocal(isfields)
        Set the index set(s) defining fields of the local subdomain matrix.

        Collective.

        Not all nodes need to be listed. Unlisted nodes will belong to the complement field.

        Parameters
            isfields (IS <#petsc4py.PETSc.IS> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>]) -- The sequence of IS <#petsc4py.PETSc.IS> describing the fields in local ordering.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetDofsSplittingLocal <https://petsc.org/release/manualpages/PC/PCBDDCSetDofsSplittingLocal.html>

    Source code at petsc4py/PETSc/PC.pyx:2386 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2386>

    setBDDCLevels(levels)
        Set the maximum number of additional levels allowed.

        Logically collective.

        Parameters
            levels (int <https://docs.python.org/3/library/functions.html#int>) -- The maximum number of levels.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetLevels <https://petsc.org/release/manualpages/PC/PCBDDCSetLevels.html>

    Source code at petsc4py/PETSc/PC.pyx:2278 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2278>

    setBDDCLocalAdjacency(csr)
        Provide a custom connectivity graph for local dofs.

        Not collective.

        Parameters
            csr (CSRIndicesSpec <#petsc4py.typing.CSRIndicesSpec>) -- Compressed sparse row layout information.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetLocalAdjacencyGraph <https://petsc.org/release/manualpages/PC/PCBDDCSetLocalAdjacencyGraph.html>

    Source code at petsc4py/PETSc/PC.pyx:2113 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2113>

    setBDDCNeumannBoundaries(bndr)
        Set the IS <#petsc4py.PETSc.IS> defining Neumann boundaries for the global problem.

        Collective.

        Parameters
            bndr (IS <#petsc4py.PETSc.IS>) -- The parallel IS <#petsc4py.PETSc.IS> defining Neumann boundaries.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetNeumannBoundaries <https://petsc.org/release/manualpages/PC/PCBDDCSetNeumannBoundaries.html>

    Source code at petsc4py/PETSc/PC.pyx:2330 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2330>

    setBDDCNeumannBoundariesLocal(bndr)
        Set the IS <#petsc4py.PETSc.IS> defining Neumann boundaries in local ordering.

        Collective.

        Parameters
            bndr (IS <#petsc4py.PETSc.IS>) -- The parallel IS <#petsc4py.PETSc.IS> defining Neumann boundaries in local ordering.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setBDDCNeumannBoundaries, PCBDDCSetNeumannBoundariesLocal <https://petsc.org/release/manualpages/PC/PCBDDCSetNeumannBoundariesLocal.html>

    Source code at petsc4py/PETSc/PC.pyx:2347 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2347>

    setBDDCPrimalVerticesIS(primv)
        Set additional user defined primal vertices.

        Collective.

        Parameters
            primv (IS <#petsc4py.PETSc.IS>) -- The IS <#petsc4py.PETSc.IS> of primal vertices in global numbering.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetPrimalVerticesIS <https://petsc.org/release/manualpages/PC/PCBDDCSetPrimalVerticesIS.html>

    Source code at petsc4py/PETSc/PC.pyx:2226 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2226>

    setBDDCPrimalVerticesLocalIS(primv)
        Set additional user defined primal vertices.

        Collective.

        Parameters
            primv (IS <#petsc4py.PETSc.IS>) -- The IS <#petsc4py.PETSc.IS> of primal vertices in local numbering.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCBDDCSetPrimalVerticesLocalIS <https://petsc.org/release/manualpages/PC/PCBDDCSetPrimalVerticesLocalIS.html>

    Source code at petsc4py/PETSc/PC.pyx:2243 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2243>

    setCompositeType(ctype)
        Set the type of composite preconditioner.

        Logically collective.

        Parameters
            ctype (CompositeType <#petsc4py.PETSc.PC.CompositeType>) -- The type of composition.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCCompositeSetType <https://petsc.org/release/manualpages/PC/PCCompositeSetType.html>

    Source code at petsc4py/PETSc/PC.pyx:1666 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1666>

    setCoordinates(coordinates)
        Set the coordinates for the nodes on the local process.

        Collective.

        Parameters
            coordinates (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]]) -- The two dimensional coordinate array.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCSetCoordinates <https://petsc.org/release/manualpages/PC/PCSetCoordinates.html>

    Source code at petsc4py/PETSc/PC.pyx:738 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L738>

    setDM(dm)
        Set the DM <#petsc4py.PETSc.DM> that may be used by some preconditioners.

        Logically collective.

        Parameters
            dm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM> object.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCSetDM <https://petsc.org/release/manualpages/PC/PCSetDM.html>

    Source code at petsc4py/PETSc/PC.pyx:721 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L721>

    setDeflationCoarseMat(mat)
        Set the coarse problem matrix.

        Collective.

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>) -- The coarse problem matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCDeflationSetCoarseMat <https://petsc.org/release/manualpages/PC/PCDeflationSetCoarseMat.html>

    Source code at petsc4py/PETSc/PC.pyx:2933 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2933>

    setDeflationCorrectionFactor(fact)
        Set the coarse problem correction factor.

        Logically collective.

        Parameters
            fact (float <https://docs.python.org/3/library/functions.html#float>) -- The correction factor.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCDeflationSetCorrectionFactor <https://petsc.org/release/manualpages/PC/PCDeflationSetCorrectionFactor.html>

    Source code at petsc4py/PETSc/PC.pyx:2856 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2856>

    setDeflationInitOnly(flg)
        Set to only perform the initialization.

        Logically collective.

        Sets initial guess to the solution on the deflation space but does not apply the deflation preconditioner. The additional preconditioner is still applied.

        Parameters
            flg (bool <https://docs.python.org/3/library/functions.html#bool>) -- Enable to only initialize the preconditioner.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCDeflationSetInitOnly <https://petsc.org/release/manualpages/PC/PCDeflationSetInitOnly.html>

    Source code at petsc4py/PETSc/PC.pyx:2798 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2798>

    setDeflationLevels(levels)
        Set the maximum level of deflation nesting.

        Logically collective.

        Parameters
            levels (int <https://docs.python.org/3/library/functions.html#int>) -- The maximum deflation level.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCDeflationSetLevels <https://petsc.org/release/manualpages/PC/PCDeflationSetLevels.html>

    Source code at petsc4py/PETSc/PC.pyx:2820 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2820>

    setDeflationProjectionNullSpaceMat(mat)
        Set the projection null space matrix.

        Collective.

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>) -- The projection null space matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCDeflationSetProjectionNullSpaceMat <https://petsc.org/release/manualpages/PC/PCDeflationSetProjectionNullSpaceMat.html>

    Source code at petsc4py/PETSc/PC.pyx:2916 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2916>

    setDeflationReductionFactor(red)
        Set the reduction factor for the preconditioner.

        Logically collective.

        Parameters
            red (int <https://docs.python.org/3/library/functions.html#int>) -- The reduction factor or DEFAULT.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCDeflationSetReductionFactor <https://petsc.org/release/manualpages/PC/PCDeflationSetReductionFactor.html>

    Source code at petsc4py/PETSc/PC.pyx:2838 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2838>

    setDeflationSpace(W, transpose)
        Set the deflation space matrix or its (Hermitian) transpose.

        Logically collective.

        Parameters

            •   W (Mat <#petsc4py.PETSc.Mat>) -- The deflation matrix.

            •   transpose (bool <https://docs.python.org/3/library/functions.html#bool>) -- Enable to indicate that W is an explicit transpose of the deflation matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCDeflationSetSpace <https://petsc.org/release/manualpages/PC/PCDeflationSetSpace.html>

    Source code at petsc4py/PETSc/PC.pyx:2895 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2895>

    setDeflationSpaceToCompute(space_type, size)
        Set the deflation space type.

        Logically collective.

        Parameters

            •   space_type (DeflationSpaceType <#petsc4py.PETSc.PC.DeflationSpaceType>) -- The deflation space type.

            •   size (int <https://docs.python.org/3/library/functions.html#int>) -- The size of the space to compute

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCDeflationSetSpaceToCompute <https://petsc.org/release/manualpages/PC/PCDeflationSetSpaceToCompute.html>

    Source code at petsc4py/PETSc/PC.pyx:2874 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2874>

    setFactorLevels(levels)
        Set the number of levels of fill.

        Logically collective.

        Parameters
            levels (int <https://docs.python.org/3/library/functions.html#int>) -- The number of levels to fill.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCFactorSetLevels <https://petsc.org/release/manualpages/PC/PCFactorSetLevels.html>

    Source code at petsc4py/PETSc/PC.pyx:1456 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1456>

    setFactorOrdering(ord_type=None, nzdiag=None, reuse=None)
        Set options for the matrix factorization reordering.

        Logically collective.

        Parameters

            •   ord_type (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The name of the matrix ordering or None <https://docs.python.org/3/library/constants.html#None> to leave unchanged.

            •   nzdiag (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Threshold to consider diagonal entries in the matrix as zero.

            •   reuse (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Enable to reuse the ordering of a factored matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCFactorSetMatOrderingType <https://petsc.org/release/manualpages/PC/PCFactorSetMatOrderingType.html>, PCFactorReorderForNonzeroDiagonal <https://petsc.org/release/manualpages/PC/PCFactorReorderForNonzeroDiagonal.html>, PCFactorSetReuseOrdering <https://petsc.org/release/manualpages/PC/PCFactorSetReuseOrdering.html>

    Source code at petsc4py/PETSc/PC.pyx:1360 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1360>

    setFactorPivot(zeropivot=None, inblocks=None)
        Set options for matrix factorization pivoting.

        Logically collective.

        Parameters

            •   zeropivot (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The size at which smaller pivots are treated as zero.

            •   inblocks (bool <https://docs.python.org/3/library/functions.html#bool> | None <https://docs.python.org/3/library/constants.html#None>) -- Enable to allow pivoting while factoring in blocks.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCFactorSetZeroPivot <https://petsc.org/release/manualpages/PC/PCFactorSetZeroPivot.html>, PCFactorSetPivotInBlocks <https://petsc.org/release/manualpages/PC/PCFactorSetPivotInBlocks.html>

    Source code at petsc4py/PETSc/PC.pyx:1397 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1397>

    setFactorSetUpSolverType()
        Set up the factorization solver.

        Collective.

        This can be called after KSP.setOperators <#petsc4py.PETSc.KSP.setOperators> or PC.setOperators, causes MatGetFactor <https://petsc.org/release/manualpages/Mat/MatGetFactor.html> to be called so then one may set the options for that particular factorization object.

        See also:
            Working with PETSc options <#petsc-options>, PCFactorSetUpMatSolverType <https://petsc.org/release/manualpages/PC/PCFactorSetUpMatSolverType.html>

    Source code at petsc4py/PETSc/PC.pyx:1344 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1344>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFactorShift(shift_type=None, amount=None)
        Set options for shifting diagonal entries of a matrix.

        Logically collective.

        Parameters

            •   shift_type (FactorShiftType <#petsc4py.PETSc.Mat.FactorShiftType> | None <https://docs.python.org/3/library/constants.html#None>) -- The type of shift, or None <https://docs.python.org/3/library/constants.html#None> to leave unchanged.

            •   amount (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The amount of shift. Specify DEFAULT <#petsc4py.PETSc.DEFAULT> to determine internally or None <https://docs.python.org/3/library/constants.html#None> to leave unchanged.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCFactorSetShiftType <https://petsc.org/release/manualpages/PC/PCFactorSetShiftType.html>, PCFactorSetShiftAmount <https://petsc.org/release/manualpages/PC/PCFactorSetShiftAmount.html>

    Source code at petsc4py/PETSc/PC.pyx:1426 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1426>

    setFactorSolverType(solver)
        Set the solver package used to perform the factorization.

        Logically collective.

        Parameters
            solver (SolverType <#petsc4py.PETSc.Mat.SolverType> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The solver package used to factorize.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCFactorSetMatSolverType <https://petsc.org/release/manualpages/PC/PCFactorSetMatSolverType.html>

    Source code at petsc4py/PETSc/PC.pyx:1311 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1311>

    setFailedReason(reason)
        Set the reason the PC terminated.

        Logically collective.

        Parameters
            reason (FailedReason <#petsc4py.PETSc.PC.FailedReason> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- the reason the PC terminated

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCSetFailedReason <https://petsc.org/release/manualpages/PC/PCSetFailedReason.html>

    Source code at petsc4py/PETSc/PC.pyx:506 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L506>

    setFieldSplitFields(bsize, *fields)
        Sets the elements for the field split.

        Collective.

        Parameters

            •   bsize (int <https://docs.python.org/3/library/functions.html#int>) -- The block size

            •   fields (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[str <https://docs.python.org/3/library/stdtypes.html#str>, Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]]) -- A sequence of tuples containing the split name and a sequence of integers that define the elements in the split.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCFieldSplitSetBlockSize <https://petsc.org/release/manualpages/PC/PCFieldSplitSetBlockSize.html>, PCFieldSplitSetFields <https://petsc.org/release/manualpages/PC/PCFieldSplitSetFields.html>

    Source code at petsc4py/PETSc/PC.pyx:1535 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1535>

    setFieldSplitIS(*fields)
        Set the elements for the field split by IS <#petsc4py.PETSc.IS>.

        Logically collective.

        Solve options for this split will be available under the prefix -fieldsplit_SPLITNAME_*.

        Parameters
            fields (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[str <https://docs.python.org/3/library/stdtypes.html#str>, IS <#petsc4py.PETSc.IS>]) -- A sequence of tuples containing the split name and the IS <#petsc4py.PETSc.IS> that defines the elements in the split.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            Working with PETSc options <#petsc-options>, PCFieldSplitSetIS <https://petsc.org/release/manualpages/PC/PCFieldSplitSetIS.html>

    Source code at petsc4py/PETSc/PC.pyx:1509 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1509>

    setFieldSplitSchurFactType(ctype)
        Set the type of approximate block factorization.

        Collective.

        Parameters
            ctype (FieldSplitSchurFactType <#petsc4py.PETSc.PC.FieldSplitSchurFactType>) -- The type indicating which blocks to retain.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCFieldSplitSetSchurFactType <https://petsc.org/release/manualpages/PC/PCFieldSplitSetSchurFactType.html>

    Source code at petsc4py/PETSc/PC.pyx:1621 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1621>

    setFieldSplitSchurPreType(ptype, pre=None)
        Set from what operator the PC is constructed.

        Collective.

        Parameters

            •   ptype (FieldSplitSchurPreType <#petsc4py.PETSc.PC.FieldSplitSchurPreType>) -- The type of matrix to use for preconditioning the Schur complement.

            •   pre (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional matrix to use for preconditioning.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCFieldSplitSetSchurPre <https://petsc.org/release/manualpages/PC/PCFieldSplitSetSchurPre.html>

    Source code at petsc4py/PETSc/PC.pyx:1639 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1639>

    setFieldSplitType(ctype)
        Set the type of composition of a field split preconditioner.

        Collective.

        Parameters
            ctype (CompositeType <#petsc4py.PETSc.PC.CompositeType>) -- The type of composition.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCFieldSplitSetType <https://petsc.org/release/manualpages/PC/PCFieldSplitSetType.html>

    Source code at petsc4py/PETSc/PC.pyx:1491 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1491>

    setFromOptions()
        Set various PC parameters from user options.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, PCSetFromOptions <https://petsc.org/release/manualpages/PC/PCSetFromOptions.html>

    Source code at petsc4py/PETSc/PC.pyx:373 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L373>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setGAMGLevels(levels)
        Set the maximum number of levels.

        Not collective.

        Parameters
            levels (int <https://docs.python.org/3/library/functions.html#int>) -- The maximum number of levels to use.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCGAMGSetNlevels <https://petsc.org/release/manualpages/PC/PCGAMGSetNlevels.html>

    Source code at petsc4py/PETSc/PC.pyx:1078 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1078>

    setGAMGSmooths(smooths)
        Set the number of smoothing steps used on all levels.

        Logically collective.

        Parameters
            smooths (int <https://docs.python.org/3/library/functions.html#int>) -- The maximum number of smooths.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCGAMGSetNSmooths <https://petsc.org/release/manualpages/PC/PCGAMGSetNSmooths.html>

    Source code at petsc4py/PETSc/PC.pyx:1096 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1096>

    setGAMGType(gamgtype)
        Set the type of algorithm.

        Collective.

        Parameters
            gamgtype (GAMGType <#petsc4py.PETSc.PC.GAMGType> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of GAMG <#petsc4py.PETSc.PC.Type.GAMG>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCGAMGSetType <https://petsc.org/release/manualpages/PC/PCGAMGSetType.html>

    Source code at petsc4py/PETSc/PC.pyx:1059 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1059>

    setGASMOverlap(overlap)
        Set the overlap between a pair of subdomains.

        Logically collective.

        Parameters
            overlap (int <https://docs.python.org/3/library/functions.html#int>) -- The amount of overlap between subdomains.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCGASMSetOverlap <https://petsc.org/release/manualpages/PC/PCGASMSetOverlap.html>

    Source code at petsc4py/PETSc/PC.pyx:1039 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1039>

    setGASMType(gasmtype)
        Set the type of restriction and interpolation.

        Logically collective.

        Parameters
            gasmtype (GASMType <#petsc4py.PETSc.PC.GASMType>) -- The type of GASM <#petsc4py.PETSc.PC.Type.GASM>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCGASMSetType <https://petsc.org/release/manualpages/PC/PCGASMSetType.html>

    Source code at petsc4py/PETSc/PC.pyx:1021 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1021>

    setHPDDMAuxiliaryMat(uis, uaux)
        Set the auxiliary matrix used by the preconditioner.

        Logically collective.

        Parameters

            •   uis (IS <#petsc4py.PETSc.IS>) -- The IS <#petsc4py.PETSc.IS> of the local auxiliary matrix

            •   uaux (Mat <#petsc4py.PETSc.Mat>) -- The auxiliary sequential matrix

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHPDDMSetAuxiliaryMat <https://petsc.org/release/manualpages/PC/PCHPDDMSetAuxiliaryMat.html>

    Source code at petsc4py/PETSc/PC.pyx:2516 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2516>

    setHPDDMCoarseCorrectionType(correction_type)
        Set the coarse correction type.

        Collective.

        Parameters
            correction_type (HPDDMCoarseCorrectionType <#petsc4py.PETSc.PC.HPDDMCoarseCorrectionType>) -- The type of coarse correction to apply.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHPDDMSetCoarseCorrectionType <https://petsc.org/release/manualpages/PC/PCHPDDMSetCoarseCorrectionType.html>

    Source code at petsc4py/PETSc/PC.pyx:2584 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2584>

    setHPDDMDeflationMat(uis, U)
        Set the deflation space used to assemble a coarse operator.

        Logically collective.

        Parameters

            •   uis (IS <#petsc4py.PETSc.IS>) -- The IS <#petsc4py.PETSc.IS> of the local deflation matrix.

            •   U (Mat <#petsc4py.PETSc.Mat>) -- The deflation sequential matrix of type Mat.Type.DENSE <#petsc4py.PETSc.Mat.Type.DENSE>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHPDDMSetDeflationMat <https://petsc.org/release/manualpages/PC/PCHPDDMSetDeflationMat.html>

    Source code at petsc4py/PETSc/PC.pyx:2630 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2630>

    setHPDDMHasNeumannMat(has)
        Set to indicate that the Mat <#petsc4py.PETSc.Mat> passed to the PC is the local Neumann matrix.

        Logically collective.

        Parameters
            has (bool <https://docs.python.org/3/library/functions.html#bool>) -- Enable to indicate the matrix is the local Neumann matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHPDDMHasNeumannMat <https://petsc.org/release/manualpages/PC/PCHPDDMHasNeumannMat.html>

    Source code at petsc4py/PETSc/PC.pyx:2566 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2566>

    setHPDDMRHSMat(B)
        Set the right-hand side matrix of the preconditioner.

        Logically collective.

        Parameters
            B (Mat <#petsc4py.PETSc.Mat>) -- The right-hand side sequential matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHPDDMSetRHSMat <https://petsc.org/release/manualpages/PC/PCHPDDMSetRHSMat.html>

    Source code at petsc4py/PETSc/PC.pyx:2535 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2535>

    setHYPREAMSSetInteriorNodes(interior)
        Set the list of interior nodes to a zero conductivity region.

        Collective.

        Parameters
            interior (Vec <#petsc4py.PETSc.Vec>) -- A vector where a value of 1.0 indicates an interior node.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHYPREAMSSetInteriorNodes <https://petsc.org/release/manualpages/PC/PCHYPREAMSSetInteriorNodes.html>

    Source code at petsc4py/PETSc/PC.pyx:1292 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1292>

    setHYPREDiscreteCurl(mat)
        Set the discrete curl matrix.

        Collective.

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>) -- The discrete curl.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHYPRESetDiscreteCurl <https://petsc.org/release/manualpages/PC/PCHYPRESetDiscreteCurl.html>

    Source code at petsc4py/PETSc/PC.pyx:1150 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1150>

    setHYPREDiscreteGradient(mat)
        Set the discrete gradient matrix.

        Collective.

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>) -- The discrete gradient.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHYPRESetDiscreteGradient <https://petsc.org/release/manualpages/PC/PCHYPRESetDiscreteGradient.html>

    Source code at petsc4py/PETSc/PC.pyx:1167 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1167>

    setHYPRESetAlphaPoissonMatrix(mat)
        Set the vector Poisson matrix.

        Collective.

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>) -- The vector Poisson matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHYPRESetAlphaPoissonMatrix <https://petsc.org/release/manualpages/PC/PCHYPRESetAlphaPoissonMatrix.html>

    Source code at petsc4py/PETSc/PC.pyx:1184 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1184>

    setHYPRESetBetaPoissonMatrix(mat=None)
        Set the Posson matrix.

        Collective.

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The Poisson matrix or None <https://docs.python.org/3/library/constants.html#None> to turn off.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHYPRESetBetaPoissonMatrix <https://petsc.org/release/manualpages/PC/PCHYPRESetBetaPoissonMatrix.html>

    Source code at petsc4py/PETSc/PC.pyx:1201 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1201>

    setHYPRESetEdgeConstantVectors(ozz, zoz, zzo=None)
        Set the representation of the constant vector fields in the edge element basis.

        Collective.

        Parameters

            •   ozz (Vec <#petsc4py.PETSc.Vec>) -- A vector representing [1, 0, 0] or [1, 0] in 2D.

            •   zoz (Vec <#petsc4py.PETSc.Vec>) -- A vector representing [0, 1, 0] or [0, 1] in 2D.

            •   zzo (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- A vector representing [0, 0, 1] or None <https://docs.python.org/3/library/constants.html#None> in 2D.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHYPRESetEdgeConstantVectors <https://petsc.org/release/manualpages/PC/PCHYPRESetEdgeConstantVectors.html>

    Source code at petsc4py/PETSc/PC.pyx:1268 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1268>

    setHYPRESetInterpolations(dim, RT_Pi_Full=None, RT_Pi=None, ND_Pi_Full=None, ND_Pi=None)
        Set the interpolation matrices.

        Collective.

        Parameters

            •   dim (int <https://docs.python.org/3/library/functions.html#int>) -- The dimension of the problem.

            •   RT_Pi_Full (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The Raviart-Thomas interpolation matrix or None <https://docs.python.org/3/library/constants.html#None> to omit.

            •   RT_Pi -- The xyz components of the Raviart-Thomas interpolation matrix, or None <https://docs.python.org/3/library/constants.html#None> to omit.

            •   ND_Pi_Full (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The Nedelec interpolation matrix or None <https://docs.python.org/3/library/constants.html#None> to omit.

            •   ND_Pi -- The xyz components of the Nedelec interpolation matrix, or None <https://docs.python.org/3/library/constants.html#None> to omit.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHYPRESetInterpolations <https://petsc.org/release/manualpages/PC/PCHYPRESetInterpolations.html>

    Source code at petsc4py/PETSc/PC.pyx:1220 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1220>

    setHYPREType(hypretype)
        Set the Type.HYPRE <#petsc4py.PETSc.PC.Type.HYPRE> type.

        Collective.

        Parameters
            hypretype (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The name of the type, one of "euclid", "pilut", "parasails", "boomeramg", "ams", "ads"

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCHYPRESetType <https://petsc.org/release/manualpages/PC/PCHYPRESetType.html>

    Source code at petsc4py/PETSc/PC.pyx:1130 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1130>

    setMGCycleType(cycle_type)
        Set the type of cycles.

        Logically collective.

        Parameters
            cycle_type (MGCycleType <#petsc4py.PETSc.PC.MGCycleType>) -- The type of multigrid cycles to use.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setMGCycleTypeOnLevel, PCMGSetCycleType <https://petsc.org/release/manualpages/PC/PCMGSetCycleType.html>

    Source code at petsc4py/PETSc/PC.pyx:2003 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2003>

    setMGCycleTypeOnLevel(level, cycle_type)
        Set the type of cycle on the given level.

        Logically collective.

        Parameters

            •   level (int <https://docs.python.org/3/library/functions.html#int>) -- The level on which to set the cycle type.

            •   cycle_type (MGCycleType <#petsc4py.PETSc.PC.MGCycleType>) -- The type of multigrid cycles to use.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setMGCycleType, PCMGSetCycleTypeOnLevel <https://petsc.org/release/manualpages/PC/PCMGSetCycleTypeOnLevel.html>

    Source code at petsc4py/PETSc/PC.pyx:2021 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2021>

    setMGInterpolation(level, mat)
        Set the interpolation operator for the given level.

        Logically collective.

        Parameters

            •   level -- The level where interpolation is defined from level-1 to level.

            •   mat (Mat <#petsc4py.PETSc.Mat>) -- The interpolation operator

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCMGSetInterpolation <https://petsc.org/release/manualpages/PC/PCMGSetInterpolation.html>

    Source code at petsc4py/PETSc/PC.pyx:1817 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1817>

    setMGLevels(levels)
        Set the number of MG <#petsc4py.PETSc.PC.Type.MG> levels.

        Logically collective.

        Parameters
            levels (int <https://docs.python.org/3/library/functions.html#int>) -- The number of levels

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCMGSetLevels <https://petsc.org/release/manualpages/PC/PCMGSetLevels.html>

    Source code at petsc4py/PETSc/PC.pyx:1784 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1784>

    setMGR(level, r)
        Set the vector where the residual is stored.

        Logically collective.

        If not provided, one will be set internally. Will be cleaned up in destroy.

        Parameters

            •   level (int <https://docs.python.org/3/library/functions.html#int>) -- The level on which to set the residual.

            •   r (Vec <#petsc4py.PETSc.Vec>) -- The vector where the residual is stored.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCMGSetR <https://petsc.org/release/manualpages/PC/PCMGSetR.html>

    Source code at petsc4py/PETSc/PC.pyx:2088 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2088>

    setMGRScale(level, rscale)
        Set the pointwise scaling for the restriction operator on the given level.

        Logically collective.

        Parameters

            •   level (int <https://docs.python.org/3/library/functions.html#int>) -- The level where restriction is defined from level to level-1.

            •   rscale (Vec <#petsc4py.PETSc.Vec>) -- The scaling vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCMGSetRScale <https://petsc.org/release/manualpages/PC/PCMGSetRScale.html>

    Source code at petsc4py/PETSc/PC.pyx:1899 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1899>

    setMGRestriction(level, mat)
        Set the restriction operator for the given level.

        Logically collective.

        Parameters

            •   level (int <https://docs.python.org/3/library/functions.html#int>) -- The level where restriction is defined from level to level-1.

            •   mat (Mat <#petsc4py.PETSc.Mat>) -- The restriction operator

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCMGSetRestriction <https://petsc.org/release/manualpages/PC/PCMGSetRestriction.html>

    Source code at petsc4py/PETSc/PC.pyx:1858 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1858>

    setMGRhs(level, rhs)
        Set the vector where the right-hand side is stored.

        Logically collective.

        If not provided, one will be set internally. Will be cleaned up in destroy.

        Parameters

            •   level (int <https://docs.python.org/3/library/functions.html#int>) -- The level on which to set the right-hand side.

            •   rhs (Vec <#petsc4py.PETSc.Vec>) -- The vector where the right-hand side is stored.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCMGSetRhs <https://petsc.org/release/manualpages/PC/PCMGSetRhs.html>

    Source code at petsc4py/PETSc/PC.pyx:2042 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2042>

    setMGType(mgtype)
        Set the form of multigrid.

        Logically collective.

        See also:
            PCMGSetType <https://petsc.org/release/manualpages/PC/PCMGSetType.html>

    Source code at petsc4py/PETSc/PC.pyx:1757 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L1757>

        Parameters
            mgtype (MGType <#petsc4py.PETSc.PC.MGType>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setMGX(level, x)
        Set the vector where the solution is stored.

        Logically collective.

        If not provided, one will be set internally. Will be cleaned up in destroy.

        Parameters

            •   level (int <https://docs.python.org/3/library/functions.html#int>) -- The level on which to set the solution.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The vector where the solution is stored.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCMGSetX <https://petsc.org/release/manualpages/PC/PCMGSetX.html>

    Source code at petsc4py/PETSc/PC.pyx:2065 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2065>

    setOperators(A=None, P=None)
        Set the matrices associated with the linear system.

        Logically collective.

        Passing None <https://docs.python.org/3/library/constants.html#None> for A or P removes the matrix that is currently used. PETSc does not reset the matrix entries of either A or P to zero after a linear solve; the user is completely responsible for matrix assembly. See Mat.zeroEntries <#petsc4py.PETSc.Mat.zeroEntries> to zero all elements of a matrix.

        Parameters

            •   A (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- the matrix which defines the linear system

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- the matrix to be used in constructing the preconditioner, usually the same as A

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    Using this directly is rarely needed, the preferred, and equivalent, usage is to call KSP.setOperators <#petsc4py.PETSc.KSP.setOperators>.

    See also:
            PCSetOperators <https://petsc.org/release/manualpages/PC/PCSetOperators.html>

    Source code at petsc4py/PETSc/PC.pyx:385 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L385>

    setOptionsPrefix(prefix)
        Set the prefix used for all the PC options.

        Logically collective.

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The prefix to prepend to all option names.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            Working with PETSc options <#petsc-options>, PCSetOptionsPrefix <https://petsc.org/release/manualpages/PC/PCSetOptionsPrefix.html>

    Source code at petsc4py/PETSc/PC.pyx:321 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L321>

    setPatchCellNumbering(sec)
        Set the cell numbering.

        Source code at petsc4py/PETSc/PC.pyx:2423 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2423>

        Parameters
            sec (Section <#petsc4py.PETSc.Section>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPatchComputeFunction(function, args=None, kargs=None)
        Set compute operator callbacks.

        Source code at petsc4py/PETSc/PC.pyx:2484 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2484>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPatchComputeFunctionInteriorFacets(function, args=None, kargs=None)
        Set compute operator callbacks.

        Source code at petsc4py/PETSc/PC.pyx:2492 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2492>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPatchComputeOperator(operator, args=None, kargs=None)
        Set compute operator callbacks.

        Source code at petsc4py/PETSc/PC.pyx:2468 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2468>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPatchComputeOperatorInteriorFacets(operator, args=None, kargs=None)
        Set compute operator callbacks.

        Source code at petsc4py/PETSc/PC.pyx:2476 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2476>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPatchConstructType(typ, operator=None, args=None, kargs=None)
        Set compute operator callbacks.

        Source code at petsc4py/PETSc/PC.pyx:2500 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2500>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPatchDiscretisationInfo(dms, bs, cellNodeMaps, subspaceOffsets, ghostBcNodes, globalBcNodes)
        Set discretisation info.

        Source code at petsc4py/PETSc/PC.pyx:2427 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2427>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPythonContext(context)
        Set the instance of the class implementing the required Python methods.

        Not collective.

        See also:
            PETSc Python preconditioner type <#petsc-python-pc>, getPythonContext

    Source code at petsc4py/PETSc/PC.pyx:790 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L790>

        Parameters
            context (Any <https://docs.python.org/3/library/typing.html#typing.Any>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPythonType(py_type)
        Set the fully qualified Python name of the class to be used.

        Collective.

        See also:
            PETSc Python preconditioner type <#petsc-python-pc>, setPythonContext, getPythonType, PCPythonSetType <https://petsc.org/release/manualpages/PC/PCPythonSetType.html>

    Source code at petsc4py/PETSc/PC.pyx:817 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L817>

        Parameters
            py_type (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setReusePreconditioner(flag)
        Set to indicate the preconditioner is to be reused.

        Logically collective.

        Normally if the A matrix inside a PC changes, the PC automatically updates itself using information from the changed matrix. Enable this option prevents this.

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Set to True <https://docs.python.org/3/library/constants.html#True> to use the reuse the current preconditioner and False <https://docs.python.org/3/library/constants.html#False> to recompute on changes to the matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setOperators, PCSetReusePreconditioner <https://petsc.org/release/manualpages/PC/PCSetReusePreconditioner.html>

    Source code at petsc4py/PETSc/PC.pyx:481 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L481>

    setSPAIBlockSize(n)
        Set the block size of the preconditioner.

        Logically collective.

        Parameters
            n (int <https://docs.python.org/3/library/functions.html#int>) -- The block size, defaults to 1.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCSPAISetBlockSize <https://petsc.org/release/manualpages/PC/PCSPAISetBlockSize.html>

    Source code at petsc4py/PETSc/PC.pyx:2724 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2724>

    setSPAICacheSize(size)
        Set the cache size.

        Logically collective.

        Parameters
            size (int <https://docs.python.org/3/library/functions.html#int>) -- The size of the cache, defaults to 5.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCSPAISetCacheSize <https://petsc.org/release/manualpages/PC/PCSPAISetCacheSize.html>

    Source code at petsc4py/PETSc/PC.pyx:2742 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2742>

    setSPAIEpsilon(val)
        Set the tolerance for the preconditioner.

        Logically collective.

        Parameters
            val (float <https://docs.python.org/3/library/functions.html#float>) -- The tolerance, defaults to 0.4.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCSPAISetEpsilon <https://petsc.org/release/manualpages/PC/PCSPAISetEpsilon.html>

    Source code at petsc4py/PETSc/PC.pyx:2651 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2651>

    setSPAIMax(maxval)
        Set the size of working buffers in the preconditioner.

        Logically collective.

        Parameters
            maxval (int <https://docs.python.org/3/library/functions.html#int>) -- Number of entries in the work arrays to be allocated, defaults to 5000.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCSPAISetMax <https://petsc.org/release/manualpages/PC/PCSPAISetMax.html>

    Source code at petsc4py/PETSc/PC.pyx:2687 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2687>

    setSPAIMaxNew(maxval)
        Set the maximum number of new non-zero candidates per step.

        Logically collective.

        Parameters
            maxval (int <https://docs.python.org/3/library/functions.html#int>) -- Number of entries allowed, defaults to 5.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCSPAISetMaxNew <https://petsc.org/release/manualpages/PC/PCSPAISetMaxNew.html>

    Source code at petsc4py/PETSc/PC.pyx:2706 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2706>

    setSPAINBSteps(nbsteps)
        Set the maximum number of improvement steps per row.

        Logically collective.

        Parameters
            nbsteps (int <https://docs.python.org/3/library/functions.html#int>) -- The number of steps, defaults to 5.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCSPAISetNBSteps <https://petsc.org/release/manualpages/PC/PCSPAISetNBSteps.html>

    Source code at petsc4py/PETSc/PC.pyx:2669 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2669>

    setSPAISp(sym)
        Set to specify a symmetric sparsity pattern.

        Logically collective.

        Parameters
            sym (int <https://docs.python.org/3/library/functions.html#int>) -- Enable to indicate the matrix is symmetric.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCSPAISetSp <https://petsc.org/release/manualpages/PC/PCSPAISetSp.html>

    Source code at petsc4py/PETSc/PC.pyx:2778 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2778>

    setSPAIVerbose(level)
        Set the verbosity level.

        Logically collective.

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>) -- The level of verbosity, defaults to 1.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCSPAISetVerbose <https://petsc.org/release/manualpages/PC/PCSPAISetVerbose.html>

    Source code at petsc4py/PETSc/PC.pyx:2760 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L2760>

    setType(pc_type)
        Set the preconditioner type.

        Collective.

        Parameters
            pc_type (Type <#petsc4py.PETSc.PC.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The preconditioner type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            Working with PETSc options <#petsc-options>, getType, TSSetType <https://petsc.org/release/manualpages/TS/TSSetType.html>

    Source code at petsc4py/PETSc/PC.pyx:288 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L288>

    setUp()
        Set up the internal data structures for the PC.

        Collective.

        See also:
            PCSetUp <https://petsc.org/release/manualpages/PC/PCSetUp.html>

    Source code at petsc4py/PETSc/PC.pyx:545 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L545>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setUpOnBlocks()
        Set up the PC for each block.

        Collective.

        For nested preconditioners such as BJACOBI <#petsc4py.PETSc.PC.Type.BJACOBI>, setUp is not called on each sub-KSP <#petsc4py.PETSc.KSP> when setUp is called on the outer PC. This routine ensures it is called.

        See also:
            setUp, PCSetUpOnBlocks <https://petsc.org/release/manualpages/PC/PCSetUpOnBlocks.html>

    Source code at petsc4py/PETSc/PC.pyx:569 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L569>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setUseAmat(flag)
        Set to indicate to apply PC to A and not P.

        Logically collective.

        Sets a flag to indicate that when the preconditioner needs to apply (part of) the operator during the preconditioning process, it applies to A provided to TS.setRHSJacobian <#petsc4py.PETSc.TS.setRHSJacobian>, TS.setIJacobian <#petsc4py.PETSc.TS.setIJacobian>, SNES.setJacobian <#petsc4py.PETSc.SNES.setJacobian>, KSP.setOperators <#petsc4py.PETSc.KSP.setOperators> or PC.setOperators not the P.

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Set True to use A and False to use P.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setOperators, PCSetUseAmat <https://petsc.org/release/manualpages/PC/PCSetUseAmat.html>

    Source code at petsc4py/PETSc/PC.pyx:436 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L436>

    view(viewer=None)
        View the PC object.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- The visualization context.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PCView <https://petsc.org/release/manualpages/PC/PCView.html>

    Source code at petsc4py/PETSc/PC.pyx:230 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/PC.pyx#L230>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Partitioner

    class petsc4py.PETSc.Partitioner
        Bases: Object <#petsc4py.PETSc.Object>

        A graph partitioner.

        Enumerations
        Type <#petsc4py.PETSc.Partitioner.Type> | The partitioner types.

  petsc4py.PETSc.Partitioner.Type

    class petsc4py.PETSc.Partitioner.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The partitioner types.

        Attributes Summary
        CHACO | Object CHACO of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GATHER | Object GATHER of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MATPARTITIONING | Object MATPARTITIONING of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MULTISTAGE | Object MULTISTAGE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PARMETIS | Object PARMETIS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PTSCOTCH | Object PTSCOTCH of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SHELL | Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SIMPLE | Object SIMPLE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        CHACO: str <https://docs.python.org/3/library/stdtypes.html#str> = CHACO
            Object CHACO of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GATHER: str <https://docs.python.org/3/library/stdtypes.html#str> = GATHER
            Object GATHER of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MATPARTITIONING: str <https://docs.python.org/3/library/stdtypes.html#str> = MATPARTITIONING
            Object MATPARTITIONING of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MULTISTAGE: str <https://docs.python.org/3/library/stdtypes.html#str> = MULTISTAGE
            Object MULTISTAGE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PARMETIS: str <https://docs.python.org/3/library/stdtypes.html#str> = PARMETIS
            Object PARMETIS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PTSCOTCH: str <https://docs.python.org/3/library/stdtypes.html#str> = PTSCOTCH
            Object PTSCOTCH of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SHELL: str <https://docs.python.org/3/library/stdtypes.html#str> = SHELL
            Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SIMPLE: str <https://docs.python.org/3/library/stdtypes.html#str> = SIMPLE
            Object SIMPLE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
create([comm]) | Create an empty partitioner object.
destroy() | Destroy the partitioner object.
getType() | Return the partitioner type.
reset() | Reset data structures of the partitioner.
setFromOptions() | Set parameters in the partitioner from the options database.
setShellPartition(numProcs[, sizes, points]) | Set a custom partition for a mesh.
setType(part_type) | Build a particular type of the partitioner.
setUp() | Construct data structures for the partitioner.
view([viewer]) | View the partitioner.

Methods Documentation

    create(comm=None)
        Create an empty partitioner object.

        Collective.

        The type can be set with setType.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            setType, PetscPartitionerCreate <https://petsc.org/release/manualpages/MatGraphOperations/PetscPartitionerCreate.html>

    Source code at petsc4py/PETSc/Partitioner.pyx:58 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Partitioner.pyx#L58>

    destroy()
        Destroy the partitioner object.

        Collective.

        See also:
            PetscPartitionerDestroy <https://petsc.org/release/manualpages/MatGraphOperations/PetscPartitionerDestroy.html>

    Source code at petsc4py/PETSc/Partitioner.pyx:45 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Partitioner.pyx#L45>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getType()
        Return the partitioner type.

        Not collective.

        See also:
            setType, PetscPartitionerGetType <https://petsc.org/release/manualpages/MatGraphOperations/PetscPartitionerGetType.html>

    Source code at petsc4py/PETSc/Partitioner.pyx:100 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Partitioner.pyx#L100>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    reset()
        Reset data structures of the partitioner.

        Collective.

        See also:
            PetscPartitionerReset <https://petsc.org/release/manualpages/MatGraphOperations/PetscPartitionerReset.html>

    Source code at petsc4py/PETSc/Partitioner.pyx:138 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Partitioner.pyx#L138>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFromOptions()
        Set parameters in the partitioner from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, PetscPartitionerSetFromOptions <https://petsc.org/release/manualpages/MatGraphOperations/PetscPartitionerSetFromOptions.html>

    Source code at petsc4py/PETSc/Partitioner.pyx:114 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Partitioner.pyx#L114>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setShellPartition(numProcs, sizes=None, points=None)
        Set a custom partition for a mesh.

        Collective.

        Parameters

            •   sizes (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- The number of points in each partition.

            •   points (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- A permutation of the points that groups those assigned to each partition in order (i.e., partition 0 first, partition 1 next, etc.).

            •   numProcs (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscPartitionerShellSetPartition <https://petsc.org/release/manualpages/MatGraphOperations/PetscPartitionerShellSetPartition.html>

    Source code at petsc4py/PETSc/Partitioner.pyx:150 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Partitioner.pyx#L150>

    setType(part_type)
        Build a particular type of the partitioner.

        Collective.

        Parameters
            part_type (Type <#petsc4py.PETSc.Partitioner.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The kind of partitioner.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getType, PetscPartitionerSetType <https://petsc.org/release/manualpages/MatGraphOperations/PetscPartitionerSetType.html>

    Source code at petsc4py/PETSc/Partitioner.pyx:81 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Partitioner.pyx#L81>

    setUp()
        Construct data structures for the partitioner.

        Collective.

        See also:
            PetscPartitionerSetUp <https://petsc.org/release/manualpages/MatGraphOperations/PetscPartitionerSetUp.html>

    Source code at petsc4py/PETSc/Partitioner.pyx:126 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Partitioner.pyx#L126>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        View the partitioner.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> to display the graph.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscPartitionerView <https://petsc.org/release/manualpages/MatGraphOperations/PetscPartitionerView.html>

    Source code at petsc4py/PETSc/Partitioner.pyx:26 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Partitioner.pyx#L26>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Quad

    class petsc4py.PETSc.Quad
        Bases: Object <#petsc4py.PETSc.Object>

        Quadrature rule for integration.

        Methods Summary
        create([comm]) | Create a Quad object.
        destroy() | Destroy the Quad object.
        duplicate() | Create a deep copy of the Quad object.
        getData() | Return the data defining the Quad.
        getNumComponents() | Return the number of components for functions to be integrated.
        getOrder() | Return the order of the method in the Quad.
        setNumComponents(nc) | Return the number of components for functions to be integrated.
        setOrder(order) | Set the order of the method in the Quad.
        view([viewer]) | View a Quad object.

        Methods Documentation

        create(comm=None)
            Create a Quad object.

            Collective.

            Parameters
                comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                PetscQuadratureCreate <https://petsc.org/release/manualpages/DT/PetscQuadratureCreate.html>

        Source code at petsc4py/PETSc/DT.pyx:28 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DT.pyx#L28>

        destroy()
            Destroy the Quad object.

            Collective.

            See also:
                PetscQuadratureDestroy <https://petsc.org/release/manualpages/DT/PetscQuadratureDestroy.html>

        Source code at petsc4py/PETSc/DT.pyx:63 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DT.pyx#L63>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        duplicate()
            Create a deep copy of the Quad object.

            Collective.

            See also:
                PetscQuadratureDuplicate <https://petsc.org/release/manualpages/DT/PetscQuadratureDuplicate.html>

        Source code at petsc4py/PETSc/DT.pyx:49 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DT.pyx#L49>

            Return type
                Quad <#petsc4py.PETSc.Quad>

        getData()
            Return the data defining the Quad.

            Not collective.

            Returns

                •   points (ArrayReal <#petsc4py.typing.ArrayReal>) -- The coordinates of the quadrature points.

                •   weights (ArrayReal <#petsc4py.typing.ArrayReal>) -- The quadrature weights.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayReal <#petsc4py.typing.ArrayReal>, ArrayReal <#petsc4py.typing.ArrayReal>]

        See also:
                PetscQuadratureGetData <https://petsc.org/release/manualpages/DT/PetscQuadratureGetData.html>

        Source code at petsc4py/PETSc/DT.pyx:76 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DT.pyx#L76>

        getNumComponents()
            Return the number of components for functions to be integrated.

            Not collective.

            See also:
                setNumComponents, PetscQuadratureGetNumComponents <https://petsc.org/release/manualpages/DT/PetscQuadratureGetNumComponents.html>

        Source code at petsc4py/PETSc/DT.pyx:104 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DT.pyx#L104>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getOrder()
            Return the order of the method in the Quad.

            Not collective.

            See also:
                setOrder, PetscQuadratureGetOrder <https://petsc.org/release/manualpages/DT/PetscQuadratureGetOrder.html>

        Source code at petsc4py/PETSc/DT.pyx:136 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DT.pyx#L136>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        setNumComponents(nc)
            Return the number of components for functions to be integrated.

            Not collective.

            Parameters
                nc (int <https://docs.python.org/3/library/functions.html#int>) -- The number of components.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getNumComponents, PetscQuadratureSetNumComponents <https://petsc.org/release/manualpages/DT/PetscQuadratureSetNumComponents.html>

        Source code at petsc4py/PETSc/DT.pyx:118 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DT.pyx#L118>

        setOrder(order)
            Set the order of the method in the Quad.

            Not collective.

            Parameters
                order (int <https://docs.python.org/3/library/functions.html#int>) -- The order of the quadrature, i.e. the highest degree polynomial that is exactly integrated.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getOrder, PetscQuadratureSetOrder <https://petsc.org/release/manualpages/DT/PetscQuadratureSetOrder.html>

        Source code at petsc4py/PETSc/DT.pyx:150 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DT.pyx#L150>

        view(viewer=None)
            View a Quad object.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> to display the graph.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscQuadratureView <https://petsc.org/release/manualpages/DT/PetscQuadratureView.html>

        Source code at petsc4py/PETSc/DT.pyx:9 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/DT.pyx#L9>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Random

    class petsc4py.PETSc.Random
        Bases: Object <#petsc4py.PETSc.Object>

        The random number generator object.

        See also:
            PetscRandom <https://petsc.org/release/manualpages/Sys/PetscRandom.html>

    Enumerations
    Type <#petsc4py.PETSc.Random.Type> | The random number generator type.

  petsc4py.PETSc.Random.Type

    class petsc4py.PETSc.Random.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The random number generator type.

        Attributes Summary
        RAND | Object RAND of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RAND48 | Object RAND48 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RANDER48 | Object RANDER48 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RANDOM123 | Object RANDOM123 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SPRNG | Object SPRNG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        RAND: str <https://docs.python.org/3/library/stdtypes.html#str> = RAND
            Object RAND of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RAND48: str <https://docs.python.org/3/library/stdtypes.html#str> = RAND48
            Object RAND48 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RANDER48: str <https://docs.python.org/3/library/stdtypes.html#str> = RANDER48
            Object RANDER48 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RANDOM123: str <https://docs.python.org/3/library/stdtypes.html#str> = RANDOM123
            Object RANDOM123 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SPRNG: str <https://docs.python.org/3/library/stdtypes.html#str> = SPRNG
            Object SPRNG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
create([comm]) | Create a random number generator object.
destroy() | Destroy the random number generator object.
getInterval() | Return the interval containing the random numbers generated.
getSeed() | Return the random number generator seed.
getType() | Return the type of the random number generator object.
getValue() | Generate a scalar random number.
getValueReal() | Generate a real random number.
setFromOptions() | Configure the random number generator from the options database.
setInterval(interval) | Set the interval of the random number generator.
setSeed([seed]) | Set the seed of random number generator.
setType(rnd_type) | Set the type of the random number generator object.
view([viewer]) | View a random number generator object.

Attributes Summary
interval | The interval of the generated random numbers.
seed | The seed of the random number generator.

Methods Documentation

    create(comm=None)
        Create a random number generator object.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>, PetscRandomCreate <https://petsc.org/release/manualpages/Sys/PetscRandomCreate.html>

    Source code at petsc4py/PETSc/Random.pyx:74 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L74>

    destroy()
        Destroy the random number generator object.

        Collective.

        See also:
            PetscRandomDestroy <https://petsc.org/release/manualpages/Sys/PetscRandomDestroy.html>

    Source code at petsc4py/PETSc/Random.pyx:61 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L61>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getInterval()
        Return the interval containing the random numbers generated.

        Not collective.

        See also:
            setInterval, PetscRandomGetInterval <https://petsc.org/release/manualpages/Sys/PetscRandomGetInterval.html>

    Source code at petsc4py/PETSc/Random.pyx:199 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L199>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Scalar <#petsc4py.typing.Scalar>, Scalar <#petsc4py.typing.Scalar>]

    getSeed()
        Return the random number generator seed.

        Not collective.

        See also:
            setSeed, PetscRandomGetSeed <https://petsc.org/release/manualpages/Sys/PetscRandomGetSeed.html>

    Source code at petsc4py/PETSc/Random.pyx:166 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L166>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getType()
        Return the type of the random number generator object.

        Not collective.

        See also:
            setType, PetscRandomGetType <https://petsc.org/release/manualpages/Sys/PetscRandomGetType.html>

    Source code at petsc4py/PETSc/Random.pyx:112 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L112>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getValue()
        Generate a scalar random number.

        Not collective.

        See also:
            PetscRandomGetValue <https://petsc.org/release/manualpages/Sys/PetscRandomGetValue.html>

    Source code at petsc4py/PETSc/Random.pyx:138 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L138>

        Return type
            Scalar <#petsc4py.typing.Scalar>

    getValueReal()
        Generate a real random number.

        Not collective.

        See also:
            PetscRandomGetValueReal <https://petsc.org/release/manualpages/Sys/PetscRandomGetValueReal.html>

    Source code at petsc4py/PETSc/Random.pyx:152 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L152>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    setFromOptions()
        Configure the random number generator from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, PetscRandomSetFromOptions <https://petsc.org/release/manualpages/Sys/PetscRandomSetFromOptions.html>

    Source code at petsc4py/PETSc/Random.pyx:126 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L126>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setInterval(interval)
        Set the interval of the random number generator.

        Not collective.

        See also:
            getInterval, PetscRandomSetInterval <https://petsc.org/release/manualpages/Sys/PetscRandomSetInterval.html>

    Source code at petsc4py/PETSc/Random.pyx:214 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L214>

        Parameters
            interval (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Scalar <#petsc4py.typing.Scalar>, Scalar <#petsc4py.typing.Scalar>])

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setSeed(seed=None)
        Set the seed of random number generator.

        Not collective.

        Parameters
            seed (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The value for the seed. If None <https://docs.python.org/3/library/constants.html#None>, it only seeds the generator.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getSeed, PetscRandomSetSeed <https://petsc.org/release/manualpages/Sys/PetscRandomSetSeed.html>, PetscRandomSeed <https://petsc.org/release/manualpages/Sys/PetscRandomSeed.html>

    Source code at petsc4py/PETSc/Random.pyx:180 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L180>

    setType(rnd_type)
        Set the type of the random number generator object.

        Collective.

        Parameters
            rnd_type (Type <#petsc4py.PETSc.Random.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of the generator.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getType, PetscRandomSetType <https://petsc.org/release/manualpages/Sys/PetscRandomSetType.html>

    Source code at petsc4py/PETSc/Random.pyx:93 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L93>

    view(viewer=None)
        View a random number generator object.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscRandomView <https://petsc.org/release/manualpages/Sys/PetscRandomView.html>

    Source code at petsc4py/PETSc/Random.pyx:41 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L41>

Attributes Documentation

    interval
        The interval of the generated random numbers.

        Source code at petsc4py/PETSc/Random.pyx:241 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L241>

    seed
        The seed of the random number generator.

        Source code at petsc4py/PETSc/Random.pyx:233 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Random.pyx#L233>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Regressor

    class petsc4py.PETSc.Regressor
        Bases: Object <#petsc4py.PETSc.Object>

        Regression solver.

        REGRESSOR is described in the PETSc manual <https://petsc.org/release/manual/regressor.html>.

        See also:
            PetscRegressor <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressor.html>

    Enumerations
    LinearType <#petsc4py.PETSc.Regressor.LinearType> | Linear regressor type.
    Type <#petsc4py.PETSc.Regressor.Type> | REGRESSOR solver type.

  petsc4py.PETSc.Regressor.LinearType

    class petsc4py.PETSc.Regressor.LinearType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Linear regressor type.

        See also:
            PetscRegressorLinearType <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorLinearType.html>

    Attributes Summary
    LASSO | Constant LASSO of type int <https://docs.python.org/3/library/functions.html#int>
    OLS | Constant OLS of type int <https://docs.python.org/3/library/functions.html#int>
    RIDGE | Constant RIDGE of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        LASSO: int <https://docs.python.org/3/library/functions.html#int> = LASSO
            Constant LASSO of type int <https://docs.python.org/3/library/functions.html#int>

        OLS: int <https://docs.python.org/3/library/functions.html#int> = OLS
            Constant OLS of type int <https://docs.python.org/3/library/functions.html#int>

        RIDGE: int <https://docs.python.org/3/library/functions.html#int> = RIDGE
            Constant RIDGE of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Regressor.Type

    class petsc4py.PETSc.Regressor.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        REGRESSOR solver type.

        See also:
            PetscRegressorType <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorType.html>

    Attributes Summary
    LINEAR | Object LINEAR of type str <https://docs.python.org/3/library/stdtypes.html#str>

    Attributes Documentation

        LINEAR: str <https://docs.python.org/3/library/stdtypes.html#str> = LINEAR
            Object LINEAR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
create([comm]) | Create a REGRESSOR solver.
destroy() | Destroy the solver.
fit(X, y) | Fit the regression problem.
getLinearCoefficients() | Get a vector of the fitted coefficients from a linear regression model.
getLinearIntercept() | Get the intercept from a linear regression model.
getLinearKSP() | Returns the KSP <#petsc4py.PETSc.KSP> context used by the linear regressor.
getLinearType() | Return the type of the linear regressor.
getTAO() | Return the underlying TAO <#petsc4py.PETSc.TAO> object .
getType() | Return the type of the solver.
predict(X, y) | Predict the regression problem.
reset() | Destroy internal data structures of the solver.
setFromOptions() | Configure the solver from the options database.
setLinearFitIntercept(flag) | Set a flag to indicate that the intercept should be calculated.
setLinearType(lineartype) | Set the type of linear regression to be performed.
setLinearUseKSP(flag) | Set a flag to indicate that KSP <#petsc4py.PETSc.KSP> instead of TAO <#petsc4py.PETSc.TAO> solvers should be used.
setRegularizerWeight(weight) | Set the weight to be used for the regularizer.
setType(regressor_type) | Set the type of the solver.
setUp() | Set up the internal data structures for using the solver.
view([viewer]) | View the solver.

Methods Documentation

    create(comm=None)
        Create a REGRESSOR solver.

        Collective.

        Parameters
            comm -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>, PetscRegressorCreate <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorCreate.html>

    Source code at petsc4py/PETSc/Regressor.pyx:61 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L61>

    destroy()
        Destroy the solver.

        Collective.

        See also:
            PetscRegressorDestroy <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorDestroy.html>

    Source code at petsc4py/PETSc/Regressor.pyx:180 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L180>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    fit(X, y)
        Fit the regression problem.

        Collective.

        Parameters

            •   X (Mat <#petsc4py.PETSc.Mat>) -- The matrix of training data

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The vector of target values from the training dataset

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscRegressorPredict <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorPredict.html>

    Source code at petsc4py/PETSc/Regressor.pyx:116 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L116>

    getLinearCoefficients()
        Get a vector of the fitted coefficients from a linear regression model.

        Not collective.

        See also:
            getLinearIntercept, PetscRegressorLinearGetCoefficients <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorLinearGetCoefficients.html>

    Source code at petsc4py/PETSc/Regressor.pyx:266 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L266>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getLinearIntercept()
        Get the intercept from a linear regression model.

        Not collective.

        See also:
            setLinearFitIntercept, PetscRegressorLinearGetIntercept <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorLinearGetIntercept.html>

    Source code at petsc4py/PETSc/Regressor.pyx:280 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L280>

        Return type
            Scalar <#petsc4py.typing.Scalar>

    getLinearKSP()
        Returns the KSP <#petsc4py.PETSc.KSP> context used by the linear regressor.

        Not collective.

        See also:
            PetscRegressorLinearGetKSP <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorLinearGetKSP.html>

    Source code at petsc4py/PETSc/Regressor.pyx:252 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L252>

        Return type
            KSP <#petsc4py.PETSc.KSP>

    getLinearType()
        Return the type of the linear regressor.

        Not collective.

        See also:
            setLinearType, PetscRegressorLinearGetType <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorLinearGetType.html>

    Source code at petsc4py/PETSc/Regressor.pyx:304 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L304>

        Return type
            RegressorLinearType <#petsc4py.PETSc.RegressorLinearType>

    getTAO()
        Return the underlying TAO <#petsc4py.PETSc.TAO> object .

        Not collective.

        See also:
            getLinearKSP, PetscRegressorGetTao <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorGetTao.html>

    Source code at petsc4py/PETSc/Regressor.pyx:154 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L154>

        Return type
            TAO <#petsc4py.PETSc.TAO>

    getType()
        Return the type of the solver.

        Not collective.

        See also:
            setType, PetscRegressorGetType <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorGetType.html>

    Source code at petsc4py/PETSc/Regressor.pyx:212 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L212>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    predict(X, y)
        Predict the regression problem.

        Collective.

        Parameters

            •   X (Mat <#petsc4py.PETSc.Mat>) -- The matrix of unlabeled observations

            •   y (Vec <#petsc4py.PETSc.Vec>) -- The vector of predicted labels

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscRegressorFit <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorFit.html>

    Source code at petsc4py/PETSc/Regressor.pyx:135 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L135>

    reset()
        Destroy internal data structures of the solver.

        Collective.

        See also:
            PetscRegressorDestroy <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorDestroy.html>

    Source code at petsc4py/PETSc/Regressor.pyx:168 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L168>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFromOptions()
        Configure the solver from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, PetscRegressorSetFromOptions <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorSetFromOptions.html>

    Source code at petsc4py/PETSc/Regressor.pyx:93 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L93>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setLinearFitIntercept(flag)
        Set a flag to indicate that the intercept should be calculated.

        Logically collective.

        See also:
            PetscRegressorLinearSetFitIntercept <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorLinearSetFitIntercept.html>

    Source code at petsc4py/PETSc/Regressor.pyx:228 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L228>

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setLinearType(lineartype)
        Set the type of linear regression to be performed.

        Logically collective.

        See also:
            getLinearType, PetscRegressorLinearSetType <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorLinearSetType.html>

    Source code at petsc4py/PETSc/Regressor.pyx:293 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L293>

        Parameters
            lineartype (RegressorLinearType <#petsc4py.PETSc.RegressorLinearType>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setLinearUseKSP(flag)
        Set a flag to indicate that KSP <#petsc4py.PETSc.KSP> instead of TAO <#petsc4py.PETSc.TAO> solvers should be used.

        Logically collective.

        See also:
            PetscRegressorLinearSetUseKSP <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorLinearSetUseKSP.html>

    Source code at petsc4py/PETSc/Regressor.pyx:240 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L240>

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setRegularizerWeight(weight)
        Set the weight to be used for the regularizer.

        Logically collective.

        See also:
            setType, PetscRegressorSetRegularizerWeight <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorSetRegularizerWeight.html>

    Source code at petsc4py/PETSc/Regressor.pyx:82 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L82>

        Parameters
            weight (float <https://docs.python.org/3/library/functions.html#float>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setType(regressor_type)
        Set the type of the solver.

        Logically collective.

        Parameters
            regressor_type (Type <#petsc4py.PETSc.Regressor.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of the solver.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getType, PetscRegressorSetType <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorSetType.html>

    Source code at petsc4py/PETSc/Regressor.pyx:193 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L193>

    setUp()
        Set up the internal data structures for using the solver.

        Collective.

        See also:
            PetscRegressorSetUp <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorSetUp.html>

    Source code at petsc4py/PETSc/Regressor.pyx:104 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L104>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        View the solver.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscRegressorView <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorView.html>

    Source code at petsc4py/PETSc/Regressor.pyx:42 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Regressor.pyx#L42>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.RegressorLinearType

    class petsc4py.PETSc.RegressorLinearType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Linear regressor type.

        See also:
            PetscRegressorLinearType <https://petsc.org/release/manualpages/PetscRegressor/PetscRegressorLinearType.html>

    Attributes Summary
    LASSO | Constant LASSO of type int <https://docs.python.org/3/library/functions.html#int>
    OLS | Constant OLS of type int <https://docs.python.org/3/library/functions.html#int>
    RIDGE | Constant RIDGE of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        LASSO: int <https://docs.python.org/3/library/functions.html#int> = LASSO
            Constant LASSO of type int <https://docs.python.org/3/library/functions.html#int>

        OLS: int <https://docs.python.org/3/library/functions.html#int> = OLS
            Constant OLS of type int <https://docs.python.org/3/library/functions.html#int>

        RIDGE: int <https://docs.python.org/3/library/functions.html#int> = RIDGE
            Constant RIDGE of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.SF

    class petsc4py.PETSc.SF
        Bases: Object <#petsc4py.PETSc.Object>

        Star Forest object for communication.

        SF is used for setting up and managing the communication of certain entries of arrays and Vec <#petsc4py.PETSc.Vec> between MPI processes.

        Enumerations
        Type <#petsc4py.PETSc.SF.Type> | The star forest types.

  petsc4py.PETSc.SF.Type

    class petsc4py.PETSc.SF.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The star forest types.

        Attributes Summary
        ALLGATHER | Object ALLGATHER of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ALLGATHERV | Object ALLGATHERV of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ALLTOALL | Object ALLTOALL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        BASIC | Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GATHER | Object GATHER of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GATHERV | Object GATHERV of type str <https://docs.python.org/3/library/stdtypes.html#str>
        NEIGHBOR | Object NEIGHBOR of type str <https://docs.python.org/3/library/stdtypes.html#str>
        WINDOW | Object WINDOW of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        ALLGATHER: str <https://docs.python.org/3/library/stdtypes.html#str> = ALLGATHER
            Object ALLGATHER of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ALLGATHERV: str <https://docs.python.org/3/library/stdtypes.html#str> = ALLGATHERV
            Object ALLGATHERV of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ALLTOALL: str <https://docs.python.org/3/library/stdtypes.html#str> = ALLTOALL
            Object ALLTOALL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BASIC: str <https://docs.python.org/3/library/stdtypes.html#str> = BASIC
            Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GATHER: str <https://docs.python.org/3/library/stdtypes.html#str> = GATHER
            Object GATHER of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GATHERV: str <https://docs.python.org/3/library/stdtypes.html#str> = GATHERV
            Object GATHERV of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NEIGHBOR: str <https://docs.python.org/3/library/stdtypes.html#str> = NEIGHBOR
            Object NEIGHBOR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        WINDOW: str <https://docs.python.org/3/library/stdtypes.html#str> = WINDOW
            Object WINDOW of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
bcastBegin(unit, rootdata, leafdata, op) | Begin pointwise broadcast.
bcastEnd(unit, rootdata, leafdata, op) | End a broadcast & reduce operation started with bcastBegin.
compose(sf) | Compose a new SF.
computeDegree() | Compute and return the degree of each root vertex.
create([comm]) | Create a star forest communication context.
createEmbeddedLeafSF(selected) | Remove edges from all but the selected leaves.
createEmbeddedRootSF(selected) | Remove edges from all but the selected roots.
createInverse() | Create the inverse map.
createSectionSF(rootSection, remoteOffsets, ...) | Create an expanded SF of DOFs.
destroy() | Destroy the star forest.
distributeSection(rootSection[, leafSection]) | Create a new, reorganized Section <#petsc4py.PETSc.Section>.
fetchAndOpBegin(unit, rootdata, leafdata, ...) | Begin fetch and update operation.
fetchAndOpEnd(unit, rootdata, leafdata, ...) | End operation started in a matching call to fetchAndOpBegin.
gatherBegin(unit, leafdata, multirootdata) | Begin pointwise gather of all leaves into multi-roots.
gatherEnd(unit, leafdata, multirootdata) | End gather operation that was started with gatherBegin.
getGraph() | Return star forest graph.
getMulti() | Return the inner SF implementing gathers and scatters.
getType() | Return the type name of the star forest.
reduceBegin(unit, leafdata, rootdata, op) | Begin reduction of leafdata into rootdata.
reduceEnd(unit, leafdata, rootdata, op) | End a reduction operation started with reduceBegin.
reset() | Reset a star forest so that different sizes or neighbors can be used.
scatterBegin(unit, multirootdata, leafdata) | Begin pointwise scatter operation.
scatterEnd(unit, multirootdata, leafdata) | End scatter operation that was started with scatterBegin.
setFromOptions() | Set options using the options database.
setGraph(nroots, local, remote) | Set star forest graph.
setRankOrder(flag) | Sort multi-points for gathers and scatters by rank order.
setType(sf_type) | Set the type of the star forest.
setUp() | Set up communication structures.
view([viewer]) | View a star forest.

Methods Documentation

    bcastBegin(unit, rootdata, leafdata, op)
        Begin pointwise broadcast.

        Collective.

        Root values are reduced to leaf values. This call has to be concluded with a call to bcastEnd.

        Parameters

            •   unit (Datatype <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Datatype.html#mpi4py.MPI.Datatype>) -- MPI datatype.

            •   rootdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Buffer to broadcast.

            •   leafdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Buffer to be reduced with values from each leaf's respective root.

            •   op (Op <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Op.html#mpi4py.MPI.Op>) -- MPI reduction operation.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            bcastEnd, PetscSFBcastBegin <https://petsc.org/release/manualpages/PetscSF/PetscSFBcastBegin.html>

    Source code at petsc4py/PETSc/SF.pyx:434 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L434>

    bcastEnd(unit, rootdata, leafdata, op)
        End a broadcast & reduce operation started with bcastBegin.

        Collective.

        Parameters

            •   unit (Datatype <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Datatype.html#mpi4py.MPI.Datatype>) -- MPI datatype.

            •   rootdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Buffer to broadcast.

            •   leafdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Buffer to be reduced with values from each leaf's respective root.

            •   op (Op <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Op.html#mpi4py.MPI.Op>) -- MPI reduction operation.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            bcastBegin, PetscSFBcastEnd <https://petsc.org/release/manualpages/PetscSF/PetscSFBcastEnd.html>

    Source code at petsc4py/PETSc/SF.pyx:463 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L463>

    compose(sf)
        Compose a new SF.

        Collective.

        Puts the sf under this object in a top (roots) down (leaves) view.

        Parameters
            sf (SF <#petsc4py.PETSc.SF>) -- SF to put under this object.

        Return type
            SF <#petsc4py.PETSc.SF>

    See also:
            PetscSFCompose <https://petsc.org/release/manualpages/PetscSF/PetscSFCompose.html>

    Source code at petsc4py/PETSc/SF.pyx:413 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L413>

    computeDegree()
        Compute and return the degree of each root vertex.

        Collective.

        See also:
            PetscSFComputeDegreeBegin <https://petsc.org/release/manualpages/PetscSF/PetscSFComputeDegreeBegin.html>, PetscSFComputeDegreeEnd <https://petsc.org/release/manualpages/PetscSF/PetscSFComputeDegreeEnd.html>

    Source code at petsc4py/PETSc/SF.pyx:279 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L279>

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    create(comm=None)
        Create a star forest communication context.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PetscSFCreate <https://petsc.org/release/manualpages/PetscSF/PetscSFCreate.html>

    Source code at petsc4py/PETSc/SF.pyx:63 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L63>

    createEmbeddedLeafSF(selected)
        Remove edges from all but the selected leaves.

        Collective.

        Does not remap indices.

        Parameters
            selected (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Indices of the selected roots on this process.

        Return type
            SF <#petsc4py.PETSc.SF>

    See also:
            PetscSFCreateEmbeddedLeafSF <https://petsc.org/release/manualpages/PetscSF/PetscSFCreateEmbeddedLeafSF.html>

    Source code at petsc4py/PETSc/SF.pyx:321 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L321>

    createEmbeddedRootSF(selected)
        Remove edges from all but the selected roots.

        Collective.

        Does not remap indices.

        Parameters
            selected (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Indices of the selected roots on this process.

        Return type
            SF <#petsc4py.PETSc.SF>

    See also:
            PetscSFCreateEmbeddedRootSF <https://petsc.org/release/manualpages/PetscSF/PetscSFCreateEmbeddedRootSF.html>

    Source code at petsc4py/PETSc/SF.pyx:297 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L297>

    createInverse()
        Create the inverse map.

        Collective.

        Create the inverse map given a PetscSF in which all vertices have degree 1.

        See also:
            PetscSFCreateInverseSF <https://petsc.org/release/manualpages/PetscSF/PetscSFCreateInverseSF.html>

    Source code at petsc4py/PETSc/SF.pyx:262 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L262>

        Return type
            SF <#petsc4py.PETSc.SF>

    createSectionSF(rootSection, remoteOffsets, leafSection)
        Create an expanded SF of DOFs.

        Collective.

        Assumes the input SF relates points.

        Parameters

            •   rootSection (Section <#petsc4py.PETSc.Section>) -- Data layout of remote points for outgoing data (this is usually the serial section).

            •   remoteOffsets (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- Offsets for point data on remote processes (these are offsets from the root section), or None <https://docs.python.org/3/library/constants.html#None>.

            •   leafSection (Section <#petsc4py.PETSc.Section>) -- Data layout of local points for incoming data (this is the distributed section).

        Return type
            SF <#petsc4py.PETSc.SF>

    See also:
            PetscSFCreateSectionSF <https://petsc.org/release/manualpages/PetscSF/PetscSFCreateSectionSF.html>

    Source code at petsc4py/PETSc/SF.pyx:345 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L345>

    destroy()
        Destroy the star forest.

        Collective.

        See also:
            PetscSFDestroy <https://petsc.org/release/manualpages/PetscSF/PetscSFDestroy.html>

    Source code at petsc4py/PETSc/SF.pyx:50 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L50>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    distributeSection(rootSection, leafSection=None)
        Create a new, reorganized Section <#petsc4py.PETSc.Section>.

        Collective.

        Moves from the root to the leaves of the SF.

        Parameters

            •   rootSection (Section <#petsc4py.PETSc.Section>) -- Section defined on root space.

            •   leafSection (Section <#petsc4py.PETSc.Section> | None <https://docs.python.org/3/library/constants.html#None>) -- Section defined on the leaf space.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayInt <#petsc4py.typing.ArrayInt>, Section <#petsc4py.PETSc.Section>]

    See also:
            PetscSFDistributeSection <https://petsc.org/release/manualpages/PetscSF/PetscSFDistributeSection.html>

    Source code at petsc4py/PETSc/SF.pyx:378 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L378>

    fetchAndOpBegin(unit, rootdata, leafdata, leafupdate, op)
        Begin fetch and update operation.

        Collective.

        This operation fetches values from root and updates atomically by applying an operation using the leaf value.

        This call has to be completed with fetchAndOpEnd.

        Parameters

            •   unit (Datatype <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Datatype.html#mpi4py.MPI.Datatype>) -- MPI datatype.

            •   rootdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Root values to be updated, input state is seen by first process to perform an update.

            •   leafdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Leaf values to use in reduction.

            •   leafupdate (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- State at each leaf's respective root immediately prior to my atomic update.

            •   op (Op <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Op.html#mpi4py.MPI.Op>) -- MPI reduction operation.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            fetchAndOpEnd, PetscSFFetchAndOpBegin <https://petsc.org/release/manualpages/PetscSF/PetscSFFetchAndOpBegin.html>

    Source code at petsc4py/PETSc/SF.pyx:642 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L642>

    fetchAndOpEnd(unit, rootdata, leafdata, leafupdate, op)
        End operation started in a matching call to fetchAndOpBegin.

        Collective.

        Parameters

            •   unit (Datatype <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Datatype.html#mpi4py.MPI.Datatype>) -- MPI datatype.

            •   rootdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Root values to be updated, input state is seen by first process to perform an update.

            •   leafdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Leaf values to use in reduction.

            •   leafupdate (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- State at each leaf's respective root immediately prior to my atomic update.

            •   op (Op <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Op.html#mpi4py.MPI.Op>) -- MPI reduction operation.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            fetchAndOpBegin, PetscSFFetchAndOpEnd <https://petsc.org/release/manualpages/PetscSF/PetscSFFetchAndOpEnd.html>

    Source code at petsc4py/PETSc/SF.pyx:678 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L678>

    gatherBegin(unit, leafdata, multirootdata)
        Begin pointwise gather of all leaves into multi-roots.

        Collective.

        This call has to be completed with gatherEnd.

        Parameters

            •   unit (Datatype <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Datatype.html#mpi4py.MPI.Datatype>) -- MPI datatype.

            •   leafdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Leaf data to gather to roots.

            •   multirootdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Root buffer to gather into, amount of space per root is equal to its degree.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            gatherEnd, PetscSFGatherBegin <https://petsc.org/release/manualpages/PetscSF/PetscSFGatherBegin.html>

    Source code at petsc4py/PETSc/SF.pyx:592 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L592>

    gatherEnd(unit, leafdata, multirootdata)
        End gather operation that was started with gatherBegin.

        Collective.

        Parameters

            •   unit (Datatype <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Datatype.html#mpi4py.MPI.Datatype>) -- MPI datatype.

            •   leafdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Leaf data to gather to roots.

            •   multirootdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Root buffer to gather into, amount of space per root is equal to its degree.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            gatherBegin, PetscSFGatherEnd <https://petsc.org/release/manualpages/PetscSF/PetscSFGatherEnd.html>

    Source code at petsc4py/PETSc/SF.pyx:618 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L618>

    getGraph()
        Return star forest graph.

        Not collective.

        The number of leaves can be determined from the size of ilocal.

        Returns

            •   nroots (int <https://docs.python.org/3/library/functions.html#int>) -- Number of root vertices on the current process (these are possible targets for other process to attach leaves).

            •   ilocal (ArrayInt <#petsc4py.typing.ArrayInt>) -- Locations of leaves in leafdata buffers.

            •   iremote (ArrayInt <#petsc4py.typing.ArrayInt>) -- Remote locations of root vertices for each leaf on the current process.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, ArrayInt <#petsc4py.typing.ArrayInt>, ArrayInt <#petsc4py.typing.ArrayInt>]

    See also:
            PetscSFGetGraph <https://petsc.org/release/manualpages/PetscSF/PetscSFGetGraph.html>

    Source code at petsc4py/PETSc/SF.pyx:155 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L155>

    getMulti()
        Return the inner SF implementing gathers and scatters.

        Collective.

        See also:
            PetscSFGetMultiSF <https://petsc.org/release/manualpages/PetscSF/PetscSFGetMultiSF.html>

    Source code at petsc4py/PETSc/SF.pyx:247 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L247>

        Return type
            SF <#petsc4py.PETSc.SF>

    getType()
        Return the type name of the star forest.

        Collective.

        See also:
            PetscSFGetType <https://petsc.org/release/manualpages/PetscSF/PetscSFGetType.html>

    Source code at petsc4py/PETSc/SF.pyx:103 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L103>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    reduceBegin(unit, leafdata, rootdata, op)
        Begin reduction of leafdata into rootdata.

        Collective.

        This call has to be completed with call to reduceEnd.

        Parameters

            •   unit (Datatype <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Datatype.html#mpi4py.MPI.Datatype>) -- MPI datatype.

            •   leafdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Values to reduce.

            •   rootdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Result of reduction of values from all leaves of each root.

            •   op (Op <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Op.html#mpi4py.MPI.Op>) -- MPI reduction operation.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            reduceEnd, PetscSFReduceBegin <https://petsc.org/release/manualpages/PetscSF/PetscSFReduceBegin.html>

    Source code at petsc4py/PETSc/SF.pyx:489 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L489>

    reduceEnd(unit, leafdata, rootdata, op)
        End a reduction operation started with reduceBegin.

        Collective.

        Parameters

            •   unit (Datatype <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Datatype.html#mpi4py.MPI.Datatype>) -- MPI datatype.

            •   leafdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Values to reduce.

            •   rootdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Result of reduction of values from all leaves of each root.

            •   op (Op <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Op.html#mpi4py.MPI.Op>) -- MPI reduction operation.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            reduceBegin, PetscSFReduceEnd <https://petsc.org/release/manualpages/PetscSF/PetscSFReduceEnd.html>

    Source code at petsc4py/PETSc/SF.pyx:517 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L517>

    reset()
        Reset a star forest so that different sizes or neighbors can be used.

        Collective.

        See also:
            PetscSFReset <https://petsc.org/release/manualpages/PetscSF/PetscSFReset.html>

    Source code at petsc4py/PETSc/SF.pyx:141 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L141>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    scatterBegin(unit, multirootdata, leafdata)
        Begin pointwise scatter operation.

        Collective.

        Operation is from multi-roots to leaves. This call has to be completed with scatterEnd.

        Parameters

            •   unit (Datatype <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Datatype.html#mpi4py.MPI.Datatype>) -- MPI datatype.

            •   multirootdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Root buffer to send to each leaf, one unit of data per leaf.

            •   leafdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Leaf data to be updated with personal data from each respective root.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            scatterEnd, PetscSFScatterBegin <https://petsc.org/release/manualpages/PetscSF/PetscSFScatterBegin.html>

    Source code at petsc4py/PETSc/SF.pyx:543 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L543>

    scatterEnd(unit, multirootdata, leafdata)
        End scatter operation that was started with scatterBegin.

        Collective.

        Parameters

            •   unit (Datatype <https://mpi4py.readthedocs.io/en/stable/reference/mpi4py.MPI.Datatype.html#mpi4py.MPI.Datatype>) -- MPI datatype.

            •   multirootdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Root buffer to send to each leaf, one unit of data per leaf.

            •   leafdata (ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>) -- Leaf data to be updated with personal data from each respective root.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            scatterBegin, PetscSFScatterEnd <https://petsc.org/release/manualpages/PetscSF/PetscSFScatterEnd.html>

    Source code at petsc4py/PETSc/SF.pyx:569 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L569>

    setFromOptions()
        Set options using the options database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, PetscSFSetFromOptions <https://petsc.org/release/manualpages/PetscSF/PetscSFSetFromOptions.html>

    Source code at petsc4py/PETSc/SF.pyx:117 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L117>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setGraph(nroots, local, remote)
        Set star forest graph.

        Collective.

        The number of leaves argument can be determined from the size of local and/or remote.

        Parameters

            •   nroots (int <https://docs.python.org/3/library/functions.html#int>) -- Number of root vertices on the current process (these are possible targets for other process to attach leaves).

            •   local (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Locations of leaves in leafdata buffers, pass None <https://docs.python.org/3/library/constants.html#None> for contiguous storage.

            •   remote (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Remote locations of root vertices for each leaf on the current process. Should be 2*nleaves long as (rank, index) pairs.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscSFSetGraph <https://petsc.org/release/manualpages/PetscSF/PetscSFSetGraph.html>

    Source code at petsc4py/PETSc/SF.pyx:190 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L190>

    setRankOrder(flag)
        Sort multi-points for gathers and scatters by rank order.

        Logically collective.

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- True <https://docs.python.org/3/library/constants.html#True> to sort, False <https://docs.python.org/3/library/constants.html#False> to skip sorting.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscSFSetRankOrder <https://petsc.org/release/manualpages/PetscSF/PetscSFSetRankOrder.html>

    Source code at petsc4py/PETSc/SF.pyx:229 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L229>

    setType(sf_type)
        Set the type of the star forest.

        Collective.

        Parameters
            sf_type (Type <#petsc4py.PETSc.SF.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The star forest type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscSFSetType <https://petsc.org/release/manualpages/PetscSF/PetscSFSetType.html>

    Source code at petsc4py/PETSc/SF.pyx:84 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L84>

    setUp()
        Set up communication structures.

        Collective.

        See also:
            PetscSFSetUp <https://petsc.org/release/manualpages/PetscSF/PetscSFSetUp.html>

    Source code at petsc4py/PETSc/SF.pyx:129 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L129>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        View a star forest.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> to display the graph.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscSFView <https://petsc.org/release/manualpages/PetscSF/PetscSFView.html>

    Source code at petsc4py/PETSc/SF.pyx:31 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SF.pyx#L31>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.SNES

    class petsc4py.PETSc.SNES
        Bases: Object <#petsc4py.PETSc.Object>

        Nonlinear equations solver.

        SNES is described in the PETSc manual <https://petsc.org/release/manual/snes.html>.

        See also:
            SNES <https://petsc.org/release/manualpages/SNES/SNES.html>

    Enumerations
    ConvergedReason <#petsc4py.PETSc.SNES.ConvergedReason> | SNES solver termination reason.
    NewtonALCorrectionType <#petsc4py.PETSc.SNES.NewtonALCorrectionType> | SNESNEWTONAL correction type.
    NormSchedule <#petsc4py.PETSc.SNES.NormSchedule> | SNES norm schedule.
    Type <#petsc4py.PETSc.SNES.Type> | SNES solver type.

  petsc4py.PETSc.SNES.ConvergedReason

    class petsc4py.PETSc.SNES.ConvergedReason
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        SNES solver termination reason.

        See also:
            SNESGetConvergedReason <https://petsc.org/release/manualpages/SNES/SNESGetConvergedReason.html>

    Attributes Summary
    CONVERGED_FNORM_ABS | Constant CONVERGED_FNORM_ABS of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_FNORM_RELATIVE | Constant CONVERGED_FNORM_RELATIVE of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_ITERATING | Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_ITS | Constant CONVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_SNORM_RELATIVE | Constant CONVERGED_SNORM_RELATIVE of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_DTOL | Constant DIVERGED_DTOL of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_FUNCTION_COUNT | Constant DIVERGED_FUNCTION_COUNT of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_FUNCTION_DOMAIN | Constant DIVERGED_FUNCTION_DOMAIN of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_FUNCTION_NANORINF | Constant DIVERGED_FUNCTION_NANORINF of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_INNER | Constant DIVERGED_INNER of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_JACOBIAN_DOMAIN | Constant DIVERGED_JACOBIAN_DOMAIN of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_LINEAR_SOLVE | Constant DIVERGED_LINEAR_SOLVE of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_LINE_SEARCH | Constant DIVERGED_LINE_SEARCH of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_LOCAL_MIN | Constant DIVERGED_LOCAL_MIN of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_MAX_IT | Constant DIVERGED_MAX_IT of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_OBJECTIVE_DOMAIN | Constant DIVERGED_OBJECTIVE_DOMAIN of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_OBJECTIVE_NANORINF | Constant DIVERGED_OBJECTIVE_NANORINF of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_TR_DELTA | Constant DIVERGED_TR_DELTA of type int <https://docs.python.org/3/library/functions.html#int>
    ITERATING | Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        CONVERGED_FNORM_ABS: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_FNORM_ABS
            Constant CONVERGED_FNORM_ABS of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_FNORM_RELATIVE: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_FNORM_RELATIVE
            Constant CONVERGED_FNORM_RELATIVE of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_ITERATING: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_ITERATING
            Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_ITS: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_ITS
            Constant CONVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_SNORM_RELATIVE: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_SNORM_RELATIVE
            Constant CONVERGED_SNORM_RELATIVE of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_DTOL: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_DTOL
            Constant DIVERGED_DTOL of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_FUNCTION_COUNT: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_FUNCTION_COUNT
            Constant DIVERGED_FUNCTION_COUNT of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_FUNCTION_DOMAIN: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_FUNCTION_DOMAIN
            Constant DIVERGED_FUNCTION_DOMAIN of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_FUNCTION_NANORINF: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_FUNCTION_NANORINF
            Constant DIVERGED_FUNCTION_NANORINF of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_INNER: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_INNER
            Constant DIVERGED_INNER of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_JACOBIAN_DOMAIN: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_JACOBIAN_DOMAIN
            Constant DIVERGED_JACOBIAN_DOMAIN of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_LINEAR_SOLVE: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_LINEAR_SOLVE
            Constant DIVERGED_LINEAR_SOLVE of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_LINE_SEARCH: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_LINE_SEARCH
            Constant DIVERGED_LINE_SEARCH of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_LOCAL_MIN: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_LOCAL_MIN
            Constant DIVERGED_LOCAL_MIN of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_MAX_IT: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_MAX_IT
            Constant DIVERGED_MAX_IT of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_OBJECTIVE_DOMAIN: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_OBJECTIVE_DOMAIN
            Constant DIVERGED_OBJECTIVE_DOMAIN of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_OBJECTIVE_NANORINF: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_OBJECTIVE_NANORINF
            Constant DIVERGED_OBJECTIVE_NANORINF of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_TR_DELTA: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_TR_DELTA
            Constant DIVERGED_TR_DELTA of type int <https://docs.python.org/3/library/functions.html#int>

        ITERATING: int <https://docs.python.org/3/library/functions.html#int> = ITERATING
            Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.SNES.NewtonALCorrectionType

    class petsc4py.PETSc.SNES.NewtonALCorrectionType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        SNESNEWTONAL correction type.

        See also:
            SNESNewtonALCorrectionType <https://petsc.org/release/manualpages/SNES/SNESNewtonALCorrectionType.html>

    Attributes Summary
    EXACT | Constant EXACT of type int <https://docs.python.org/3/library/functions.html#int>
    NORMAL | Constant NORMAL of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        EXACT: int <https://docs.python.org/3/library/functions.html#int> = EXACT
            Constant EXACT of type int <https://docs.python.org/3/library/functions.html#int>

        NORMAL: int <https://docs.python.org/3/library/functions.html#int> = NORMAL
            Constant NORMAL of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.SNES.NormSchedule

    class petsc4py.PETSc.SNES.NormSchedule
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        SNES norm schedule.

        See also:
            SNESNormSchedule <https://petsc.org/release/manualpages/SNES/SNESNormSchedule.html>

    Attributes Summary
    ALWAYS | Constant ALWAYS of type int <https://docs.python.org/3/library/functions.html#int>
    DEFAULT | Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>
    FINAL_ONLY | Constant FINAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>
    INITIAL_FINAL_ONLY | Constant INITIAL_FINAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>
    INITIAL_ONLY | Constant INITIAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>
    NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_ALWAYS | Constant NORM_ALWAYS of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_DEFAULT | Constant NORM_DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_FINAL_ONLY | Constant NORM_FINAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_INITIAL_FINAL_ONLY | Constant NORM_INITIAL_FINAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_INITIAL_ONLY | Constant NORM_INITIAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>
    NORM_NONE | Constant NORM_NONE of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        ALWAYS: int <https://docs.python.org/3/library/functions.html#int> = ALWAYS
            Constant ALWAYS of type int <https://docs.python.org/3/library/functions.html#int>

        DEFAULT: int <https://docs.python.org/3/library/functions.html#int> = DEFAULT
            Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>

        FINAL_ONLY: int <https://docs.python.org/3/library/functions.html#int> = FINAL_ONLY
            Constant FINAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>

        INITIAL_FINAL_ONLY: int <https://docs.python.org/3/library/functions.html#int> = INITIAL_FINAL_ONLY
            Constant INITIAL_FINAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>

        INITIAL_ONLY: int <https://docs.python.org/3/library/functions.html#int> = INITIAL_ONLY
            Constant INITIAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>

        NONE: int <https://docs.python.org/3/library/functions.html#int> = NONE
            Constant NONE of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_ALWAYS: int <https://docs.python.org/3/library/functions.html#int> = NORM_ALWAYS
            Constant NORM_ALWAYS of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_DEFAULT: int <https://docs.python.org/3/library/functions.html#int> = NORM_DEFAULT
            Constant NORM_DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_FINAL_ONLY: int <https://docs.python.org/3/library/functions.html#int> = NORM_FINAL_ONLY
            Constant NORM_FINAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_INITIAL_FINAL_ONLY: int <https://docs.python.org/3/library/functions.html#int> = NORM_INITIAL_FINAL_ONLY
            Constant NORM_INITIAL_FINAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_INITIAL_ONLY: int <https://docs.python.org/3/library/functions.html#int> = NORM_INITIAL_ONLY
            Constant NORM_INITIAL_ONLY of type int <https://docs.python.org/3/library/functions.html#int>

        NORM_NONE: int <https://docs.python.org/3/library/functions.html#int> = NORM_NONE
            Constant NORM_NONE of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.SNES.Type

    class petsc4py.PETSc.SNES.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        SNES solver type.

        See also:
            SNESType <https://petsc.org/release/manualpages/SNES/SNESType.html>

    Attributes Summary
    ANDERSON | Object ANDERSON of type str <https://docs.python.org/3/library/stdtypes.html#str>
    ASPIN | Object ASPIN of type str <https://docs.python.org/3/library/stdtypes.html#str>
    COMPOSITE | Object COMPOSITE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    FAS | Object FAS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    KSPONLY | Object KSPONLY of type str <https://docs.python.org/3/library/stdtypes.html#str>
    KSPTRANSPOSEONLY | Object KSPTRANSPOSEONLY of type str <https://docs.python.org/3/library/stdtypes.html#str>
    MS | Object MS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NASM | Object NASM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NCG | Object NCG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NEWTONAL | Object NEWTONAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NEWTONLS | Object NEWTONLS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NEWTONTR | Object NEWTONTR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NGMRES | Object NGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NGS | Object NGS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NRICHARDSON | Object NRICHARDSON of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PATCH | Object PATCH of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PYTHON | Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>
    QN | Object QN of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SHELL | Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    VINEWTONRSLS | Object VINEWTONRSLS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    VINEWTONSSLS | Object VINEWTONSSLS of type str <https://docs.python.org/3/library/stdtypes.html#str>

    Attributes Documentation

        ANDERSON: str <https://docs.python.org/3/library/stdtypes.html#str> = ANDERSON
            Object ANDERSON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ASPIN: str <https://docs.python.org/3/library/stdtypes.html#str> = ASPIN
            Object ASPIN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        COMPOSITE: str <https://docs.python.org/3/library/stdtypes.html#str> = COMPOSITE
            Object COMPOSITE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        FAS: str <https://docs.python.org/3/library/stdtypes.html#str> = FAS
            Object FAS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        KSPONLY: str <https://docs.python.org/3/library/stdtypes.html#str> = KSPONLY
            Object KSPONLY of type str <https://docs.python.org/3/library/stdtypes.html#str>

        KSPTRANSPOSEONLY: str <https://docs.python.org/3/library/stdtypes.html#str> = KSPTRANSPOSEONLY
            Object KSPTRANSPOSEONLY of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MS: str <https://docs.python.org/3/library/stdtypes.html#str> = MS
            Object MS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NASM: str <https://docs.python.org/3/library/stdtypes.html#str> = NASM
            Object NASM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NCG: str <https://docs.python.org/3/library/stdtypes.html#str> = NCG
            Object NCG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NEWTONAL: str <https://docs.python.org/3/library/stdtypes.html#str> = NEWTONAL
            Object NEWTONAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NEWTONLS: str <https://docs.python.org/3/library/stdtypes.html#str> = NEWTONLS
            Object NEWTONLS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NEWTONTR: str <https://docs.python.org/3/library/stdtypes.html#str> = NEWTONTR
            Object NEWTONTR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NGMRES: str <https://docs.python.org/3/library/stdtypes.html#str> = NGMRES
            Object NGMRES of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NGS: str <https://docs.python.org/3/library/stdtypes.html#str> = NGS
            Object NGS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NRICHARDSON: str <https://docs.python.org/3/library/stdtypes.html#str> = NRICHARDSON
            Object NRICHARDSON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PATCH: str <https://docs.python.org/3/library/stdtypes.html#str> = PATCH
            Object PATCH of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PYTHON: str <https://docs.python.org/3/library/stdtypes.html#str> = PYTHON
            Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        QN: str <https://docs.python.org/3/library/stdtypes.html#str> = QN
            Object QN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SHELL: str <https://docs.python.org/3/library/stdtypes.html#str> = SHELL
            Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        VINEWTONRSLS: str <https://docs.python.org/3/library/stdtypes.html#str> = VINEWTONRSLS
            Object VINEWTONRSLS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        VINEWTONSSLS: str <https://docs.python.org/3/library/stdtypes.html#str> = VINEWTONSSLS
            Object VINEWTONSSLS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
appendOptionsPrefix(prefix) | Append to the prefix used for searching for options in the database.
callConvergenceTest(its, xnorm, ynorm, fnorm) | Compute the convergence test.
computeFunction(x, f) | Compute the function.
computeJacobian(x, J[, P]) | Compute the Jacobian.
computeNGS(x[, b]) | Compute a nonlinear Gauss-Seidel step.
computeObjective(x) | Compute the value of the objective function.
converged(its, xnorm, ynorm, fnorm) | Compute the convergence test and update the solver converged reason.
create([comm]) | Create a SNES solver.
createPython([context, comm]) | Create a nonlinear solver of Python type.
destroy() | Destroy the solver.
getApplicationContext() | Return the application context.
getCompositeNumber() | Return the number of solvers in the composite.
getCompositeSNES(n) | Return the n-th solver in the composite.
getConvergedReason() | Return the termination flag.
getConvergenceHistory() | Return the convergence history.
getConvergenceTest() | Return the callback to used as convergence test.
getDM() | Return the DM <#petsc4py.PETSc.DM> associated with the solver.
getDivergenceTolerance() | Get the divergence tolerance parameter used in the convergence tests.
getErrorIfNotConverged() | Return the flag indicating error on divergence.
getFASCoarseSolve() | Return the SNES used at the coarsest level of the FAS hierarchy.
getFASCycleSNES(level) | Return the SNES corresponding to a particular level of the FAS hierarchy.
getFASInjection(level) | Return the Mat <#petsc4py.PETSc.Mat> used to apply the injection from level-1 to level.
getFASInterpolation(level) | Return the Mat <#petsc4py.PETSc.Mat> used to apply the interpolation from level-1 to level.
getFASLevels() | Return the number of levels used.
getFASRestriction(level) | Return the Mat <#petsc4py.PETSc.Mat> used to apply the restriction from level-1 to level.
getFASSmoother(level) | Return the smoother used at a given level of the FAS hierarchy.
getFASSmootherDown(level) | Return the downsmoother used at a given level of the FAS hierarchy.
getFASSmootherUp(level) | Return the upsmoother used at a given level of the FAS hierarchy.
getFunction() | Return the callback to compute the nonlinear function.
getFunctionEvaluations() | Return the current number of function evaluations.
getFunctionNorm() | Return the function norm.
getInitialGuess() | Return the callback to compute the initial guess.
getIterationNumber() | Return the current iteration number.
getJacobian() | Return the matrices used to compute the Jacobian and the callback tuple.
getKSP() | Return the linear solver used by the nonlinear solver.
getKSPFailures() | Return the current number of linear solve failures.
getLineSearch() | Return the linesearch object associated with this SNES.
getLinearSolveIterations() | Return the total number of linear iterations.
getMaxFunctionEvaluations() | Return the maximum allowed number of function evaluations.
getMaxKSPFailures() | Return the maximum allowed number of linear solve failures.
getMaxStepFailures() | Return the maximum allowed number of step failures.
getMonitor() | Return the callback used to monitor solver convergence.
getNASMNumber() | Return the number of solvers in NASM.
getNASMSNES(n) | Return the n-th solver in NASM.
getNGS() | Return the nonlinear Gauss-Seidel callback tuple.
getNPC() | Return the nonlinear preconditioner associated with the solver.
getNPCSide() | Return the nonlinear preconditioning side.
getNewtonALLoadParameter() | Return the load parameter for SNESNEWTONAL.
getNormSchedule() | Return the norm schedule.
getObjective() | Return the objective callback tuple.
getOptionsPrefix() | Return the prefix used for searching for options in the database.
getParamsEW() | Get the parameters of the Eisenstat and Walker trick.
getPythonContext() | Return the instance of the class implementing the required Python methods.
getPythonType() | Return the fully qualified Python name of the class used by the solver.
getRhs() | Return the vector holding the right-hand side.
getSolution() | Return the vector holding the solution.
getSolutionUpdate() | Return the vector holding the solution update.
getStepFailures() | Return the current number of step failures.
getTRTolerances() | Return the tolerance parameters used for the trust region.
getTRUpdateParameters() | Return the update parameters used for the trust region.
getTolerances() | Return the tolerance parameters used in the solver convergence tests.
getType() | Return the type of the solver.
getUpdate() | Return the callback to compute the update at the beginning of each step.
getUseEW() | Return the flag indicating if the solver uses the Eisenstat-Walker trick.
getUseFD() | Return true if the solver uses color finite-differencing for the Jacobian.
getUseKSP() | Return the flag indicating if the solver uses a linear solver.
getUseMF() | Return the flag indicating if the solver uses matrix-free finite-differencing.
getVIInactiveSet() | Return the index set for the inactive set.
getVariableBounds() | Get the vectors for the variable bounds.
hasNPC() | Return a boolean indicating whether the solver has a nonlinear preconditioner.
logConvergenceHistory(norm[, linear_its]) | Log residual norm and linear iterations.
monitor(its, rnorm) | Monitor the solver.
monitorCancel() | Cancel all the monitors of the solver.
reset() | Reset the solver.
setApplicationContext(appctx) | Set the application context.
setConvergedReason(reason) | Set the termination flag.
setConvergenceHistory([length, reset]) | Set the convergence history.
setConvergenceTest(converged[, args, kargs]) | Set the callback to use as convergence test.
setDM(dm) | Associate a DM <#petsc4py.PETSc.DM> with the solver.
setDivergenceTolerance(dtol) | Set the divergence tolerance parameter used in the convergence tests.
setErrorIfNotConverged(flag) | Immediately generate an error if the solver has not converged.
setFASInjection(level, mat) | Set the Mat <#petsc4py.PETSc.Mat> to be used to apply the injection from level-1 to level.
setFASInterpolation(level, mat) | Set the Mat <#petsc4py.PETSc.Mat> to be used to apply the interpolation from level-1 to level.
setFASLevels(levels[, comms]) | Set the number of levels to use with FAS.
setFASRScale(level, vec) | Set the scaling factor of the restriction operator from level to level-1.
setFASRestriction(level, mat) | Set the Mat <#petsc4py.PETSc.Mat> to be used to apply the restriction from level-1 to level.
setForceIteration(force) | Force solve to take at least one iteration.
setFromOptions() | Configure the solver from the options database.
setFunction(function[, f, args, kargs]) | Set the callback to compute the nonlinear function.
setFunctionNorm(norm) | Set the function norm value.
setInitialGuess(initialguess[, args, kargs]) | Set the callback to compute the initial guess.
setIterationNumber(its) | Set the current iteration number.
setJacobian(jacobian[, J, P, args, kargs]) | Set the callback to compute the Jacobian.
setKSP(ksp) | Set the linear solver that will be used by the nonlinear solver.
setLineSearch(linesearch) | Set the linesearch object to be used by this SNES.
setLineSearchPreCheck(precheck[, args, kargs]) | Set the callback that will be called before applying the linesearch.
setMaxFunctionEvaluations(max_funcs) | Set the maximum allowed number of function evaluations.
setMaxKSPFailures(max_fails) | Set the maximum allowed number of linear solve failures.
setMaxStepFailures(max_fails) | Set the maximum allowed number of step failures.
setMonitor(monitor[, args, kargs]) | Set the callback used to monitor solver convergence.
setNGS(ngs[, args, kargs]) | Set the callback to compute nonlinear Gauss-Seidel.
setNPC(snes) | Set the nonlinear preconditioner.
setNPCSide(side) | Set the nonlinear preconditioning side.
setNewtonALCorrectionType(corrtype) | Set the correction type for SNESNEWTONAL.
setNewtonALFunction(function[, args, kargs]) | Set the callback to compute the tangent load vector for SNESNEWTONAL.
setNormSchedule(normsched) | Set the norm schedule.
setObjective(objective[, args, kargs]) | Set the callback to compute the objective function.
setOptionsPrefix(prefix) | Set the prefix used for searching for options in the database.
setParamsEW([version, rtol_0, rtol_max, ...]) | Set the parameters for the Eisenstat and Walker trick.
setPatchCellNumbering(sec) | Set cell patch numbering.
setPatchComputeFunction(function[, args, kargs]) | Set patch compute function.
setPatchComputeOperator(operator[, args, kargs]) | Set patch compute operator.
setPatchConstructType(typ[, operator, args, ...]) | Set patch construct type.
setPatchDiscretisationInfo(dms, bs, ...) | Set patch discretisation information.
setPythonContext(context) | Set the instance of the class implementing the required Python methods.
setPythonType(py_type) | Set the fully qualified Python name of the class to be used.
setResetCounters([reset]) | Set the flag to reset the counters.
setSolution(vec) | Set the vector used to store the solution.
setTRTolerances([delta_min, delta_max, delta_0]) | Set the tolerance parameters used for the trust region.
setTRUpdateParameters([eta1, eta2, eta3, t1, t2]) | Set the update parameters used for the trust region.
setTolerances([rtol, atol, stol, max_it]) | Set the tolerance parameters used in the solver convergence tests.
setType(snes_type) | Set the type of the solver.
setUp() | Set up the internal data structures for using the solver.
setUpMatrices() | Ensures that matrices are available for Newton-like methods.
setUpdate(update[, args, kargs]) | Set the callback to compute update at the beginning of each step.
setUseEW([flag]) | Tell the solver to use the Eisenstat-Walker trick.
setUseFD([flag]) | Set the boolean flag to use coloring finite-differencing for Jacobian assembly.
setUseKSP([flag]) | Set the boolean flag indicating to use a linear solver.
setUseMF([flag]) | Set the boolean flag indicating to use matrix-free finite-differencing.
setVariableBounds(xl, xu) | Set the vector for the variable bounds.
solve([b, x]) | Solve the nonlinear equations.
view([viewer]) | View the solver.

Attributes Summary
appctx | Application context.
atol | Absolute residual tolerance.
dm | DM <#petsc4py.PETSc.DM>.
history | Convergence history.
is_converged | Boolean indicating if the solver has converged.
is_diverged | Boolean indicating if the solver has failed.
is_iterating | Boolean indicating if the solver has not converged yet.
its | Number of iterations.
ksp | Linear solver.
linesearch | The linesearch object associated with this SNES.
max_funcs | Maximum number of function evaluations.
max_it | Maximum number of iterations.
norm | Function norm.
npc | Nonlinear preconditioner.
reason | Converged reason.
rtol | Relative residual tolerance.
stol | Solution update tolerance.
use_ew | Use the Eisenstat-Walker trick.
use_fd | Boolean indicating if the solver uses coloring finite-differencing.
use_ksp | Boolean indicating if the solver uses a linear solver.
use_mf | Boolean indicating if the solver uses matrix-free finite-differencing.
vec_rhs | Right-hand side vector.
vec_sol | Solution vector.
vec_upd | Update vector.

Methods Documentation

    appendOptionsPrefix(prefix)
        Append to the prefix used for searching for options in the database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, setOptionsPrefix, SNESAppendOptionsPrefix <https://petsc.org/release/manualpages/SNES/SNESAppendOptionsPrefix.html>

    Source code at petsc4py/PETSc/SNES.pyx:243 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L243>

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    callConvergenceTest(its, xnorm, ynorm, fnorm)
        Compute the convergence test.

        Collective.

        Parameters

            •   its (int <https://docs.python.org/3/library/functions.html#int>) -- Iteration number.

            •   xnorm (float <https://docs.python.org/3/library/functions.html#float>) -- Solution norm.

            •   ynorm (float <https://docs.python.org/3/library/functions.html#float>) -- Update norm.

            •   fnorm (float <https://docs.python.org/3/library/functions.html#float>) -- Function norm.

        Return type
            ConvergedReason <#petsc4py.PETSc.SNES.ConvergedReason>

    See also:
            setConvergenceTest, getConvergenceTest

    Source code at petsc4py/PETSc/SNES.pyx:1342 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1342>

    computeFunction(x, f)
        Compute the function.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input state vector.

            •   f (Vec <#petsc4py.PETSc.Vec>) -- The output vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setFunction, SNESComputeFunction <https://petsc.org/release/manualpages/SNES/SNESComputeFunction.html>

    Source code at petsc4py/PETSc/SNES.pyx:1043 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1043>

    computeJacobian(x, J, P=None)
        Compute the Jacobian.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input state vector.

            •   J (Mat <#petsc4py.PETSc.Mat>) -- The output Jacobian matrix.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The output Jacobian matrix used to construct the preconditioner.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setJacobian, SNESComputeJacobian <https://petsc.org/release/manualpages/SNES/SNESComputeJacobian.html>

    Source code at petsc4py/PETSc/SNES.pyx:1062 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1062>

    computeNGS(x, b=None)
        Compute a nonlinear Gauss-Seidel step.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The input/output state vector.

            •   b (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The input right-hand side vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setNGS, getNGS, SNESComputeNGS <https://petsc.org/release/manualpages/SNES/SNESComputeNGS.html>

    Source code at petsc4py/PETSc/SNES.pyx:1149 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1149>

    computeObjective(x)
        Compute the value of the objective function.

        Collective.

        Parameters
            x (Vec <#petsc4py.PETSc.Vec>) -- The input state vector.

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    See also:
            setObjective, SNESComputeObjective <https://petsc.org/release/manualpages/SNES/SNESComputeObjective.html>

    Source code at petsc4py/PETSc/SNES.pyx:1085 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1085>

    converged(its, xnorm, ynorm, fnorm)
        Compute the convergence test and update the solver converged reason.

        Collective.

        Parameters

            •   its (int <https://docs.python.org/3/library/functions.html#int>) -- Iteration number.

            •   xnorm (float <https://docs.python.org/3/library/functions.html#float>) -- Solution norm.

            •   ynorm (float <https://docs.python.org/3/library/functions.html#float>) -- Update norm.

            •   fnorm (float <https://docs.python.org/3/library/functions.html#float>) -- Function norm.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setConvergenceTest, getConvergenceTest, SNESConverged <https://petsc.org/release/manualpages/SNES/SNESConverged.html>

    Source code at petsc4py/PETSc/SNES.pyx:1372 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1372>

    create(comm=None)
        Create a SNES solver.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>, SNESCreate <https://petsc.org/release/manualpages/SNES/SNESCreate.html>

    Source code at petsc4py/PETSc/SNES.pyx:161 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L161>

    createPython(context=None, comm=None)
        Create a nonlinear solver of Python type.

        Collective.

        Parameters

            •   context (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- An instance of the Python class implementing the required methods.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PETSc Python nonlinear solver type (TODO) <#petsc-python-snes>, setType, setPythonContext, Type.PYTHON <#petsc4py.PETSc.SNES.Type.PYTHON>

    Source code at petsc4py/PETSc/SNES.pyx:2210 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2210>

    destroy()
        Destroy the solver.

        Collective.

        See also:
            SNESDestroy <https://petsc.org/release/manualpages/SNES/SNESDestroy.html>

    Source code at petsc4py/PETSc/SNES.pyx:148 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L148>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getApplicationContext()
        Return the application context.

        Source code at petsc4py/PETSc/SNES.pyx:280 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L280>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getCompositeNumber()
        Return the number of solvers in the composite.

        Not collective.

        See also:
            getCompositeSNES, SNESCompositeGetNumber <https://petsc.org/release/manualpages/SNES/SNESCompositeGetNumber.html>, SNESCOMPOSITE <https://petsc.org/release/manualpages/SNES/SNESCOMPOSITE.html>

    Source code at petsc4py/PETSc/SNES.pyx:2311 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2311>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getCompositeSNES(n)
        Return the n-th solver in the composite.

        Not collective.

        See also:
            getCompositeNumber, SNESCompositeGetSNES <https://petsc.org/release/manualpages/SNES/SNESCompositeGetSNES.html>, SNESCOMPOSITE <https://petsc.org/release/manualpages/SNES/SNESCOMPOSITE.html>

    Source code at petsc4py/PETSc/SNES.pyx:2294 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2294>

        Parameters
            n (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            SNES <#petsc4py.PETSc.SNES>

    getConvergedReason()
        Return the termination flag.

        Not collective.

        See also:
            setConvergedReason, SNESGetConvergedReason <https://petsc.org/release/manualpages/SNES/SNESGetConvergedReason.html>

    Source code at petsc4py/PETSc/SNES.pyx:1755 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1755>

        Return type
            ConvergedReason <#petsc4py.PETSc.SNES.ConvergedReason>

    getConvergenceHistory()
        Return the convergence history.

        Not collective.

        See also:
            SNESGetConvergenceHistory <https://petsc.org/release/manualpages/SNES/SNESGetConvergenceHistory.html>

    Source code at petsc4py/PETSc/SNES.pyx:1423 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1423>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayReal <#petsc4py.typing.ArrayReal>, ArrayInt <#petsc4py.typing.ArrayInt>]

    getConvergenceTest()
        Return the callback to used as convergence test.

        Not collective.

        See also:
            setConvergenceTest, callConvergenceTest

    Source code at petsc4py/PETSc/SNES.pyx:1330 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1330>

        Return type
            SNESConvergedFunction <#petsc4py.typing.SNESConvergedFunction>

    getDM()
        Return the DM <#petsc4py.PETSc.DM> associated with the solver.

        Not collective.

        See also:
            setDM, SNESGetDM <https://petsc.org/release/manualpages/SNES/SNESGetDM.html>

    Source code at petsc4py/PETSc/SNES.pyx:295 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L295>

        Return type
            DM <#petsc4py.PETSc.DM>

    getDivergenceTolerance()
        Get the divergence tolerance parameter used in the convergence tests.

        Not collective.

        See also:
            setDivergenceTolerance, getTolerances, SNESGetDivergenceTolerance <https://petsc.org/release/manualpages/SNES/SNESGetDivergenceTolerance.html>

    Source code at petsc4py/PETSc/SNES.pyx:1255 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1255>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getErrorIfNotConverged()
        Return the flag indicating error on divergence.

        Not collective.

        See also:
            setErrorIfNotConverged, SNESGetErrorIfNotConverged <https://petsc.org/release/manualpages/SNES/SNESGetErrorIfNotConverged.html>

    Source code at petsc4py/PETSc/SNES.pyx:1782 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1782>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getFASCoarseSolve()
        Return the SNES used at the coarsest level of the FAS hierarchy.

        Not collective.

        See also:
            getFASSmoother, SNESFASGetCoarseSolve <https://petsc.org/release/manualpages/SNESFAS/SNESFASGetCoarseSolve.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:610 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L610>

        Return type
            SNES <#petsc4py.PETSc.SNES>

    getFASCycleSNES(level)
        Return the SNES corresponding to a particular level of the FAS hierarchy.

        Not collective.

        See also:
            setFASLevels, getFASCoarseSolve, getFASSmoother, SNESFASGetCycleSNES <https://petsc.org/release/manualpages/SNESFAS/SNESFASGetCycleSNES.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:593 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L593>

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            SNES <#petsc4py.PETSc.SNES>

    getFASInjection(level)
        Return the Mat <#petsc4py.PETSc.Mat> used to apply the injection from level-1 to level.

        Not collective.

        See also:
            setFASInjection, SNESFASGetInjection <https://petsc.org/release/manualpages/SNESFAS/SNESFASGetInjection.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:516 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L516>

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getFASInterpolation(level)
        Return the Mat <#petsc4py.PETSc.Mat> used to apply the interpolation from level-1 to level.

        Not collective.

        See also:
            setFASInterpolation, SNESFASGetInterpolation <https://petsc.org/release/manualpages/SNESFAS/SNESFASGetInterpolation.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:456 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L456>

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getFASLevels()
        Return the number of levels used.

        Not collective.

        See also:
            setFASLevels, SNESFASGetLevels <https://petsc.org/release/manualpages/SNESFAS/SNESFASGetLevels.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:579 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L579>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getFASRestriction(level)
        Return the Mat <#petsc4py.PETSc.Mat> used to apply the restriction from level-1 to level.

        Not collective.

        See also:
            setFASRestriction, SNESFASGetRestriction <https://petsc.org/release/manualpages/SNESFAS/SNESFASGetRestriction.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:486 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L486>

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getFASSmoother(level)
        Return the smoother used at a given level of the FAS hierarchy.

        Not collective.

        See also:
            setFASLevels, getFASCoarseSolve, getFASSmootherDown, getFASSmootherUp, SNESFASGetSmoother <https://petsc.org/release/manualpages/SNESFAS/SNESFASGetSmoother.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:625 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L625>

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            SNES <#petsc4py.PETSc.SNES>

    getFASSmootherDown(level)
        Return the downsmoother used at a given level of the FAS hierarchy.

        Not collective.

        See also:
            setFASLevels, getFASCoarseSolve, getFASSmoother, getFASSmootherUp, SNESFASGetSmootherDown <https://petsc.org/release/manualpages/SNESFAS/SNESFASGetSmootherDown.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:642 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L642>

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            SNES <#petsc4py.PETSc.SNES>

    getFASSmootherUp(level)
        Return the upsmoother used at a given level of the FAS hierarchy.

        Not collective.

        See also:
            setFASLevels, getFASCoarseSolve, getFASSmoother, getFASSmootherDown, SNESFASGetSmootherUp <https://petsc.org/release/manualpages/SNESFAS/SNESFASGetSmootherUp.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:659 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L659>

        Parameters
            level (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            SNES <#petsc4py.PETSc.SNES>

    getFunction()
        Return the callback to compute the nonlinear function.

        Not collective.

        See also:
            setFunction, SNESGetFunction <https://petsc.org/release/manualpages/SNES/SNESGetFunction.html>

    Source code at petsc4py/PETSc/SNES.pyx:859 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L859>

        Return type
            SNESFunction <#petsc4py.typing.SNESFunction>

    getFunctionEvaluations()
        Return the current number of function evaluations.

        Not collective.

        See also:
            setMaxFunctionEvaluations, SNESGetNumberFunctionEvals <https://petsc.org/release/manualpages/SNES/SNESGetNumberFunctionEvals.html>

    Source code at petsc4py/PETSc/SNES.pyx:1576 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1576>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getFunctionNorm()
        Return the function norm.

        Not collective.

        See also:
            setFunctionNorm, SNESGetFunctionNorm <https://petsc.org/release/manualpages/SNES/SNESGetFunctionNorm.html>

    Source code at petsc4py/PETSc/SNES.pyx:1853 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1853>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getInitialGuess()
        Return the callback to compute the initial guess.

        Not collective.

        See also:
            setInitialGuess

    Source code at petsc4py/PETSc/SNES.pyx:812 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L812>

        Return type
            SNESGuessFunction <#petsc4py.typing.SNESGuessFunction>

    getIterationNumber()
        Return the current iteration number.

        Not collective.

        See also:
            setIterationNumber, SNESGetIterationNumber <https://petsc.org/release/manualpages/SNES/SNESGetIterationNumber.html>

    Source code at petsc4py/PETSc/SNES.pyx:1811 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1811>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getJacobian()
        Return the matrices used to compute the Jacobian and the callback tuple.

        Not collective.

        Returns

            •   J (Mat <#petsc4py.PETSc.Mat>) -- The matrix to store the Jacobian.

            •   P (Mat <#petsc4py.PETSc.Mat>) -- The matrix to construct the preconditioner.

            •   callback (SNESJacobianFunction <#petsc4py.typing.SNESJacobianFunction>) -- callback, positional and keyword arguments.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>, SNESJacobianFunction <#petsc4py.typing.SNESJacobianFunction>]

    See also:
            setJacobian, SNESGetJacobian <https://petsc.org/release/manualpages/SNES/SNESGetJacobian.html>

    Source code at petsc4py/PETSc/SNES.pyx:971 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L971>

    getKSP()
        Return the linear solver used by the nonlinear solver.

        Not collective.

        See also:
            setKSP, SNESGetKSP <https://petsc.org/release/manualpages/SNES/SNESGetKSP.html>

    Source code at petsc4py/PETSc/SNES.pyx:1952 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1952>

        Return type
            KSP <#petsc4py.PETSc.KSP>

    getKSPFailures()
        Return the current number of linear solve failures.

        Not collective.

        See also:
            getMaxKSPFailures, SNESGetLinearSolveFailures <https://petsc.org/release/manualpages/SNES/SNESGetLinearSolveFailures.html>

    Source code at petsc4py/PETSc/SNES.pyx:1658 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1658>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getLineSearch()
        Return the linesearch object associated with this SNES.

        Not collective.

        See also:
            setLineSearch, linesearch, SNESGetLineSearch <https://petsc.org/release/manualpages/SNES/SNESGetLineSearch.html>

    Source code at petsc4py/PETSc/SNES.pyx:2619 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2619>

        Return type
            SNESLineSearch <#petsc4py.PETSc.SNESLineSearch>

    getLinearSolveIterations()
        Return the total number of linear iterations.

        Not collective.

        See also:
            SNESGetLinearSolveIterations <https://petsc.org/release/manualpages/SNES/SNESGetLinearSolveIterations.html>

    Source code at petsc4py/PETSc/SNES.pyx:1867 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1867>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getMaxFunctionEvaluations()
        Return the maximum allowed number of function evaluations.

        Not collective.

        See also:
            setMaxFunctionEvaluations, SNESSetTolerances <https://petsc.org/release/manualpages/SNES/SNESSetTolerances.html>

    Source code at petsc4py/PETSc/SNES.pyx:1560 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1560>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getMaxKSPFailures()
        Return the maximum allowed number of linear solve failures.

        Not collective.

        See also:
            setMaxKSPFailures, SNESGetMaxLinearSolveFailures <https://petsc.org/release/manualpages/SNES/SNESGetMaxLinearSolveFailures.html>

    Source code at petsc4py/PETSc/SNES.pyx:1644 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1644>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getMaxStepFailures()
        Return the maximum allowed number of step failures.

        Not collective.

        See also:
            setMaxStepFailures, SNESGetMaxNonlinearStepFailures <https://petsc.org/release/manualpages/SNES/SNESGetMaxNonlinearStepFailures.html>

    Source code at petsc4py/PETSc/SNES.pyx:1603 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1603>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getMonitor()
        Return the callback used to monitor solver convergence.

        Not collective.

        See also:
            setMonitor

    Source code at petsc4py/PETSc/SNES.pyx:1495 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1495>

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[SNESMonitorFunction <#petsc4py.typing.SNESMonitorFunction>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>]]]

    getNASMNumber()
        Return the number of solvers in NASM.

        Not collective.

        See also:
            getNASMSNES, SNESNASMGetNumber <https://petsc.org/release/manualpages/SNES/SNESNASMGetNumber.html>, SNESNASM <https://petsc.org/release/manualpages/SNES/SNESNASM.html>

    Source code at petsc4py/PETSc/SNES.pyx:2343 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2343>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getNASMSNES(n)
        Return the n-th solver in NASM.

        Not collective.

        See also:
            getNASMNumber, SNESNASMGetSNES <https://petsc.org/release/manualpages/SNES/SNESNASMGetSNES.html>, SNESNASM <https://petsc.org/release/manualpages/SNES/SNESNASM.html>

    Source code at petsc4py/PETSc/SNES.pyx:2327 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2327>

        Parameters
            n (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            SNES <#petsc4py.PETSc.SNES>

    getNGS()
        Return the nonlinear Gauss-Seidel callback tuple.

        Not collective.

        See also:
            setNGS, computeNGS

    Source code at petsc4py/PETSc/SNES.pyx:1135 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1135>

        Return type
            SNESNGSFunction <#petsc4py.typing.SNESNGSFunction>

    getNPC()
        Return the nonlinear preconditioner associated with the solver.

        Not collective.

        See also:
            setNPC, hasNPC, setNPCSide, getNPCSide, SNESGetNPC <https://petsc.org/release/manualpages/SNES/SNESGetNPC.html>

    Source code at petsc4py/PETSc/SNES.pyx:678 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L678>

        Return type
            SNES <#petsc4py.PETSc.SNES>

    getNPCSide()
        Return the nonlinear preconditioning side.

        Not collective.

        See also:
            setNPC, getNPC, hasNPC, setNPCSide, SNESGetNPCSide <https://petsc.org/release/manualpages/SNES/SNESGetNPCSide.html>

    Source code at petsc4py/PETSc/SNES.pyx:731 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L731>

        Return type
            Side <#petsc4py.PETSc.PC.Side>

    getNewtonALLoadParameter()
        Return the load parameter for SNESNEWTONAL.

        Not collective.

        See also:
            setNewtonALFunction, setNewtonALCorrectionType, SNESNewtonALGetLoadParameter <https://petsc.org/release/manualpages/SNES/SNESNewtonALGetLoadParameter.html>

    Source code at petsc4py/PETSc/SNES.pyx:2687 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2687>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getNormSchedule()
        Return the norm schedule.

        Not collective.

        See also:
            setNormSchedule, SNESGetNormSchedule <https://petsc.org/release/manualpages/SNES/SNESGetNormSchedule.html>

    Source code at petsc4py/PETSc/SNES.pyx:1281 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1281>

        Return type
            NormSchedule <#petsc4py.PETSc.SNES.NormSchedule>

    getObjective()
        Return the objective callback tuple.

        Not collective.

        See also:
            setObjective

    Source code at petsc4py/PETSc/SNES.pyx:1029 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1029>

        Return type
            SNESObjFunction <#petsc4py.typing.SNESObjFunction>

    getOptionsPrefix()
        Return the prefix used for searching for options in the database.

        Not collective.

        See also:
            Working with PETSc options <#petsc-options>, setOptionsPrefix, SNESGetOptionsPrefix <https://petsc.org/release/manualpages/SNES/SNESGetOptionsPrefix.html>

    Source code at petsc4py/PETSc/SNES.pyx:229 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L229>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getParamsEW()
        Get the parameters of the Eisenstat and Walker trick.

        Not collective.

        See also:
            setUseEW, setParamsEW, SNESKSPGetParametersEW <https://petsc.org/release/manualpages/SNES/SNESKSPGetParametersEW.html>

    Source code at petsc4py/PETSc/SNES.pyx:2056 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2056>

        Return type
            dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, int <https://docs.python.org/3/library/functions.html#int> | float <https://docs.python.org/3/library/functions.html#float>]

    getPythonContext()
        Return the instance of the class implementing the required Python methods.

        Not collective.

        See also:
            PETSc Python nonlinear solver type (TODO) <#petsc-python-snes>, setPythonContext

    Source code at petsc4py/PETSc/SNES.pyx:2247 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2247>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getPythonType()
        Return the fully qualified Python name of the class used by the solver.

        Not collective.

        See also:
            PETSc Python nonlinear solver type (TODO) <#petsc-python-snes>, setPythonContext, setPythonType, SNESPythonGetType <https://petsc.org/release/manualpages/SNES/SNESPythonGetType.html>

    Source code at petsc4py/PETSc/SNES.pyx:2277 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2277>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getRhs()
        Return the vector holding the right-hand side.

        Not collective.

        See also:
            SNESGetRhs <https://petsc.org/release/manualpages/SNES/SNESGetRhs.html>

    Source code at petsc4py/PETSc/SNES.pyx:1881 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1881>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getSolution()
        Return the vector holding the solution.

        Not collective.

        See also:
            setSolution, SNESGetSolution <https://petsc.org/release/manualpages/SNES/SNESGetSolution.html>

    Source code at petsc4py/PETSc/SNES.pyx:1896 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1896>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getSolutionUpdate()
        Return the vector holding the solution update.

        Not collective.

        See also:
            SNESGetSolutionUpdate <https://petsc.org/release/manualpages/SNES/SNESGetSolutionUpdate.html>

    Source code at petsc4py/PETSc/SNES.pyx:1923 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1923>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getStepFailures()
        Return the current number of step failures.

        Not collective.

        See also:
            getMaxStepFailures, SNESGetNonlinearStepFailures <https://petsc.org/release/manualpages/SNES/SNESGetNonlinearStepFailures.html>

    Source code at petsc4py/PETSc/SNES.pyx:1617 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1617>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getTRTolerances()
        Return the tolerance parameters used for the trust region.

        Not collective.

        Returns

            •   delta_min (float <https://docs.python.org/3/library/functions.html#float>) -- The minimum allowed trust region size.

            •   delta_max (float <https://docs.python.org/3/library/functions.html#float>) -- The maximum allowed trust region size.

            •   delta_0 (float <https://docs.python.org/3/library/functions.html#float>) -- The initial trust region size.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            setTRTolerances, getTRUpdateParameters, SNESNewtonTRGetTolerances <https://petsc.org/release/manualpages/SNES/SNESNewtonTRGetTolerances.html>

    Source code at petsc4py/PETSc/SNES.pyx:353 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L353>

    getTRUpdateParameters()
        Return the update parameters used for the trust region.

        Not collective.

        Returns

            •   eta1 (float <https://docs.python.org/3/library/functions.html#float>) -- The step acceptance tolerance.

            •   eta2 (float <https://docs.python.org/3/library/functions.html#float>) -- The shrinking tolerance.

            •   eta3 (float <https://docs.python.org/3/library/functions.html#float>) -- The enlarging tolerance.

            •   t1 (float <https://docs.python.org/3/library/functions.html#float>) -- The shrinking factor.

            •   t2 (float <https://docs.python.org/3/library/functions.html#float>) -- The enlarging factor.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            setTRUpdateParameters, getTRTolerances, SNESNewtonTRGetUpdateParameters <https://petsc.org/release/manualpages/SNES/SNESNewtonTRGetUpdateParameters.html>

    Source code at petsc4py/PETSc/SNES.pyx:412 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L412>

    getTolerances()
        Return the tolerance parameters used in the solver convergence tests.

        Not collective.

        Returns

            •   rtol (float <https://docs.python.org/3/library/functions.html#float>) -- The relative norm of the residual.

            •   atol (float <https://docs.python.org/3/library/functions.html#float>) -- The absolute norm of the residual.

            •   stol (float <https://docs.python.org/3/library/functions.html#float>) -- The absolute norm of the step.

            •   max_it (int <https://docs.python.org/3/library/functions.html#int>) -- The maximum allowed number of iterations.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            setTolerances, SNESGetTolerances <https://petsc.org/release/manualpages/SNES/SNESGetTolerances.html>

    Source code at petsc4py/PETSc/SNES.pyx:1211 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1211>

    getType()
        Return the type of the solver.

        Not collective.

        See also:
            setType, SNESGetType <https://petsc.org/release/manualpages/SNES/SNESGetType.html>

    Source code at petsc4py/PETSc/SNES.pyx:201 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L201>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getUpdate()
        Return the callback to compute the update at the beginning of each step.

        Not collective.

        See also:
            setUpdate

    Source code at petsc4py/PETSc/SNES.pyx:920 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L920>

        Return type
            SNESUpdateFunction <#petsc4py.typing.SNESUpdateFunction>

    getUseEW()
        Return the flag indicating if the solver uses the Eisenstat-Walker trick.

        Not collective.

        See also:
            setUseEW, setParamsEW, SNESKSPGetUseEW <https://petsc.org/release/manualpages/SNES/SNESKSPGetUseEW.html>

    Source code at petsc4py/PETSc/SNES.pyx:1990 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1990>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getUseFD()
        Return true if the solver uses color finite-differencing for the Jacobian.

        Not collective.

        See also:
            setUseFD

    Source code at petsc4py/PETSc/SNES.pyx:2150 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2150>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getUseKSP()
        Return the flag indicating if the solver uses a linear solver.

        Not collective.

        See also:
            setUseKSP

    Source code at petsc4py/PETSc/SNES.pyx:2094 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2094>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getUseMF()
        Return the flag indicating if the solver uses matrix-free finite-differencing.

        Not collective.

        See also:
            setUseMF

    Source code at petsc4py/PETSc/SNES.pyx:2123 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2123>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getVIInactiveSet()
        Return the index set for the inactive set.

        Not collective.

        See also:
            SNESVIGetInactiveSet <https://petsc.org/release/manualpages/SNES/SNESVIGetInactiveSet.html>

    Source code at petsc4py/PETSc/SNES.pyx:2193 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2193>

        Return type
            IS <#petsc4py.PETSc.IS>

    getVariableBounds()
        Get the vectors for the variable bounds.

        Collective.

        See also:
            setVariableBounds, SNESVIGetVariableBounds <https://petsc.org/release/manualpages/SNES/SNESVIGetVariableBounds.html>

    Source code at petsc4py/PETSc/SNES.pyx:2178 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2178>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>]

    hasNPC()
        Return a boolean indicating whether the solver has a nonlinear preconditioner.

        Not collective.

        See also:
            setNPC, getNPC, setNPCSide, getNPCSide, SNESHasNPC <https://petsc.org/release/manualpages/SNES/SNESHasNPC.html>

    Source code at petsc4py/PETSc/SNES.pyx:693 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L693>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    logConvergenceHistory(norm, linear_its=0)
        Log residual norm and linear iterations.

        Source code at petsc4py/PETSc/SNES.pyx:1441 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1441>

        Parameters

            •   norm (float <https://docs.python.org/3/library/functions.html#float>)

            •   linear_its (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    monitor(its, rnorm)
        Monitor the solver.

        Collective.

        Parameters

            •   its -- Current number of iterations.

            •   rnorm -- Current value of the residual norm.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setMonitor, SNESMonitor <https://petsc.org/release/manualpages/SNES/SNESMonitor.html>

    Source code at petsc4py/PETSc/SNES.pyx:1522 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1522>

    monitorCancel()
        Cancel all the monitors of the solver.

        Logically collective.

        See also:
            setMonitor, SNESMonitorCancel <https://petsc.org/release/manualpages/SNES/SNESMonitorCancel.html>

    Source code at petsc4py/PETSc/SNES.pyx:1507 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1507>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    reset()
        Reset the solver.

        Collective.

        See also:
            SNESReset <https://petsc.org/release/manualpages/SNES/SNESReset.html>

    Source code at petsc4py/PETSc/SNES.pyx:1707 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1707>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setApplicationContext(appctx)
        Set the application context.

        Source code at petsc4py/PETSc/SNES.pyx:271 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L271>

        Parameters
            appctx (Any <https://docs.python.org/3/library/typing.html#typing.Any>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setConvergedReason(reason)
        Set the termination flag.

        Collective.

        See also:
            getConvergedReason, SNESSetConvergedReason <https://petsc.org/release/manualpages/SNES/SNESSetConvergedReason.html>

    Source code at petsc4py/PETSc/SNES.pyx:1742 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1742>

        Parameters
            reason (ConvergedReason <#petsc4py.PETSc.SNES.ConvergedReason>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setConvergenceHistory(length=None, reset=False)
        Set the convergence history.

        Logically collective.

        See also:
            SNESSetConvergenceHistory <https://petsc.org/release/manualpages/SNES/SNESSetConvergenceHistory.html>

    Source code at petsc4py/PETSc/SNES.pyx:1399 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1399>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setConvergenceTest(converged, args=None, kargs=None)
        Set the callback to use as convergence test.

        Logically collective.

        Parameters

            •   converged (SNESConvergedFunction <#petsc4py.typing.SNESConvergedFunction> | Literal <https://docs.python.org/3/library/typing.html#typing.Literal>['skip', 'default']) -- The convergence testing callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getConvergenceTest, callConvergenceTest, SNESSetConvergenceTest <https://petsc.org/release/manualpages/SNES/SNESSetConvergenceTest.html>

    Source code at petsc4py/PETSc/SNES.pyx:1295 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1295>

    setDM(dm)
        Associate a DM <#petsc4py.PETSc.DM> with the solver.

        Not collective.

        See also:
            getDM, SNESSetDM <https://petsc.org/release/manualpages/SNES/SNESSetDM.html>

    Source code at petsc4py/PETSc/SNES.pyx:312 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L312>

        Parameters
            dm (DM <#petsc4py.PETSc.DM>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setDivergenceTolerance(dtol)
        Set the divergence tolerance parameter used in the convergence tests.

        Logically collective.

        Parameters
            dtol (float <https://docs.python.org/3/library/functions.html#float>) -- The divergence tolerance.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getDivergenceTolerance, setTolerances, SNESSetDivergenceTolerance <https://petsc.org/release/manualpages/SNES/SNESSetDivergenceTolerance.html>

    Source code at petsc4py/PETSc/SNES.pyx:1238 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1238>

    setErrorIfNotConverged(flag)
        Immediately generate an error if the solver has not converged.

        Collective.

        See also:
            getErrorIfNotConverged, SNESSetErrorIfNotConverged <https://petsc.org/release/manualpages/SNES/SNESSetErrorIfNotConverged.html>

    Source code at petsc4py/PETSc/SNES.pyx:1769 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1769>

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFASInjection(level, mat)
        Set the Mat <#petsc4py.PETSc.Mat> to be used to apply the injection from level-1 to level.

        Collective.

        See also:
            getFASInjection, setFASInterpolation, setFASRestriction, SNESFASSetInjection <https://petsc.org/release/manualpages/SNESFAS/SNESFASSetInjection.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:502 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L502>

        Parameters

            •   level (int <https://docs.python.org/3/library/functions.html#int>)

            •   mat (Mat <#petsc4py.PETSc.Mat>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFASInterpolation(level, mat)
        Set the Mat <#petsc4py.PETSc.Mat> to be used to apply the interpolation from level-1 to level.

        Collective.

        See also:
            getFASInterpolation, setFASRestriction, setFASInjection, SNESFASSetInterpolation <https://petsc.org/release/manualpages/SNESFAS/SNESFASSetInterpolation.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:442 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L442>

        Parameters

            •   level (int <https://docs.python.org/3/library/functions.html#int>)

            •   mat (Mat <#petsc4py.PETSc.Mat>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFASLevels(levels, comms=None)
        Set the number of levels to use with FAS.

        Collective.

        Parameters

            •   levels (int <https://docs.python.org/3/library/functions.html#int>) -- The number of levels

            •   comms (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Comm <#petsc4py.PETSc.Comm>] | None <https://docs.python.org/3/library/constants.html#None>) -- An optional sequence of communicators of length Logging Levels <https://docs.python.org/3/library/logging.html#levels>, or None <https://docs.python.org/3/library/constants.html#None> for the default communicator Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getFASLevels, SNESFASSetLevels <https://petsc.org/release/manualpages/SNESFAS/SNESFASSetLevels.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:545 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L545>

    setFASRScale(level, vec)
        Set the scaling factor of the restriction operator from level to level-1.

        Collective.

        See also:
            setFASRestriction, SNESFASSetRScale <https://petsc.org/release/manualpages/SNESFAS/SNESFASSetRScale.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:532 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L532>

        Parameters

            •   level (int <https://docs.python.org/3/library/functions.html#int>)

            •   vec (Vec <#petsc4py.PETSc.Vec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFASRestriction(level, mat)
        Set the Mat <#petsc4py.PETSc.Mat> to be used to apply the restriction from level-1 to level.

        Collective.

        See also:
            setFASRScale, getFASRestriction, setFASInterpolation, setFASInjection, SNESFASSetRestriction <https://petsc.org/release/manualpages/SNESFAS/SNESFASSetRestriction.html>, SNESFAS <https://petsc.org/release/manualpages/SNESFAS/SNESFAS.html>

    Source code at petsc4py/PETSc/SNES.pyx:472 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L472>

        Parameters

            •   level (int <https://docs.python.org/3/library/functions.html#int>)

            •   mat (Mat <#petsc4py.PETSc.Mat>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setForceIteration(force)
        Force solve to take at least one iteration.

        Collective.

        See also:
            SNESSetForceIteration <https://petsc.org/release/manualpages/SNES/SNESSetForceIteration.html>

    Source code at petsc4py/PETSc/SNES.pyx:1825 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1825>

        Parameters
            force (bool <https://docs.python.org/3/library/functions.html#bool>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFromOptions()
        Configure the solver from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, SNESSetFromOptions <https://petsc.org/release/manualpages/SNES/SNESSetFromOptions.html>

    Source code at petsc4py/PETSc/SNES.pyx:257 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L257>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFunction(function, f=None, args=None, kargs=None)
        Set the callback to compute the nonlinear function.

        Logically collective.

        Parameters

            •   function (SNESFunction <#petsc4py.typing.SNESFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The callback.

            •   f (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- An optional vector to store the result.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getFunction, SNESSetFunction <https://petsc.org/release/manualpages/SNES/SNESSetFunction.html>

    Source code at petsc4py/PETSc/SNES.pyx:824 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L824>

    setFunctionNorm(norm)
        Set the function norm value.

        Collective.

        This is only of use to implementers of custom SNES types.

        See also:
            getFunctionNorm, SNESSetFunctionNorm <https://petsc.org/release/manualpages/SNES/SNESSetFunctionNorm.html>

    Source code at petsc4py/PETSc/SNES.pyx:1838 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1838>

        Parameters
            norm (float <https://docs.python.org/3/library/functions.html#float>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setInitialGuess(initialguess, args=None, kargs=None)
        Set the callback to compute the initial guess.

        Logically collective.

        Parameters

            •   initialguess (SNESGuessFunction <#petsc4py.typing.SNESGuessFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getInitialGuess, SNESSetComputeInitialGuess <https://petsc.org/release/manualpages/SNES/SNESSetComputeInitialGuess.html>

    Source code at petsc4py/PETSc/SNES.pyx:781 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L781>

    setIterationNumber(its)
        Set the current iteration number.

        Collective.

        This is only of use to implementers of custom SNES types.

        See also:
            getIterationNumber, SNESSetIterationNumber <https://petsc.org/release/manualpages/SNES/SNESSetIterationNumber.html>

    Source code at petsc4py/PETSc/SNES.pyx:1796 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1796>

        Parameters
            its (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setJacobian(jacobian, J=None, P=None, args=None, kargs=None)
        Set the callback to compute the Jacobian.

        Logically collective.

        Parameters

            •   jacobian (SNESJacobianFunction <#petsc4py.typing.SNESJacobianFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The Jacobian callback.

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix to store the Jacobian.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix to construct the preconditioner.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getJacobian, SNESSetJacobian <https://petsc.org/release/manualpages/SNES/SNESSetJacobian.html>

    Source code at petsc4py/PETSc/SNES.pyx:932 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L932>

    setKSP(ksp)
        Set the linear solver that will be used by the nonlinear solver.

        Logically collective.

        See also:
            getKSP, SNESSetKSP <https://petsc.org/release/manualpages/SNES/SNESSetKSP.html>

    Source code at petsc4py/PETSc/SNES.pyx:1940 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1940>

        Parameters
            ksp (KSP <#petsc4py.PETSc.KSP>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setLineSearch(linesearch)
        Set the linesearch object to be used by this SNES.

        Logically collective.

        See also:
            getLineSearch, linesearch, SNESSetLineSearch <https://petsc.org/release/manualpages/SNES/SNESSetLineSearch.html>

    Source code at petsc4py/PETSc/SNES.pyx:2634 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2634>

        Parameters
            linesearch (SNESLineSearch <#petsc4py.PETSc.SNESLineSearch>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setLineSearchPreCheck(precheck, args=None, kargs=None)
        Set the callback that will be called before applying the linesearch.

        Logically collective.

        Parameters

            •   precheck (SNESLSPreFunction <#petsc4py.typing.SNESLSPreFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            SNESLineSearchSetPreCheck <https://petsc.org/release/manualpages/SNES/SNESLineSearchSetPreCheck.html>

    Source code at petsc4py/PETSc/SNES.pyx:747 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L747>

    setMaxFunctionEvaluations(max_funcs)
        Set the maximum allowed number of function evaluations.

        Collective.

        See also:
            getMaxFunctionEvaluations, SNESSetTolerances <https://petsc.org/release/manualpages/SNES/SNESSetTolerances.html>

    Source code at petsc4py/PETSc/SNES.pyx:1545 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1545>

        Parameters
            max_funcs (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setMaxKSPFailures(max_fails)
        Set the maximum allowed number of linear solve failures.

        Collective.

        See also:
            getMaxKSPFailures, SNESSetMaxLinearSolveFailures <https://petsc.org/release/manualpages/SNES/SNESSetMaxLinearSolveFailures.html>

    Source code at petsc4py/PETSc/SNES.pyx:1631 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1631>

        Parameters
            max_fails (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setMaxStepFailures(max_fails)
        Set the maximum allowed number of step failures.

        Collective.

        See also:
            getMaxStepFailures, SNESSetMaxNonlinearStepFailures <https://petsc.org/release/manualpages/SNES/SNESSetMaxNonlinearStepFailures.html>

    Source code at petsc4py/PETSc/SNES.pyx:1590 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1590>

        Parameters
            max_fails (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setMonitor(monitor, args=None, kargs=None)
        Set the callback used to monitor solver convergence.

        Logically collective.

        Parameters

            •   monitor (SNESMonitorFunction <#petsc4py.typing.SNESMonitorFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getMonitor, SNESMonitorSet <https://petsc.org/release/manualpages/SNES/SNESMonitorSet.html>

    Source code at petsc4py/PETSc/SNES.pyx:1462 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1462>

    setNGS(ngs, args=None, kargs=None)
        Set the callback to compute nonlinear Gauss-Seidel.

        Logically collective.

        Parameters

            •   ngs (SNESNGSFunction <#petsc4py.typing.SNESNGSFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The nonlinear Gauss-Seidel callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getNGS, computeNGS, SNESSetNGS <https://petsc.org/release/manualpages/SNES/SNESSetNGS.html>

    Source code at petsc4py/PETSc/SNES.pyx:1104 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1104>

    setNPC(snes)
        Set the nonlinear preconditioner.

        Logically collective.

        See also:
            getNPC, hasNPC, setNPCSide, getNPCSide, SNESSetNPC <https://petsc.org/release/manualpages/SNES/SNESSetNPC.html>

    Source code at petsc4py/PETSc/SNES.pyx:707 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L707>

        Parameters
            snes (SNES <#petsc4py.PETSc.SNES>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setNPCSide(side)
        Set the nonlinear preconditioning side.

        Collective.

        See also:
            setNPC, getNPC, hasNPC, getNPCSide, SNESSetNPCSide <https://petsc.org/release/manualpages/SNES/SNESSetNPCSide.html>

    Source code at petsc4py/PETSc/SNES.pyx:719 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L719>

        Parameters
            side (Side <#petsc4py.PETSc.PC.Side>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setNewtonALCorrectionType(corrtype)
        Set the correction type for SNESNEWTONAL.

        Logically collective.

        See also:
            getNewtonALLoadParameter, SNESNewtonALSetCorrectionType <https://petsc.org/release/manualpages/SNES/SNESNewtonALSetCorrectionType.html>

    Source code at petsc4py/PETSc/SNES.pyx:2702 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2702>

        Parameters
            corrtype (NewtonALCorrectionType <#petsc4py.PETSc.SNES.NewtonALCorrectionType>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setNewtonALFunction(function, args=None, kargs=None)
        Set the callback to compute the tangent load vector for SNESNEWTONAL.

        Logically collective.

        Parameters

            •   function (SNESFunction <#petsc4py.typing.SNESFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getNewtonALLoadParameter, SNESNewtonALSetFunction <https://petsc.org/release/manualpages/SNES/SNESNewtonALSetFunction.html>

    Source code at petsc4py/PETSc/SNES.pyx:2656 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2656>

    setNormSchedule(normsched)
        Set the norm schedule.

        Collective.

        See also:
            getNormSchedule, SNESSetNormSchedule <https://petsc.org/release/manualpages/SNES/SNESSetNormSchedule.html>

    Source code at petsc4py/PETSc/SNES.pyx:1269 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1269>

        Parameters
            normsched (NormSchedule <#petsc4py.PETSc.SNES.NormSchedule>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setObjective(objective, args=None, kargs=None)
        Set the callback to compute the objective function.

        Logically collective.

        Parameters

            •   objective (SNESObjFunction <#petsc4py.typing.SNESObjFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The Jacobian callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getObjective, SNESSetObjective <https://petsc.org/release/manualpages/SNES/SNESSetObjective.html>

    Source code at petsc4py/PETSc/SNES.pyx:998 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L998>

    setOptionsPrefix(prefix)
        Set the prefix used for searching for options in the database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, SNESSetOptionsPrefix <https://petsc.org/release/manualpages/SNES/SNESSetOptionsPrefix.html>

    Source code at petsc4py/PETSc/SNES.pyx:215 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L215>

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setParamsEW(version=None, rtol_0=None, rtol_max=None, gamma=None, alpha=None, alpha2=None, threshold=None)
        Set the parameters for the Eisenstat and Walker trick.

        Logically collective.

        Parameters

            •   version (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The version of the algorithm. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   rtol_0 (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The initial relative residual norm. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   rtol_max (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The maximum relative residual norm. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   gamma (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Parameter. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   alpha (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Parameter. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   alpha2 (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Parameter. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   threshold (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Parameter. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setUseEW, getParamsEW, SNESKSPSetParametersEW <https://petsc.org/release/manualpages/SNES/SNESKSPSetParametersEW.html>

    Source code at petsc4py/PETSc/SNES.pyx:2004 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2004>

    setPatchCellNumbering(sec)
        Set cell patch numbering.

        Source code at petsc4py/PETSc/SNES.pyx:2359 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2359>

        Parameters
            sec (Section <#petsc4py.PETSc.Section>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPatchComputeFunction(function, args=None, kargs=None)
        Set patch compute function.

        Source code at petsc4py/PETSc/SNES.pyx:2412 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2412>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPatchComputeOperator(operator, args=None, kargs=None)
        Set patch compute operator.

        Source code at petsc4py/PETSc/SNES.pyx:2404 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2404>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPatchConstructType(typ, operator=None, args=None, kargs=None)
        Set patch construct type.

        Source code at petsc4py/PETSc/SNES.pyx:2420 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2420>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPatchDiscretisationInfo(dms, bs, cellNodeMaps, subspaceOffsets, ghostBcNodes, globalBcNodes)
        Set patch discretisation information.

        Source code at petsc4py/PETSc/SNES.pyx:2363 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2363>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPythonContext(context)
        Set the instance of the class implementing the required Python methods.

        Not collective.

        See also:
            PETSc Python nonlinear solver type (TODO) <#petsc-python-snes>, getPythonContext

    Source code at petsc4py/PETSc/SNES.pyx:2235 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2235>

        Parameters
            context (Any <https://docs.python.org/3/library/typing.html#typing.Any>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPythonType(py_type)
        Set the fully qualified Python name of the class to be used.

        Collective.

        See also:
            PETSc Python nonlinear solver type (TODO) <#petsc-python-snes>, setPythonContext, getPythonType, SNESPythonSetType <https://petsc.org/release/manualpages/SNES/SNESPythonSetType.html>

    Source code at petsc4py/PETSc/SNES.pyx:2262 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2262>

        Parameters
            py_type (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setResetCounters(reset=True)
        Set the flag to reset the counters.

        Collective.

        See also:
            SNESSetCountersReset <https://petsc.org/release/manualpages/SNES/SNESSetCountersReset.html>

    Source code at petsc4py/PETSc/SNES.pyx:1447 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1447>

        Parameters
            reset (bool <https://docs.python.org/3/library/functions.html#bool>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setSolution(vec)
        Set the vector used to store the solution.

        Collective.

        See also:
            getSolution, SNESSetSolution <https://petsc.org/release/manualpages/SNES/SNESSetSolution.html>

    Source code at petsc4py/PETSc/SNES.pyx:1911 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1911>

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setTRTolerances(delta_min=None, delta_max=None, delta_0=None)
        Set the tolerance parameters used for the trust region.

        Logically collective.

        Parameters

            •   delta_min (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The minimum allowed trust region size. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   delta_max (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The maximum allowed trust region size. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   delta_0 (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The initial trust region size. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getTRTolerances, setTRUpdateParameters, SNESNewtonTRSetTolerances <https://petsc.org/release/manualpages/SNES/SNESNewtonTRSetTolerances.html>

    Source code at petsc4py/PETSc/SNES.pyx:326 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L326>

    setTRUpdateParameters(eta1=None, eta2=None, eta3=None, t1=None, t2=None)
        Set the update parameters used for the trust region.

        Logically collective.

        Parameters

            •   eta1 (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The step acceptance tolerance. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   eta2 (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The shrinking tolerance. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   eta3 (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The enlarging tolerance. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   t1 (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The shrinking factor. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   t2 (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The enlarging factor. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setTRTolerances, getTRUpdateParameters, SNESNewtonTRSetUpdateParameters <https://petsc.org/release/manualpages/SNES/SNESNewtonTRSetUpdateParameters.html>

    Source code at petsc4py/PETSc/SNES.pyx:377 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L377>

    setTolerances(rtol=None, atol=None, stol=None, max_it=None)
        Set the tolerance parameters used in the solver convergence tests.

        Logically collective.

        Parameters

            •   rtol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The relative norm of the residual, or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   atol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The absolute norm of the residual, or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   stol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The absolute norm of the step, or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   max_it (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The maximum allowed number of iterations, or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>. Use UNLIMITED <#petsc4py.PETSc.UNLIMITED> to have no maximum.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getTolerances, SNESSetTolerances <https://petsc.org/release/manualpages/SNES/SNESSetTolerances.html>

    Source code at petsc4py/PETSc/SNES.pyx:1172 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1172>

    setType(snes_type)
        Set the type of the solver.

        Logically collective.

        Parameters
            snes_type (Type <#petsc4py.PETSc.SNES.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of the solver.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getType, SNESSetType <https://petsc.org/release/manualpages/SNES/SNESSetType.html>

    Source code at petsc4py/PETSc/SNES.pyx:182 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L182>

    setUp()
        Set up the internal data structures for using the solver.

        Collective.

        See also:
            SNESSetUp <https://petsc.org/release/manualpages/SNES/SNESSetUp.html>

    Source code at petsc4py/PETSc/SNES.pyx:1681 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1681>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setUpMatrices()
        Ensures that matrices are available for Newton-like methods.

        Collective.

        This is only of use to implementers of custom SNES types.

        See also:
            setUp, SNESSetUpMatrices <https://petsc.org/release/manualpages/SNES/SNESSetUpMatrices.html>

    Source code at petsc4py/PETSc/SNES.pyx:1693 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1693>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setUpdate(update, args=None, kargs=None)
        Set the callback to compute update at the beginning of each step.

        Logically collective.

        Parameters

            •   update (SNESUpdateFunction <#petsc4py.typing.SNESUpdateFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getUpdate, SNESSetUpdate <https://petsc.org/release/manualpages/SNES/SNESSetUpdate.html>

    Source code at petsc4py/PETSc/SNES.pyx:889 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L889>

    setUseEW(flag=True, *targs, **kargs)
        Tell the solver to use the Eisenstat-Walker trick.

        Logically collective.

        Parameters

            •   flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether or not to use the Eisenstat-Walker trick.

            •   *targs (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- Positional arguments for setParamsEW.

            •   **kargs (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- Keyword arguments for setParamsEW.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getUseEW, setParamsEW, SNESKSPSetUseEW <https://petsc.org/release/manualpages/SNES/SNESKSPSetUseEW.html>

    Source code at petsc4py/PETSc/SNES.pyx:1967 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1967>

    setUseFD(flag=True)
        Set the boolean flag to use coloring finite-differencing for Jacobian assembly.

        Logically collective.

        See also:
            getUseFD

    Source code at petsc4py/PETSc/SNES.pyx:2137 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2137>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setUseKSP(flag=True)
        Set the boolean flag indicating to use a linear solver.

        Logically collective.

        See also:
            getUseKSP

    Source code at petsc4py/PETSc/SNES.pyx:2081 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2081>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setUseMF(flag=True)
        Set the boolean flag indicating to use matrix-free finite-differencing.

        Logically collective.

        See also:
            getUseMF

    Source code at petsc4py/PETSc/SNES.pyx:2110 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2110>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setVariableBounds(xl, xu)
        Set the vector for the variable bounds.

        Collective.

        See also:
            getVariableBounds, SNESVISetVariableBounds <https://petsc.org/release/manualpages/SNES/SNESVISetVariableBounds.html>

    Source code at petsc4py/PETSc/SNES.pyx:2166 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2166>

        Parameters

            •   xl (Vec <#petsc4py.PETSc.Vec>)

            •   xu (Vec <#petsc4py.PETSc.Vec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    solve(b=None, x=None)
        Solve the nonlinear equations.

        Collective.

        Parameters

            •   b (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The affine right-hand side or None <https://docs.python.org/3/library/constants.html#None> to use zero.

            •   x (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The starting vector or None <https://docs.python.org/3/library/constants.html#None> to use the vector stored internally.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setSolution, getSolution, SNESSolve <https://petsc.org/release/manualpages/SNES/SNESSolve.html>

    Source code at petsc4py/PETSc/SNES.pyx:1719 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L1719>

    view(viewer=None)
        View the solver.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            SNESView <https://petsc.org/release/manualpages/SNES/SNESView.html>

    Source code at petsc4py/PETSc/SNES.pyx:129 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L129>

Attributes Documentation

    appctx
        Application context.

        Source code at petsc4py/PETSc/SNES.pyx:2436 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2436>

    atol
        Absolute residual tolerance.

        Source code at petsc4py/PETSc/SNES.pyx:2517 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2517>

    dm  DM <#petsc4py.PETSc.DM>.

        Source code at petsc4py/PETSc/SNES.pyx:2446 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2446>

    history
        Convergence history.

        Source code at petsc4py/PETSc/SNES.pyx:2569 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2569>

    is_converged
        Boolean indicating if the solver has converged.

        Source code at petsc4py/PETSc/SNES.pyx:2589 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2589>

    is_diverged
        Boolean indicating if the solver has failed.

        Source code at petsc4py/PETSc/SNES.pyx:2594 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2594>

    is_iterating
        Boolean indicating if the solver has not converged yet.

        Source code at petsc4py/PETSc/SNES.pyx:2584 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2584>

    its Number of iterations.

        Source code at petsc4py/PETSc/SNES.pyx:2553 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2553>

    ksp Linear solver.

        Source code at petsc4py/PETSc/SNES.pyx:2483 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2483>

    linesearch
        The linesearch object associated with this SNES.

        Source code at petsc4py/PETSc/SNES.pyx:2646 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2646>

    max_funcs
        Maximum number of function evaluations.

        Source code at petsc4py/PETSc/SNES.pyx:2543 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2543>

    max_it
        Maximum number of iterations.

        Source code at petsc4py/PETSc/SNES.pyx:2533 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2533>

    norm
        Function norm.

        Source code at petsc4py/PETSc/SNES.pyx:2561 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2561>

    npc Nonlinear preconditioner.

        Source code at petsc4py/PETSc/SNES.pyx:2456 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2456>

    reason
        Converged reason.

        Source code at petsc4py/PETSc/SNES.pyx:2576 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2576>

    rtol
        Relative residual tolerance.

        Source code at petsc4py/PETSc/SNES.pyx:2509 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2509>

    stol
        Solution update tolerance.

        Source code at petsc4py/PETSc/SNES.pyx:2525 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2525>

    use_ew
        Use the Eisenstat-Walker trick.

        Source code at petsc4py/PETSc/SNES.pyx:2499 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2499>

    use_fd
        Boolean indicating if the solver uses coloring finite-differencing.

        Source code at petsc4py/PETSc/SNES.pyx:2609 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2609>

    use_ksp
        Boolean indicating if the solver uses a linear solver.

        Source code at petsc4py/PETSc/SNES.pyx:2491 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2491>

    use_mf
        Boolean indicating if the solver uses matrix-free finite-differencing.

        Source code at petsc4py/PETSc/SNES.pyx:2601 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2601>

    vec_rhs
        Right-hand side vector.

        Source code at petsc4py/PETSc/SNES.pyx:2476 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2476>

    vec_sol
        Solution vector.

        Source code at petsc4py/PETSc/SNES.pyx:2466 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2466>

    vec_upd
        Update vector.

        Source code at petsc4py/PETSc/SNES.pyx:2471 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2471>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.SNESLineSearch

    class petsc4py.PETSc.SNESLineSearch
        Bases: Object <#petsc4py.PETSc.Object>

        Linesearch object used by SNES solvers.

        See also:
            SNESLineSearch <https://petsc.org/release/manualpages/SNES/SNESLineSearch.html>

    Enumerations
    Type <#petsc4py.PETSc.SNESLineSearch.Type> | SNES linesearch type.

  petsc4py.PETSc.SNESLineSearch.Type

    class petsc4py.PETSc.SNESLineSearch.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        SNES linesearch type.

        See also:
            SNESLineSearchType <https://petsc.org/release/manualpages/SNES/SNESLineSearchType.html>

    Attributes Summary
    BASIC | Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BISECTION | Object BISECTION of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BT | Object BT of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CP | Object CP of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NCGLINEAR | Object NCGLINEAR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NLEQERR | Object NLEQERR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NONE | Object NONE of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SECANT | Object SECANT of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SHELL | Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

    Attributes Documentation

        BASIC: str <https://docs.python.org/3/library/stdtypes.html#str> = BASIC
            Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BISECTION: str <https://docs.python.org/3/library/stdtypes.html#str> = BISECTION
            Object BISECTION of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BT: str <https://docs.python.org/3/library/stdtypes.html#str> = BT
            Object BT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CP: str <https://docs.python.org/3/library/stdtypes.html#str> = CP
            Object CP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NCGLINEAR: str <https://docs.python.org/3/library/stdtypes.html#str> = NCGLINEAR
            Object NCGLINEAR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NLEQERR: str <https://docs.python.org/3/library/stdtypes.html#str> = NLEQERR
            Object NLEQERR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NONE: str <https://docs.python.org/3/library/stdtypes.html#str> = NONE
            Object NONE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SECANT: str <https://docs.python.org/3/library/stdtypes.html#str> = SECANT
            Object SECANT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SHELL: str <https://docs.python.org/3/library/stdtypes.html#str> = SHELL
            Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
create([comm]) | Create a new linesearch object.
destroy() | Destroy the linesearch object.
getOrder() | Return the order of the linesearch.
getTolerances() | Return the tolerance parameters used in the linesearch.
getType() | Return the type of the linesearch.
setFromOptions() | Configure the linesearch from the options database.
setOrder(order) | Set the order of the linesearch.
setTolerances([minstep, maxstep, rtol, ...]) | Set the tolerance parameters used in the linesearch.
setType(ls_type) | Set the type of the linesearch.
view([viewer]) | View the linesearch object.

Methods Documentation

    create(comm=None)
        Create a new linesearch object.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm>, optional) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            destroy, SNESLineSearchCreate <https://petsc.org/release/manualpages/SNES/SNESLineSearchCreate.html>

    Source code at petsc4py/PETSc/SNES.pyx:2751 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2751>

    destroy()
        Destroy the linesearch object.

        Collective.

        See also:
            SNESLineSearchDestroy <https://petsc.org/release/manualpages/SNES/SNESLineSearchDestroy.html>

    Source code at petsc4py/PETSc/SNES.pyx:2925 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2925>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getOrder()
        Return the order of the linesearch.

        Not collective.

        See also:
            setOrder, SNESLineSearchGetOrder <https://petsc.org/release/manualpages/SNES/SNESLineSearchGetOrder.html>

    Source code at petsc4py/PETSc/SNES.pyx:2898 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2898>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getTolerances()
        Return the tolerance parameters used in the linesearch.

        Not collective.

        Returns

            •   minstep (float <https://docs.python.org/3/library/functions.html#float>) -- Minimum step length.

            •   maxstep (float <https://docs.python.org/3/library/functions.html#float>, optional) -- Maximum step length.

            •   rtol (float <https://docs.python.org/3/library/functions.html#float>) -- Relative tolerance.

            •   atol (float <https://docs.python.org/3/library/functions.html#float>) -- Absolute tolerance.

            •   ltol (float <https://docs.python.org/3/library/functions.html#float>) -- Lambda tolerance.

            •   max_its (int <https://docs.python.org/3/library/functions.html#int>) -- Maximum number of iterations for the linesearch.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            setTolerances, SNESLineSearchGetTolerances <https://petsc.org/release/manualpages/SNES/SNESLineSearchGetTolerances.html>

    Source code at petsc4py/PETSc/SNES.pyx:2831 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2831>

    getType()
        Return the type of the linesearch.

        Not collective.

        See also:
            setType, SNESLineSearchGetType <https://petsc.org/release/manualpages/SNES/SNESLineSearchGetType.html>

    Source code at petsc4py/PETSc/SNES.pyx:2803 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2803>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    setFromOptions()
        Configure the linesearch from the options database.

        Collective.

        See also:
            SNESLineSearchSetFromOptions <https://petsc.org/release/manualpages/SNES/SNESLineSearchSetFromOptions.html>

    Source code at petsc4py/PETSc/SNES.pyx:2772 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2772>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setOrder(order)
        Set the order of the linesearch.

        Logically collective.

        See also:
            getOrder, SNESLineSearchSetOrder <https://petsc.org/release/manualpages/SNES/SNESLineSearchSetOrder.html>

    Source code at petsc4py/PETSc/SNES.pyx:2912 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2912>

        Parameters
            order (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setTolerances(minstep=None, maxstep=None, rtol=None, atol=None, ltol=None, max_its=None)
        Set the tolerance parameters used in the linesearch.

        Logically collective.

        Parameters

            •   minstep (float <https://docs.python.org/3/library/functions.html#float>) -- Minimum step length.

            •   maxstep (float <https://docs.python.org/3/library/functions.html#float>, optional) -- Maximum step length.

            •   rtol (float <https://docs.python.org/3/library/functions.html#float>, optional) -- Relative tolerance.

            •   atol (float <https://docs.python.org/3/library/functions.html#float>, optional) -- Absolute tolerance.

            •   ltol (float <https://docs.python.org/3/library/functions.html#float>, optional) -- Lambda tolerance.

            •   max_its (int <https://docs.python.org/3/library/functions.html#int>, optional) -- Maximum number of iterations for the linesearch.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getTolerances, SNESLineSearchSetTolerances <https://petsc.org/release/manualpages/SNES/SNESLineSearchSetTolerances.html>

    Source code at petsc4py/PETSc/SNES.pyx:2860 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2860>

    setType(ls_type)
        Set the type of the linesearch.

        Logically collective.

        See also:
            getType, SNESLineSearchSetType <https://petsc.org/release/manualpages/SNES/SNESLineSearchSetType.html>

    Source code at petsc4py/PETSc/SNES.pyx:2817 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2817>

        Parameters
            ls_type (Type <#petsc4py.PETSc.SNESLineSearch.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        View the linesearch object.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            SNESLineSearchView <https://petsc.org/release/manualpages/SNES/SNESLineSearchView.html>

    Source code at petsc4py/PETSc/SNES.pyx:2784 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/SNES.pyx#L2784>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Scatter

    class petsc4py.PETSc.Scatter
        Bases: Object <#petsc4py.PETSc.Object>

        Scatter object.

        The object used to perform data movement between vectors. Scatter is described in the PETSc manual <https://petsc.org/release/manual/vec.html#sec-scatter>.

        See also:
            Vec <#petsc4py.PETSc.Vec>, SF <#petsc4py.PETSc.SF>, VecScatter <https://petsc.org/release/manualpages/PetscSF/VecScatter.html>

    Enumerations
    Mode <#petsc4py.PETSc.Scatter.Mode> | Scatter mode.
    Type <#petsc4py.PETSc.Scatter.Type> | Scatter type.

  petsc4py.PETSc.Scatter.Mode

    class petsc4py.PETSc.Scatter.Mode
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Scatter mode.

        Most commonly used scatter modes are:

        FORWARD
            Scatter values in the forward direction.

        REVERSE
            Scatter values in the reverse direction.

    See also:
            Scatter.create <#petsc4py.PETSc.Scatter.create>, Scatter.begin <#petsc4py.PETSc.Scatter.begin>, Scatter.end <#petsc4py.PETSc.Scatter.end>, ScatterMode <https://petsc.org/release/manualpages/Vec/ScatterMode.html>

    Attributes Summary
    FORWARD | Constant FORWARD of type int <https://docs.python.org/3/library/functions.html#int>
    FORWARD_LOCAL | Constant FORWARD_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>
    REVERSE | Constant REVERSE of type int <https://docs.python.org/3/library/functions.html#int>
    REVERSE_LOCAL | Constant REVERSE_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>
    SCATTER_FORWARD | Constant SCATTER_FORWARD of type int <https://docs.python.org/3/library/functions.html#int>
    SCATTER_FORWARD_LOCAL | Constant SCATTER_FORWARD_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>
    SCATTER_REVERSE | Constant SCATTER_REVERSE of type int <https://docs.python.org/3/library/functions.html#int>
    SCATTER_REVERSE_LOCAL | Constant SCATTER_REVERSE_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        FORWARD: int <https://docs.python.org/3/library/functions.html#int> = FORWARD
            Constant FORWARD of type int <https://docs.python.org/3/library/functions.html#int>

        FORWARD_LOCAL: int <https://docs.python.org/3/library/functions.html#int> = FORWARD_LOCAL
            Constant FORWARD_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

        REVERSE: int <https://docs.python.org/3/library/functions.html#int> = REVERSE
            Constant REVERSE of type int <https://docs.python.org/3/library/functions.html#int>

        REVERSE_LOCAL: int <https://docs.python.org/3/library/functions.html#int> = REVERSE_LOCAL
            Constant REVERSE_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

        SCATTER_FORWARD: int <https://docs.python.org/3/library/functions.html#int> = SCATTER_FORWARD
            Constant SCATTER_FORWARD of type int <https://docs.python.org/3/library/functions.html#int>

        SCATTER_FORWARD_LOCAL: int <https://docs.python.org/3/library/functions.html#int> = SCATTER_FORWARD_LOCAL
            Constant SCATTER_FORWARD_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

        SCATTER_REVERSE: int <https://docs.python.org/3/library/functions.html#int> = SCATTER_REVERSE
            Constant SCATTER_REVERSE of type int <https://docs.python.org/3/library/functions.html#int>

        SCATTER_REVERSE_LOCAL: int <https://docs.python.org/3/library/functions.html#int> = SCATTER_REVERSE_LOCAL
            Constant SCATTER_REVERSE_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Scatter.Type

    class petsc4py.PETSc.Scatter.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Scatter type.

        See also:
            VecScatterType <https://petsc.org/release/manualpages/PetscSF/VecScatterType.html>

    Attributes Summary
    ALLGATHER | Object ALLGATHER of type str <https://docs.python.org/3/library/stdtypes.html#str>
    ALLGATHERV | Object ALLGATHERV of type str <https://docs.python.org/3/library/stdtypes.html#str>
    ALLTOALL | Object ALLTOALL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BASIC | Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>
    GATHER | Object GATHER of type str <https://docs.python.org/3/library/stdtypes.html#str>
    GATHERV | Object GATHERV of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NEIGHBOR | Object NEIGHBOR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    WINDOW | Object WINDOW of type str <https://docs.python.org/3/library/stdtypes.html#str>

    Attributes Documentation

        ALLGATHER: str <https://docs.python.org/3/library/stdtypes.html#str> = ALLGATHER
            Object ALLGATHER of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ALLGATHERV: str <https://docs.python.org/3/library/stdtypes.html#str> = ALLGATHERV
            Object ALLGATHERV of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ALLTOALL: str <https://docs.python.org/3/library/stdtypes.html#str> = ALLTOALL
            Object ALLTOALL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BASIC: str <https://docs.python.org/3/library/stdtypes.html#str> = BASIC
            Object BASIC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GATHER: str <https://docs.python.org/3/library/stdtypes.html#str> = GATHER
            Object GATHER of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GATHERV: str <https://docs.python.org/3/library/stdtypes.html#str> = GATHERV
            Object GATHERV of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NEIGHBOR: str <https://docs.python.org/3/library/stdtypes.html#str> = NEIGHBOR
            Object NEIGHBOR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        WINDOW: str <https://docs.python.org/3/library/stdtypes.html#str> = WINDOW
            Object WINDOW of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
begin(vec_from, vec_to[, addv, mode]) | Begin a generalized scatter from one vector into another.
copy() | Return a copy of the scatter.
create(vec_from, is_from, vec_to, is_to) | Create a scatter object.
destroy() | Destroy the scatter.
end(vec_from, vec_to[, addv, mode]) | Complete a generalized scatter from one vector into another.
getType() | Return the type of the scatter.
scatter(vec_from, vec_to[, addv, mode]) | Perform a generalized scatter from one vector into another.
setFromOptions() | Configure the scatter from the options database.
setType(scatter_type) | Set the type of the scatter.
setUp() | Set up the internal data structures for using the scatter.
toAll(vec) | Create a scatter that communicates a vector to all sharing processes.
toZero(vec) | Create a scatter that communicates a vector to rank zero.
view([viewer]) | View the scatter.

Methods Documentation

    begin(vec_from, vec_to, addv=None, mode=None)
        Begin a generalized scatter from one vector into another.

        Collective.

        This call has to be concluded with a call to end. For additional details on the Parameters, see scatter.

        See also:
            create, end, VecScatterBegin <https://petsc.org/release/manualpages/Vec/VecScatterBegin.html>

    Source code at petsc4py/PETSc/Scatter.pyx:262 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L262>

        Parameters

            •   vec_from (Vec <#petsc4py.PETSc.Vec>)

            •   vec_to (Vec <#petsc4py.PETSc.Vec>)

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>)

            •   mode (ScatterModeSpec <#petsc4py.typing.ScatterModeSpec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    copy()
        Return a copy of the scatter.

        Source code at petsc4py/PETSc/Scatter.pyx:199 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L199>

        Return type
            Scatter <#petsc4py.PETSc.Scatter>

    create(vec_from, is_from, vec_to, is_to)
        Create a scatter object.

        Collective.

        Parameters

            •   vec_from (Vec <#petsc4py.PETSc.Vec>) -- Representative vector from which to scatter the data.

            •   is_from (IS <#petsc4py.PETSc.IS>) -- Indices of vec_from to scatter. If None <https://docs.python.org/3/library/constants.html#None>, use all indices.

            •   vec_to (Vec <#petsc4py.PETSc.Vec>) -- Representative vector to which scatter the data.

            •   is_to (IS <#petsc4py.PETSc.IS>) -- Indices of vec_to where to receive. If None <https://docs.python.org/3/library/constants.html#None>, use all indices.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Examples

    The scatter object can be used to repeatedly perform data movement. It is the PETSc equivalent of NumPy-like indexing and slicing, with support for parallel communications:

        >>> revmode = PETSc.Scatter.Mode.REVERSE
        >>> v1 = PETSc.Vec().createWithArray([1, 2, 3])
        >>> v2 = PETSc.Vec().createWithArray([0, 0, 0])
        >>> sct = PETSc.Scatter().create(v1,None,v2,None)
        >>> sct.scatter(v1,v2) # v2[:] = v1[:]
        >>> sct.scatter(v2,v1,mode=revmode) # v1[:] = v2[:]

        >>> revmode = PETSc.Scatter.Mode.REVERSE
        >>> v1 = PETSc.Vec().createWithArray([1, 2, 3, 4])
        >>> v2 = PETSc.Vec().createWithArray([0, 0])
        >>> is1 = PETSc.IS().createStride(2, 3, -2)
        >>> sct = PETSc.Scatter().create(v1,is1,v2,None)
        >>> sct.scatter(v1,v2) # v2[:] = v1[3:0:-2]
        >>> sct.scatter(v2,v1,mode=revmode) # v1[3:0:-2] = v2[:]

    See also:
            IS <#petsc4py.PETSc.IS>, VecScatterCreate <https://petsc.org/release/manualpages/Vec/VecScatterCreate.html>

    Source code at petsc4py/PETSc/Scatter.pyx:90 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L90>

    destroy()
        Destroy the scatter.

        Collective.

        See also:
            VecScatterDestroy <https://petsc.org/release/manualpages/Vec/VecScatterDestroy.html>

    Source code at petsc4py/PETSc/Scatter.pyx:77 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L77>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    end(vec_from, vec_to, addv=None, mode=None)
        Complete a generalized scatter from one vector into another.

        Collective.

        This call has to be preceded by a call to begin. For additional details on the Parameters, see scatter.

        See also:
            create, begin, VecScatterEnd <https://petsc.org/release/manualpages/Vec/VecScatterEnd.html>

    Source code at petsc4py/PETSc/Scatter.pyx:285 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L285>

        Parameters

            •   vec_from (Vec <#petsc4py.PETSc.Vec>)

            •   vec_to (Vec <#petsc4py.PETSc.Vec>)

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>)

            •   mode (ScatterModeSpec <#petsc4py.typing.ScatterModeSpec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    getType()
        Return the type of the scatter.

        Not collective.

        See also:
            setType, VecScatterGetType <https://petsc.org/release/manualpages/Vec/VecScatterGetType.html>

    Source code at petsc4py/PETSc/Scatter.pyx:160 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L160>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    scatter(vec_from, vec_to, addv=None, mode=None)
        Perform a generalized scatter from one vector into another.

        Collective.

        Parameters

            •   vec_from (Vec <#petsc4py.PETSc.Vec>) -- The source vector.

            •   vec_to (Vec <#petsc4py.PETSc.Vec>) -- The destination vector.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

            •   mode (ScatterModeSpec <#petsc4py.typing.ScatterModeSpec>) -- Scatter mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            create, begin, end, VecScatterBegin <https://petsc.org/release/manualpages/Vec/VecScatterBegin.html>, VecScatterEnd <https://petsc.org/release/manualpages/Vec/VecScatterEnd.html>

    Source code at petsc4py/PETSc/Scatter.pyx:308 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L308>

    setFromOptions()
        Configure the scatter from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, VecScatterSetFromOptions <https://petsc.org/release/manualpages/Vec/VecScatterSetFromOptions.html>

    Source code at petsc4py/PETSc/Scatter.pyx:174 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L174>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setType(scatter_type)
        Set the type of the scatter.

        Logically collective.

        See also:
            getType, VecScatterSetType <https://petsc.org/release/manualpages/Vec/VecScatterSetType.html>

    Source code at petsc4py/PETSc/Scatter.pyx:146 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L146>

        Parameters
            scatter_type (Type <#petsc4py.PETSc.Scatter.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setUp()
        Set up the internal data structures for using the scatter.

        Collective.

        See also:
            VecScatterSetUp <https://petsc.org/release/manualpages/Vec/VecScatterSetUp.html>

    Source code at petsc4py/PETSc/Scatter.pyx:186 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L186>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    classmethod toAll(vec)
        Create a scatter that communicates a vector to all sharing processes.

        Collective.

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>) -- The vector to scatter from.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Scatter <#petsc4py.PETSc.Scatter>, Vec <#petsc4py.PETSc.Vec>]

    Notes

    The created scatter will have the same communicator of vec. The method also returns an output vector of appropriate size to contain the result of the operation.

    See also:
            toZero, VecScatterCreateToAll <https://petsc.org/release/manualpages/Vec/VecScatterCreateToAll.html>

    Source code at petsc4py/PETSc/Scatter.pyx:205 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L205>

    classmethod toZero(vec)
        Create a scatter that communicates a vector to rank zero.

        Collective.

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>) -- The vector to scatter from.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Scatter <#petsc4py.PETSc.Scatter>, Vec <#petsc4py.PETSc.Vec>]

    Notes

    The created scatter will have the same communicator of vec. The method also returns an output vector of appropriate size to contain the result of the operation.

    See also:
            toAll, VecScatterCreateToZero <https://petsc.org/release/manualpages/Vec/VecScatterCreateToZero.html>

    Source code at petsc4py/PETSc/Scatter.pyx:233 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L233>

    view(viewer=None)
        View the scatter.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            VecScatterView <https://petsc.org/release/manualpages/Vec/VecScatterView.html>

    Source code at petsc4py/PETSc/Scatter.pyx:58 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Scatter.pyx#L58>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.ScatterMode

    class petsc4py.PETSc.ScatterMode
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Scatter mode.

        Most commonly used scatter modes are:

        FORWARD
            Scatter values in the forward direction.

        REVERSE
            Scatter values in the reverse direction.

    See also:
            Scatter.create <#petsc4py.PETSc.Scatter.create>, Scatter.begin <#petsc4py.PETSc.Scatter.begin>, Scatter.end <#petsc4py.PETSc.Scatter.end>, ScatterMode <https://petsc.org/release/manualpages/Vec/ScatterMode.html>

    Attributes Summary
    FORWARD | Constant FORWARD of type int <https://docs.python.org/3/library/functions.html#int>
    FORWARD_LOCAL | Constant FORWARD_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>
    REVERSE | Constant REVERSE of type int <https://docs.python.org/3/library/functions.html#int>
    REVERSE_LOCAL | Constant REVERSE_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>
    SCATTER_FORWARD | Constant SCATTER_FORWARD of type int <https://docs.python.org/3/library/functions.html#int>
    SCATTER_FORWARD_LOCAL | Constant SCATTER_FORWARD_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>
    SCATTER_REVERSE | Constant SCATTER_REVERSE of type int <https://docs.python.org/3/library/functions.html#int>
    SCATTER_REVERSE_LOCAL | Constant SCATTER_REVERSE_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        FORWARD: int <https://docs.python.org/3/library/functions.html#int> = FORWARD
            Constant FORWARD of type int <https://docs.python.org/3/library/functions.html#int>

        FORWARD_LOCAL: int <https://docs.python.org/3/library/functions.html#int> = FORWARD_LOCAL
            Constant FORWARD_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

        REVERSE: int <https://docs.python.org/3/library/functions.html#int> = REVERSE
            Constant REVERSE of type int <https://docs.python.org/3/library/functions.html#int>

        REVERSE_LOCAL: int <https://docs.python.org/3/library/functions.html#int> = REVERSE_LOCAL
            Constant REVERSE_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

        SCATTER_FORWARD: int <https://docs.python.org/3/library/functions.html#int> = SCATTER_FORWARD
            Constant SCATTER_FORWARD of type int <https://docs.python.org/3/library/functions.html#int>

        SCATTER_FORWARD_LOCAL: int <https://docs.python.org/3/library/functions.html#int> = SCATTER_FORWARD_LOCAL
            Constant SCATTER_FORWARD_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

        SCATTER_REVERSE: int <https://docs.python.org/3/library/functions.html#int> = SCATTER_REVERSE
            Constant SCATTER_REVERSE of type int <https://docs.python.org/3/library/functions.html#int>

        SCATTER_REVERSE_LOCAL: int <https://docs.python.org/3/library/functions.html#int> = SCATTER_REVERSE_LOCAL
            Constant SCATTER_REVERSE_LOCAL of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Section

    class petsc4py.PETSc.Section
        Bases: Object <#petsc4py.PETSc.Object>

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

        Methods Summary
        addConstraintDof(point, numDof) | Increment the number of constrained DOFs for a given point.
        addDof(point, numDof) | Add numDof degrees of freedom associated with a given point.
        addFieldConstraintDof(point, field, numDof) | Add numDof constrained DOFs for a given field on a point.
        addFieldDof(point, field, numDof) | Add numDof DOFs associated with a field on a given point.
        clone() | Return a copy of the section.
        create([comm]) | Allocate a section and set the map contents to the default.
        createGlobalSection(sf) | Create a section describing the global field layout.
        destroy() | Destroy a section.
        getChart() | Return the range in which points (indices) lie for this section.
        getConstrainedStorageSize() | Return the size capable of holding all unconstrained DOFs in a section.
        getConstraintDof(point) | Return the number of constrained DOFs associated with a given point.
        getConstraintIndices(point) | Return the point DOFs numbers which are constrained for a given point.
        getDof(point) | Return the number of degrees of freedom for a given point.
        getFieldComponents(field) | Return the number of field components for the given field.
        getFieldConstraintDof(point, field) | Return the number of constrained DOFs for a given field on a point.
        getFieldConstraintIndices(point, field) | Return the field DOFs numbers, in [0, DOFs), which are constrained.
        getFieldDof(point, field) | Return the number of DOFs associated with a field on a given point.
        getFieldName(field) | Return the name of a field in the section.
        getFieldOffset(point, field) | Return the offset for the field DOFs on the given point.
        getMaxDof() | Return the maximum number of DOFs for any point in the section.
        getNumFields() | Return the number of fields in a section.
        getOffset(point) | Return the offset for the DOFs associated with the given point.
        getOffsetRange() | Return the full range of offsets, [start, end), for a section.
        getPermutation() | Return the permutation that was set with setPermutation.
        getStorageSize() | Return the size capable of holding all the DOFs defined in a section.
        reset() | Free all section data.
        setChart(pStart, pEnd) | Set the range in which points (indices) lie for this section.
        setConstraintDof(point, numDof) | Set the number of constrained DOFs associated with a given point.
        setConstraintIndices(point, indices) | Set the point DOFs numbers, in [0, DOFs), which are constrained.
        setDof(point, numDof) | Set the number of degrees of freedom associated with a given point.
        setFieldComponents(field, numComp) | Set the number of field components for the given field.
        setFieldConstraintDof(point, field, numDof) | Set the number of constrained DOFs for a given field on a point.
        setFieldConstraintIndices(point, field, indices) | Set the field DOFs numbers, in [0, DOFs), which are constrained.
        setFieldDof(point, field, numDof) | Set the number of DOFs associated with a field on a given point.
        setFieldName(field, fieldName) | Set the name of a field in the section.
        setFieldOffset(point, field, offset) | Set the offset for the DOFs on the given field at a point.
        setNumFields(numFields) | Set the number of fields in a section.
        setOffset(point, offset) | Set the offset for the DOFs associated with the given point.
        setPermutation(perm) | Set the permutation for [0, pEnd - pStart).
        setUp() | Calculate offsets.
        view([viewer]) | View the section.

        Methods Documentation

        addConstraintDof(point, numDof)
            Increment the number of constrained DOFs for a given point.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   numDof (int <https://docs.python.org/3/library/functions.html#int>) -- The number of additional DOFs which are fixed by constraints.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                setConstraintDof, getConstraintDof, PetscSectionAddConstraintDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionAddConstraintDof.html>

        Source code at petsc4py/PETSc/Section.pyx:485 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L485>

        addDof(point, numDof)
            Add numDof degrees of freedom associated with a given point.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   numDof (int <https://docs.python.org/3/library/functions.html#int>) -- The number of additional DOFs.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                setDof, getDof, PetscSectionAddDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionAddDof.html>

        Source code at petsc4py/PETSc/Section.pyx:354 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L354>

        addFieldConstraintDof(point, field, numDof)
            Add numDof constrained DOFs for a given field on a point.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field.

                •   numDof (int <https://docs.python.org/3/library/functions.html#int>) -- The number of additional DOFs which are fixed by constraints.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                setFieldConstraintDof, getFieldConstraintDof, PetscSectionAddFieldConstraintDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionAddFieldConstraintDof.html>

        Source code at petsc4py/PETSc/Section.pyx:557 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L557>

        addFieldDof(point, field, numDof)
            Add numDof DOFs associated with a field on a given point.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field.

                •   numDof (int <https://docs.python.org/3/library/functions.html#int>) -- The number of additional DOFs.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                setFieldDof, getFieldDof, PetscSectionAddFieldDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionAddFieldDof.html>

        Source code at petsc4py/PETSc/Section.pyx:421 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L421>

        clone()
            Return a copy of the section.

            Collective.

            The copy is shallow, if possible.

            See also:
                PetscSectionClone <https://petsc.org/release/manualpages/PetscSection/PetscSectionClone.html>

        Source code at petsc4py/PETSc/Section.pyx:80 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L80>

            Return type
                Section <#petsc4py.PETSc.Section>

        create(comm=None)
            Allocate a section and set the map contents to the default.

            Collective.

            Typical calling sequence: - create - setNumFields - setChart - setDof - setUp - getOffset - destroy

            The Section object and methods are intended to be used in the PETSc Vec and Mat implementations. The indices returned by the Section are appropriate for the kind of Vec <#petsc4py.PETSc.Vec> it is associated with. For example, if the vector being indexed is a local vector, we call the section a local section. If the section indexes a global vector, we call it a global section. For parallel vectors, like global vectors, we use negative indices to indicate DOFs owned by other processes.

            Parameters
                comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                PetscSectionCreate <https://petsc.org/release/manualpages/PetscSection/PetscSectionCreate.html>

        Source code at petsc4py/PETSc/Section.pyx:42 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L42>

        createGlobalSection(sf)
            Create a section describing the global field layout.

            Collective.

            The section describes the global field layout using the local section and an SF <#petsc4py.PETSc.SF> describing the section point overlap.

            If we have a set of local sections defining the layout of a set of local vectors, and also an SF <#petsc4py.PETSc.SF> to determine which section points are shared and the ownership, we can calculate a global section defining the parallel data layout, and the associated global vector.

            This gives negative sizes and offsets to points not owned by this process.

            includeConstraints and localOffsets parameters of the C API are always set to False <https://docs.python.org/3/library/constants.html#False>.

            Parameters
                sf (SF <#petsc4py.PETSc.SF>) -- The SF <#petsc4py.PETSc.SF> describing the parallel layout of the section points (leaves are unowned local points).

            Return type
                Section <#petsc4py.PETSc.Section>

        See also:
                PetscSectionCreateGlobalSection <https://petsc.org/release/manualpages/PetscSection/PetscSectionCreateGlobalSection.html>

        Source code at petsc4py/PETSc/Section.pyx:846 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L846>

        destroy()
            Destroy a section.

            Not collective.

            See also:
                PetscSectionDestroy <https://petsc.org/release/manualpages/PetscSection/PetscSectionDestroy.html>

        Source code at petsc4py/PETSc/Section.pyx:29 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L29>

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        getChart()
            Return the range in which points (indices) lie for this section.

            Not collective.

            The range is [pStart, pEnd), i.e., from the first point to one past the last point.

            See also:
                PetscSectionGetChart <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetChart.html>

        Source code at petsc4py/PETSc/Section.pyx:238 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L238>

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        getConstrainedStorageSize()
            Return the size capable of holding all unconstrained DOFs in a section.

            Not collective.

            See also:
                getStorageSize, PetscSectionGetConstrainedStorageSize <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetConstrainedStorageSize.html>

        Source code at petsc4py/PETSc/Section.pyx:720 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L720>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getConstraintDof(point)
            Return the number of constrained DOFs associated with a given point.

            Not collective.

            Parameters
                point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                setConstraintDof, PetscSectionGetConstraintDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetConstraintDof.html>

        Source code at petsc4py/PETSc/Section.pyx:445 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L445>

        getConstraintIndices(point)
            Return the point DOFs numbers which are constrained for a given point.

            Not collective.

            The range is in [0, DOFs).

            Parameters
                point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

            Return type
                ArrayInt <#petsc4py.typing.ArrayInt>

        See also:
                setConstraintIndices, PetscSectionGetConstraintIndices <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetConstraintIndices.html>

        Source code at petsc4py/PETSc/Section.pyx:586 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L586>

        getDof(point)
            Return the number of degrees of freedom for a given point.

            Not collective.

            In a global section, this value will be negative for points not owned by this process.

            Parameters
                point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                setDof, addDof, PetscSectionGetDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetDof.html>

        Source code at petsc4py/PETSc/Section.pyx:311 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L311>

        getFieldComponents(field)
            Return the number of field components for the given field.

            Not collective.

            Parameters
                field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                setFieldComponents, PetscSectionGetFieldComponents <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetFieldComponents.html>

        Source code at petsc4py/PETSc/Section.pyx:198 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L198>

        getFieldConstraintDof(point, field)
            Return the number of constrained DOFs for a given field on a point.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                setFieldConstraintDof, PetscSectionGetFieldConstraintDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetFieldConstraintDof.html>

        Source code at petsc4py/PETSc/Section.pyx:506 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L506>

        getFieldConstraintIndices(point, field)
            Return the field DOFs numbers, in [0, DOFs), which are constrained.

            Not collective.

            The constrained DOFs are sorted in ascending order.

            Parameters

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

            Return type
                ArrayInt <#petsc4py.typing.ArrayInt>

        See also:
                setFieldConstraintIndices, PetscSectionGetFieldConstraintIndices <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetFieldConstraintIndices.html>

        Source code at petsc4py/PETSc/Section.pyx:634 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L634>

        getFieldDof(point, field)
            Return the number of DOFs associated with a field on a given point.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                setFieldDof, PetscSectionGetFieldDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetFieldDof.html>

        Source code at petsc4py/PETSc/Section.pyx:375 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L375>

        getFieldName(field)
            Return the name of a field in the section.

            Not collective.

            Parameters
                field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        See also:
                setFieldName, PetscSectionGetFieldName <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetFieldName.html>

        Source code at petsc4py/PETSc/Section.pyx:156 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L156>

        getFieldOffset(point, field)
            Return the offset for the field DOFs on the given point.

            Not collective.

            In a global section, this offset will be negative for points not owned by this process.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                setFieldOffset, PetscSectionGetFieldOffset <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetFieldOffset.html>

        Source code at petsc4py/PETSc/Section.pyx:779 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L779>

        getMaxDof()
            Return the maximum number of DOFs for any point in the section.

            Not collective.

            See also:
                PetscSectionGetMaxDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetMaxDof.html>

        Source code at petsc4py/PETSc/Section.pyx:692 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L692>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getNumFields()
            Return the number of fields in a section.

            Not collective.

            Returns 0 if no fields were defined.

            See also:
                setNumFields, PetscSectionGetNumFields <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetNumFields.html>

        Source code at petsc4py/PETSc/Section.pyx:122 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L122>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        getOffset(point)
            Return the offset for the DOFs associated with the given point.

            Not collective.

            In a global section, this offset will be negative for points not owned by this process.

            Parameters
                point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        See also:
                setOffset, PetscSectionGetOffset <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetOffset.html>

        Source code at petsc4py/PETSc/Section.pyx:734 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L734>

        getOffsetRange()
            Return the full range of offsets, [start, end), for a section.

            Not collective.

            See also:
                PetscSectionGetOffsetRange <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetOffsetRange.html>

        Source code at petsc4py/PETSc/Section.pyx:831 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L831>

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        getPermutation()
            Return the permutation that was set with setPermutation.

            Not collective.

            See also:
                setPermutation, PetscSectionGetPermutation <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetPermutation.html>

        Source code at petsc4py/PETSc/Section.pyx:279 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L279>

            Return type
                IS <#petsc4py.PETSc.IS>

        getStorageSize()
            Return the size capable of holding all the DOFs defined in a section.

            Not collective.

            See also:
                getConstrainedStorageSize, PetscSectionGetStorageSize <https://petsc.org/release/manualpages/PetscSection/PetscSectionGetStorageSize.html>

        Source code at petsc4py/PETSc/Section.pyx:706 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L706>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        reset()
            Free all section data.

            Not collective.

            See also:
                PetscSectionReset <https://petsc.org/release/manualpages/PetscSection/PetscSectionReset.html>

        Source code at petsc4py/PETSc/Section.pyx:110 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L110>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setChart(pStart, pEnd)
            Set the range in which points (indices) lie for this section.

            Not collective.

            The range is [pStart, pEnd), i.e., from the first point to one past the last point.

            Parameters

                •   pStart (int <https://docs.python.org/3/library/functions.html#int>) -- The first point.

                •   pEnd (int <https://docs.python.org/3/library/functions.html#int>) -- One past the last point.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscSectionSetChart <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetChart.html>

        Source code at petsc4py/PETSc/Section.pyx:255 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L255>

        setConstraintDof(point, numDof)
            Set the number of constrained DOFs associated with a given point.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   numDof (int <https://docs.python.org/3/library/functions.html#int>) -- The number of DOFs which are fixed by constraints.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getConstraintDof, addConstraintDof, PetscSectionSetConstraintDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetConstraintDof.html>

        Source code at petsc4py/PETSc/Section.pyx:464 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L464>

        setConstraintIndices(point, indices)
            Set the point DOFs numbers, in [0, DOFs), which are constrained.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- The constrained DOFs.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getConstraintIndices, PetscSectionSetConstraintIndices <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetConstraintIndices.html>

        Source code at petsc4py/PETSc/Section.pyx:610 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L610>

        setDof(point, numDof)
            Set the number of degrees of freedom associated with a given point.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   numDof (int <https://docs.python.org/3/library/functions.html#int>) -- The number of DOFs.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getDof, addDof, PetscSectionSetDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetDof.html>

        Source code at petsc4py/PETSc/Section.pyx:333 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L333>

        setFieldComponents(field, numComp)
            Set the number of field components for the given field.

            Not collective.

            Parameters

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

                •   numComp (int <https://docs.python.org/3/library/functions.html#int>) -- The number of field components.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getFieldComponents, PetscSectionSetFieldComponents <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetFieldComponents.html>

        Source code at petsc4py/PETSc/Section.pyx:217 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L217>

        setFieldConstraintDof(point, field, numDof)
            Set the number of constrained DOFs for a given field on a point.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field.

                •   numDof (int <https://docs.python.org/3/library/functions.html#int>) -- The number of DOFs which are fixed by constraints.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getFieldConstraintDof, addFieldConstraintDof, PetscSectionSetFieldConstraintDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetFieldConstraintDof.html>

        Source code at petsc4py/PETSc/Section.pyx:528 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L528>

        setFieldConstraintIndices(point, field, indices)
            Set the field DOFs numbers, in [0, DOFs), which are constrained.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

                •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- The constrained DOFs.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getFieldConstraintIndices, PetscSectionSetFieldConstraintIndices <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetFieldConstraintIndices.html>

        Source code at petsc4py/PETSc/Section.pyx:661 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L661>

        setFieldDof(point, field, numDof)
            Set the number of DOFs associated with a field on a given point.

            Not collective.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field.

                •   numDof (int <https://docs.python.org/3/library/functions.html#int>) -- The number of DOFs.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getFieldDof, addFieldDof, PetscSectionSetFieldDof <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetFieldDof.html>

        Source code at petsc4py/PETSc/Section.pyx:397 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L397>

        setFieldName(field, fieldName)
            Set the name of a field in the section.

            Not collective.

            Parameters

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field number.

                •   fieldName (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The field name.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getFieldName, PetscSectionSetFieldName <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetFieldName.html>

        Source code at petsc4py/PETSc/Section.pyx:176 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L176>

        setFieldOffset(point, field, offset)
            Set the offset for the DOFs on the given field at a point.

            Not collective.

            The user usually does not call this function, but uses setUp.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   field (int <https://docs.python.org/3/library/functions.html#int>) -- The field.

                •   offset (int <https://docs.python.org/3/library/functions.html#int>) -- The offset.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getFieldOffset, PetscSectionSetFieldOffset <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetFieldOffset.html>

        Source code at petsc4py/PETSc/Section.pyx:805 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L805>

        setNumFields(numFields)
            Set the number of fields in a section.

            Not collective.

            Parameters
                numFields (int <https://docs.python.org/3/library/functions.html#int>) -- The number of fields.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getNumFields, PetscSectionSetNumFields <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetNumFields.html>

        Source code at petsc4py/PETSc/Section.pyx:138 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L138>

        setOffset(point, offset)
            Set the offset for the DOFs associated with the given point.

            Not collective.

            The user usually does not call this function, but uses setUp.

            Parameters

                •   point (int <https://docs.python.org/3/library/functions.html#int>) -- The point.

                •   offset (int <https://docs.python.org/3/library/functions.html#int>) -- The offset.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getOffset, PetscSectionSetOffset <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetOffset.html>

        Source code at petsc4py/PETSc/Section.pyx:756 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L756>

        setPermutation(perm)
            Set the permutation for [0, pEnd - pStart).

            Not collective.

            Parameters
                perm (IS <#petsc4py.PETSc.IS>) -- The permutation of points.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getPermutation, PetscSectionSetPermutation <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetPermutation.html>

        Source code at petsc4py/PETSc/Section.pyx:294 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L294>

        setUp()
            Calculate offsets.

            Not collective.

            Offsets are based on the number of degrees of freedom for each point.

            See also:
                PetscSectionSetUp <https://petsc.org/release/manualpages/PetscSection/PetscSectionSetUp.html>

        Source code at petsc4py/PETSc/Section.pyx:96 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L96>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        view(viewer=None)
            View the section.

            Collective.

            Parameters
                viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> to display the section.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscSectionView <https://petsc.org/release/manualpages/PetscSection/PetscSectionView.html>

        Source code at petsc4py/PETSc/Section.pyx:10 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Section.pyx#L10>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Space

    class petsc4py.PETSc.Space
        Bases: Object <#petsc4py.PETSc.Object>

        Function space object.

        Enumerations
        Type <#petsc4py.PETSc.Space.Type> | The function space types.

  petsc4py.PETSc.Space.Type

    class petsc4py.PETSc.Space.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The function space types.

        Attributes Summary
        POINT | Object POINT of type str <https://docs.python.org/3/library/stdtypes.html#str>
        POLYNOMIAL | Object POLYNOMIAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PTRIMMED | Object PTRIMMED of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SUBSPACE | Object SUBSPACE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SUM | Object SUM of type str <https://docs.python.org/3/library/stdtypes.html#str>
        TENSOR | Object TENSOR of type str <https://docs.python.org/3/library/stdtypes.html#str>
        WXY | Object WXY of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        POINT: str <https://docs.python.org/3/library/stdtypes.html#str> = POINT
            Object POINT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        POLYNOMIAL: str <https://docs.python.org/3/library/stdtypes.html#str> = POLYNOMIAL
            Object POLYNOMIAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PTRIMMED: str <https://docs.python.org/3/library/stdtypes.html#str> = PTRIMMED
            Object PTRIMMED of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SUBSPACE: str <https://docs.python.org/3/library/stdtypes.html#str> = SUBSPACE
            Object SUBSPACE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SUM: str <https://docs.python.org/3/library/stdtypes.html#str> = SUM
            Object SUM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        TENSOR: str <https://docs.python.org/3/library/stdtypes.html#str> = TENSOR
            Object TENSOR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        WXY: str <https://docs.python.org/3/library/stdtypes.html#str> = WXY
            Object WXY of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
create([comm]) | Create an empty Space object.
destroy() | Destroy the Space object.
getDegree() | Return the polynomial degrees that characterize this space.
getDimension() | Return the number of basis vectors.
getNumComponents() | Return the number of components for this space.
getNumVariables() | Return the number of variables for this space.
getPTrimmedFormDegree() | Return the form degree of the trimmed polynomials.
getPointPoints() | Return the evaluation points for the space as the points of a quad.
getPolynomialTensor() | Return whether a function space is a space of tensor polynomials.
getSumConcatenate() | Return the concatenate flag for this space.
getSumNumSubspaces() | Return the number of spaces in the sum.
getSumSubspace(s) | Return a space in the sum.
getTensorNumSubspaces() | Return the number of spaces in the tensor product.
getTensorSubspace(s) | Return a space in the tensor product.
getType() | Return the type of the space object.
setDegree(degree, maxDegree) | Set the degree of approximation for this space.
setFromOptions() | Set parameters in Space from the options database.
setNumComponents(nc) | Set the number of components for this space.
setNumVariables(n) | Set the number of variables for this space.
setPTrimmedFormDegree(formDegree) | Set the form degree of the trimmed polynomials.
setPointPoints(quad) | Set the evaluation points for the space to be based on a quad.
setPolynomialTensor(tensor) | Set whether a function space is a space of tensor polynomials.
setSumConcatenate(concatenate) | Set the concatenate flag for this space.
setSumNumSubspaces(numSumSpaces) | Set the number of spaces in the sum.
setSumSubspace(s, subsp) | Set a space in the sum.
setTensorNumSubspaces(numTensSpaces) | Set the number of spaces in the tensor product.
setTensorSubspace(s, subsp) | Set a space in the tensor product.
setType(space_type) | Build a particular type of space.
setUp() | Construct data structures for the Space.
view([viewer]) | View a Space.

Methods Documentation

    create(comm=None)
        Create an empty Space object.

        Collective.

        The type can then be set with setType.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PetscSpaceCreate <https://petsc.org/release/manualpages/SPACE/PetscSpaceCreate.html>

    Source code at petsc4py/PETSc/Space.pyx:36 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L36>

    destroy()
        Destroy the Space object.

        Collective.

        See also:
            PetscSpaceDestroy <https://petsc.org/release/manualpages/SPACE/PetscSpaceDestroy.html>

    Source code at petsc4py/PETSc/Space.pyx:59 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L59>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getDegree()
        Return the polynomial degrees that characterize this space.

        Not collective.

        Returns

            •   minDegree (int <https://docs.python.org/3/library/functions.html#int>) -- The degree of the largest polynomial space contained in the space.

            •   maxDegree (int <https://docs.python.org/3/library/functions.html#int>) -- The degree of the smallest polynomial space containing the space.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            setDegree, PetscSpaceGetDegree <https://petsc.org/release/manualpages/SPACE/PetscSpaceGetDegree.html>

    Source code at petsc4py/PETSc/Space.pyx:117 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L117>

    getDimension()
        Return the number of basis vectors.

        Not collective.

        See also:
            PetscSpaceGetDimension <https://petsc.org/release/manualpages/SPACE/PetscSpaceGetDimension.html>

    Source code at petsc4py/PETSc/Space.pyx:103 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L103>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getNumComponents()
        Return the number of components for this space.

        Not collective.

        See also:
            setNumComponents, PetscSpaceGetNumComponents <https://petsc.org/release/manualpages/SPACE/PetscSpaceGetNumComponents.html>

    Source code at petsc4py/PETSc/Space.pyx:195 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L195>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getNumVariables()
        Return the number of variables for this space.

        Not collective.

        See also:
            setNumVariables, PetscSpaceGetNumVariables <https://petsc.org/release/manualpages/SPACE/PetscSpaceGetNumVariables.html>

    Source code at petsc4py/PETSc/Space.pyx:163 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L163>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getPTrimmedFormDegree()
        Return the form degree of the trimmed polynomials.

        Not collective.

        See also:
            setPTrimmedFormDegree, PetscSpacePTrimmedGetFormDegree <https://petsc.org/release/manualpages/SPACE/PetscSpacePTrimmedGetFormDegree.html>

    Source code at petsc4py/PETSc/Space.pyx:546 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L546>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getPointPoints()
        Return the evaluation points for the space as the points of a quad.

        Logically collective.

        See also:
            setPointPoints, PetscSpacePointGetPoints <https://petsc.org/release/manualpages/SPACE/PetscSpacePointGetPoints.html>

    Source code at petsc4py/PETSc/Space.pyx:513 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L513>

        Return type
            Quad <#petsc4py.PETSc.Quad>

    getPolynomialTensor()
        Return whether a function space is a space of tensor polynomials.

        Not collective.

        Return True <https://docs.python.org/3/library/constants.html#True> if a function space is a space of tensor polynomials (the space is spanned by polynomials whose degree in each variable is bounded by the given order), as opposed to polynomials (the space is spanned by polynomials whose total degree—summing over all variables is bounded by the given order).

        See also:
            setPolynomialTensor, PetscSpacePolynomialGetTensor <https://petsc.org/release/manualpages/SPACE/PetscSpacePolynomialGetTensor.html>

    Source code at petsc4py/PETSc/Space.pyx:448 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L448>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getSumConcatenate()
        Return the concatenate flag for this space.

        Not collective.

        A concatenated sum space will have the number of components equal to the sum of the number of components of all subspaces. A non-concatenated, or direct sum space will have the same number of components as its subspaces.

        See also:
            setSumConcatenate, PetscSpaceSumGetConcatenate <https://petsc.org/release/manualpages/SPACE/PetscSpaceSumGetConcatenate.html>

    Source code at petsc4py/PETSc/Space.pyx:261 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L261>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getSumNumSubspaces()
        Return the number of spaces in the sum.

        Not collective.

        See also:
            setSumNumSubspaces, PetscSpaceSumGetNumSubspaces <https://petsc.org/release/manualpages/SPACE/PetscSpaceSumGetNumSubspaces.html>

    Source code at petsc4py/PETSc/Space.pyx:304 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L304>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getSumSubspace(s)
        Return a space in the sum.

        Not collective.

        Parameters
            s (int <https://docs.python.org/3/library/functions.html#int>) -- The space number.

        Return type
            Space <#petsc4py.PETSc.Space>

    See also:
            setSumSubspace, PetscSpaceSumGetSubspace <https://petsc.org/release/manualpages/SPACE/PetscSpaceSumGetSubspace.html>

    Source code at petsc4py/PETSc/Space.pyx:318 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L318>

    getTensorNumSubspaces()
        Return the number of spaces in the tensor product.

        Not collective.

        See also:
            setTensorNumSubspaces, PetscSpaceTensorGetNumSubspaces <https://petsc.org/release/manualpages/SPACE/PetscSpaceTensorGetNumSubspaces.html>

    Source code at petsc4py/PETSc/Space.pyx:376 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L376>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getTensorSubspace(s)
        Return a space in the tensor product.

        Not collective.

        Parameters
            s (int <https://docs.python.org/3/library/functions.html#int>) -- The space number.

        Return type
            Space <#petsc4py.PETSc.Space>

    See also:
            setTensorSubspace, PetscSpaceTensorGetSubspace <https://petsc.org/release/manualpages/SPACE/PetscSpaceTensorGetSubspace.html>

    Source code at petsc4py/PETSc/Space.pyx:410 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L410>

    getType()
        Return the type of the space object.

        Not collective.

        See also:
            setType, PetscSpaceGetType <https://petsc.org/release/manualpages/SPACE/PetscSpaceGetType.html>

    Source code at petsc4py/PETSc/Space.pyx:227 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L227>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    setDegree(degree, maxDegree)
        Set the degree of approximation for this space.

        Logically collective.

        One of degree and maxDegree can be None <https://docs.python.org/3/library/constants.html#None>.

        Parameters

            •   degree (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The degree of the largest polynomial space contained in the space.

            •   maxDegree (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- The degree of the largest polynomial space containing the space.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getDegree, PetscSpaceSetDegree <https://petsc.org/release/manualpages/SPACE/PetscSpaceSetDegree.html>

    Source code at petsc4py/PETSc/Space.pyx:138 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L138>

    setFromOptions()
        Set parameters in Space from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, PetscSpaceSetFromOptions <https://petsc.org/release/manualpages/SPACE/PetscSpaceSetFromOptions.html>

    Source code at petsc4py/PETSc/Space.pyx:91 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L91>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setNumComponents(nc)
        Set the number of components for this space.

        Logically collective.

        Parameters
            nc (int <https://docs.python.org/3/library/functions.html#int>) -- The number of components.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getNumComponents, PetscSpaceSetNumComponents <https://petsc.org/release/manualpages/SPACE/PetscSpaceSetNumComponents.html>

    Source code at petsc4py/PETSc/Space.pyx:209 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L209>

    setNumVariables(n)
        Set the number of variables for this space.

        Logically collective.

        Parameters
            n (int <https://docs.python.org/3/library/functions.html#int>) -- The number of variables (x, y, z etc.).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getNumVariables, PetscSpaceSetNumVariables <https://petsc.org/release/manualpages/SPACE/PetscSpaceSetNumVariables.html>

    Source code at petsc4py/PETSc/Space.pyx:177 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L177>

    setPTrimmedFormDegree(formDegree)
        Set the form degree of the trimmed polynomials.

        Logically collective.

        Parameters
            formDegree (int <https://docs.python.org/3/library/functions.html#int>) -- The form degree.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getPTrimmedFormDegree, PetscSpacePTrimmedSetFormDegree <https://petsc.org/release/manualpages/SPACE/PetscSpacePTrimmedSetFormDegree.html>

    Source code at petsc4py/PETSc/Space.pyx:528 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L528>

    setPointPoints(quad)
        Set the evaluation points for the space to be based on a quad.

        Logically collective.

        Sets the evaluation points for the space to coincide with the points of a quadrature rule.

        Parameters
            quad (Quad <#petsc4py.PETSc.Quad>) -- The Quad <#petsc4py.PETSc.Quad> defining the points.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getPointPoints, PetscSpacePointSetPoints <https://petsc.org/release/manualpages/SPACE/PetscSpacePointSetPoints.html>

    Source code at petsc4py/PETSc/Space.pyx:493 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L493>

    setPolynomialTensor(tensor)
        Set whether a function space is a space of tensor polynomials.

        Logically collective.

        Set to True <https://docs.python.org/3/library/constants.html#True> for a function space which is a space of tensor polynomials (the space is spanned by polynomials whose degree in each variable is bounded by the given order), as opposed to polynomials (the space is spanned by polynomials whose total degree—summing over all variables is bounded by the given order).

        Parameters
            tensor (bool <https://docs.python.org/3/library/functions.html#bool>) -- True <https://docs.python.org/3/library/constants.html#True> for a tensor polynomial space, False <https://docs.python.org/3/library/constants.html#False> for a polynomial space.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getPolynomialTensor, PetscSpacePolynomialSetTensor <https://petsc.org/release/manualpages/SPACE/PetscSpacePolynomialSetTensor.html>

    Source code at petsc4py/PETSc/Space.pyx:468 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L468>

    setSumConcatenate(concatenate)
        Set the concatenate flag for this space.

        Logically collective.

        A concatenated sum space will have the number of components equal to the sum of the number of components of all subspaces. A non-concatenated, or direct sum space will have the same number of components as its subspaces.

        Parameters
            concatenate (bool <https://docs.python.org/3/library/functions.html#bool>) -- True <https://docs.python.org/3/library/constants.html#True> if subspaces are concatenated components, False <https://docs.python.org/3/library/constants.html#False> if direct summands.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getSumConcatenate, PetscSpaceSumSetConcatenate <https://petsc.org/release/manualpages/SPACE/PetscSpaceSumSetConcatenate.html>

    Source code at petsc4py/PETSc/Space.pyx:280 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L280>

    setSumNumSubspaces(numSumSpaces)
        Set the number of spaces in the sum.

        Logically collective.

        Parameters
            numSumSpaces (int <https://docs.python.org/3/library/functions.html#int>) -- The number of spaces.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getSumNumSubspaces, PetscSpaceSumSetNumSubspaces <https://petsc.org/release/manualpages/SPACE/PetscSpaceSumSetNumSubspaces.html>

    Source code at petsc4py/PETSc/Space.pyx:358 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L358>

    setSumSubspace(s, subsp)
        Set a space in the sum.

        Logically collective.

        Parameters

            •   s (int <https://docs.python.org/3/library/functions.html#int>) -- The space number.

            •   subsp (Space <#petsc4py.PETSc.Space>) -- The number of spaces.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getSumSubspace, PetscSpaceSumSetSubspace <https://petsc.org/release/manualpages/SPACE/PetscSpaceSumSetSubspace.html>

    Source code at petsc4py/PETSc/Space.pyx:338 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L338>

    setTensorNumSubspaces(numTensSpaces)
        Set the number of spaces in the tensor product.

        Logically collective.

        Parameters
            numTensSpaces (int <https://docs.python.org/3/library/functions.html#int>) -- The number of spaces.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getTensorNumSubspaces, PetscSpaceTensorSetNumSubspaces <https://petsc.org/release/manualpages/SPACE/PetscSpaceTensorSetNumSubspaces.html>

    Source code at petsc4py/PETSc/Space.pyx:430 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L430>

    setTensorSubspace(s, subsp)
        Set a space in the tensor product.

        Logically collective.

        Parameters

            •   s (int <https://docs.python.org/3/library/functions.html#int>) -- The space number.

            •   subsp (Space <#petsc4py.PETSc.Space>) -- The number of spaces.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getTensorSubspace, PetscSpaceTensorSetSubspace <https://petsc.org/release/manualpages/SPACE/PetscSpaceTensorSetSubspace.html>

    Source code at petsc4py/PETSc/Space.pyx:390 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L390>

    setType(space_type)
        Build a particular type of space.

        Collective.

        Parameters
            space_type (Type <#petsc4py.PETSc.Space.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The kind of space.

        Return type
            Self

    See also:
            getType, PetscSpaceSetType <https://petsc.org/release/manualpages/SPACE/PetscSpaceSetType.html>

    Source code at petsc4py/PETSc/Space.pyx:241 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L241>

    setUp()
        Construct data structures for the Space.

        Collective.

        See also:
            PetscSpaceSetUp <https://petsc.org/release/manualpages/SPACE/PetscSpaceSetUp.html>

    Source code at petsc4py/PETSc/Space.pyx:24 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L24>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        View a Space.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> to display the Space.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            PetscSpaceView <https://petsc.org/release/manualpages/SPACE/PetscSpaceView.html>

    Source code at petsc4py/PETSc/Space.pyx:72 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Space.pyx#L72>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Sys

    class petsc4py.PETSc.Sys
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        System utilities.

        Methods Summary
        Print(*args[, sep, end, comm]) | Print output from the first processor of a communicator.
        getDefaultComm() | Get the default MPI communicator used to create PETSc objects.
        getVersion([devel, date, author]) | Return PETSc version information.
        getVersionInfo() | Return PETSc version information.
        hasExternalPackage(package) | Return whether PETSc has support for external package.
        infoAllow(flag[, filename, mode]) | Enables or disables PETSc info messages.
        isFinalized() | Return whether PETSc has been finalized.
        isInitialized() | Return whether PETSc has been initialized.
        popErrorHandler() | Remove the current error handler.
        popSignalHandler() | Remove the current signal handler.
        pushErrorHandler(errhandler) | Set the current error handler.
        registerCitation(citation) | Register BibTeX citation.
        setDefaultComm(comm) | Set the default MPI communicator used to create PETSc objects.
        sleep([seconds]) | Sleep some number of seconds.
        splitOwnership(size[, bsize, comm]) | Given a global (or local) size determines a local (or global) size.
        syncFlush([comm]) | Flush output from previous syncPrint calls.
        syncPrint(*args[, sep, end, flush, comm]) | Print synchronized output from several processors of a communicator.

        Methods Documentation

        classmethod Print(*args, sep=' ', end='\n', comm=None, **kwargs)
            Print output from the first processor of a communicator.

            Collective.

            Parameters

                •   *args (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- Positional arguments.

                •   sep (str <https://docs.python.org/3/library/stdtypes.html#str>) -- String inserted between values, by default a space.

                •   end (str <https://docs.python.org/3/library/stdtypes.html#str>) -- String appended after the last value, by default a newline.

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to getDefaultComm.

                •   **kwargs (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- Keyword arguments.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscPrintf <https://petsc.org/release/manualpages/Sys/PetscPrintf.html>

        Source code at petsc4py/PETSc/Sys.pyx:155 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L155>

        classmethod getDefaultComm()
            Get the default MPI communicator used to create PETSc objects.

            Not collective.

            See also:
                setDefaultComm

        Source code at petsc4py/PETSc/Sys.pyx:116 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L116>

            Return type
                Comm <#petsc4py.PETSc.Comm>

        classmethod getVersion(devel=False, date=False, author=False)
            Return PETSc version information.

            Not collective.

            Parameters

                •   devel (bool <https://docs.python.org/3/library/functions.html#bool>) -- Additionally, return whether using an in-development version.

                •   date (bool <https://docs.python.org/3/library/functions.html#bool>) -- Additionally, return date information.

                •   author (bool <https://docs.python.org/3/library/functions.html#bool>) -- Additionally, return author information.

            Returns

                •   major (int <https://docs.python.org/3/library/functions.html#int>) -- Major version number.

                •   minor (int <https://docs.python.org/3/library/functions.html#int>) -- Minor version number.

                •   micro (int <https://docs.python.org/3/library/functions.html#int>) -- Micro (or patch) version number.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        See also:
                PetscGetVersion <https://petsc.org/release/manualpages/Sys/PetscGetVersion.html>, PetscGetVersionNumber <https://petsc.org/release/manualpages/Sys/PetscGetVersionNumber.html>

        Source code at petsc4py/PETSc/Sys.pyx:7 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L7>

        classmethod getVersionInfo()
            Return PETSc version information.

            Not collective.

            Returns
                info -- Dictionary with version information.

            Return type
                dict <https://docs.python.org/3/library/stdtypes.html#dict>

        See also:
                PetscGetVersion <https://petsc.org/release/manualpages/Sys/PetscGetVersion.html>, PetscGetVersionNumber <https://petsc.org/release/manualpages/Sys/PetscGetVersionNumber.html>

        Source code at petsc4py/PETSc/Sys.pyx:62 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L62>

        classmethod hasExternalPackage(package)
            Return whether PETSc has support for external package.

            Not collective.

            Parameters
                package (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The external package name.

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        See also:
                PetscHasExternalPackage <https://petsc.org/release/manualpages/Sys/PetscHasExternalPackage.html>

        Source code at petsc4py/PETSc/Sys.pyx:449 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L449>

        classmethod infoAllow(flag, filename=None, mode='w')
            Enables or disables PETSc info messages.

            Not collective.

            Parameters

                •   flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether to enable info messages.

                •   filename (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- Name of a file where to dump output.

                •   mode (str <https://docs.python.org/3/library/stdtypes.html#str>) -- Write mode for file, by default "w".

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscInfoAllow <https://petsc.org/release/manualpages/Log/PetscInfoAllow.html>, PetscInfoSetFile <https://petsc.org/release/manualpages/Log/PetscInfoSetFile.html>

        Source code at petsc4py/PETSc/Sys.pyx:392 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L392>

        classmethod isFinalized()
            Return whether PETSc has been finalized.

            Not collective.

            See also:
                isInitialized

        Source code at petsc4py/PETSc/Sys.pyx:101 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L101>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        classmethod isInitialized()
            Return whether PETSc has been initialized.

            Not collective.

            See also:
                isFinalized

        Source code at petsc4py/PETSc/Sys.pyx:88 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L88>

            Return type
                bool <https://docs.python.org/3/library/functions.html#bool>

        classmethod popErrorHandler()
            Remove the current error handler.

            Logically collective.

            See also:
                PetscPopErrorHandler <https://petsc.org/release/manualpages/Sys/PetscPopErrorHandler.html>

        Source code at petsc4py/PETSc/Sys.pyx:366 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L366>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        classmethod popSignalHandler()
            Remove the current signal handler.

            Logically collective.

            See also:
                PetscPopSignalHandler <https://petsc.org/release/manualpages/Sys/PetscPopSignalHandler.html>

        Source code at petsc4py/PETSc/Sys.pyx:379 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L379>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        classmethod pushErrorHandler(errhandler)
            Set the current error handler.

            Logically collective.

            Parameters
                errhandler (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The name of the error handler.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscPushErrorHandler <https://petsc.org/release/manualpages/Sys/PetscPushErrorHandler.html>

        Source code at petsc4py/PETSc/Sys.pyx:331 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L331>

        classmethod registerCitation(citation)
            Register BibTeX citation.

            Not collective.

            Parameters
                citation (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The BibTex citation entry to register.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscCitationsRegister <https://petsc.org/release/manualpages/Sys/PetscCitationsRegister.html>

        Source code at petsc4py/PETSc/Sys.pyx:426 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L426>

        classmethod setDefaultComm(comm)
            Set the default MPI communicator used to create PETSc objects.

            Logically collective.

            Parameters
                comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator. If set to None <https://docs.python.org/3/library/constants.html#None>, uses COMM_WORLD <#petsc4py.PETSc.COMM_WORLD>.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                getDefaultComm

        Source code at petsc4py/PETSc/Sys.pyx:131 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L131>

        classmethod sleep(seconds=1.0)
            Sleep some number of seconds.

            Not collective.

            Parameters
                seconds (float <https://docs.python.org/3/library/functions.html#float>) -- Time to sleep in seconds.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscSleep <https://petsc.org/release/manualpages/Sys/PetscSleep.html>

        Source code at petsc4py/PETSc/Sys.pyx:310 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L310>

        classmethod splitOwnership(size, bsize=None, comm=None)
            Given a global (or local) size determines a local (or global) size.

            Collective.

            Parameters

                •   size (int <https://docs.python.org/3/library/functions.html#int> | tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]) -- Global size N or 2-tuple (n, N) with local and global sizes. Either of n or N (but not both) can be None <https://docs.python.org/3/library/constants.html#None>.

                •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Block size, defaults to 1.

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to getDefaultComm.

            Returns

                •   n (int <https://docs.python.org/3/library/functions.html#int>) -- The local size.

                •   N (int <https://docs.python.org/3/library/functions.html#int>) -- The global size.

            Return type
                tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

        Notes

        The size argument corresponds to the full size of the vector. That is, an array with 10 blocks and a block size of 3 will have a size of 30, not 10.

        See also:
                PetscSplitOwnership <https://petsc.org/release/manualpages/Sys/PetscSplitOwnership.html>

        Source code at petsc4py/PETSc/Sys.pyx:261 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L261>

        classmethod syncFlush(comm=None)
            Flush output from previous syncPrint calls.

            Collective.

            Parameters
                comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to getDefaultComm.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscSynchronizedPrintf <https://petsc.org/release/manualpages/Sys/PetscSynchronizedPrintf.html>, PetscSynchronizedFlush <https://petsc.org/release/manualpages/Sys/PetscSynchronizedFlush.html>

        Source code at petsc4py/PETSc/Sys.pyx:240 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L240>

        classmethod syncPrint(*args, sep=' ', end='\n', flush=False, comm=None, **kwargs)
            Print synchronized output from several processors of a communicator.

            Not collective.

            Parameters

                •   *args (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- Positional arguments.

                •   sep (str <https://docs.python.org/3/library/stdtypes.html#str>) -- String inserted between values, by default a space.

                •   end (str <https://docs.python.org/3/library/stdtypes.html#str>) -- String appended after the last value, by default a newline.

                •   flush (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether to flush output with syncFlush.

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to getDefaultComm.

                •   **kwargs (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- Keyword arguments.

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        See also:
                PetscSynchronizedPrintf <https://petsc.org/release/manualpages/Sys/PetscSynchronizedPrintf.html>, PetscSynchronizedFlush <https://petsc.org/release/manualpages/Sys/PetscSynchronizedFlush.html>

        Source code at petsc4py/PETSc/Sys.pyx:197 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Sys.pyx#L197>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TAO

    class petsc4py.PETSc.TAO
        Bases: Object <#petsc4py.PETSc.Object>

        Optimization solver.

        TAO is described in the PETSc manual <https://petsc.org/release/manual/tao.html>.

        See also:
            Tao <https://petsc.org/release/manualpages/Tao/Tao.html>

    Enumerations
    ALMMType <#petsc4py.PETSc.TAO.ALMMType> | TAO Augmented Lagrangian Multiplier method (ALMM) Type.
    BNCGType <#petsc4py.PETSc.TAO.BNCGType> | TAO Bound Constrained Conjugate Gradient (BNCG) Update Type.
    ConvergedReason <#petsc4py.PETSc.TAO.ConvergedReason> | TAO solver termination reason.
    Type <#petsc4py.PETSc.TAO.Type> | TAO solver type.

  petsc4py.PETSc.TAO.ALMMType

    class petsc4py.PETSc.TAO.ALMMType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        TAO Augmented Lagrangian Multiplier method (ALMM) Type.

        Attributes Summary
        CLASSIC | Constant CLASSIC of type int <https://docs.python.org/3/library/functions.html#int>
        PHR | Constant PHR of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        CLASSIC: int <https://docs.python.org/3/library/functions.html#int> = CLASSIC
            Constant CLASSIC of type int <https://docs.python.org/3/library/functions.html#int>

        PHR: int <https://docs.python.org/3/library/functions.html#int> = PHR
            Constant PHR of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TAO.BNCGType

    class petsc4py.PETSc.TAO.BNCGType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        TAO Bound Constrained Conjugate Gradient (BNCG) Update Type.

        Attributes Summary
        DK | Constant DK of type int <https://docs.python.org/3/library/functions.html#int>
        DY | Constant DY of type int <https://docs.python.org/3/library/functions.html#int>
        FR | Constant FR of type int <https://docs.python.org/3/library/functions.html#int>
        GD | Constant GD of type int <https://docs.python.org/3/library/functions.html#int>
        HS | Constant HS of type int <https://docs.python.org/3/library/functions.html#int>
        HZ | Constant HZ of type int <https://docs.python.org/3/library/functions.html#int>
        KD | Constant KD of type int <https://docs.python.org/3/library/functions.html#int>
        PCGD | Constant PCGD of type int <https://docs.python.org/3/library/functions.html#int>
        PRP | Constant PRP of type int <https://docs.python.org/3/library/functions.html#int>
        PRP_PLUS | Constant PRP_PLUS of type int <https://docs.python.org/3/library/functions.html#int>
        SSML_BFGS | Constant SSML_BFGS of type int <https://docs.python.org/3/library/functions.html#int>
        SSML_BRDN | Constant SSML_BRDN of type int <https://docs.python.org/3/library/functions.html#int>
        SSML_DFP | Constant SSML_DFP of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        DK: int <https://docs.python.org/3/library/functions.html#int> = DK
            Constant DK of type int <https://docs.python.org/3/library/functions.html#int>

        DY: int <https://docs.python.org/3/library/functions.html#int> = DY
            Constant DY of type int <https://docs.python.org/3/library/functions.html#int>

        FR: int <https://docs.python.org/3/library/functions.html#int> = FR
            Constant FR of type int <https://docs.python.org/3/library/functions.html#int>

        GD: int <https://docs.python.org/3/library/functions.html#int> = GD
            Constant GD of type int <https://docs.python.org/3/library/functions.html#int>

        HS: int <https://docs.python.org/3/library/functions.html#int> = HS
            Constant HS of type int <https://docs.python.org/3/library/functions.html#int>

        HZ: int <https://docs.python.org/3/library/functions.html#int> = HZ
            Constant HZ of type int <https://docs.python.org/3/library/functions.html#int>

        KD: int <https://docs.python.org/3/library/functions.html#int> = KD
            Constant KD of type int <https://docs.python.org/3/library/functions.html#int>

        PCGD: int <https://docs.python.org/3/library/functions.html#int> = PCGD
            Constant PCGD of type int <https://docs.python.org/3/library/functions.html#int>

        PRP: int <https://docs.python.org/3/library/functions.html#int> = PRP
            Constant PRP of type int <https://docs.python.org/3/library/functions.html#int>

        PRP_PLUS: int <https://docs.python.org/3/library/functions.html#int> = PRP_PLUS
            Constant PRP_PLUS of type int <https://docs.python.org/3/library/functions.html#int>

        SSML_BFGS: int <https://docs.python.org/3/library/functions.html#int> = SSML_BFGS
            Constant SSML_BFGS of type int <https://docs.python.org/3/library/functions.html#int>

        SSML_BRDN: int <https://docs.python.org/3/library/functions.html#int> = SSML_BRDN
            Constant SSML_BRDN of type int <https://docs.python.org/3/library/functions.html#int>

        SSML_DFP: int <https://docs.python.org/3/library/functions.html#int> = SSML_DFP
            Constant SSML_DFP of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TAO.ConvergedReason

    class petsc4py.PETSc.TAO.ConvergedReason
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        TAO solver termination reason.

        See also:
            TaoConvergedReason <https://petsc.org/release/manualpages/Tao/TaoConvergedReason.html>

    Attributes Summary
    CONTINUE_ITERATING | Constant CONTINUE_ITERATING of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_GATOL | Constant CONVERGED_GATOL of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_GRTOL | Constant CONVERGED_GRTOL of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_GTTOL | Constant CONVERGED_GTTOL of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_ITERATING | Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_MINF | Constant CONVERGED_MINF of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_STEPTOL | Constant CONVERGED_STEPTOL of type int <https://docs.python.org/3/library/functions.html#int>
    CONVERGED_USER | Constant CONVERGED_USER of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_LS_FAILURE | Constant DIVERGED_LS_FAILURE of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_MAXFCN | Constant DIVERGED_MAXFCN of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_MAXITS | Constant DIVERGED_MAXITS of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_NAN | Constant DIVERGED_NAN of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_TR_REDUCTION | Constant DIVERGED_TR_REDUCTION of type int <https://docs.python.org/3/library/functions.html#int>
    DIVERGED_USER | Constant DIVERGED_USER of type int <https://docs.python.org/3/library/functions.html#int>
    ITERATING | Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

    Attributes Documentation

        CONTINUE_ITERATING: int <https://docs.python.org/3/library/functions.html#int> = CONTINUE_ITERATING
            Constant CONTINUE_ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_GATOL: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_GATOL
            Constant CONVERGED_GATOL of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_GRTOL: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_GRTOL
            Constant CONVERGED_GRTOL of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_GTTOL: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_GTTOL
            Constant CONVERGED_GTTOL of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_ITERATING: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_ITERATING
            Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_MINF: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_MINF
            Constant CONVERGED_MINF of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_STEPTOL: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_STEPTOL
            Constant CONVERGED_STEPTOL of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_USER: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_USER
            Constant CONVERGED_USER of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_LS_FAILURE: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_LS_FAILURE
            Constant DIVERGED_LS_FAILURE of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_MAXFCN: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_MAXFCN
            Constant DIVERGED_MAXFCN of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_MAXITS: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_MAXITS
            Constant DIVERGED_MAXITS of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_NAN: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_NAN
            Constant DIVERGED_NAN of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_TR_REDUCTION: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_TR_REDUCTION
            Constant DIVERGED_TR_REDUCTION of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_USER: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_USER
            Constant DIVERGED_USER of type int <https://docs.python.org/3/library/functions.html#int>

        ITERATING: int <https://docs.python.org/3/library/functions.html#int> = ITERATING
            Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TAO.Type

    class petsc4py.PETSc.TAO.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        TAO solver type.

        See also:
            TaoType <https://petsc.org/release/manualpages/Tao/TaoType.html>

    Attributes Summary
    ADMM | Object ADMM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    ALMM | Object ALMM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    ASFLS | Object ASFLS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    ASILS | Object ASILS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BLMVM | Object BLMVM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BMRM | Object BMRM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BNCG | Object BNCG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BNLS | Object BNLS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BNTL | Object BNTL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BNTR | Object BNTR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BQNKLS | Object BQNKLS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BQNKTL | Object BQNKTL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BQNKTR | Object BQNKTR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BQNLS | Object BQNLS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BQPIP | Object BQPIP of type str <https://docs.python.org/3/library/stdtypes.html#str>
    BRGN | Object BRGN of type str <https://docs.python.org/3/library/stdtypes.html#str>
    CG | Object CG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    GPCG | Object GPCG of type str <https://docs.python.org/3/library/stdtypes.html#str>
    IPM | Object IPM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LCL | Object LCL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    LMVM | Object LMVM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NLS | Object NLS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NM | Object NM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NTL | Object NTL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    NTR | Object NTR of type str <https://docs.python.org/3/library/stdtypes.html#str>
    OWLQN | Object OWLQN of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PDIPM | Object PDIPM of type str <https://docs.python.org/3/library/stdtypes.html#str>
    POUNDERS | Object POUNDERS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    PYTHON | Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SHELL | Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SSFLS | Object SSFLS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    SSILS | Object SSILS of type str <https://docs.python.org/3/library/stdtypes.html#str>
    TRON | Object TRON of type str <https://docs.python.org/3/library/stdtypes.html#str>

    Attributes Documentation

        ADMM: str <https://docs.python.org/3/library/stdtypes.html#str> = ADMM
            Object ADMM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ALMM: str <https://docs.python.org/3/library/stdtypes.html#str> = ALMM
            Object ALMM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ASFLS: str <https://docs.python.org/3/library/stdtypes.html#str> = ASFLS
            Object ASFLS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ASILS: str <https://docs.python.org/3/library/stdtypes.html#str> = ASILS
            Object ASILS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BLMVM: str <https://docs.python.org/3/library/stdtypes.html#str> = BLMVM
            Object BLMVM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BMRM: str <https://docs.python.org/3/library/stdtypes.html#str> = BMRM
            Object BMRM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BNCG: str <https://docs.python.org/3/library/stdtypes.html#str> = BNCG
            Object BNCG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BNLS: str <https://docs.python.org/3/library/stdtypes.html#str> = BNLS
            Object BNLS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BNTL: str <https://docs.python.org/3/library/stdtypes.html#str> = BNTL
            Object BNTL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BNTR: str <https://docs.python.org/3/library/stdtypes.html#str> = BNTR
            Object BNTR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BQNKLS: str <https://docs.python.org/3/library/stdtypes.html#str> = BQNKLS
            Object BQNKLS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BQNKTL: str <https://docs.python.org/3/library/stdtypes.html#str> = BQNKTL
            Object BQNKTL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BQNKTR: str <https://docs.python.org/3/library/stdtypes.html#str> = BQNKTR
            Object BQNKTR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BQNLS: str <https://docs.python.org/3/library/stdtypes.html#str> = BQNLS
            Object BQNLS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BQPIP: str <https://docs.python.org/3/library/stdtypes.html#str> = BQPIP
            Object BQPIP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BRGN: str <https://docs.python.org/3/library/stdtypes.html#str> = BRGN
            Object BRGN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CG: str <https://docs.python.org/3/library/stdtypes.html#str> = CG
            Object CG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GPCG: str <https://docs.python.org/3/library/stdtypes.html#str> = GPCG
            Object GPCG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        IPM: str <https://docs.python.org/3/library/stdtypes.html#str> = IPM
            Object IPM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LCL: str <https://docs.python.org/3/library/stdtypes.html#str> = LCL
            Object LCL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        LMVM: str <https://docs.python.org/3/library/stdtypes.html#str> = LMVM
            Object LMVM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NLS: str <https://docs.python.org/3/library/stdtypes.html#str> = NLS
            Object NLS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NM: str <https://docs.python.org/3/library/stdtypes.html#str> = NM
            Object NM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NTL: str <https://docs.python.org/3/library/stdtypes.html#str> = NTL
            Object NTL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NTR: str <https://docs.python.org/3/library/stdtypes.html#str> = NTR
            Object NTR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        OWLQN: str <https://docs.python.org/3/library/stdtypes.html#str> = OWLQN
            Object OWLQN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PDIPM: str <https://docs.python.org/3/library/stdtypes.html#str> = PDIPM
            Object PDIPM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        POUNDERS: str <https://docs.python.org/3/library/stdtypes.html#str> = POUNDERS
            Object POUNDERS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PYTHON: str <https://docs.python.org/3/library/stdtypes.html#str> = PYTHON
            Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SHELL: str <https://docs.python.org/3/library/stdtypes.html#str> = SHELL
            Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SSFLS: str <https://docs.python.org/3/library/stdtypes.html#str> = SSFLS
            Object SSFLS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SSILS: str <https://docs.python.org/3/library/stdtypes.html#str> = SSILS
            Object SSILS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        TRON: str <https://docs.python.org/3/library/stdtypes.html#str> = TRON
            Object TRON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
addTerm(prefix, scale, term[, params, mapmat]) | Add an objective term to the solver.
appendOptionsPrefix(prefix) | Append to the prefix used for searching for options in the database.
cancelMonitor() | Cancel all the monitors of the solver.
checkConverged() | Run convergence test and return converged reason.
computeConstraints(x, c) | Compute the vector corresponding to the constraints.
computeDualVariables(xl, xu) | Compute the dual vectors corresponding to variables' bounds.
computeGradient(x, g) | Compute the gradient of the objective function.
computeHessian(x, H[, P]) | Compute the Hessian of the objective function.
computeJacobian(x, J[, P]) | Compute the Jacobian.
computeObjective(x) | Compute the value of the objective function.
computeObjectiveGradient(x, g) | Compute the gradient of the objective function and its value.
computeResidual(x, f) | Compute the residual.
computeVariableBounds(xl, xu) | Compute the vectors corresponding to variables' bounds.
create([comm]) | Create a TAO solver.
createPython([context, comm]) | Create an optimization solver of Python type.
destroy() | Destroy the solver.
getALMMSubsolver() | Return the subsolver inside the ALMM solver.
getALMMType() | Return the type of the ALMM solver.
getAppCtx() | Return the application context.
getBNCGType() | Return the type of the BNCG solver.
getBRGNDampingVector() | Return the damping vector.
getBRGNSubsolver() | Return the subsolver inside the BRGN solver.
getConstraintTolerances() | Return the constraints tolerance parameters used in the convergence tests.
getConvergedReason() | Return the reason for the solver convergence.
getConvergenceTest() | Return the callback used to test for solver convergence.
getEqualityConstraints() | Return tuple holding vector and callback of equality constraints.
getGradient() | Return the vector used to store the gradient and the evaluation callback.
getGradientNorm() | Return the matrix used to compute inner products.
getHessian() | Return the matrices used to store the Hessian and the evaluation callback.
getInequalityConstraints() | Return tuple holding vector and callback of inequality constraints.
getIterationNumber() | Return the current iteration number.
getJacobianEquality() | Return matrix, precon matrix and callback of equality constraints Jacobian.
getJacobianInequality() | Return matrix, precon matrix and callback of ineq.
getKSP() | Return the linear solver used by the nonlinear solver.
getLMVMH0() | Return the initial Hessian for the quasi-Newton approximation.
getLMVMH0KSP() | Return the KSP <#petsc4py.PETSc.KSP> for the inverse of the initial Hessian approximation.
getLMVMMat() | Get the LMVM matrix.
getLineSearch() | Return the TAO Line Search object.
getMaximumFunctionEvaluations() | Return the maximum number of objective evaluations within the solver.
getMaximumIterations() | Return the maximum number of solver iterations.
getMonitor() | Return the callback used to monitor solver convergence.
getObjective() | Return the objective evaluation callback.
getObjectiveAndGradient() | Return the vector used to store the gradient and the evaluation callback.
getObjectiveValue() | Return the current value of the objective function.
getOptionsPrefix() | Return the prefix used for searching for options in the database.
getPythonContext() | Return the instance of the class implementing the required Python methods.
getPythonType() | Return the fully qualified Python name of the class used by the solver.
getSolution() | Return the vector holding the solution.
getSolutionNorm() | Return the objective function value and the norms of gradient and constraints.
getSolutionStatus() | Return the solution status.
getTerm() | Return the entire objective term of the solver.
getTolerances() | Return the tolerance parameters used in the solver convergence tests.
getType() | Return the type of the solver.
getUpdate() | Return the callback to compute the update.
getVariableBounds() | Return the lower and upper bounds vectors.
monitor([its, f, res, cnorm, step]) | Monitor the solver.
setALMMSubsolver(subsolver) | Set the subsolver inside the ALMM solver.
setALMMType(tao_almm_type) | Set the ALMM type of the solver.
setAppCtx(appctx) | Set the application context.
setBNCGType(cg_type) | Set the type of the BNCG solver.
setBRGNDictionaryMatrix(D) | Set the dictionary matrix.
setBRGNRegularizerHessian(hessian[, H, ...]) | Set the callback to compute the regularizer Hessian.
setBRGNRegularizerObjectiveGradient(objgrad) | Set the callback to compute the regularizer objective and gradient.
setBRGNRegularizerWeight(weight) | Set the regularizer weight.
setBRGNSmoothL1Epsilon(epsilon) | Set the smooth L1 epsilon.
setConstraintTolerances([catol, crtol]) | Set the constraints tolerance parameters used in the solver convergence tests.
setConstraints(constraints[, C, args, kargs]) | Set the callback to compute constraints.
setConvergedReason(reason) | Set the termination flag.
setConvergenceTest(converged[, args, kargs]) | Set the callback used to test for solver convergence.
setEqualityConstraints(equality_constraints, c) | Set equality constraints callback.
setFromOptions() | Configure the solver from the options database.
setGradient(gradient[, g, args, kargs]) | Set the gradient evaluation callback.
setGradientNorm(mat) | Set the matrix used to compute inner products.
setHessian(hessian[, H, P, args, kargs]) | Set the callback to compute the Hessian matrix.
setInequalityConstraints(...[, args, kargs]) | Set inequality constraints callback.
setInitialTrustRegionRadius(radius) | Set the initial trust region radius.
setIterationNumber(its) | Set the current iteration number.
setJacobian(jacobian[, J, P, args, kargs]) | Set the callback to compute the Jacobian.
setJacobianDesign(jacobian_design[, J, ...]) | Set Jacobian design callback.
setJacobianEquality(jacobian_equality[, J, ...]) | Set Jacobian equality constraints callback.
setJacobianInequality(jacobian_inequality[, ...]) | Set Jacobian inequality constraints callback.
setJacobianResidual(jacobian[, J, P, args, ...]) | Set the callback to compute the least-squares residual Jacobian.
setJacobianState(jacobian_state[, J, P, I, ...]) | Set Jacobian state callback.
setLMVMH0(mat) | Set the initial Hessian for the quasi-Newton approximation.
setLMVMMat(M) | Set the LMVM matrix.
setMaximumFunctionEvaluations(mit) | Set the maximum number of objective evaluations within the solver.
setMaximumIterations(mit) | Set the maximum number of solver iterations.
setMonitor(monitor[, args, kargs]) | Set the callback used to monitor solver convergence.
setObjective(objective[, args, kargs]) | Set the objective function evaluation callback.
setObjectiveGradient(objgrad[, g, args, kargs]) | Set the objective function and gradient evaluation callback.
setOptionsPrefix(prefix) | Set the prefix used for searching for options in the database.
setPythonContext(context) | Set the instance of the class implementing the required Python methods.
setPythonType(py_type) | Set the fully qualified Python name of the class to be used.
setResidual(residual, R[, args, kargs]) | Set the residual evaluation callback for least-squares applications.
setSolution(x) | Set the vector used to store the solution.
setStateDesignIS([state, design]) | Set the index sets indicating state and design variables.
setTolerances([gatol, grtol, gttol]) | Set the tolerance parameters used in the solver convergence tests.
setType(tao_type) | Set the type of the solver.
setUp() | Set up the internal data structures for using the solver.
setUpdate(update[, args, kargs]) | Set the callback to compute update at each optimization step.
setVariableBounds(varbounds[, args, kargs]) | Set the lower and upper bounds for the optimization problem.
solve([x]) | Solve the optimization problem.
view([viewer]) | View the solver.

Attributes Summary
appctx | Application context.
cnorm | Constraints norm.
converged | Boolean indicating if the solver has converged.
ctol | Broken.
diverged | Boolean indicating if the solver has failed.
ftol | Broken.
function | Objective value.
gnorm | Gradient norm.
gradient | Gradient vector.
gtol | Broken.
iterating | Boolean indicating if the solver has not converged yet.
its | Number of iterations.
ksp | Linear solver.
objective | Objective value.
reason | Converged reason.
solution | Solution vector.

Methods Documentation

    addTerm(prefix, scale, term, params=None, mapmat=None)
        Add an objective term to the solver.

        Logically collective.

        Parameters

            •   prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The prefix used for configuring the new term.

            •   scale (float <https://docs.python.org/3/library/functions.html#float>) -- The scale of the term.

            •   term (TAOTerm <#petsc4py.PETSc.TAOTerm>) -- The objective term to be added to the solver.

            •   params (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The parameter vector.

            •   mapmat (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The mapping matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TaoAddTerm <https://petsc.org/release/manualpages/Tao/TaoAddTerm.html>

    Source code at petsc4py/PETSc/TAO.pyx:1762 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1762>

    appendOptionsPrefix(prefix)
        Append to the prefix used for searching for options in the database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, setOptionsPrefix, TaoAppendOptionsPrefix <https://petsc.org/release/manualpages/Tao/TaoAppendOptionsPrefix.html>

    Source code at petsc4py/PETSc/TAO.pyx:220 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L220>

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    cancelMonitor()
        Cancel all the monitors of the solver.

        Logically collective.

        See also:
            setMonitor, TaoMonitorCancel <https://petsc.org/release/manualpages/Tao/TaoMonitorCancel.html>

    Source code at petsc4py/PETSc/TAO.pyx:1373 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1373>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    checkConverged()
        Run convergence test and return converged reason.

        Collective.

        See also:
            converged

    Source code at petsc4py/PETSc/TAO.pyx:1700 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1700>

        Return type
            ConvergedReason <#petsc4py.PETSc.TAO.ConvergedReason>

    computeConstraints(x, c)
        Compute the vector corresponding to the constraints.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The parameter vector.

            •   c (Vec <#petsc4py.PETSc.Vec>) -- The output constraints vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setVariableBounds, TaoComputeVariableBounds <https://petsc.org/release/manualpages/Tao/TaoComputeVariableBounds.html>

    Source code at petsc4py/PETSc/TAO.pyx:1040 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1040>

    computeDualVariables(xl, xu)
        Compute the dual vectors corresponding to variables' bounds.

        Collective.

        See also:
            TaoComputeDualVariables <https://petsc.org/release/manualpages/Tao/TaoComputeDualVariables.html>

    Source code at petsc4py/PETSc/TAO.pyx:1004 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1004>

        Parameters

            •   xl (Vec <#petsc4py.PETSc.Vec>)

            •   xu (Vec <#petsc4py.PETSc.Vec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    computeGradient(x, g)
        Compute the gradient of the objective function.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The parameter vector.

            •   g (Vec <#petsc4py.PETSc.Vec>) -- The output gradient vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setGradient, TaoComputeGradient <https://petsc.org/release/manualpages/Tao/TaoComputeGradient.html>

    Source code at petsc4py/PETSc/TAO.pyx:963 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L963>

    computeHessian(x, H, P=None)
        Compute the Hessian of the objective function.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The parameter vector.

            •   H (Mat <#petsc4py.PETSc.Mat>) -- The output Hessian matrix.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The output Hessian matrix used to construct the preconditioner.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setHessian, TaoComputeHessian <https://petsc.org/release/manualpages/Tao/TaoComputeHessian.html>

    Source code at petsc4py/PETSc/TAO.pyx:1059 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1059>

    computeJacobian(x, J, P=None)
        Compute the Jacobian.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The parameter vector.

            •   J (Mat <#petsc4py.PETSc.Mat>) -- The output Jacobian matrix.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The output Jacobian matrix used to construct the preconditioner.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setJacobian, TaoComputeJacobian <https://petsc.org/release/manualpages/Tao/TaoComputeJacobian.html>

    Source code at petsc4py/PETSc/TAO.pyx:1082 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1082>

    computeObjective(x)
        Compute the value of the objective function.

        Collective.

        Parameters
            x (Vec <#petsc4py.PETSc.Vec>) -- The parameter vector.

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    See also:
            setObjective, TaoComputeObjective <https://petsc.org/release/manualpages/Tao/TaoComputeObjective.html>

    Source code at petsc4py/PETSc/TAO.pyx:925 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L925>

    computeObjectiveGradient(x, g)
        Compute the gradient of the objective function and its value.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The parameter vector.

            •   g (Vec <#petsc4py.PETSc.Vec>) -- The output gradient vector.

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    See also:
            setObjectiveGradient, setGradient, setObjective, TaoComputeObjectiveAndGradient <https://petsc.org/release/manualpages/Tao/TaoComputeObjectiveAndGradient.html>

    Source code at petsc4py/PETSc/TAO.pyx:982 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L982>

    computeResidual(x, f)
        Compute the residual.

        Collective.

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The parameter vector.

            •   f (Vec <#petsc4py.PETSc.Vec>) -- The output vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setResidual, TaoComputeResidual <https://petsc.org/release/manualpages/Tao/TaoComputeResidual.html>

    Source code at petsc4py/PETSc/TAO.pyx:944 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L944>

    computeVariableBounds(xl, xu)
        Compute the vectors corresponding to variables' bounds.

        Collective.

        See also:
            setVariableBounds, TaoComputeVariableBounds <https://petsc.org/release/manualpages/Tao/TaoComputeVariableBounds.html>

    Source code at petsc4py/PETSc/TAO.pyx:1016 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1016>

        Parameters

            •   xl (Vec <#petsc4py.PETSc.Vec>)

            •   xu (Vec <#petsc4py.PETSc.Vec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    create(comm=None)
        Create a TAO solver.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>, TaoCreate <https://petsc.org/release/manualpages/Tao/TaoCreate.html>

    Source code at petsc4py/PETSc/TAO.pyx:152 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L152>

    createPython(context=None, comm=None)
        Create an optimization solver of Python type.

        Collective.

        Parameters

            •   context (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- An instance of the Python class implementing the required methods.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PETSc Python optimization solver type <#petsc-python-tao>, setType, setPythonContext, Type.PYTHON <#petsc4py.PETSc.TAO.Type.PYTHON>

    Source code at petsc4py/PETSc/TAO.pyx:1957 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1957>

    destroy()
        Destroy the solver.

        Collective.

        See also:
            TaoDestroy <https://petsc.org/release/manualpages/Tao/TaoDestroy.html>

    Source code at petsc4py/PETSc/TAO.pyx:139 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L139>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getALMMSubsolver()
        Return the subsolver inside the ALMM solver.

        Not collective.

        See also:
            setALMMSubsolver, TaoALMMGetSubsolver <https://petsc.org/release/manualpages/Tao/TaoALMMGetSubsolver.html>

    Source code at petsc4py/PETSc/TAO.pyx:1797 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1797>

        Return type
            TAO <#petsc4py.PETSc.TAO>

    getALMMType()
        Return the type of the ALMM solver.

        Not collective.

        See also:
            setALMMType, TaoALMMGetType <https://petsc.org/release/manualpages/Tao/TaoALMMGetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:1812 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1812>

        Return type
            ALMMType <#petsc4py.PETSc.TAO.ALMMType>

    getAppCtx()
        Return the application context.

        Source code at petsc4py/PETSc/TAO.pyx:293 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L293>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getBNCGType()
        Return the type of the BNCG solver.

        Not collective.

        See also:
            setBNCGType, TaoBNCGGetType <https://petsc.org/release/manualpages/Tao/TaoBNCGGetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:1569 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1569>

        Return type
            BNCGType <#petsc4py.PETSc.TAO.BNCGType>

    getBRGNDampingVector()
        Return the damping vector.

        Not collective.

        Source code at petsc4py/PETSc/TAO.pyx:1942 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1942>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getBRGNSubsolver()
        Return the subsolver inside the BRGN solver.

        Not collective.

        See also:
            TaoBRGNGetSubsolver <https://petsc.org/release/manualpages/Tao/TaoBRGNGetSubsolver.html>

    Source code at petsc4py/PETSc/TAO.pyx:1859 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1859>

        Return type
            TAO <#petsc4py.PETSc.TAO>

    getConstraintTolerances()
        Return the constraints tolerance parameters used in the convergence tests.

        Not collective.

        Returns

            •   catol (float <https://docs.python.org/3/library/functions.html#float>) -- The absolute norm of the constraints.

            •   crtol (float <https://docs.python.org/3/library/functions.html#float>) -- The relative norm of the constraints.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            setConstraintTolerances, TaoGetConstraintTolerances <https://petsc.org/release/manualpages/Tao/TaoGetConstraintTolerances.html>

    Source code at petsc4py/PETSc/TAO.pyx:1244 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1244>

    getConvergedReason()
        Return the reason for the solver convergence.

        Not collective.

        See also:
            TaoGetConvergedReason <https://petsc.org/release/manualpages/Tao/TaoGetConvergedReason.html>

    Source code at petsc4py/PETSc/TAO.pyx:1626 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1626>

        Return type
            ConvergedReason <#petsc4py.PETSc.TAO.ConvergedReason>

    getConvergenceTest()
        Return the callback used to test for solver convergence.

        Not collective.

        See also:
            setConvergenceTest

    Source code at petsc4py/PETSc/TAO.pyx:1293 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1293>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[TAOConvergedFunction <#petsc4py.typing.TAOConvergedFunction>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>]]

    getEqualityConstraints()
        Return tuple holding vector and callback of equality constraints.

        Not collective.

        See also:
            setEqualityConstraints, TaoGetEqualityConstraintsRoutine <https://petsc.org/release/manualpages/Tao/TaoGetEqualityConstraintsRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:755 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L755>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[TAOConstraintsFunction <#petsc4py.typing.TAOConstraintsFunction>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>, dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>]]

    getGradient()
        Return the vector used to store the gradient and the evaluation callback.

        Not collective.

        See also:
            setGradient, setHessian, TaoGetGradient <https://petsc.org/release/manualpages/Tao/TaoGetGradient.html>

    Source code at petsc4py/PETSc/TAO.pyx:436 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L436>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, TAOGradientFunction <#petsc4py.typing.TAOGradientFunction>]

    getGradientNorm()
        Return the matrix used to compute inner products.

        Not collective.

        See also:
            setGradientNorm, TaoGetGradientNorm <https://petsc.org/release/manualpages/Tao/TaoGetGradientNorm.html>

    Source code at petsc4py/PETSc/TAO.pyx:1484 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1484>

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getHessian()
        Return the matrices used to store the Hessian and the evaluation callback.

        Not collective.

        See also:
            setHessian, TaoGetHessian <https://petsc.org/release/manualpages/Tao/TaoGetHessian.html>

    Source code at petsc4py/PETSc/TAO.pyx:598 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L598>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>, TAOHessianFunction <#petsc4py.typing.TAOHessianFunction>]

    getInequalityConstraints()
        Return tuple holding vector and callback of inequality constraints.

        Not collective.

        See also:
            setInequalityConstraints, TaoGetInequalityConstraintsRoutine <https://petsc.org/release/manualpages/Tao/TaoGetInequalityConstraintsRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:828 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L828>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[TAOConstraintsFunction <#petsc4py.typing.TAOConstraintsFunction>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>, dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>]]

    getIterationNumber()
        Return the current iteration number.

        Not collective.

        See also:
            setIterationNumber, TaoGetIterationNumber <https://petsc.org/release/manualpages/Tao/TaoGetIterationNumber.html>

    Source code at petsc4py/PETSc/TAO.pyx:1596 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1596>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getJacobianEquality()
        Return matrix, precon matrix and callback of equality constraints Jacobian.

        Not collective.

        See also:
            setJacobianEquality, TaoGetJacobianEqualityRoutine <https://petsc.org/release/manualpages/Tao/TaoGetJacobianEqualityRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:792 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L792>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[TAOConstraintsJacobianFunction <#petsc4py.typing.TAOConstraintsJacobianFunction>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>, dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>]]

    getJacobianInequality()
        Return matrix, precon matrix and callback of ineq. constraints Jacobian.

        Not collective.

        See also:
            setJacobianInequality, TaoGetJacobianInequalityRoutine <https://petsc.org/release/manualpages/Tao/TaoGetJacobianInequalityRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:865 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L865>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[TAOConstraintsJacobianFunction <#petsc4py.typing.TAOConstraintsJacobianFunction>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>, dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>]]

    getKSP()
        Return the linear solver used by the nonlinear solver.

        Not collective.

        See also:
            TaoGetKSP <https://petsc.org/release/manualpages/Tao/TaoGetKSP.html>

    Source code at petsc4py/PETSc/TAO.pyx:1714 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1714>

        Return type
            KSP <#petsc4py.PETSc.KSP>

    getLMVMH0()
        Return the initial Hessian for the quasi-Newton approximation.

        Not collective.

        See also:
            setLMVMH0, TaoLMVMGetH0 <https://petsc.org/release/manualpages/Tao/TaoLMVMGetH0.html>

    Source code at petsc4py/PETSc/TAO.pyx:1511 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1511>

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getLMVMH0KSP()
        Return the KSP <#petsc4py.PETSc.KSP> for the inverse of the initial Hessian approximation.

        Not collective.

        See also:
            setLMVMH0, TaoLMVMGetH0KSP <https://petsc.org/release/manualpages/Tao/TaoLMVMGetH0KSP.html>

    Source code at petsc4py/PETSc/TAO.pyx:1526 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1526>

        Return type
            KSP <#petsc4py.PETSc.KSP>

    getLMVMMat()
        Get the LMVM matrix.

        Not collective.

        See also:
            setLMVMMat, TaoGetLMVMMatrix <https://petsc.org/release/manualpages/Tao/TaoGetLMVMMatrix.html>

    Source code at petsc4py/PETSc/TAO.pyx:709 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L709>

        Return type
            Mat <#petsc4py.PETSc.Mat>

    getLineSearch()
        Return the TAO Line Search object.

        Not collective.

        See also:
            TaoGetLineSearch <https://petsc.org/release/manualpages/Tao/TaoGetLineSearch.html>

    Source code at petsc4py/PETSc/TAO.pyx:2039 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2039>

        Return type
            TAOLineSearch <#petsc4py.PETSc.TAOLineSearch>

    getMaximumFunctionEvaluations()
        Return the maximum number of objective evaluations within the solver.

        Not collective.

        See also:
            setMaximumFunctionEvaluations, TaoGetMaximumFunctionEvaluations <https://petsc.org/release/manualpages/Tao/TaoGetMaximumFunctionEvaluations.html>

    Source code at petsc4py/PETSc/TAO.pyx:1204 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1204>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getMaximumIterations()
        Return the maximum number of solver iterations.

        Not collective.

        See also:
            setMaximumIterations, TaoGetMaximumIterations <https://petsc.org/release/manualpages/Tao/TaoGetMaximumIterations.html>

    Source code at petsc4py/PETSc/TAO.pyx:1177 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1177>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getMonitor()
        Return the callback used to monitor solver convergence.

        Not collective.

        See also:
            setMonitor

    Source code at petsc4py/PETSc/TAO.pyx:1361 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1361>

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[TAOMonitorFunction <#petsc4py.typing.TAOMonitorFunction>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>]]]

    getObjective()
        Return the objective evaluation callback.

        Not collective.

        See also:
            setObjective, TaoGetObjective <https://petsc.org/release/manualpages/Tao/TaoGetObjective.html>

    Source code at petsc4py/PETSc/TAO.pyx:423 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L423>

        Return type
            TAOObjectiveFunction <#petsc4py.typing.TAOObjectiveFunction>

    getObjectiveAndGradient()
        Return the vector used to store the gradient and the evaluation callback.

        Not collective.

        See also:
            setObjectiveGradient, TaoGetObjectiveAndGradient <https://petsc.org/release/manualpages/Tao/TaoGetObjectiveAndGradient.html>

    Source code at petsc4py/PETSc/TAO.pyx:482 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L482>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, TAOObjectiveGradientFunction <#petsc4py.typing.TAOObjectiveGradientFunction>]

    getObjectiveValue()
        Return the current value of the objective function.

        Not collective.

        See also:
            setObjective, TaoGetSolutionStatus <https://petsc.org/release/manualpages/Tao/TaoGetSolutionStatus.html>

    Source code at petsc4py/PETSc/TAO.pyx:1610 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1610>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getOptionsPrefix()
        Return the prefix used for searching for options in the database.

        Not collective.

        See also:
            Working with PETSc options <#petsc-options>, setOptionsPrefix, TaoGetOptionsPrefix <https://petsc.org/release/manualpages/Tao/TaoGetOptionsPrefix.html>

    Source code at petsc4py/PETSc/TAO.pyx:234 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L234>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getPythonContext()
        Return the instance of the class implementing the required Python methods.

        Not collective.

        See also:
            PETSc Python optimization solver type <#petsc-python-tao>, setPythonContext

    Source code at petsc4py/PETSc/TAO.pyx:1994 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1994>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getPythonType()
        Return the fully qualified Python name of the class used by the solver.

        Not collective.

        See also:
            PETSc Python optimization solver type <#petsc-python-tao>, setPythonContext, setPythonType, TaoPythonGetType <https://petsc.org/release/manualpages/Tao/TaoPythonGetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:2024 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2024>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getSolution()
        Return the vector holding the solution.

        Not collective.

        See also:
            setSolution, TaoGetSolution <https://petsc.org/release/manualpages/Tao/TaoGetSolution.html>

    Source code at petsc4py/PETSc/TAO.pyx:1457 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1457>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getSolutionNorm()
        Return the objective function value and the norms of gradient and constraints.

        Not collective.

        Returns

            •   f (float <https://docs.python.org/3/library/functions.html#float>) -- Current value of the objective function.

            •   res (float <https://docs.python.org/3/library/functions.html#float>) -- Current value of the residual norm.

            •   cnorm (float <https://docs.python.org/3/library/functions.html#float>) -- Current value of the constrains norm.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            getSolutionStatus, TaoGetSolutionStatus <https://petsc.org/release/manualpages/Tao/TaoGetSolutionStatus.html>

    Source code at petsc4py/PETSc/TAO.pyx:1640 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1640>

    getSolutionStatus()
        Return the solution status.

        Not collective.

        Returns

            •   its (int <https://docs.python.org/3/library/functions.html#int>) -- Current number of iterations.

            •   f (float <https://docs.python.org/3/library/functions.html#float>) -- Current value of the objective function.

            •   res (float <https://docs.python.org/3/library/functions.html#float>) -- Current value of the residual norm.

            •   cnorm (float <https://docs.python.org/3/library/functions.html#float>) -- Current value of the constrains norm.

            •   step (float <https://docs.python.org/3/library/functions.html#float>) -- Current value of the step.

            •   reason (ConvergedReason <#petsc4py.PETSc.TAO.ConvergedReason>) -- Current value of converged reason.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, ConvergedReason <#petsc4py.PETSc.TAO.ConvergedReason>]

    See also:
            TaoGetSolutionStatus <https://petsc.org/release/manualpages/Tao/TaoGetSolutionStatus.html>

    Source code at petsc4py/PETSc/TAO.pyx:1665 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1665>

    getTerm()
        Return the entire objective term of the solver.

        Not collective.

        Returns

            •   scale (float <https://docs.python.org/3/library/functions.html#float>) -- The scale of the term.

            •   term (TAOTerm <#petsc4py.PETSc.TAOTerm>) -- The term of the whole objective.

            •   params (Vec <#petsc4py.PETSc.Vec>) -- The parameters vector.

            •   mapmat (Mat <#petsc4py.PETSc.Mat>) -- The mapping matrix of the term.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, TAOTerm <#petsc4py.PETSc.TAOTerm>, Vec <#petsc4py.PETSc.Vec>, Mat <#petsc4py.PETSc.Mat>]

    See also:
            TaoGetTerm <https://petsc.org/release/manualpages/Tao/TaoGetTerm.html>

    Source code at petsc4py/PETSc/TAO.pyx:1731 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1731>

    getTolerances()
        Return the tolerance parameters used in the solver convergence tests.

        Not collective.

        Returns

            •   gatol (float <https://docs.python.org/3/library/functions.html#float>) -- The absolute norm of the gradient.

            •   grtol (float <https://docs.python.org/3/library/functions.html#float>) -- The relative norm of the gradient.

            •   gttol (float <https://docs.python.org/3/library/functions.html#float>) -- The relative norm of the gradient with respect to the initial norm of the gradient.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            setTolerances, TaoGetTolerances <https://petsc.org/release/manualpages/Tao/TaoGetTolerances.html>

    Source code at petsc4py/PETSc/TAO.pyx:1140 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1140>

    getType()
        Return the type of the solver.

        Not collective.

        See also:
            setType, TaoGetType <https://petsc.org/release/manualpages/Tao/TaoGetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:192 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L192>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getUpdate()
        Return the callback to compute the update.

        Not collective.

        See also:
            setUpdate

    Source code at petsc4py/PETSc/TAO.pyx:911 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L911>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[TAOUpdateFunction <#petsc4py.typing.TAOUpdateFunction>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>]]

    getVariableBounds()
        Return the lower and upper bounds vectors.

        Not collective.

        See also:
            setVariableBounds, TaoGetVariableBounds <https://petsc.org/release/manualpages/Tao/TaoGetVariableBounds.html>

    Source code at petsc4py/PETSc/TAO.pyx:1541 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1541>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>]

    monitor(its=None, f=None, res=None, cnorm=None, step=None)
        Monitor the solver.

        Collective.

        This function should be called without arguments, unless users want to modify the values internally stored by the solver.

        Parameters

            •   its (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Current number of iterations or None <https://docs.python.org/3/library/constants.html#None> to use the value stored internally by the solver.

            •   f (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Current value of the objective function or None <https://docs.python.org/3/library/constants.html#None> to use the value stored internally by the solver.

            •   res (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Current value of the residual norm or None <https://docs.python.org/3/library/constants.html#None> to use the value stored internally by the solver.

            •   cnorm (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Current value of the constrains norm or None <https://docs.python.org/3/library/constants.html#None> to use the value stored internally by the solver.

            •   step (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Current value of the step or None <https://docs.python.org/3/library/constants.html#None> to use the value stored internally by the solver.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setMonitor, TaoMonitor <https://petsc.org/release/manualpages/Tao/TaoMonitor.html>

    Source code at petsc4py/PETSc/TAO.pyx:1387 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1387>

    setALMMSubsolver(subsolver)
        Set the subsolver inside the ALMM solver.

        Logically collective.

        See also:
            getALMMSubsolver, TaoALMMSetSubsolver <https://petsc.org/release/manualpages/Tao/TaoALMMSetSubsolver.html>

    Source code at petsc4py/PETSc/TAO.pyx:1826 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1826>

        Parameters
            subsolver (TAO <#petsc4py.PETSc.TAO>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setALMMType(tao_almm_type)
        Set the ALMM type of the solver.

        Logically collective.

        Parameters
            tao_almm_type (ALMMType <#petsc4py.PETSc.TAO.ALMMType>) -- The type of the solver.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getALMMType, TaoALMMSetType <https://petsc.org/release/manualpages/Tao/TaoALMMSetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:1839 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1839>

    setAppCtx(appctx)
        Set the application context.

        Source code at petsc4py/PETSc/TAO.pyx:289 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L289>

        Parameters
            appctx (Any <https://docs.python.org/3/library/typing.html#typing.Any>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setBNCGType(cg_type)
        Set the type of the BNCG solver.

        Collective.

        See also:
            getBNCGType, TaoBNCGSetType <https://petsc.org/release/manualpages/Tao/TaoBNCGSetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:1556 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1556>

        Parameters
            cg_type (BNCGType <#petsc4py.PETSc.TAO.BNCGType>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setBRGNDictionaryMatrix(D)
        Set the dictionary matrix.

        Collective.

        See also:
            TaoBRGNSetDictionaryMatrix <https://petsc.org/release/manualpages/Tao/TaoBRGNSetDictionaryMatrix.html>

    Source code at petsc4py/PETSc/TAO.pyx:1930 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1930>

        Parameters
            D (Mat <#petsc4py.PETSc.Mat>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setBRGNRegularizerHessian(hessian, H=None, args=None, kargs=None)
        Set the callback to compute the regularizer Hessian.

        Logically collective.

        See also:
            TaoBRGNSetRegularizerHessianRoutine <https://petsc.org/release/manualpages/Tao/TaoBRGNSetRegularizerHessianRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:1890 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1890>

        Parameters

            •   H (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>)

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>)

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setBRGNRegularizerObjectiveGradient(objgrad, args=None, kargs=None)
        Set the callback to compute the regularizer objective and gradient.

        Logically collective.

        See also:
            TaoBRGNSetRegularizerObjectiveAndGradientRoutine <https://petsc.org/release/manualpages/Tao/TaoBRGNSetRegularizerObjectiveAndGradientRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:1874 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1874>

        Parameters

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>)

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setBRGNRegularizerWeight(weight)
        Set the regularizer weight.

        Collective.

        Source code at petsc4py/PETSc/TAO.pyx:1908 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1908>

        Parameters
            weight (float <https://docs.python.org/3/library/functions.html#float>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setBRGNSmoothL1Epsilon(epsilon)
        Set the smooth L1 epsilon.

        Collective.

        See also:
            TaoBRGNSetL1SmoothEpsilon <https://petsc.org/release/manualpages/Tao/TaoBRGNSetL1SmoothEpsilon.html>

    Source code at petsc4py/PETSc/TAO.pyx:1917 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1917>

        Parameters
            epsilon (float <https://docs.python.org/3/library/functions.html#float>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setConstraintTolerances(catol=None, crtol=None)
        Set the constraints tolerance parameters used in the solver convergence tests.

        Collective.

        Parameters

            •   catol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The absolute norm of the constraints, or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   crtol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The relative norm of the constraints, or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getConstraintTolerances, TaoSetConstraintTolerances <https://petsc.org/release/manualpages/Tao/TaoSetConstraintTolerances.html>

    Source code at petsc4py/PETSc/TAO.pyx:1218 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1218>

    setConstraints(constraints, C=None, args=None, kargs=None)
        Set the callback to compute constraints.

        Logically collective.

        Parameters

            •   constraints (TAOConstraintsFunction <#petsc4py.typing.TAOConstraintsFunction>) -- The callback.

            •   C (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The vector to hold the constraints.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TaoSetConstraintsRoutine <https://petsc.org/release/manualpages/Tao/TaoSetConstraintsRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:534 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L534>

    setConvergedReason(reason)
        Set the termination flag.

        Collective.

        See also:
            getConvergedReason, TaoSetConvergedReason <https://petsc.org/release/manualpages/Tao/TaoSetConvergedReason.html>

    Source code at petsc4py/PETSc/TAO.pyx:1305 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1305>

        Parameters
            reason (ConvergedReason <#petsc4py.PETSc.TAO.ConvergedReason>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setConvergenceTest(converged, args=None, kargs=None)
        Set the callback used to test for solver convergence.

        Logically collective.

        Parameters

            •   converged (TAOConvergedFunction <#petsc4py.typing.TAOConvergedFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The callback. If None <https://docs.python.org/3/library/constants.html#None>, reset to the default convergence test.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getConvergenceTest, TaoSetConvergenceTest <https://petsc.org/release/manualpages/Tao/TaoSetConvergenceTest.html>

    Source code at petsc4py/PETSc/TAO.pyx:1265 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1265>

    setEqualityConstraints(equality_constraints, c, args=None, kargs=None)
        Set equality constraints callback.

        Logically collective.

        See also:
            TaoSetEqualityConstraintsRoutine <https://petsc.org/release/manualpages/Tao/TaoSetEqualityConstraintsRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:737 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L737>

        Parameters

            •   c (Vec <#petsc4py.PETSc.Vec>)

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>)

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFromOptions()
        Configure the solver from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, TaoSetFromOptions <https://petsc.org/release/manualpages/Tao/TaoSetFromOptions.html>

    Source code at petsc4py/PETSc/TAO.pyx:248 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L248>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setGradient(gradient, g=None, args=None, kargs=None)
        Set the gradient evaluation callback.

        Logically collective.

        Parameters

            •   gradient (TAOGradientFunction <#petsc4py.typing.TAOGradientFunction>) -- The gradient callback.

            •   g (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The vector to store the gradient.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setObjective, setObjectiveGradient, setHessian, TaoSetGradient <https://petsc.org/release/manualpages/Tao/TaoSetGradient.html>

    Source code at petsc4py/PETSc/TAO.pyx:394 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L394>

    setGradientNorm(mat)
        Set the matrix used to compute inner products.

        Collective.

        See also:
            getGradientNorm, TaoSetGradientNorm <https://petsc.org/release/manualpages/Tao/TaoSetGradientNorm.html>

    Source code at petsc4py/PETSc/TAO.pyx:1472 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1472>

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setHessian(hessian, H=None, P=None, args=None, kargs=None)
        Set the callback to compute the Hessian matrix.

        Logically collective.

        Parameters

            •   hessian (TAOHessianFunction <#petsc4py.typing.TAOHessianFunction>) -- The Hessian callback.

            •   H (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix to store the Hessian.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix to construct the preconditioner.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getHessian, setObjective, setObjectiveGradient, setGradient, TaoSetHessian <https://petsc.org/release/manualpages/Tao/TaoSetHessian.html>

    Source code at petsc4py/PETSc/TAO.pyx:563 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L563>

    setInequalityConstraints(inequality_constraints, c, args=None, kargs=None)
        Set inequality constraints callback.

        Logically collective.

        See also:
            TaoSetInequalityConstraintsRoutine <https://petsc.org/release/manualpages/Tao/TaoSetInequalityConstraintsRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:810 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L810>

        Parameters

            •   c (Vec <#petsc4py.PETSc.Vec>)

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>)

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setInitialTrustRegionRadius(radius)
        Set the initial trust region radius.

        Collective.

        See also:
            TaoSetInitialTrustRegionRadius <https://petsc.org/release/manualpages/Tao/TaoSetInitialTrustRegionRadius.html>

    Source code at petsc4py/PETSc/TAO.pyx:274 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L274>

        Parameters
            radius (float <https://docs.python.org/3/library/functions.html#float>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setIterationNumber(its)
        Set the current iteration number.

        Collective.

        See also:
            getIterationNumber, TaoSetIterationNumber <https://petsc.org/release/manualpages/Tao/TaoSetIterationNumber.html>

    Source code at petsc4py/PETSc/TAO.pyx:1583 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1583>

        Parameters
            its (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setJacobian(jacobian, J=None, P=None, args=None, kargs=None)
        Set the callback to compute the Jacobian.

        Logically collective.

        Parameters

            •   jacobian (TAOJacobianFunction <#petsc4py.typing.TAOJacobianFunction>) -- The Jacobian callback.

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix to store the Jacobian.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix to construct the preconditioner.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TaoSetJacobianRoutine <https://petsc.org/release/manualpages/Tao/TaoSetJacobianRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:616 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L616>

    setJacobianDesign(jacobian_design, J=None, args=None, kargs=None)
        Set Jacobian design callback.

        Logically collective.

        See also:
            TaoSetJacobianDesignRoutine <https://petsc.org/release/manualpages/Tao/TaoSetJacobianDesignRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:689 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L689>

        Parameters

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>)

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>)

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setJacobianEquality(jacobian_equality, J=None, P=None, args=None, kargs=None)
        Set Jacobian equality constraints callback.

        Logically collective.

        See also:
            TaoSetJacobianEqualityRoutine <https://petsc.org/release/manualpages/Tao/TaoSetJacobianEqualityRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:770 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L770>

        Parameters

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>)

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>)

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>)

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setJacobianInequality(jacobian_inequality, J=None, P=None, args=None, kargs=None)
        Set Jacobian inequality constraints callback.

        Logically collective.

        See also:
            TaoSetJacobianInequalityRoutine <https://petsc.org/release/manualpages/Tao/TaoSetJacobianInequalityRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:843 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L843>

        Parameters

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>)

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>)

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>)

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setJacobianResidual(jacobian, J=None, P=None, args=None, kargs=None)
        Set the callback to compute the least-squares residual Jacobian.

        Logically collective.

        Parameters

            •   jacobian (TAOJacobianResidualFunction <#petsc4py.typing.TAOJacobianResidualFunction>) -- The Jacobian callback.

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix to store the Jacobian.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix to construct the preconditioner.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setResidual, TaoSetJacobianResidualRoutine <https://petsc.org/release/manualpages/Tao/TaoSetJacobianResidualRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:361 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L361>

    setJacobianState(jacobian_state, J=None, P=None, I=None, args=None, kargs=None)
        Set Jacobian state callback.

        Logically collective.

        See also:
            TaoSetJacobianStateRoutine <https://petsc.org/release/manualpages/Tao/TaoSetJacobianStateRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:665 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L665>

        Parameters

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>)

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>)

            •   I (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>)

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>)

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setLMVMH0(mat)
        Set the initial Hessian for the quasi-Newton approximation.

        Collective.

        See also:
            getLMVMH0, TaoLMVMSetH0 <https://petsc.org/release/manualpages/Tao/TaoLMVMSetH0.html>

    Source code at petsc4py/PETSc/TAO.pyx:1499 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1499>

        Parameters
            mat (Mat <#petsc4py.PETSc.Mat>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setLMVMMat(M)
        Set the LMVM matrix.

        Logically collective.

        See also:
            getLMVMMat, TaoSetLMVMMatrix <https://petsc.org/release/manualpages/Tao/TaoSetLMVMMatrix.html>

    Source code at petsc4py/PETSc/TAO.pyx:724 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L724>

        Parameters
            M (Mat <#petsc4py.PETSc.Mat>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setMaximumFunctionEvaluations(mit)
        Set the maximum number of objective evaluations within the solver.

        Collective.

        See also:
            setMaximumIterations, TaoSetMaximumFunctionEvaluations <https://petsc.org/release/manualpages/Tao/TaoSetMaximumFunctionEvaluations.html>

    Source code at petsc4py/PETSc/TAO.pyx:1191 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1191>

        Parameters
            mit (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setMaximumIterations(mit)
        Set the maximum number of solver iterations.

        Collective.

        See also:
            setTolerances, TaoSetMaximumIterations <https://petsc.org/release/manualpages/Tao/TaoSetMaximumIterations.html>

    Source code at petsc4py/PETSc/TAO.pyx:1164 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1164>

        Parameters
            mit (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    setMonitor(monitor, args=None, kargs=None)
        Set the callback used to monitor solver convergence.

        Logically collective.

        Parameters

            •   monitor (TAOMonitorFunction <#petsc4py.typing.TAOMonitorFunction>) -- The callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getMonitor, TaoMonitorSet <https://petsc.org/release/manualpages/Tao/TaoMonitorSet.html>

    Source code at petsc4py/PETSc/TAO.pyx:1332 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1332>

    setObjective(objective, args=None, kargs=None)
        Set the objective function evaluation callback.

        Logically collective.

        Parameters

            •   objective (TAOObjectiveFunction <#petsc4py.typing.TAOObjectiveFunction>) -- The objective function callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setGradient, setObjectiveGradient, TaoSetObjective <https://petsc.org/release/manualpages/Tao/TaoSetObjective.html>

    Source code at petsc4py/PETSc/TAO.pyx:309 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L309>

    setObjectiveGradient(objgrad, g=None, args=None, kargs=None)
        Set the objective function and gradient evaluation callback.

        Logically collective.

        Parameters

            •   objgrad (TAOObjectiveGradientFunction <#petsc4py.typing.TAOObjectiveGradientFunction>) -- The objective function and gradient callback.

            •   g (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The vector to store the gradient.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setObjective, setGradient, setHessian, getObjectiveAndGradient, TaoSetObjectiveAndGradient <https://petsc.org/release/manualpages/Tao/TaoSetObjectiveAndGradient.html>

    Source code at petsc4py/PETSc/TAO.pyx:452 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L452>

    setOptionsPrefix(prefix)
        Set the prefix used for searching for options in the database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, TaoSetOptionsPrefix <https://petsc.org/release/manualpages/Tao/TaoSetOptionsPrefix.html>

    Source code at petsc4py/PETSc/TAO.pyx:206 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L206>

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPythonContext(context)
        Set the instance of the class implementing the required Python methods.

        Not collective.

        See also:
            PETSc Python optimization solver type <#petsc-python-tao>, getPythonContext

    Source code at petsc4py/PETSc/TAO.pyx:1982 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1982>

        Parameters
            context (Any <https://docs.python.org/3/library/typing.html#typing.Any>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPythonType(py_type)
        Set the fully qualified Python name of the class to be used.

        Collective.

        See also:
            PETSc Python optimization solver type <#petsc-python-tao>, setPythonContext, getPythonType, TaoPythonSetType <https://petsc.org/release/manualpages/Tao/TaoPythonSetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:2009 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2009>

        Parameters
            py_type (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setResidual(residual, R, args=None, kargs=None)
        Set the residual evaluation callback for least-squares applications.

        Logically collective.

        Parameters

            •   residual (TAOResidualFunction <#petsc4py.typing.TAOResidualFunction>) -- The residual callback.

            •   R (Vec <#petsc4py.PETSc.Vec>) -- The vector to store the residual.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setJacobianResidual, TaoSetResidualRoutine <https://petsc.org/release/manualpages/Tao/TaoSetResidualRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:334 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L334>

    setSolution(x)
        Set the vector used to store the solution.

        Collective.

        See also:
            getSolution, TaoSetSolution <https://petsc.org/release/manualpages/Tao/TaoSetSolution.html>

    Source code at petsc4py/PETSc/TAO.pyx:297 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L297>

        Parameters
            x (Vec <#petsc4py.PETSc.Vec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setStateDesignIS(state=None, design=None)
        Set the index sets indicating state and design variables.

        Collective.

        See also:
            TaoSetStateDesignIS <https://petsc.org/release/manualpages/Tao/TaoSetStateDesignIS.html>

    Source code at petsc4py/PETSc/TAO.pyx:650 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L650>

        Parameters

            •   state (IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>)

            •   design (IS <#petsc4py.PETSc.IS> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setTolerances(gatol=None, grtol=None, gttol=None)
        Set the tolerance parameters used in the solver convergence tests.

        Collective.

        Parameters

            •   gatol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The absolute norm of the gradient, or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   grtol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The relative norm of the gradient with respect to the initial norm of the objective, or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

            •   gttol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The relative norm of the gradient with respect to the initial norm of the gradient, or DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set. Defaults to CURRENT <#petsc4py.PETSc.CURRENT>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getTolerances, TaoSetTolerances <https://petsc.org/release/manualpages/Tao/TaoSetTolerances.html>

    Source code at petsc4py/PETSc/TAO.pyx:1107 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1107>

    setType(tao_type)
        Set the type of the solver.

        Logically collective.

        Parameters
            tao_type (Type <#petsc4py.PETSc.TAO.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of the solver.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getType, TaoSetType <https://petsc.org/release/manualpages/Tao/TaoSetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:173 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L173>

    setUp()
        Set up the internal data structures for using the solver.

        Collective.

        See also:
            TaoSetUp <https://petsc.org/release/manualpages/Tao/TaoSetUp.html>

    Source code at petsc4py/PETSc/TAO.pyx:260 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L260>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setUpdate(update, args=None, kargs=None)
        Set the callback to compute update at each optimization step.

        Logically collective.

        Parameters

            •   update (TAOUpdateFunction <#petsc4py.typing.TAOUpdateFunction>) -- The update callback or None <https://docs.python.org/3/library/constants.html#None> to reset it.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getUpdate, TaoSetUpdate <https://petsc.org/release/manualpages/Tao/TaoSetUpdate.html>

    Source code at petsc4py/PETSc/TAO.pyx:882 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L882>

    setVariableBounds(varbounds, args=None, kargs=None)
        Set the lower and upper bounds for the optimization problem.

        Logically collective.

        Parameters

            •   varbounds (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>] | TAOVariableBoundsFunction <#petsc4py.typing.TAOVariableBoundsFunction>) -- Either a tuple of Vec <#petsc4py.PETSc.Vec> or a TAOVariableBoundsFunction <#petsc4py.typing.TAOVariableBoundsFunction> callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TaoSetVariableBounds <https://petsc.org/release/manualpages/Tao/TaoSetVariableBounds.html>, TaoSetVariableBoundsRoutine <https://petsc.org/release/manualpages/Tao/TaoSetVariableBoundsRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:498 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L498>

    solve(x=None)
        Solve the optimization problem.

        Collective.

        Parameters
            x (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The starting vector or None <https://docs.python.org/3/library/constants.html#None> to use the vector stored internally.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setSolution, getSolution, TaoSolve <https://petsc.org/release/manualpages/Tao/TaoSolve.html>

    Source code at petsc4py/PETSc/TAO.pyx:1438 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L1438>

    view(viewer=None)
        View the solver.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TaoView <https://petsc.org/release/manualpages/Tao/TaoView.html>

    Source code at petsc4py/PETSc/TAO.pyx:120 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L120>

Attributes Documentation

    appctx
        Application context.

        Source code at petsc4py/PETSc/TAO.pyx:2060 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2060>

    cnorm
        Constraints norm.

        Source code at petsc4py/PETSc/TAO.pyx:2129 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2129>

    converged
        Boolean indicating if the solver has converged.

        Source code at petsc4py/PETSc/TAO.pyx:2166 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2166>

    ctol
        Broken.

        Source code at petsc4py/PETSc/TAO.pyx:2104 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2104>

    diverged
        Boolean indicating if the solver has failed.

        Source code at petsc4py/PETSc/TAO.pyx:2171 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2171>

    ftol
        Broken.

        Source code at petsc4py/PETSc/TAO.pyx:2078 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2078>

    function
        Objective value.

        Source code at petsc4py/PETSc/TAO.pyx:2144 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2144>

    gnorm
        Gradient norm.

        Source code at petsc4py/PETSc/TAO.pyx:2124 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2124>

    gradient
        Gradient vector.

        Source code at petsc4py/PETSc/TAO.pyx:2149 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2149>

    gtol
        Broken.

        Source code at petsc4py/PETSc/TAO.pyx:2091 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2091>

    iterating
        Boolean indicating if the solver has not converged yet.

        Source code at petsc4py/PETSc/TAO.pyx:2161 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2161>

    its Number of iterations.

        Source code at petsc4py/PETSc/TAO.pyx:2119 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2119>

    ksp Linear solver.

        Source code at petsc4py/PETSc/TAO.pyx:2070 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2070>

    objective
        Objective value.

        Source code at petsc4py/PETSc/TAO.pyx:2139 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2139>

    reason
        Converged reason.

        Source code at petsc4py/PETSc/TAO.pyx:2156 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2156>

    solution
        Solution vector.

        Source code at petsc4py/PETSc/TAO.pyx:2134 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2134>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TAOLineSearch

    class petsc4py.PETSc.TAOLineSearch
        Bases: Object <#petsc4py.PETSc.Object>

        TAO Line Search.

        Enumerations
        ConvergedReason <#petsc4py.PETSc.TAOLineSearch.ConvergedReason> | TAO Line Search Termination Reasons.
        Type <#petsc4py.PETSc.TAOLineSearch.Type> | TAO Line Search Types.

  petsc4py.PETSc.TAOLineSearch.ConvergedReason

    class petsc4py.PETSc.TAOLineSearch.ConvergedReason
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        TAO Line Search Termination Reasons.

        Attributes Summary
        CONTINUE_SEARCH | Constant CONTINUE_SEARCH of type int <https://docs.python.org/3/library/functions.html#int>
        FAILED_ASCENT | Constant FAILED_ASCENT of type int <https://docs.python.org/3/library/functions.html#int>
        FAILED_BADPARAMETER | Constant FAILED_BADPARAMETER of type int <https://docs.python.org/3/library/functions.html#int>
        FAILED_INFORNAN | Constant FAILED_INFORNAN of type int <https://docs.python.org/3/library/functions.html#int>
        HALTED_LOWERBOUND | Constant HALTED_LOWERBOUND of type int <https://docs.python.org/3/library/functions.html#int>
        HALTED_MAXFCN | Constant HALTED_MAXFCN of type int <https://docs.python.org/3/library/functions.html#int>
        HALTED_OTHER | Constant HALTED_OTHER of type int <https://docs.python.org/3/library/functions.html#int>
        HALTED_RTOL | Constant HALTED_RTOL of type int <https://docs.python.org/3/library/functions.html#int>
        HALTED_UPPERBOUND | Constant HALTED_UPPERBOUND of type int <https://docs.python.org/3/library/functions.html#int>
        HALTED_USER | Constant HALTED_USER of type int <https://docs.python.org/3/library/functions.html#int>
        SUCCESS | Constant SUCCESS of type int <https://docs.python.org/3/library/functions.html#int>
        SUCCESS_USER | Constant SUCCESS_USER of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        CONTINUE_SEARCH: int <https://docs.python.org/3/library/functions.html#int> = CONTINUE_SEARCH
            Constant CONTINUE_SEARCH of type int <https://docs.python.org/3/library/functions.html#int>

        FAILED_ASCENT: int <https://docs.python.org/3/library/functions.html#int> = FAILED_ASCENT
            Constant FAILED_ASCENT of type int <https://docs.python.org/3/library/functions.html#int>

        FAILED_BADPARAMETER: int <https://docs.python.org/3/library/functions.html#int> = FAILED_BADPARAMETER
            Constant FAILED_BADPARAMETER of type int <https://docs.python.org/3/library/functions.html#int>

        FAILED_INFORNAN: int <https://docs.python.org/3/library/functions.html#int> = FAILED_INFORNAN
            Constant FAILED_INFORNAN of type int <https://docs.python.org/3/library/functions.html#int>

        HALTED_LOWERBOUND: int <https://docs.python.org/3/library/functions.html#int> = HALTED_LOWERBOUND
            Constant HALTED_LOWERBOUND of type int <https://docs.python.org/3/library/functions.html#int>

        HALTED_MAXFCN: int <https://docs.python.org/3/library/functions.html#int> = HALTED_MAXFCN
            Constant HALTED_MAXFCN of type int <https://docs.python.org/3/library/functions.html#int>

        HALTED_OTHER: int <https://docs.python.org/3/library/functions.html#int> = HALTED_OTHER
            Constant HALTED_OTHER of type int <https://docs.python.org/3/library/functions.html#int>

        HALTED_RTOL: int <https://docs.python.org/3/library/functions.html#int> = HALTED_RTOL
            Constant HALTED_RTOL of type int <https://docs.python.org/3/library/functions.html#int>

        HALTED_UPPERBOUND: int <https://docs.python.org/3/library/functions.html#int> = HALTED_UPPERBOUND
            Constant HALTED_UPPERBOUND of type int <https://docs.python.org/3/library/functions.html#int>

        HALTED_USER: int <https://docs.python.org/3/library/functions.html#int> = HALTED_USER
            Constant HALTED_USER of type int <https://docs.python.org/3/library/functions.html#int>

        SUCCESS: int <https://docs.python.org/3/library/functions.html#int> = SUCCESS
            Constant SUCCESS of type int <https://docs.python.org/3/library/functions.html#int>

        SUCCESS_USER: int <https://docs.python.org/3/library/functions.html#int> = SUCCESS_USER
            Constant SUCCESS_USER of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TAOLineSearch.Type

    class petsc4py.PETSc.TAOLineSearch.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        TAO Line Search Types.

        Attributes Summary
        ARMIJO | Object ARMIJO of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GPCG | Object GPCG of type str <https://docs.python.org/3/library/stdtypes.html#str>
        IPM | Object IPM of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MORETHUENTE | Object MORETHUENTE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        OWARMIJO | Object OWARMIJO of type str <https://docs.python.org/3/library/stdtypes.html#str>
        UNIT | Object UNIT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        ARMIJO: str <https://docs.python.org/3/library/stdtypes.html#str> = ARMIJO
            Object ARMIJO of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GPCG: str <https://docs.python.org/3/library/stdtypes.html#str> = GPCG
            Object GPCG of type str <https://docs.python.org/3/library/stdtypes.html#str>

        IPM: str <https://docs.python.org/3/library/stdtypes.html#str> = IPM
            Object IPM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MORETHUENTE: str <https://docs.python.org/3/library/stdtypes.html#str> = MORETHUENTE
            Object MORETHUENTE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        OWARMIJO: str <https://docs.python.org/3/library/stdtypes.html#str> = OWARMIJO
            Object OWARMIJO of type str <https://docs.python.org/3/library/stdtypes.html#str>

        UNIT: str <https://docs.python.org/3/library/stdtypes.html#str> = UNIT
            Object UNIT of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
apply(x, g, s) | Performs a line-search in a given step direction.
create([comm]) | Create a TAO linesearch.
destroy() | Destroy the linesearch object.
getOptionsPrefix() | Return the prefix used for searching for options in the database.
getType() | Return the type of the linesearch.
setFromOptions() | Configure the linesearch from the options database.
setGradient(gradient[, args, kargs]) | Set the gradient evaluation callback.
setInitialStepLength(s) | Sets the initial step length of a line search.
setObjective(objective[, args, kargs]) | Set the objective function evaluation callback.
setObjectiveGradient(objgrad[, args, kargs]) | Set the objective function and gradient evaluation callback.
setOptionsPrefix([prefix]) | Set the prefix used for searching for options in the database.
setType(ls_type) | Set the type of the linesearch.
setUp() | Set up the internal data structures for using the linesearch.
useTAORoutine(tao) | Use the objective and gradient evaluation routines from the given Tao object.
view([viewer]) | View the linesearch object.

Methods Documentation

    apply(x, g, s)
        Performs a line-search in a given step direction.

        Collective.

        See also:
            TaoLineSearchApply <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchApply.html>

    Source code at petsc4py/PETSc/TAO.pyx:2459 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2459>

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>)

            •   g (Vec <#petsc4py.PETSc.Vec>)

            •   s (Vec <#petsc4py.PETSc.Vec>)

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, str <https://docs.python.org/3/library/stdtypes.html#str>]

    create(comm=None)
        Create a TAO linesearch.

        Collective.

        Parameters
            comm -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>, TaoLineSearchCreate <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchCreate.html>

    Source code at petsc4py/PETSc/TAO.pyx:2262 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2262>

    destroy()
        Destroy the linesearch object.

        Collective.

        See also:
            TaoLineSearchDestroy <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchDestroy.html>

    Source code at petsc4py/PETSc/TAO.pyx:2249 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2249>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getOptionsPrefix()
        Return the prefix used for searching for options in the database.

        Not collective.

        See also:
            Working with PETSc options <#petsc-options>, setOptionsPrefix, TaoLineSearchGetOptionsPrefix <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchGetOptionsPrefix.html>

    Source code at petsc4py/PETSc/TAO.pyx:2354 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2354>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getType()
        Return the type of the linesearch.

        Not collective.

        See also:
            setType, TaoLineSearchGetType <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchGetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:2302 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2302>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    setFromOptions()
        Configure the linesearch from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, TaoLineSearchSetFromOptions <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchSetFromOptions.html>

    Source code at petsc4py/PETSc/TAO.pyx:2316 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2316>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setGradient(gradient, args=None, kargs=None)
        Set the gradient evaluation callback.

        Logically collective.

        Parameters

            •   gradient (TAOLSGradientFunction <#petsc4py.typing.TAOLSGradientFunction>) -- The gradient callback.

            •   g -- The vector to store the gradient.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setObjective, setObjectiveGradient, setHessian <#petsc4py.PETSc.TAO.setHessian>, TaoLineSearchSetGradientRoutine <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchSetGradientRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:2393 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2393>

    setInitialStepLength(s)
        Sets the initial step length of a line search.

        Logically collective.

        See also:
            TaoLineSearchSetInitialStepLength <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchSetInitialStepLength.html>

    Source code at petsc4py/PETSc/TAO.pyx:2475 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2475>

        Parameters
            s (float <https://docs.python.org/3/library/functions.html#float>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setObjective(objective, args=None, kargs=None)
        Set the objective function evaluation callback.

        Logically collective.

        Parameters

            •   objective (TAOLSObjectiveFunction <#petsc4py.typing.TAOLSObjectiveFunction>) -- The objective function callback.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setGradient, setObjectiveGradient, TaoLineSearchSetObjectiveRoutine <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchSetObjectiveRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:2368 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2368>

    setObjectiveGradient(objgrad, args=None, kargs=None)
        Set the objective function and gradient evaluation callback.

        Logically collective.

        Parameters

            •   objgrad (TAOLSObjectiveGradientFunction <#petsc4py.typing.TAOLSObjectiveGradientFunction>) -- The objective function and gradient callback.

            •   g -- The vector to store the gradient.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Positional arguments for the callback.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Keyword arguments for the callback.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            setObjective, setGradient, setHessian <#petsc4py.PETSc.TAO.setHessian>, getObjectiveAndGradient <#petsc4py.PETSc.TAO.getObjectiveAndGradient>, TaoLineSearchSetObjectiveAndGradientRoutine <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchSetObjectiveAndGradientRoutine.html>

    Source code at petsc4py/PETSc/TAO.pyx:2420 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2420>

    setOptionsPrefix(prefix=None)
        Set the prefix used for searching for options in the database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, TaoLineSearchSetOptionsPrefix <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchSetOptionsPrefix.html>

    Source code at petsc4py/PETSc/TAO.pyx:2340 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2340>

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setType(ls_type)
        Set the type of the linesearch.

        Logically collective.

        Parameters
            ls_type (Type <#petsc4py.PETSc.TAOLineSearch.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of the solver.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getType, TaoLineSearchSetType <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchSetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:2283 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2283>

    setUp()
        Set up the internal data structures for using the linesearch.

        Collective.

        See also:
            TaoLineSearchSetUp <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchSetUp.html>

    Source code at petsc4py/PETSc/TAO.pyx:2328 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2328>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    useTAORoutine(tao)
        Use the objective and gradient evaluation routines from the given Tao object.

        Logically collective.

        See also:
            TaoLineSearchUseTaoRoutines <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchUseTaoRoutines.html>

    Source code at petsc4py/PETSc/TAO.pyx:2447 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2447>

        Parameters
            tao (TAO <#petsc4py.PETSc.TAO>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        View the linesearch object.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TaoLineSearchView <https://petsc.org/release/manualpages/TaoLineSearch/TaoLineSearchView.html>

    Source code at petsc4py/PETSc/TAO.pyx:2230 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2230>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TAOTerm

    class petsc4py.PETSc.TAOTerm
        Bases: Object <#petsc4py.PETSc.Object>

        TAO Term.

        Enumerations
        Type <#petsc4py.PETSc.TAOTerm.Type> | TAO Term Types.

  petsc4py.PETSc.TAOTerm.Type

    class petsc4py.PETSc.TAOTerm.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        TAO Term Types.

        Attributes Summary
        CALLBACKS | Object CALLBACKS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        HALFL2SQUARED | Object HALFL2SQUARED of type str <https://docs.python.org/3/library/stdtypes.html#str>
        L1 | Object L1 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        QUADRATIC | Object QUADRATIC of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SHELL | Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SUM | Object SUM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        CALLBACKS: str <https://docs.python.org/3/library/stdtypes.html#str> = CALLBACKS
            Object CALLBACKS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HALFL2SQUARED: str <https://docs.python.org/3/library/stdtypes.html#str> = HALFL2SQUARED
            Object HALFL2SQUARED of type str <https://docs.python.org/3/library/stdtypes.html#str>

        L1: str <https://docs.python.org/3/library/stdtypes.html#str> = L1
            Object L1 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        QUADRATIC: str <https://docs.python.org/3/library/stdtypes.html#str> = QUADRATIC
            Object QUADRATIC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SHELL: str <https://docs.python.org/3/library/stdtypes.html#str> = SHELL
            Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SUM: str <https://docs.python.org/3/library/stdtypes.html#str> = SUM
            Object SUM of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
create([comm]) | Create a TAO Term.
destroy() | Destroy the term object.
getType() | Return the type of the term.
setFromOptions() | Configure the term from the options database.
setSolutionTemplate(x) | Set the solution vector template.
setType(term_type) | Set the type of the term.
setUp() | Set up the internal data structures for using the term.
view([viewer]) | View the term object.

Methods Documentation

    create(comm=None)
        Create a TAO Term.

        Collective.

        Parameters
            comm -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>, TaoTermCreate <https://petsc.org/release/manualpages/TaoTerm/TaoTermCreate.html>

    Source code at petsc4py/PETSc/TAO.pyx:2550 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2550>

    destroy()
        Destroy the term object.

        Collective.

        See also:
            TaoTermDestroy <https://petsc.org/release/manualpages/TaoTerm/TaoTermDestroy.html>

    Source code at petsc4py/PETSc/TAO.pyx:2537 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2537>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getType()
        Return the type of the term.

        Not collective.

        See also:
            setType, TaoTermGetType <https://petsc.org/release/manualpages/TaoTerm/TaoTermGetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:2590 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2590>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    setFromOptions()
        Configure the term from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, TaoTermSetFromOptions <https://petsc.org/release/manualpages/TaoTerm/TaoTermSetFromOptions.html>

    Source code at petsc4py/PETSc/TAO.pyx:2604 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2604>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setSolutionTemplate(x)
        Set the solution vector template.

        Collective.

        See also:
            TaoTermSetSolutionTemplate <https://petsc.org/release/manualpages/TaoTerm/TaoTermSetSolutionTemplate.html>

    Source code at petsc4py/PETSc/TAO.pyx:2628 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2628>

        Parameters
            x (Vec <#petsc4py.PETSc.Vec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setType(term_type)
        Set the type of the term.

        Logically collective.

        Parameters
            term_type (Type <#petsc4py.PETSc.TAOTerm.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of the term.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getType, TaoTermSetType <https://petsc.org/release/manualpages/TaoTerm/TaoTermSetType.html>

    Source code at petsc4py/PETSc/TAO.pyx:2571 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2571>

    setUp()
        Set up the internal data structures for using the term.

        Collective.

        See also:
            TaoTermSetUp <https://petsc.org/release/manualpages/TaoTerm/TaoTermSetUp.html>

    Source code at petsc4py/PETSc/TAO.pyx:2616 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2616>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        View the term object.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TaoTermView <https://petsc.org/release/manualpages/TaoTerm/TaoTermView.html>

    Source code at petsc4py/PETSc/TAO.pyx:2518 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TAO.pyx#L2518>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TS

    class petsc4py.PETSc.TS
        Bases: Object <#petsc4py.PETSc.Object>

        ODE integrator.

        TS is described in the PETSc manual <https://petsc.org/release/manual/ts.html>.

        See also:
            TS <https://petsc.org/release/manualpages/TS/TS.html>

    Enumerations
    ARKIMEXType <#petsc4py.PETSc.TS.ARKIMEXType> | The ARKIMEX subtype.
    ConvergedReason <#petsc4py.PETSc.TS.ConvergedReason> | The reason the time step is converging.
    DIRKType <#petsc4py.PETSc.TS.DIRKType> | The DIRK subtype.
    EquationType <#petsc4py.PETSc.TS.EquationType> | Distinguishes among types of explicit and implicit equations.
    ExactFinalTime <#petsc4py.PETSc.TS.ExactFinalTime> | The method for ending time stepping.
    ProblemType <#petsc4py.PETSc.TS.ProblemType> | Distinguishes linear and nonlinear problems.
    RKType <#petsc4py.PETSc.TS.RKType> | The RK subtype.
    Type <#petsc4py.PETSc.TS.Type> | The time stepping method.

  petsc4py.PETSc.TS.ARKIMEXType

    class petsc4py.PETSc.TS.ARKIMEXType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The ARKIMEX subtype.

        Attributes Summary
        ARKIMEX1BEE | Object ARKIMEX1BEE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEX2C | Object ARKIMEX2C of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEX2D | Object ARKIMEX2D of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEX2E | Object ARKIMEX2E of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEX3 | Object ARKIMEX3 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEX4 | Object ARKIMEX4 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEX5 | Object ARKIMEX5 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEXA2 | Object ARKIMEXA2 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEXARS122 | Object ARKIMEXARS122 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEXARS443 | Object ARKIMEXARS443 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEXBPR3 | Object ARKIMEXBPR3 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEXL2 | Object ARKIMEXL2 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEXPRSSP2 | Object ARKIMEXPRSSP2 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        ARKIMEX1BEE: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEX1BEE
            Object ARKIMEX1BEE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEX2C: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEX2C
            Object ARKIMEX2C of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEX2D: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEX2D
            Object ARKIMEX2D of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEX2E: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEX2E
            Object ARKIMEX2E of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEX3: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEX3
            Object ARKIMEX3 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEX4: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEX4
            Object ARKIMEX4 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEX5: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEX5
            Object ARKIMEX5 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEXA2: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEXA2
            Object ARKIMEXA2 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEXARS122: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEXARS122
            Object ARKIMEXARS122 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEXARS443: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEXARS443
            Object ARKIMEXARS443 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEXBPR3: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEXBPR3
            Object ARKIMEXBPR3 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEXL2: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEXL2
            Object ARKIMEXL2 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEXPRSSP2: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEXPRSSP2
            Object ARKIMEXPRSSP2 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TS.ConvergedReason

    class petsc4py.PETSc.TS.ConvergedReason
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The reason the time step is converging.

        Attributes Summary
        CONVERGED_EVENT | Constant CONVERGED_EVENT of type int <https://docs.python.org/3/library/functions.html#int>
        CONVERGED_ITERATING | Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int>
        CONVERGED_ITS | Constant CONVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int>
        CONVERGED_TIME | Constant CONVERGED_TIME of type int <https://docs.python.org/3/library/functions.html#int>
        CONVERGED_USER | Constant CONVERGED_USER of type int <https://docs.python.org/3/library/functions.html#int>
        DIVERGED_NONLINEAR_SOLVE | Constant DIVERGED_NONLINEAR_SOLVE of type int <https://docs.python.org/3/library/functions.html#int>
        DIVERGED_STEP_REJECTED | Constant DIVERGED_STEP_REJECTED of type int <https://docs.python.org/3/library/functions.html#int>
        ITERATING | Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        CONVERGED_EVENT: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_EVENT
            Constant CONVERGED_EVENT of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_ITERATING: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_ITERATING
            Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_ITS: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_ITS
            Constant CONVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_TIME: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_TIME
            Constant CONVERGED_TIME of type int <https://docs.python.org/3/library/functions.html#int>

        CONVERGED_USER: int <https://docs.python.org/3/library/functions.html#int> = CONVERGED_USER
            Constant CONVERGED_USER of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_NONLINEAR_SOLVE: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_NONLINEAR_SOLVE
            Constant DIVERGED_NONLINEAR_SOLVE of type int <https://docs.python.org/3/library/functions.html#int>

        DIVERGED_STEP_REJECTED: int <https://docs.python.org/3/library/functions.html#int> = DIVERGED_STEP_REJECTED
            Constant DIVERGED_STEP_REJECTED of type int <https://docs.python.org/3/library/functions.html#int>

        ITERATING: int <https://docs.python.org/3/library/functions.html#int> = ITERATING
            Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TS.DIRKType

    class petsc4py.PETSc.TS.DIRKType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The DIRK subtype.

        Attributes Summary
        DIRK657A | Object DIRK657A of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRK658A | Object DIRK658A of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRK7510SAL | Object DIRK7510SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRK759A | Object DIRK759A of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRK8614A | Object DIRK8614A of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRK8616SAL | Object DIRK8616SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRKES122SAL | Object DIRKES122SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRKES213SAL | Object DIRKES213SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRKES324SAL | Object DIRKES324SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRKES325SAL | Object DIRKES325SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRKES648SA | Object DIRKES648SA of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRKES7510SA | Object DIRKES7510SA of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRKES8516SAL | Object DIRKES8516SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRKS212 | Object DIRKS212 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRKS659A | Object DIRKS659A of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRKS7511SAL | Object DIRKS7511SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        DIRK657A: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRK657A
            Object DIRK657A of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRK658A: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRK658A
            Object DIRK658A of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRK7510SAL: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRK7510SAL
            Object DIRK7510SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRK759A: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRK759A
            Object DIRK759A of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRK8614A: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRK8614A
            Object DIRK8614A of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRK8616SAL: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRK8616SAL
            Object DIRK8616SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRKES122SAL: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRKES122SAL
            Object DIRKES122SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRKES213SAL: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRKES213SAL
            Object DIRKES213SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRKES324SAL: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRKES324SAL
            Object DIRKES324SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRKES325SAL: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRKES325SAL
            Object DIRKES325SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRKES648SA: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRKES648SA
            Object DIRKES648SA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRKES7510SA: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRKES7510SA
            Object DIRKES7510SA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRKES8516SAL: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRKES8516SAL
            Object DIRKES8516SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRKS212: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRKS212
            Object DIRKS212 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRKS659A: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRKS659A
            Object DIRKS659A of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRKS7511SAL: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRKS7511SAL
            Object DIRKS7511SAL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TS.EquationType

    class petsc4py.PETSc.TS.EquationType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Distinguishes among types of explicit and implicit equations.

        Attributes Summary
        DAE_IMPLICIT_INDEX1 | Constant DAE_IMPLICIT_INDEX1 of type int <https://docs.python.org/3/library/functions.html#int>
        DAE_IMPLICIT_INDEX2 | Constant DAE_IMPLICIT_INDEX2 of type int <https://docs.python.org/3/library/functions.html#int>
        DAE_IMPLICIT_INDEX3 | Constant DAE_IMPLICIT_INDEX3 of type int <https://docs.python.org/3/library/functions.html#int>
        DAE_IMPLICIT_INDEXHI | Constant DAE_IMPLICIT_INDEXHI of type int <https://docs.python.org/3/library/functions.html#int>
        DAE_SEMI_EXPLICIT_INDEX1 | Constant DAE_SEMI_EXPLICIT_INDEX1 of type int <https://docs.python.org/3/library/functions.html#int>
        DAE_SEMI_EXPLICIT_INDEX2 | Constant DAE_SEMI_EXPLICIT_INDEX2 of type int <https://docs.python.org/3/library/functions.html#int>
        DAE_SEMI_EXPLICIT_INDEX3 | Constant DAE_SEMI_EXPLICIT_INDEX3 of type int <https://docs.python.org/3/library/functions.html#int>
        DAE_SEMI_EXPLICIT_INDEXHI | Constant DAE_SEMI_EXPLICIT_INDEXHI of type int <https://docs.python.org/3/library/functions.html#int>
        EXPLICIT | Constant EXPLICIT of type int <https://docs.python.org/3/library/functions.html#int>
        IMPLICIT | Constant IMPLICIT of type int <https://docs.python.org/3/library/functions.html#int>
        ODE_EXPLICIT | Constant ODE_EXPLICIT of type int <https://docs.python.org/3/library/functions.html#int>
        ODE_IMPLICIT | Constant ODE_IMPLICIT of type int <https://docs.python.org/3/library/functions.html#int>
        UNSPECIFIED | Constant UNSPECIFIED of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        DAE_IMPLICIT_INDEX1: int <https://docs.python.org/3/library/functions.html#int> = DAE_IMPLICIT_INDEX1
            Constant DAE_IMPLICIT_INDEX1 of type int <https://docs.python.org/3/library/functions.html#int>

        DAE_IMPLICIT_INDEX2: int <https://docs.python.org/3/library/functions.html#int> = DAE_IMPLICIT_INDEX2
            Constant DAE_IMPLICIT_INDEX2 of type int <https://docs.python.org/3/library/functions.html#int>

        DAE_IMPLICIT_INDEX3: int <https://docs.python.org/3/library/functions.html#int> = DAE_IMPLICIT_INDEX3
            Constant DAE_IMPLICIT_INDEX3 of type int <https://docs.python.org/3/library/functions.html#int>

        DAE_IMPLICIT_INDEXHI: int <https://docs.python.org/3/library/functions.html#int> = DAE_IMPLICIT_INDEXHI
            Constant DAE_IMPLICIT_INDEXHI of type int <https://docs.python.org/3/library/functions.html#int>

        DAE_SEMI_EXPLICIT_INDEX1: int <https://docs.python.org/3/library/functions.html#int> = DAE_SEMI_EXPLICIT_INDEX1
            Constant DAE_SEMI_EXPLICIT_INDEX1 of type int <https://docs.python.org/3/library/functions.html#int>

        DAE_SEMI_EXPLICIT_INDEX2: int <https://docs.python.org/3/library/functions.html#int> = DAE_SEMI_EXPLICIT_INDEX2
            Constant DAE_SEMI_EXPLICIT_INDEX2 of type int <https://docs.python.org/3/library/functions.html#int>

        DAE_SEMI_EXPLICIT_INDEX3: int <https://docs.python.org/3/library/functions.html#int> = DAE_SEMI_EXPLICIT_INDEX3
            Constant DAE_SEMI_EXPLICIT_INDEX3 of type int <https://docs.python.org/3/library/functions.html#int>

        DAE_SEMI_EXPLICIT_INDEXHI: int <https://docs.python.org/3/library/functions.html#int> = DAE_SEMI_EXPLICIT_INDEXHI
            Constant DAE_SEMI_EXPLICIT_INDEXHI of type int <https://docs.python.org/3/library/functions.html#int>

        EXPLICIT: int <https://docs.python.org/3/library/functions.html#int> = EXPLICIT
            Constant EXPLICIT of type int <https://docs.python.org/3/library/functions.html#int>

        IMPLICIT: int <https://docs.python.org/3/library/functions.html#int> = IMPLICIT
            Constant IMPLICIT of type int <https://docs.python.org/3/library/functions.html#int>

        ODE_EXPLICIT: int <https://docs.python.org/3/library/functions.html#int> = ODE_EXPLICIT
            Constant ODE_EXPLICIT of type int <https://docs.python.org/3/library/functions.html#int>

        ODE_IMPLICIT: int <https://docs.python.org/3/library/functions.html#int> = ODE_IMPLICIT
            Constant ODE_IMPLICIT of type int <https://docs.python.org/3/library/functions.html#int>

        UNSPECIFIED: int <https://docs.python.org/3/library/functions.html#int> = UNSPECIFIED
            Constant UNSPECIFIED of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TS.ExactFinalTime

    class petsc4py.PETSc.TS.ExactFinalTime
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The method for ending time stepping.

        Attributes Summary
        INTERPOLATE | Constant INTERPOLATE of type int <https://docs.python.org/3/library/functions.html#int>
        MATCHSTEP | Constant MATCHSTEP of type int <https://docs.python.org/3/library/functions.html#int>
        STEPOVER | Constant STEPOVER of type int <https://docs.python.org/3/library/functions.html#int>
        UNSPECIFIED | Constant UNSPECIFIED of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        INTERPOLATE: int <https://docs.python.org/3/library/functions.html#int> = INTERPOLATE
            Constant INTERPOLATE of type int <https://docs.python.org/3/library/functions.html#int>

        MATCHSTEP: int <https://docs.python.org/3/library/functions.html#int> = MATCHSTEP
            Constant MATCHSTEP of type int <https://docs.python.org/3/library/functions.html#int>

        STEPOVER: int <https://docs.python.org/3/library/functions.html#int> = STEPOVER
            Constant STEPOVER of type int <https://docs.python.org/3/library/functions.html#int>

        UNSPECIFIED: int <https://docs.python.org/3/library/functions.html#int> = UNSPECIFIED
            Constant UNSPECIFIED of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TS.ProblemType

    class petsc4py.PETSc.TS.ProblemType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Distinguishes linear and nonlinear problems.

        Attributes Summary
        LINEAR | Constant LINEAR of type int <https://docs.python.org/3/library/functions.html#int>
        NONLINEAR | Constant NONLINEAR of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        LINEAR: int <https://docs.python.org/3/library/functions.html#int> = LINEAR
            Constant LINEAR of type int <https://docs.python.org/3/library/functions.html#int>

        NONLINEAR: int <https://docs.python.org/3/library/functions.html#int> = NONLINEAR
            Constant NONLINEAR of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TS.RKType

    class petsc4py.PETSc.TS.RKType
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The RK subtype.

        Attributes Summary
        RK1FE | Object RK1FE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK2A | Object RK2A of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK2B | Object RK2B of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK3 | Object RK3 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK3BS | Object RK3BS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK4 | Object RK4 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK5BS | Object RK5BS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK5DP | Object RK5DP of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK5F | Object RK5F of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK6VR | Object RK6VR of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK7VR | Object RK7VR of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK8VR | Object RK8VR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        RK1FE: str <https://docs.python.org/3/library/stdtypes.html#str> = RK1FE
            Object RK1FE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK2A: str <https://docs.python.org/3/library/stdtypes.html#str> = RK2A
            Object RK2A of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK2B: str <https://docs.python.org/3/library/stdtypes.html#str> = RK2B
            Object RK2B of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK3: str <https://docs.python.org/3/library/stdtypes.html#str> = RK3
            Object RK3 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK3BS: str <https://docs.python.org/3/library/stdtypes.html#str> = RK3BS
            Object RK3BS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK4: str <https://docs.python.org/3/library/stdtypes.html#str> = RK4
            Object RK4 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK5BS: str <https://docs.python.org/3/library/stdtypes.html#str> = RK5BS
            Object RK5BS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK5DP: str <https://docs.python.org/3/library/stdtypes.html#str> = RK5DP
            Object RK5DP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK5F: str <https://docs.python.org/3/library/stdtypes.html#str> = RK5F
            Object RK5F of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK6VR: str <https://docs.python.org/3/library/stdtypes.html#str> = RK6VR
            Object RK6VR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK7VR: str <https://docs.python.org/3/library/stdtypes.html#str> = RK7VR
            Object RK7VR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK8VR: str <https://docs.python.org/3/library/stdtypes.html#str> = RK8VR
            Object RK8VR of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.TS.Type

    class petsc4py.PETSc.TS.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The time stepping method.

        Attributes Summary
        ALPHA | Object ALPHA of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ALPHA2 | Object ALPHA2 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ARKIMEX | Object ARKIMEX of type str <https://docs.python.org/3/library/stdtypes.html#str>
        BASICSYMPLECTIC | Object BASICSYMPLECTIC of type str <https://docs.python.org/3/library/stdtypes.html#str>
        BDF | Object BDF of type str <https://docs.python.org/3/library/stdtypes.html#str>
        BE | Object BE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        BEULER | Object BEULER of type str <https://docs.python.org/3/library/stdtypes.html#str>
        CN | Object CN of type str <https://docs.python.org/3/library/stdtypes.html#str>
        CRANK_NICOLSON | Object CRANK_NICOLSON of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DIRK | Object DIRK of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DISCGRAD | Object DISCGRAD of type str <https://docs.python.org/3/library/stdtypes.html#str>
        EIMEX | Object EIMEX of type str <https://docs.python.org/3/library/stdtypes.html#str>
        EULER | Object EULER of type str <https://docs.python.org/3/library/stdtypes.html#str>
        FE | Object FE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GLEE | Object GLEE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GLLE | Object GLLE of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MIMEX | Object MIMEX of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MPRK | Object MPRK of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PSEUDO | Object PSEUDO of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PYTHON | Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RADAU5 | Object RADAU5 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RK | Object RK of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ROSW | Object ROSW of type str <https://docs.python.org/3/library/stdtypes.html#str>
        RUNGE_KUTTA | Object RUNGE_KUTTA of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SSP | Object SSP of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SUNDIALS | Object SUNDIALS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        TH | Object TH of type str <https://docs.python.org/3/library/stdtypes.html#str>
        THETA | Object THETA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        ALPHA: str <https://docs.python.org/3/library/stdtypes.html#str> = ALPHA
            Object ALPHA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ALPHA2: str <https://docs.python.org/3/library/stdtypes.html#str> = ALPHA2
            Object ALPHA2 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ARKIMEX: str <https://docs.python.org/3/library/stdtypes.html#str> = ARKIMEX
            Object ARKIMEX of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BASICSYMPLECTIC: str <https://docs.python.org/3/library/stdtypes.html#str> = BASICSYMPLECTIC
            Object BASICSYMPLECTIC of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BDF: str <https://docs.python.org/3/library/stdtypes.html#str> = BDF
            Object BDF of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BE: str <https://docs.python.org/3/library/stdtypes.html#str> = BE
            Object BE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BEULER: str <https://docs.python.org/3/library/stdtypes.html#str> = BEULER
            Object BEULER of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CN: str <https://docs.python.org/3/library/stdtypes.html#str> = CN
            Object CN of type str <https://docs.python.org/3/library/stdtypes.html#str>

        CRANK_NICOLSON: str <https://docs.python.org/3/library/stdtypes.html#str> = CRANK_NICOLSON
            Object CRANK_NICOLSON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DIRK: str <https://docs.python.org/3/library/stdtypes.html#str> = DIRK
            Object DIRK of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DISCGRAD: str <https://docs.python.org/3/library/stdtypes.html#str> = DISCGRAD
            Object DISCGRAD of type str <https://docs.python.org/3/library/stdtypes.html#str>

        EIMEX: str <https://docs.python.org/3/library/stdtypes.html#str> = EIMEX
            Object EIMEX of type str <https://docs.python.org/3/library/stdtypes.html#str>

        EULER: str <https://docs.python.org/3/library/stdtypes.html#str> = EULER
            Object EULER of type str <https://docs.python.org/3/library/stdtypes.html#str>

        FE: str <https://docs.python.org/3/library/stdtypes.html#str> = FE
            Object FE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GLEE: str <https://docs.python.org/3/library/stdtypes.html#str> = GLEE
            Object GLEE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GLLE: str <https://docs.python.org/3/library/stdtypes.html#str> = GLLE
            Object GLLE of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MIMEX: str <https://docs.python.org/3/library/stdtypes.html#str> = MIMEX
            Object MIMEX of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPRK: str <https://docs.python.org/3/library/stdtypes.html#str> = MPRK
            Object MPRK of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PSEUDO: str <https://docs.python.org/3/library/stdtypes.html#str> = PSEUDO
            Object PSEUDO of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PYTHON: str <https://docs.python.org/3/library/stdtypes.html#str> = PYTHON
            Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RADAU5: str <https://docs.python.org/3/library/stdtypes.html#str> = RADAU5
            Object RADAU5 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RK: str <https://docs.python.org/3/library/stdtypes.html#str> = RK
            Object RK of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ROSW: str <https://docs.python.org/3/library/stdtypes.html#str> = ROSW
            Object ROSW of type str <https://docs.python.org/3/library/stdtypes.html#str>

        RUNGE_KUTTA: str <https://docs.python.org/3/library/stdtypes.html#str> = RUNGE_KUTTA
            Object RUNGE_KUTTA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SSP: str <https://docs.python.org/3/library/stdtypes.html#str> = SSP
            Object SSP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SUNDIALS: str <https://docs.python.org/3/library/stdtypes.html#str> = SUNDIALS
            Object SUNDIALS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        TH: str <https://docs.python.org/3/library/stdtypes.html#str> = TH
            Object TH of type str <https://docs.python.org/3/library/stdtypes.html#str>

        THETA: str <https://docs.python.org/3/library/stdtypes.html#str> = THETA
            Object THETA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
adjointReset() | Reset a TS, removing any allocated vectors and matrices.
adjointSetSteps(adjoint_steps) | Set the number of steps the adjoint solver should take backward in time.
adjointSetUp() | Set up the internal data structures for the later use of an adjoint solver.
adjointSolve() | Solve the discrete adjoint problem for an ODE/DAE.
adjointStep() | Step one time step backward in the adjoint run.
appendOptionsPrefix(prefix) | Append to the prefix used for all the TS options.
clone() | Return a shallow clone of the TS object.
computeI2Function(t, x, xdot, xdotdot, f) | Evaluate the DAE residual in implicit form.
computeI2Jacobian(t, x, xdot, xdotdot, v, a, J) | Evaluate the Jacobian of the DAE.
computeIFunction(t, x, xdot, f[, imex]) | Evaluate the DAE residual written in implicit form.
computeIJacobian(t, x, xdot, a, J[, P, imex]) | Evaluate the Jacobian of the DAE.
computeIJacobianP(t, x, xdot, a, J[, imex]) | Evaluate the Jacobian with respect to parameters.
computeRHSFunction(t, x, f) | Evaluate the right-hand side function.
computeRHSFunctionLinear(t, x, f) | Evaluate the right-hand side via the user-provided Jacobian.
computeRHSJacobian(t, x, J[, P]) | Compute the Jacobian matrix that has been set with setRHSJacobian.
computeRHSJacobianConstant(t, x, J[, P]) | Reuse a Jacobian that is time-independent.
computeRHSJacobianP(t, x, J) | Run the user-defined JacobianP function.
create([comm]) | Create an empty TS.
createPython([context, comm]) | Create an integrator of Python type.
createQuadratureTS([forward]) | Create a sub TS that evaluates integrals over time.
destroy() | Destroy the TS that was created with create.
getARKIMEXType() | Return the Type.ARKIMEX <#petsc4py.PETSc.TS.Type.ARKIMEX> scheme.
getAlphaParams() | Return the algorithmic parameters for Type.ALPHA <#petsc4py.PETSc.TS.Type.ALPHA>.
getAppCtx() | Return the application context.
getConvergedReason() | Return the reason the TS step was stopped.
getCostGradients() | Return the cost gradients.
getCostIntegral() | Return a vector of values of the integral term in the cost functions.
getDIRKType() | Return the Type.DIRK <#petsc4py.PETSc.TS.Type.DIRK> scheme.
getDM() | Return the DM <#petsc4py.PETSc.DM> associated with the TS.
getEquationType() | Get the type of the equation that TS is solving.
getEvaluationSolutions() | Return the solutions and the times they were recorded at.
getEvaluationTimes() | Return the evaluation points.
getI2Function() | Return the vector and function which computes the residual.
getI2Jacobian() | Return the matrices and function which computes the Jacobian.
getIFunction() | Return the vector and function which computes the implicit residual.
getIJacobian() | Return the matrices and function which computes the implicit Jacobian.
getKSP() | Return the KSP <#petsc4py.PETSc.KSP> associated with the TS.
getKSPIterations() | Return the total number of linear iterations used by the TS.
getMaxSteps() | Return the maximum number of steps to use.
getMaxTime() | Return the maximum (final) time.
getMonitor() | Return the monitor.
getNumEvents() | Return the number of events.
getOptionsPrefix() | Return the prefix used for all the TS options.
getPostStep() | Return the poststep function.
getPreStep() | Return the prestep function.
getPrevTime() | Return the starting time of the previously completed step.
getProblemType() | Return the type of problem to be solved.
getPythonContext() | Return the instance of the class implementing the required Python methods.
getPythonType() | Return the fully qualified Python name of the class used by the solver.
getQuadratureTS() | Return the sub TS that evaluates integrals over time.
getRHSFunction() | Return the vector where the rhs is stored and the function used to compute it.
getRHSJacobian() | Return the Jacobian and the function used to compute them.
getRKType() | Return the Type.RK <#petsc4py.PETSc.TS.Type.RK> scheme.
getSNES() | Return the SNES <#petsc4py.PETSc.SNES> associated with the TS.
getSNESFailures() | Return the total number of failed SNES <#petsc4py.PETSc.SNES> solves in the TS.
getSNESIterations() | Return the total number of nonlinear iterations used by the TS.
getSolution() | Return the solution at the present timestep.
getSolution2() | Return the solution and time derivative at the present timestep.
getSolveTime() | Return the time after a call to solve.
getStepLimits() | Return the minimum and maximum allowed time step sizes.
getStepNumber() | Return the number of time steps completed.
getStepRejections() | Return the total number of rejected steps.
getTheta() | Return the abscissa of the stage in (0, 1] for Type.THETA <#petsc4py.PETSc.TS.Type.THETA>.
getThetaEndpoint() | Return whether the endpoint variable of Type.THETA <#petsc4py.PETSc.TS.Type.THETA> is used.
getTime() | Return the time of the most recently completed step.
getTimeSpanSolutions() | Return the solutions at the times in the time span.
getTimeStep() | Return the duration of the current timestep.
getTolerances() | Return the tolerances for local truncation error.
getType() | Return the TS type.
interpolate(t, u) | Interpolate the solution to a given time.
load(viewer) | Load a TS that has been stored in binary with view.
monitor(step, time[, u]) | Monitor the solve.
monitorCancel() | Clear all the monitors that have been set.
removeTrajectory() | Remove the internal TS trajectory object.
reset() | Reset the TS, removing any allocated vectors and matrices.
restartStep() | Flag the solver to restart the next step.
rollBack() | Roll back one time step.
setARKIMEXFastSlowSplit(flag) | Use ARKIMEX for solving a fast-slow system.
setARKIMEXFullyImplicit(flag) | Solve both parts of the equation implicitly.
setARKIMEXType(ts_type) | Set the type of Type.ARKIMEX <#petsc4py.PETSc.TS.Type.ARKIMEX> scheme.
setAlphaParams([alpha_m, alpha_f, gamma]) | Set the algorithmic parameters for Type.ALPHA <#petsc4py.PETSc.TS.Type.ALPHA>.
setAlphaRadius(radius) | Set the spectral radius for Type.ALPHA <#petsc4py.PETSc.TS.Type.ALPHA>.
setAppCtx(appctx) | Set the application context.
setConvergedReason(reason) | Set the reason for handling the convergence of solve.
setCostGradients(vl[, vm]) | Set the cost gradients.
setDIRKType(ts_type) | Set the type of Type.DIRK <#petsc4py.PETSc.TS.Type.DIRK> scheme.
setDM(dm) | Set the DM that may be used by some nonlinear solvers or preconditioners.
setEquationType(eqtype) | Set the type of the equation that TS is solving.
setErrorIfStepFails([flag]) | Immediately error is no step succeeds.
setEvaluationTimes(tspan) | Sets evaluation points where solution will be computed and stored.
setEventHandler(direction, terminate, indicator) | Set a function used for detecting events.
setEventTolerances([tol, vtol]) | Set tolerances for event zero crossings when using event handler.
setExactFinalTime(option) | Set method of computing the final time step.
setFromOptions() | Set various TS parameters from user options.
setI2Function(function[, f, args, kargs]) | Set the function to compute the 2nd order DAE.
setI2Jacobian(jacobian[, J, P, args, kargs]) | Set the function to compute the Jacobian of the 2nd order DAE.
setIFunction(function[, f, args, kargs]) | Set the function representing the DAE to be solved.
setIJacobian(jacobian[, J, P, args, kargs]) | Set the function to compute the Jacobian.
setIJacobianP(jacobian[, J, args, kargs]) | Set the function that computes the Jacobian.
setMaxSNESFailures(n) | Set the maximum number of SNES solves failures allowed.
setMaxStepRejections(n) | Set the maximum number of step rejections before a time step fails.
setMaxSteps(max_steps) | Set the maximum number of steps to use.
setMaxTime(max_time) | Set the maximum (final) time.
setMonitor(monitor[, args, kargs]) | Set an additional monitor to the TS.
setOptionsPrefix(prefix) | Set the prefix used for all the TS options.
setPostStep(poststep[, args, kargs]) | Set a function to be called at the end of each time step.
setPreStep(prestep[, args, kargs]) | Set a function to be called at the beginning of each time step.
setProblemType(ptype) | Set the type of problem to be solved.
setPythonContext(context) | Set the instance of the class implementing the required Python methods.
setPythonType(py_type) | Set the fully qualified Python name of the class to be used.
setRHSFunction(function[, f, args, kargs]) | Set the routine for evaluating the function G in U_t = G(t, u).
setRHSJacobian(jacobian[, J, P, args, kargs]) | Set the function to compute the Jacobian of G in U_t = G(U, t).
setRHSJacobianP(rhsjacobianp[, A, args, kargs]) | Set the function that computes the Jacobian with respect to the parameters.
setRHSSplitIFunction(splitname, function[, ...]) | Set the split implicit functions.
setRHSSplitIJacobian(splitname, jacobian[, ...]) | Set the Jacobian for the split implicit function.
setRHSSplitIS(splitname, iss) | Set the index set for the specified split.
setRHSSplitRHSFunction(splitname, function) | Set the split right-hand-side functions.
setRKType(ts_type) | Set the type of the Runge-Kutta scheme.
setSaveTrajectory() | Enable to save solutions as an internal TS trajectory.
setSolution(u) | Set the initial solution vector.
setSolution2(u, v) | Set the initial solution and its time derivative.
setStepLimits(hmin, hmax) | Set the minimum and maximum allowed step sizes.
setStepNumber(step_number) | Set the number of steps completed.
setTheta(theta) | Set the abscissa of the stage in (0, 1] for Type.THETA <#petsc4py.PETSc.TS.Type.THETA>.
setThetaEndpoint([flag]) | Set to use the endpoint variant of Type.THETA <#petsc4py.PETSc.TS.Type.THETA>.
setTime(t) | Set the time.
setTimeSpan(tspan) | Set the time span and time points to evaluate solution at.
setTimeStep(time_step) | Set the duration of the timestep.
setTolerances([rtol, atol]) | Set tolerances for local truncation error when using an adaptive controller.
setType(ts_type) | Set the method to be used as the TS solver.
setUp() | Set up the internal data structures for the TS.
solve([u]) | Step the requested number of timesteps.
step() | Take one step.
view([viewer]) | Print the TS object.

Attributes Summary
appctx | Application context.
atol | The absolute tolerance.
converged | Indicates the TS has converged.
diverged | Indicates the TS has stopped.
dm | The DM <#petsc4py.PETSc.DM>.
equation_type | The equation type.
iterating | Indicates the TS is still iterating.
ksp | The KSP <#petsc4py.PETSc.KSP>.
max_steps | The maximum number of steps.
max_time | The maximum time.
problem_type | The problem type.
reason | The converged reason.
rtol | The relative tolerance.
snes | The SNES <#petsc4py.PETSc.SNES>.
step_number | The current step number.
time | The current time.
time_step | The current time step size.
vec_sol | The solution vector.

Methods Documentation

    adjointReset()
        Reset a TS, removing any allocated vectors and matrices.

        Collective.

        See also:
            TSAdjointReset <https://petsc.org/release/manualpages/Sensitivity/TSAdjointReset.html>

    Source code at petsc4py/PETSc/TS.pyx:2908 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2908>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    adjointSetSteps(adjoint_steps)
        Set the number of steps the adjoint solver should take backward in time.

        Logically collective.

        Parameters
            adjoint_steps (int <https://docs.python.org/3/library/functions.html#int>) -- The number of steps to take.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSAdjointSetSteps <https://petsc.org/release/manualpages/Sensitivity/TSAdjointSetSteps.html>

    Source code at petsc4py/PETSc/TS.pyx:2854 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2854>

    adjointSetUp()
        Set up the internal data structures for the later use of an adjoint solver.

        Collective.

        See also:
            TSAdjointSetUp <https://petsc.org/release/manualpages/Sensitivity/TSAdjointSetUp.html>

    Source code at petsc4py/PETSc/TS.pyx:2872 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2872>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    adjointSolve()
        Solve the discrete adjoint problem for an ODE/DAE.

        Collective.

        See also:
            TSAdjointSolve <https://petsc.org/release/manualpages/Sensitivity/TSAdjointSolve.html>

    Source code at petsc4py/PETSc/TS.pyx:2884 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2884>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    adjointStep()
        Step one time step backward in the adjoint run.

        Collective.

        See also:
            TSAdjointStep <https://petsc.org/release/manualpages/Sensitivity/TSAdjointStep.html>

    Source code at petsc4py/PETSc/TS.pyx:2896 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2896>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    appendOptionsPrefix(prefix)
        Append to the prefix used for all the TS options.

        Logically collective.

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The prefix to append to the current prefix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    A hyphen must not be given at the beginning of the prefix name.

    See also:
            Working with PETSc options <#petsc-options>, TSAppendOptionsPrefix <https://petsc.org/release/manualpages/TS/TSAppendOptionsPrefix.html>

    Source code at petsc4py/PETSc/TS.pyx:540 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L540>

    clone()
        Return a shallow clone of the TS object.

        Collective.

        See also:
            TSClone <https://petsc.org/release/manualpages/TS/TSClone.html>

    Source code at petsc4py/PETSc/TS.pyx:244 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L244>

        Return type
            TS <#petsc4py.PETSc.TS>

    computeI2Function(t, x, xdot, xdotdot, f)
        Evaluate the DAE residual in implicit form.

        Collective.

        Parameters

            •   t (float <https://docs.python.org/3/library/functions.html#float>) -- The current time.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The state vector.

            •   xdot (Vec <#petsc4py.PETSc.Vec>) -- The time derivative of the state vector.

            •   xdotdot (Vec <#petsc4py.PETSc.Vec>) -- The second time derivative of the state vector.

            •   f (Vec <#petsc4py.PETSc.Vec>) -- The vector into which the residual is stored.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSComputeI2Function <https://petsc.org/release/manualpages/TS/TSComputeI2Function.html>

    Source code at petsc4py/PETSc/TS.pyx:1143 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1143>

    computeI2Jacobian(t, x, xdot, xdotdot, v, a, J, P=None)
        Evaluate the Jacobian of the DAE.

        Collective.

        If F(t, U, V, A)=0 is the DAE, the required Jacobian is dF/dU + v dF/dV + a dF/dA.

        Parameters

            •   t (float <https://docs.python.org/3/library/functions.html#float>) -- The current time.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The state vector.

            •   xdot (Vec <#petsc4py.PETSc.Vec>) -- The time derivative of the state vector.

            •   xdotdot (Vec <#petsc4py.PETSc.Vec>) -- The second time derivative of the state vector.

            •   v (float <https://docs.python.org/3/library/functions.html#float>) -- The shift to apply to the first derivative.

            •   a (float <https://docs.python.org/3/library/functions.html#float>) -- The shift to apply to the second derivative.

            •   J (Mat <#petsc4py.PETSc.Mat>) -- The matrix into which the Jacobian is computed.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional matrix to use for building a preconditioner.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSComputeI2Jacobian <https://petsc.org/release/manualpages/TS/TSComputeI2Jacobian.html>

    Source code at petsc4py/PETSc/TS.pyx:1170 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1170>

    computeIFunction(t, x, xdot, f, imex=False)
        Evaluate the DAE residual written in implicit form.

        Collective.

        Parameters

            •   t (float <https://docs.python.org/3/library/functions.html#float>) -- The current time.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The state vector.

            •   xdot (Vec <#petsc4py.PETSc.Vec>) -- The time derivative of the state vector.

            •   f (Vec <#petsc4py.PETSc.Vec>) -- The vector into which the residual is stored.

            •   imex (bool <https://docs.python.org/3/library/functions.html#bool>) -- A flag which indicates if the RHS should be kept separate.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSComputeIFunction <https://petsc.org/release/manualpages/TS/TSComputeIFunction.html>

    Source code at petsc4py/PETSc/TS.pyx:928 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L928>

    computeIJacobian(t, x, xdot, a, J, P=None, imex=False)
        Evaluate the Jacobian of the DAE.

        Collective.

        If F(t, U, Udot)=0 is the DAE, the required Jacobian is dF/dU + shift*dF/dUdot

        Parameters

            •   t (float <https://docs.python.org/3/library/functions.html#float>) -- The current time.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The state vector.

            •   xdot (Vec <#petsc4py.PETSc.Vec>) -- The time derivative of the state vector.

            •   a (float <https://docs.python.org/3/library/functions.html#float>) -- The shift to apply

            •   J (Mat <#petsc4py.PETSc.Mat>) -- The matrix into which the Jacobian is computed.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional matrix to use for building a preconditioner.

            •   imex (bool <https://docs.python.org/3/library/functions.html#bool>) -- A flag which indicates if the RHS should be kept separate.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSComputeIJacobian <https://petsc.org/release/manualpages/TS/TSComputeIJacobian.html>

    Source code at petsc4py/PETSc/TS.pyx:958 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L958>

    computeIJacobianP(t, x, xdot, a, J, imex=False)
        Evaluate the Jacobian with respect to parameters.

        Collective.

        Parameters

            •   t (float <https://docs.python.org/3/library/functions.html#float>) -- The current time.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The state vector.

            •   xdot (Vec <#petsc4py.PETSc.Vec>) -- The time derivative of the state vector.

            •   a (float <https://docs.python.org/3/library/functions.html#float>) -- The shift to apply

            •   J (Mat <#petsc4py.PETSc.Mat>) -- The matrix into which the Jacobian is computed.

            •   imex (bool <https://docs.python.org/3/library/functions.html#bool>) -- A flag which indicates if the RHS should be kept separate.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSComputeIJacobianP <https://petsc.org/release/manualpages/Sensitivity/TSComputeIJacobianP.html>

    Source code at petsc4py/PETSc/TS.pyx:998 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L998>

    computeRHSFunction(t, x, f)
        Evaluate the right-hand side function.

        Collective.

        Parameters

            •   t (float <https://docs.python.org/3/library/functions.html#float>) -- The time at which to evaluate the RHS.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The state vector.

            •   f (Vec <#petsc4py.PETSc.Vec>) -- The Vec into which the RHS is computed.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSComputeRHSFunction <https://petsc.org/release/manualpages/TS/TSComputeRHSFunction.html>

    Source code at petsc4py/PETSc/TS.pyx:675 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L675>

    computeRHSFunctionLinear(t, x, f)
        Evaluate the right-hand side via the user-provided Jacobian.

        Collective.

        Parameters

            •   t (float <https://docs.python.org/3/library/functions.html#float>) -- The time at which to evaluate the RHS.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The state vector.

            •   f (Vec <#petsc4py.PETSc.Vec>) -- The Vec into which the RHS is computed.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSComputeRHSFunctionLinear <https://petsc.org/release/manualpages/TS/TSComputeRHSFunctionLinear.html>

    Source code at petsc4py/PETSc/TS.pyx:697 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L697>

    computeRHSJacobian(t, x, J, P=None)
        Compute the Jacobian matrix that has been set with setRHSJacobian.

        Collective.

        Parameters

            •   t (float <https://docs.python.org/3/library/functions.html#float>) -- The time at which to evaluate the Jacobian.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The state vector.

            •   J (Mat <#petsc4py.PETSc.Mat>) -- The matrix into which the Jacobian is computed.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional matrix to use for building a preconditioner.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSComputeRHSJacobian <https://petsc.org/release/manualpages/TS/TSComputeRHSJacobian.html>

    Source code at petsc4py/PETSc/TS.pyx:719 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L719>

    computeRHSJacobianConstant(t, x, J, P=None)
        Reuse a Jacobian that is time-independent.

        Collective.

        Parameters

            •   t (float <https://docs.python.org/3/library/functions.html#float>) -- The time at which to evaluate the Jacobian.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The state vector.

            •   J (Mat <#petsc4py.PETSc.Mat>) -- A pointer to the stored Jacobian.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- An optional pointer to the matrix used to construct the preconditioner.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSComputeRHSJacobianConstant <https://petsc.org/release/manualpages/TS/TSComputeRHSJacobianConstant.html>

    Source code at petsc4py/PETSc/TS.pyx:745 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L745>

    computeRHSJacobianP(t, x, J)
        Run the user-defined JacobianP function.

        Collective.

        Parameters

            •   t (float <https://docs.python.org/3/library/functions.html#float>) -- The time at which to compute the Jacobian.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- The solution at which to compute the Jacobian.

            •   J (Mat <#petsc4py.PETSc.Mat>) -- The output Jacobian matrix.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSComputeRHSJacobianP <https://petsc.org/release/manualpages/Sensitivity/TSComputeRHSJacobianP.html>

    Source code at petsc4py/PETSc/TS.pyx:2832 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2832>

    create(comm=None)
        Create an empty TS.

        Collective.

        The problem type can then be set with setProblemType and the type of solver can then be set with setType.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            TSCreate <https://petsc.org/release/manualpages/TS/TSCreate.html>

    Source code at petsc4py/PETSc/TS.pyx:220 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L220>

    createPython(context=None, comm=None)
        Create an integrator of Python type.

        Collective.

        Parameters

            •   context (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- An instance of the Python class implementing the required methods.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PETSc Python ode-integrator type (TODO) <#petsc-python-ts>, setType, setPythonContext, Type.PYTHON <#petsc4py.PETSc.TS.Type.PYTHON>

    Source code at petsc4py/PETSc/TS.pyx:2922 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2922>

    createQuadratureTS(forward=True)
        Create a sub TS that evaluates integrals over time.

        Collective.

        Parameters
            forward (bool <https://docs.python.org/3/library/functions.html#bool>) -- Enable to evaluate forward in time.

        Return type
            TS <#petsc4py.PETSc.TS>

    See also:
            TSCreateQuadratureTS <https://petsc.org/release/manualpages/Sensitivity/TSCreateQuadratureTS.html>

    Source code at petsc4py/PETSc/TS.pyx:2751 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2751>

    destroy()
        Destroy the TS that was created with create.

        Collective.

        See also:
            TSDestroy <https://petsc.org/release/manualpages/TS/TSDestroy.html>

    Source code at petsc4py/PETSc/TS.pyx:207 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L207>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    getARKIMEXType()
        Return the Type.ARKIMEX <#petsc4py.PETSc.TS.Type.ARKIMEX> scheme.

        Not collective.

        See also:
            TSARKIMEXGetType <https://petsc.org/release/manualpages/TS/TSARKIMEXGetType.html>

    Source code at petsc4py/PETSc/TS.pyx:390 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L390>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getAlphaParams()
        Return the algorithmic parameters for Type.ALPHA <#petsc4py.PETSc.TS.Type.ALPHA>.

        Not collective.

        See also:
            TSAlphaGetParams <https://petsc.org/release/manualpages/TS/TSAlphaGetParams.html>

    Source code at petsc4py/PETSc/TS.pyx:3129 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3129>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    getAppCtx()
        Return the application context.

        Source code at petsc4py/PETSc/TS.pyx:590 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L590>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getConvergedReason()
        Return the reason the TS step was stopped.

        Not collective.

        Can only be called once solve is complete.

        See also:
            TSGetConvergedReason <https://petsc.org/release/manualpages/TS/TSGetConvergedReason.html>

    Source code at petsc4py/PETSc/TS.pyx:2149 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2149>

        Return type
            ConvergedReason <#petsc4py.PETSc.TS.ConvergedReason>

    getCostGradients()
        Return the cost gradients.

        Not collective.

        See also:
            setCostGradients, TSGetCostGradients <https://petsc.org/release/manualpages/Sensitivity/TSGetCostGradients.html>

    Source code at petsc4py/PETSc/TS.pyx:2693 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2693>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <#petsc4py.PETSc.Vec>], list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <#petsc4py.PETSc.Vec>]]

    getCostIntegral()
        Return a vector of values of the integral term in the cost functions.

        Not collective.

        See also:
            TSGetCostIntegral <https://petsc.org/release/manualpages/Sensitivity/TSGetCostIntegral.html>

    Source code at petsc4py/PETSc/TS.pyx:2632 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2632>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getDIRKType()
        Return the Type.DIRK <#petsc4py.PETSc.TS.Type.DIRK> scheme.

        Not collective.

        See also:
            setDIRKType, TSDIRKGetType <https://petsc.org/release/manualpages/TS/TSDIRKGetType.html>

    Source code at petsc4py/PETSc/TS.pyx:427 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L427>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getDM()
        Return the DM <#petsc4py.PETSc.DM> associated with the TS.

        Not collective.

        Only valid if nonlinear solvers or preconditioners are used which use the DM <#petsc4py.PETSc.DM>.

        See also:
            TSGetDM <https://petsc.org/release/manualpages/TS/TSGetDM.html>

    Source code at petsc4py/PETSc/TS.pyx:1648 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1648>

        Return type
            DM <#petsc4py.PETSc.DM>

    getEquationType()
        Get the type of the equation that TS is solving.

        Not collective.

        See also:
            TSGetEquationType <https://petsc.org/release/manualpages/TS/TSGetEquationType.html>

    Source code at petsc4py/PETSc/TS.pyx:489 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L489>

        Return type
            EquationType <#petsc4py.PETSc.TS.EquationType>

    getEvaluationSolutions()
        Return the solutions and the times they were recorded at.

        Not collective.

        See also:
            setEvaluationTimes

    Source code at petsc4py/PETSc/TS.pyx:1539 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1539>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayReal <#petsc4py.typing.ArrayReal>, list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <#petsc4py.PETSc.Vec>]]

    getEvaluationTimes()
        Return the evaluation points.

        Not collective.

        See also:
            setEvaluationTimes

    Source code at petsc4py/PETSc/TS.pyx:1523 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1523>

        Return type
            ArrayReal <#petsc4py.typing.ArrayReal>

    getI2Function()
        Return the vector and function which computes the residual.

        Not collective.

        See also:
            TSGetI2Function <https://petsc.org/release/manualpages/TS/TSGetI2Function.html>

    Source code at petsc4py/PETSc/TS.pyx:1219 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1219>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, TSI2Function <#petsc4py.typing.TSI2Function>]

    getI2Jacobian()
        Return the matrices and function which computes the Jacobian.

        Not collective.

        See also:
            TSGetI2Jacobian <https://petsc.org/release/manualpages/TS/TSGetI2Jacobian.html>

    Source code at petsc4py/PETSc/TS.pyx:1235 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1235>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>, TSI2Jacobian <#petsc4py.typing.TSI2Jacobian>]

    getIFunction()
        Return the vector and function which computes the implicit residual.

        Not collective.

        See also:
            TSGetIFunction <https://petsc.org/release/manualpages/TS/TSGetIFunction.html>

    Source code at petsc4py/PETSc/TS.pyx:1032 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1032>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, TSIFunction <#petsc4py.typing.TSIFunction>]

    getIJacobian()
        Return the matrices and function which computes the implicit Jacobian.

        Not collective.

        See also:
            TSGetIJacobian <https://petsc.org/release/manualpages/TS/TSGetIJacobian.html>

    Source code at petsc4py/PETSc/TS.pyx:1048 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1048>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>, TSIJacobian <#petsc4py.typing.TSIJacobian>]

    getKSP()
        Return the KSP <#petsc4py.PETSc.KSP> associated with the TS.

        Not collective.

        See also:
            TSGetKSP <https://petsc.org/release/manualpages/TS/TSGetKSP.html>

    Source code at petsc4py/PETSc/TS.pyx:1631 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1631>

        Return type
            KSP <#petsc4py.PETSc.KSP>

    getKSPIterations()
        Return the total number of linear iterations used by the TS.

        Not collective.

        This counter is reset to zero for each successive call to solve.

        See also:
            TSGetKSPIterations <https://petsc.org/release/manualpages/TS/TSGetKSPIterations.html>

    Source code at petsc4py/PETSc/TS.pyx:1916 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1916>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getMaxSteps()
        Return the maximum number of steps to use.

        Not collective.

        See also:
            TSGetMaxSteps <https://petsc.org/release/manualpages/TS/TSGetMaxSteps.html>

    Source code at petsc4py/PETSc/TS.pyx:1885 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1885>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getMaxTime()
        Return the maximum (final) time.

        Not collective.

        Defaults to 5.

        See also:
            TSGetMaxTime <https://petsc.org/release/manualpages/TS/TSGetMaxTime.html>

    Source code at petsc4py/PETSc/TS.pyx:1849 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1849>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getMonitor()
        Return the monitor.

        Not collective.

        See also:
            setMonitor

    Source code at petsc4py/PETSc/TS.pyx:2201 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2201>

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[TSMonitorFunction <#petsc4py.typing.TSMonitorFunction>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...], dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>]]]

    getNumEvents()
        Return the number of events.

        Logically collective.

        See also:
            TSGetNumEvents <https://petsc.org/release/manualpages/TS/TSGetNumEvents.html>

    Source code at petsc4py/PETSc/TS.pyx:2348 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2348>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getOptionsPrefix()
        Return the prefix used for all the TS options.

        Not collective.

        See also:
            TSGetOptionsPrefix <https://petsc.org/release/manualpages/TS/TSGetOptionsPrefix.html>

    Source code at petsc4py/PETSc/TS.pyx:526 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L526>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getPostStep()
        Return the poststep function.

        Source code at petsc4py/PETSc/TS.pyx:2441 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2441>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[TSPostStepFunction <#petsc4py.typing.TSPostStepFunction>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>, dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>]

    getPreStep()
        Return the prestep function.

        Not collective.

        See also:
            setPreStep

    Source code at petsc4py/PETSc/TS.pyx:2397 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2397>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[TSPreStepFunction <#petsc4py.typing.TSPreStepFunction>, tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>, dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>]

    getPrevTime()
        Return the starting time of the previously completed step.

        Not collective.

        See also:
            TSGetPrevTime <https://petsc.org/release/manualpages/TS/TSGetPrevTime.html>

    Source code at petsc4py/PETSc/TS.pyx:1723 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1723>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getProblemType()
        Return the type of problem to be solved.

        Not collective.

        See also:
            TSGetProblemType <https://petsc.org/release/manualpages/TS/TSGetProblemType.html>

    Source code at petsc4py/PETSc/TS.pyx:458 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L458>

        Return type
            ProblemType <#petsc4py.PETSc.TS.ProblemType>

    getPythonContext()
        Return the instance of the class implementing the required Python methods.

        Not collective.

        See also:
            PETSc Python ode-integrator type (TODO) <#petsc-python-ts>, setPythonContext

    Source code at petsc4py/PETSc/TS.pyx:2959 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2959>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getPythonType()
        Return the fully qualified Python name of the class used by the solver.

        Not collective.

        See also:
            PETSc Python ode-integrator type (TODO) <#petsc-python-ts>, setPythonContext, setPythonType, TSPythonGetType <https://petsc.org/release/manualpages/TS/TSPythonGetType.html>

    Source code at petsc4py/PETSc/TS.pyx:2988 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2988>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getQuadratureTS()
        Return the sub TS that evaluates integrals over time.

        Not collective.

        Returns

            •   forward (bool <https://docs.python.org/3/library/functions.html#bool>) -- True if evaluating the integral forward in time

            •   qts (TS) -- The sub TS

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[bool <https://docs.python.org/3/library/functions.html#bool>, TS <#petsc4py.PETSc.TS>]

    See also:
            TSGetQuadratureTS <https://petsc.org/release/manualpages/Sensitivity/TSGetQuadratureTS.html>

    Source code at petsc4py/PETSc/TS.pyx:2772 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2772>

    getRHSFunction()
        Return the vector where the rhs is stored and the function used to compute it.

        Not collective.

        See also:
            TSGetRHSFunction <https://petsc.org/release/manualpages/TS/TSGetRHSFunction.html>

    Source code at petsc4py/PETSc/TS.pyx:771 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L771>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, TSRHSFunction <#petsc4py.typing.TSRHSFunction>]

    getRHSJacobian()
        Return the Jacobian and the function used to compute them.

        Not collective.

        See also:
            TSGetRHSJacobian <https://petsc.org/release/manualpages/TS/TSGetRHSJacobian.html>

    Source code at petsc4py/PETSc/TS.pyx:787 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L787>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <#petsc4py.PETSc.Mat>, Mat <#petsc4py.PETSc.Mat>, TSRHSJacobian <#petsc4py.typing.TSRHSJacobian>]

    getRKType()
        Return the Type.RK <#petsc4py.PETSc.TS.Type.RK> scheme.

        Not collective.

        See also:
            TSRKGetType <https://petsc.org/release/manualpages/TS/TSRKGetType.html>

    Source code at petsc4py/PETSc/TS.pyx:376 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L376>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getSNES()
        Return the SNES <#petsc4py.PETSc.SNES> associated with the TS.

        Not collective.

        See also:
            TSGetSNES <https://petsc.org/release/manualpages/TS/TSGetSNES.html>

    Source code at petsc4py/PETSc/TS.pyx:1616 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1616>

        Return type
            SNES <#petsc4py.PETSc.SNES>

    getSNESFailures()
        Return the total number of failed SNES <#petsc4py.PETSc.SNES> solves in the TS.

        Not collective.

        This counter is reset to zero for each successive call to solve.

        See also:
            TSGetSNESFailures <https://petsc.org/release/manualpages/TS/TSGetSNESFailures.html>

    Source code at petsc4py/PETSc/TS.pyx:1990 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1990>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getSNESIterations()
        Return the total number of nonlinear iterations used by the TS.

        Not collective.

        This counter is reset to zero for each successive call to solve.

        See also:
            TSGetSNESIterations <https://petsc.org/release/manualpages/TS/TSGetSNESIterations.html>

    Source code at petsc4py/PETSc/TS.pyx:1899 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1899>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getSolution()
        Return the solution at the present timestep.

        Not collective.

        It is valid to call this routine inside the function that you are evaluating in order to move to the new timestep. This vector is not changed until the solution at the next timestep has been calculated.

        See also:
            TSGetSolution <https://petsc.org/release/manualpages/TS/TSGetSolution.html>

    Source code at petsc4py/PETSc/TS.pyx:1429 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1429>

        Return type
            Vec <#petsc4py.PETSc.Vec>

    getSolution2()
        Return the solution and time derivative at the present timestep.

        Not collective.

        It is valid to call this routine inside the function that you are evaluating in order to move to the new timestep. These vectors are not changed until the solution at the next timestep has been calculated.

        See also:
            TS2GetSolution <https://petsc.org/release/manualpages/TS/TS2GetSolution.html>

    Source code at petsc4py/PETSc/TS.pyx:1467 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1467>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, Vec <#petsc4py.PETSc.Vec>]

    getSolveTime()
        Return the time after a call to solve.

        Not collective.

        This time corresponds to the final time set with setMaxTime.

        See also:
            TSGetSolveTime <https://petsc.org/release/manualpages/TS/TSGetSolveTime.html>

    Source code at petsc4py/PETSc/TS.pyx:1737 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1737>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getStepLimits()
        Return the minimum and maximum allowed time step sizes.

        Not collective.

        See also:
            TSAdaptGetStepLimits <https://petsc.org/release/manualpages/TS/TSAdaptGetStepLimits.html>

    Source code at petsc4py/PETSc/TS.pyx:2582 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2582>

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    getStepNumber()
        Return the number of time steps completed.

        Not collective.

        See also:
            TSGetStepNumber <https://petsc.org/release/manualpages/TS/TSGetStepNumber.html>

    Source code at petsc4py/PETSc/TS.pyx:1813 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1813>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getStepRejections()
        Return the total number of rejected steps.

        Not collective.

        This counter is reset to zero for each successive call to solve.

        See also:
            TSGetStepRejections <https://petsc.org/release/manualpages/TS/TSGetStepRejections.html>

    Source code at petsc4py/PETSc/TS.pyx:1955 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1955>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getTheta()
        Return the abscissa of the stage in (0, 1] for Type.THETA <#petsc4py.PETSc.TS.Type.THETA>.

        Not collective.

        See also:
            TSThetaGetTheta <https://petsc.org/release/manualpages/TS/TSThetaGetTheta.html>

    Source code at petsc4py/PETSc/TS.pyx:3026 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3026>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getThetaEndpoint()
        Return whether the endpoint variable of Type.THETA <#petsc4py.PETSc.TS.Type.THETA> is used.

        Not collective.

        See also:
            TSThetaGetEndpoint <https://petsc.org/release/manualpages/TS/TSThetaGetEndpoint.html>

    Source code at petsc4py/PETSc/TS.pyx:3058 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3058>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    getTime()
        Return the time of the most recently completed step.

        Not collective.

        When called during time step evaluation (e.g. during residual evaluation or via hooks set using setPreStep or setPostStep), the time returned is at the start of the step.

        See also:
            TSGetTime <https://petsc.org/release/manualpages/TS/TSGetTime.html>

    Source code at petsc4py/PETSc/TS.pyx:1705 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1705>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getTimeSpanSolutions()
        Return the solutions at the times in the time span. Deprecated.

        Not collective.

        See also:
            setTimeSpan, setEvaluationTimes, getEvaluationSolutions

    Source code at petsc4py/PETSc/TS.pyx:1596 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1596>

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <#petsc4py.PETSc.Vec>]

    getTimeStep()
        Return the duration of the current timestep.

        Not collective.

        See also:
            TSGetTimeStep <https://petsc.org/release/manualpages/TS/TSGetTimeStep.html>

    Source code at petsc4py/PETSc/TS.pyx:1772 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1772>

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    getTolerances()
        Return the tolerances for local truncation error.

        Logically collective.

        Returns

            •   rtol (float <https://docs.python.org/3/library/functions.html#float>) -- the relative tolerance

            •   atol (float <https://docs.python.org/3/library/functions.html#float>) -- the absolute tolerance

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            TSGetTolerances <https://petsc.org/release/manualpages/TS/TSGetTolerances.html>

    Source code at petsc4py/PETSc/TS.pyx:2072 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2072>

    getType()
        Return the TS type.

        Not collective.

        See also:
            TSGetType <https://petsc.org/release/manualpages/TS/TSGetType.html>

    Source code at petsc4py/PETSc/TS.pyx:362 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L362>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    interpolate(t, u)
        Interpolate the solution to a given time.

        Collective.

        Parameters

            •   t (float <https://docs.python.org/3/library/functions.html#float>) -- The time to interpolate.

            •   u (Vec <#petsc4py.PETSc.Vec>) -- The state vector to interpolate.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSInterpolate <https://petsc.org/release/manualpages/TS/TSInterpolate.html>

    Source code at petsc4py/PETSc/TS.pyx:2539 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2539>

    load(viewer)
        Load a TS that has been stored in binary with view.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer>) -- The visualization context.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSLoad <https://petsc.org/release/manualpages/TS/TSLoad.html>

    Source code at petsc4py/PETSc/TS.pyx:190 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L190>

    monitor(step, time, u=None)
        Monitor the solve.

        Collective.

        Parameters

            •   step (int <https://docs.python.org/3/library/functions.html#int>) -- The step number that has just completed.

            •   time (float <https://docs.python.org/3/library/functions.html#float>) -- The model time of the state.

            •   u (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The state at the current model time.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSMonitor <https://petsc.org/release/manualpages/TS/TSMonitor.html>

    Source code at petsc4py/PETSc/TS.pyx:2228 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2228>

    monitorCancel()
        Clear all the monitors that have been set.

        Logically collective.

        See also:
            TSMonitorCancel <https://petsc.org/release/manualpages/TS/TSMonitorCancel.html>

    Source code at petsc4py/PETSc/TS.pyx:2213 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2213>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    removeTrajectory()
        Remove the internal TS trajectory object.

        Collective.

        See also:
            TSRemoveTrajectory <https://petsc.org/release/manualpages/TS/TSRemoveTrajectory.html>

    Source code at petsc4py/PETSc/TS.pyx:2620 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2620>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    reset()
        Reset the TS, removing any allocated vectors and matrices.

        Collective.

        See also:
            TSReset <https://petsc.org/release/manualpages/TS/TSReset.html>

    Source code at petsc4py/PETSc/TS.pyx:2457 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2457>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    restartStep()
        Flag the solver to restart the next step.

        Collective.

        Multistep methods like TSBDF or Runge-Kutta methods with FSAL property require restarting the solver in the event of discontinuities. These discontinuities may be introduced as a consequence of explicitly modifications to the solution vector (which PETSc attempts to detect and handle) or problem coefficients (which PETSc is not able to detect). For the sake of correctness and maximum safety, users are expected to call TSRestart() whenever they introduce discontinuities in callback routines (e.g. prestep and poststep routines, or implicit/rhs function routines with discontinuous source terms).

        See also:
            TSRestartStep <https://petsc.org/release/manualpages/TS/TSRestartStep.html>

    Source code at petsc4py/PETSc/TS.pyx:2485 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2485>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    rollBack()
        Roll back one time step.

        Collective.

        See also:
            TSRollBack <https://petsc.org/release/manualpages/TS/TSRollBack.html>

    Source code at petsc4py/PETSc/TS.pyx:2508 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2508>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setARKIMEXFastSlowSplit(flag)
        Use ARKIMEX for solving a fast-slow system.

        Logically collective.

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Set to True for fast-slow partitioned systems.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSARKIMEXSetType <https://petsc.org/release/manualpages/TS/TSARKIMEXSetType.html>

    Source code at petsc4py/PETSc/TS.pyx:345 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L345>

    setARKIMEXFullyImplicit(flag)
        Solve both parts of the equation implicitly.

        Logically collective.

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Set to True for fully implicit.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSARKIMEXSetFullyImplicit <https://petsc.org/release/manualpages/TS/TSARKIMEXSetFullyImplicit.html>

    Source code at petsc4py/PETSc/TS.pyx:327 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L327>

    setARKIMEXType(ts_type)
        Set the type of Type.ARKIMEX <#petsc4py.PETSc.TS.Type.ARKIMEX> scheme.

        Logically collective.

        Parameters
            ts_type (ARKIMEXType <#petsc4py.PETSc.TS.ARKIMEXType> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of Type.ARKIMEX <#petsc4py.PETSc.TS.Type.ARKIMEX> scheme.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_arkimex_type sets scheme type from the commandline.

    See also:
            TSARKIMEXSetType <https://petsc.org/release/manualpages/TS/TSARKIMEXSetType.html>

    Source code at petsc4py/PETSc/TS.pyx:304 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L304>

    setAlphaParams(alpha_m=None, alpha_f=None, gamma=None)
        Set the algorithmic parameters for Type.ALPHA <#petsc4py.PETSc.TS.Type.ALPHA>.

        Logically collective.

        Users should call setAlphaRadius.

        Parameters

            •   alpha_m (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Parameter, leave None <https://docs.python.org/3/library/constants.html#None> to keep current value.

            •   alpha_f (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Parameter, leave None <https://docs.python.org/3/library/constants.html#None> to keep current value.

            •   gamma (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- Parameter, leave None <https://docs.python.org/3/library/constants.html#None> to keep current value.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSAlphaSetParams <https://petsc.org/release/manualpages/TS/TSAlphaSetParams.html>

    Source code at petsc4py/PETSc/TS.pyx:3096 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3096>

    setAlphaRadius(radius)
        Set the spectral radius for Type.ALPHA <#petsc4py.PETSc.TS.Type.ALPHA>.

        Logically collective.

        Parameters
            radius (float <https://docs.python.org/3/library/functions.html#float>) -- the spectral radius

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_alpha_radius can be used to set this from the commandline.

    See also:
            TSAlphaSetRadius <https://petsc.org/release/manualpages/TS/TSAlphaSetRadius.html>

    Source code at petsc4py/PETSc/TS.pyx:3074 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3074>

    setAppCtx(appctx)
        Set the application context.

        Not collective.

        Parameters
            appctx (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- The application context.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Source code at petsc4py/PETSc/TS.pyx:577 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L577>

    setConvergedReason(reason)
        Set the reason for handling the convergence of solve.

        Logically collective.

        Can only be called when solve is active and reason must contain common value.

        Parameters
            reason (ConvergedReason <#petsc4py.PETSc.TS.ConvergedReason>) -- The reason for convergence.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetConvergedReason <https://petsc.org/release/manualpages/TS/TSSetConvergedReason.html>

    Source code at petsc4py/PETSc/TS.pyx:2128 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2128>

    setCostGradients(vl, vm=None)
        Set the cost gradients.

        Logically collective.

        Parameters

            •   vl (Vec <#petsc4py.PETSc.Vec> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>] | None <https://docs.python.org/3/library/constants.html#None>) -- gradients with respect to the initial condition variables, the dimension and parallel layout of these vectors is the same as the ODE solution vector

            •   vm (Vec <#petsc4py.PETSc.Vec> | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>] | None <https://docs.python.org/3/library/constants.html#None>) -- gradients with respect to the parameters, the number of entries in these vectors is the same as the number of parameters

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetCostGradients <https://petsc.org/release/manualpages/Sensitivity/TSSetCostGradients.html>

    Source code at petsc4py/PETSc/TS.pyx:2647 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2647>

    setDIRKType(ts_type)
        Set the type of Type.DIRK <#petsc4py.PETSc.TS.Type.DIRK> scheme.

        Logically collective.

        Parameters
            ts_type (DIRKType <#petsc4py.PETSc.TS.DIRKType> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of Type.DIRK <#petsc4py.PETSc.TS.Type.DIRK> scheme.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_dirk_type sets scheme type from the commandline.

    See also:
            TSDIRKSetType <https://petsc.org/release/manualpages/TS/TSDIRKSetType.html>

    Source code at petsc4py/PETSc/TS.pyx:404 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L404>

    setDM(dm)
        Set the DM that may be used by some nonlinear solvers or preconditioners.

        Logically collective.

        Parameters
            dm (DM <#petsc4py.PETSc.DM>) -- The DM <#petsc4py.PETSc.DM> object.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetDM <https://petsc.org/release/manualpages/TS/TSSetDM.html>

    Source code at petsc4py/PETSc/TS.pyx:1668 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1668>

    setEquationType(eqtype)
        Set the type of the equation that TS is solving.

        Logically collective.

        Parameters
            eqtype (EquationType <#petsc4py.PETSc.TS.EquationType>) -- The type of equation.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetEquationType <https://petsc.org/release/manualpages/TS/TSSetEquationType.html>

    Source code at petsc4py/PETSc/TS.pyx:472 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L472>

    setErrorIfStepFails(flag=True)
        Immediately error is no step succeeds.

        Not collective.

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>) -- Enable to error if no step succeeds.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_error_if_step_fails to enable from the commandline.

    See also:
            TSSetErrorIfStepFails <https://petsc.org/release/manualpages/TS/TSSetErrorIfStepFails.html>

    Source code at petsc4py/PETSc/TS.pyx:2007 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2007>

    setEvaluationTimes(tspan)
        Sets evaluation points where solution will be computed and stored.

        Collective.

        The solution will be computed and stored for each time requested. The times must be all increasing and correspond to the intermediate points for time integration. ExactFinalTime.MATCHSTEP <#petsc4py.PETSc.TS.ExactFinalTime.MATCHSTEP> must be used to make the last time step in each sub-interval match the intermediate points specified. The intermediate solutions are saved in a vector array that can be accessed with getEvaluationSolutions.

        Parameters
            tspan (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) -- The sequence of time points. The first element and the last element are the initial time and the final time respectively.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_eval_times <t0, ..., tn> sets the time span from the commandline

    See also:
            getEvaluationTimes, TSGetEvaluationTimes <https://petsc.org/release/manualpages/TS/TSGetEvaluationTimes.html>

    Source code at petsc4py/PETSc/TS.pyx:1490 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1490>

    setEventHandler(direction, terminate, indicator, postevent=None, args=None, kargs=None)
        Set a function used for detecting events.

        Logically collective.

        Parameters

            •   direction (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Direction of zero crossing to be detected {-1, 0, +1}.

            •   terminate (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[bool <https://docs.python.org/3/library/functions.html#bool>]) -- Flags for each event to indicate stepping should be terminated.

            •   indicator (TSIndicatorFunction <#petsc4py.typing.TSIndicatorFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- Function for defining the indicator-functions marking the events

            •   postevent (TSPostEventFunction <#petsc4py.typing.TSPostEventFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- Function to execute after the event

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for indicator.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for indicator.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetEventHandler <https://petsc.org/release/manualpages/TS/TSSetEventHandler.html>

    Source code at petsc4py/PETSc/TS.pyx:2257 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2257>

    setEventTolerances(tol=None, vtol=None)
        Set tolerances for event zero crossings when using event handler.

        Logically collective.

        setEventHandler must have already been called.

        Parameters

            •   tol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The scalar tolerance or None <https://docs.python.org/3/library/constants.html#None> to leave at the current value

            •   vtol (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>] | None <https://docs.python.org/3/library/constants.html#None>) -- A sequence of scalar tolerance for each event. Used in preference to tol if present. Set to None <https://docs.python.org/3/library/constants.html#None> to leave at the current value.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_event_tol can be used to set values from the commandline.

    See also:
            TSSetEventTolerances <https://petsc.org/release/manualpages/TS/TSSetEventTolerances.html>

    Source code at petsc4py/PETSc/TS.pyx:2312 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2312>

    setExactFinalTime(option)
        Set method of computing the final time step.

        Logically collective.

        Parameters
            option (ExactFinalTime <#petsc4py.PETSc.TS.ExactFinalTime>) -- The exact final time option

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_exact_final_time may be used to specify from the commandline.

    See also:
            TSSetExactFinalTime <https://petsc.org/release/manualpages/TS/TSSetExactFinalTime.html>

    Source code at petsc4py/PETSc/TS.pyx:2106 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2106>

    setFromOptions()
        Set various TS parameters from user options.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, TSSetFromOptions <https://petsc.org/release/manualpages/TS/TSSetFromOptions.html>

    Source code at petsc4py/PETSc/TS.pyx:563 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L563>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setI2Function(function, f=None, args=None, kargs=None)
        Set the function to compute the 2nd order DAE.

        Logically collective.

        Parameters

            •   function (TSI2Function <#petsc4py.typing.TSI2Function> | None <https://docs.python.org/3/library/constants.html#None>) -- The right-hand side function.

            •   f (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The vector to store values or None <https://docs.python.org/3/library/constants.html#None> to be created internally.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for function.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for function.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetI2Function <https://petsc.org/release/manualpages/TS/TSSetI2Function.html>

    Source code at petsc4py/PETSc/TS.pyx:1064 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1064>

    setI2Jacobian(jacobian, J=None, P=None, args=None, kargs=None)
        Set the function to compute the Jacobian of the 2nd order DAE.

        Logically collective.

        Parameters

            •   jacobian (TSI2Jacobian <#petsc4py.typing.TSI2Jacobian> | None <https://docs.python.org/3/library/constants.html#None>) -- The function which computes the Jacobian.

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix into which the Jacobian is computed.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional matrix to use for building a preconditioner.

            •   args -- Additional positional arguments for jacobian.

            •   kargs -- Additional keyword arguments for jacobian.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetI2Jacobian <https://petsc.org/release/manualpages/TS/TSSetI2Jacobian.html>

    Source code at petsc4py/PETSc/TS.pyx:1101 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1101>

    setIFunction(function, f=None, args=None, kargs=None)
        Set the function representing the DAE to be solved.

        Logically collective.

        Parameters

            •   function (TSIFunction <#petsc4py.typing.TSIFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The right-hand side function.

            •   f (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The vector to store values or None <https://docs.python.org/3/library/constants.html#None> to be created internally.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for function.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for function.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetIFunction <https://petsc.org/release/manualpages/TS/TSSetIFunction.html>

    Source code at petsc4py/PETSc/TS.pyx:805 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L805>

    setIJacobian(jacobian, J=None, P=None, args=None, kargs=None)
        Set the function to compute the Jacobian.

        Logically collective.

        Set the function to compute the matrix dF/dU + a*dF/dU_t where F(t, U, U_t) is the function provided with setIFunction.

        Parameters

            •   jacobian (TSIJacobian <#petsc4py.typing.TSIJacobian> | None <https://docs.python.org/3/library/constants.html#None>) -- The function which computes the Jacobian.

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix into which the Jacobian is computed.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The optional matrix to use for building a preconditioner.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for jacobian.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for jacobian.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetIJacobian <https://petsc.org/release/manualpages/TS/TSSetIJacobian.html>

    Source code at petsc4py/PETSc/TS.pyx:842 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L842>

    setIJacobianP(jacobian, J=None, args=None, kargs=None)
        Set the function that computes the Jacobian.

        Logically collective.

        Set the function that computes the Jacobian of F with respect to the parameters P where F(Udot, U, t) = G(U, P, t), as well as the location to store the matrix.

        Parameters

            •   jacobian -- The function which computes the Jacobian.

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix into which the Jacobian is computed.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for jacobian.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for jacobian.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetIJacobianP <https://petsc.org/release/manualpages/Sensitivity/TSSetIJacobianP.html>

    Source code at petsc4py/PETSc/TS.pyx:887 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L887>

    setMaxSNESFailures(n)
        Set the maximum number of SNES solves failures allowed.

        Not collective.

        Parameters
            n (int <https://docs.python.org/3/library/functions.html#int>) -- The maximum number of failed nonlinear solver, use -1 for unlimited.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetMaxSNESFailures <https://petsc.org/release/manualpages/TS/TSSetMaxSNESFailures.html>

    Source code at petsc4py/PETSc/TS.pyx:1972 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1972>

    setMaxStepRejections(n)
        Set the maximum number of step rejections before a time step fails.

        Not collective.

        Parameters
            n (int <https://docs.python.org/3/library/functions.html#int>) -- The maximum number of rejected steps, use -1 for unlimited.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_max_step_rejections can be used to set this from the commandline

    See also:
            TSSetMaxStepRejections <https://petsc.org/release/manualpages/TS/TSSetMaxStepRejections.html>

    Source code at petsc4py/PETSc/TS.pyx:1933 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1933>

    setMaxSteps(max_steps)
        Set the maximum number of steps to use.

        Logically collective.

        Defaults to 5000.

        Parameters
            max_steps (int <https://docs.python.org/3/library/functions.html#int>) -- The maximum number of steps to use.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetMaxSteps <https://petsc.org/release/manualpages/TS/TSSetMaxSteps.html>

    Source code at petsc4py/PETSc/TS.pyx:1865 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1865>

    setMaxTime(max_time)
        Set the maximum (final) time.

        Logically collective.

        Parameters
            max_time (float <https://docs.python.org/3/library/functions.html#float>) -- the final time

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_max_time sets the max time from the commandline

    See also:
            TSSetMaxTime <https://petsc.org/release/manualpages/TS/TSSetMaxTime.html>

    Source code at petsc4py/PETSc/TS.pyx:1827 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1827>

    setMonitor(monitor, args=None, kargs=None)
        Set an additional monitor to the TS.

        Logically collective.

        Parameters

            •   monitor (TSMonitorFunction <#petsc4py.typing.TSMonitorFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The custom monitor function.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for monitor.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for monitor.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSMonitorSet <https://petsc.org/release/manualpages/TS/TSMonitorSet.html>

    Source code at petsc4py/PETSc/TS.pyx:2167 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2167>

    setOptionsPrefix(prefix)
        Set the prefix used for all the TS options.

        Logically collective.

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The prefix to prepend to all option names.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    A hyphen must not be given at the beginning of the prefix name.

    See also:
            Working with PETSc options <#petsc-options>, TSSetOptionsPrefix <https://petsc.org/release/manualpages/TS/TSSetOptionsPrefix.html>

    Source code at petsc4py/PETSc/TS.pyx:503 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L503>

    setPostStep(poststep, args=None, kargs=None)
        Set a function to be called at the end of each time step.

        Logically collective.

        Parameters

            •   poststep (TSPostStepFunction <#petsc4py.typing.TSPostStepFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The function to be called at the end of each step.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for poststep.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for poststep.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetPostStep <https://petsc.org/release/manualpages/TS/TSSetPostStep.html>

    Source code at petsc4py/PETSc/TS.pyx:2409 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2409>

    setPreStep(prestep, args=None, kargs=None)
        Set a function to be called at the beginning of each time step.

        Logically collective.

        Parameters

            •   prestep (TSPreStepFunction <#petsc4py.typing.TSPreStepFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The function to be called at the beginning of each step.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for prestep.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for prestep.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetPreStep <https://petsc.org/release/manualpages/TS/TSSetPreStep.html>

    Source code at petsc4py/PETSc/TS.pyx:2364 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2364>

    setProblemType(ptype)
        Set the type of problem to be solved.

        Logically collective.

        Parameters
            ptype (ProblemType <#petsc4py.PETSc.TS.ProblemType>) -- The type of problem of the forms.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetProblemType <https://petsc.org/release/manualpages/TS/TSSetProblemType.html>

    Source code at petsc4py/PETSc/TS.pyx:441 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L441>

    setPythonContext(context)
        Set the instance of the class implementing the required Python methods.

        Not collective.

        See also:
            PETSc Python ode-integrator type (TODO) <#petsc-python-ts>, getPythonContext

    Source code at petsc4py/PETSc/TS.pyx:2947 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2947>

        Parameters
            context (Any <https://docs.python.org/3/library/typing.html#typing.Any>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPythonType(py_type)
        Set the fully qualified Python name of the class to be used.

        Collective.

        See also:
            PETSc Python ode-integrator type (TODO) <#petsc-python-ts>, setPythonContext, getPythonType, TSPythonSetType <https://petsc.org/release/manualpages/TS/TSPythonSetType.html>

    Source code at petsc4py/PETSc/TS.pyx:2974 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2974>

        Parameters
            py_type (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setRHSFunction(function, f=None, args=None, kargs=None)
        Set the routine for evaluating the function G in U_t = G(t, u).

        Logically collective.

        Parameters

            •   function (TSRHSFunction <#petsc4py.typing.TSRHSFunction> | None <https://docs.python.org/3/library/constants.html#None>) -- The right-hand side function.

            •   f (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The vector into which the right-hand side is computed.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for function.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for function.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetRHSFunction <https://petsc.org/release/manualpages/TS/TSSetRHSFunction.html>

    Source code at petsc4py/PETSc/TS.pyx:596 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L596>

    setRHSJacobian(jacobian, J=None, P=None, args=None, kargs=None)
        Set the function to compute the Jacobian of G in U_t = G(U, t).

        Logically collective.

        Parameters

            •   jacobian (TSRHSJacobian <#petsc4py.typing.TSRHSJacobian> | None <https://docs.python.org/3/library/constants.html#None>) -- The right-hand side function.

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix into which the jacobian is computed.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The matrix into which the preconditioner is computed.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for jacobian.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for jacobian.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetRHSJacobian <https://petsc.org/release/manualpages/TS/TSSetRHSJacobian.html>

    Source code at petsc4py/PETSc/TS.pyx:633 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L633>

    setRHSJacobianP(rhsjacobianp, A=None, args=None, kargs=None)
        Set the function that computes the Jacobian with respect to the parameters.

        Collective.

        Parameters

            •   rhsjacobianp (TSRHSJacobianP <#petsc4py.typing.TSRHSJacobianP> | None <https://docs.python.org/3/library/constants.html#None>) -- The function to compute the Jacobian

            •   A (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- The JacobianP matrix

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for rhsjacobianp.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for rhsjacobianp.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetRHSJacobianP <https://petsc.org/release/manualpages/Sensitivity/TSSetRHSJacobianP.html>

    Source code at petsc4py/PETSc/TS.pyx:2795 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2795>

    setRHSSplitIFunction(splitname, function, r=None, args=None, kargs=None)
        Set the split implicit functions.

        Logically collective.

        Parameters

            •   splitname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- Name of the split.

            •   function (TSIFunction <#petsc4py.typing.TSIFunction>) -- The implicit function evaluation routine.

            •   r (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector to hold the residual.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for function.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for function.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSRHSSplitSetIFunction <https://petsc.org/release/manualpages/TS/TSRHSSplitSetIFunction.html>

    Source code at petsc4py/PETSc/TS.pyx:1317 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1317>

    setRHSSplitIJacobian(splitname, jacobian, J=None, P=None, args=None, kargs=None)
        Set the Jacobian for the split implicit function.

        Logically collective.

        Parameters

            •   splitname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- Name of the split.

            •   jacobian (TSRHSJacobian <#petsc4py.typing.TSRHSJacobian>) -- The Jacobian evaluation routine.

            •   J (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix to store Jacobian entries computed by jacobian.

            •   P (Mat <#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) -- Matrix used to compute preconditioner (usually the same as J).

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for jacobian.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for jacobian.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSRHSSplitSetIJacobian <https://petsc.org/release/manualpages/TS/TSRHSSplitSetIJacobian.html>

    Source code at petsc4py/PETSc/TS.pyx:1361 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1361>

    setRHSSplitIS(splitname, iss)
        Set the index set for the specified split.

        Logically collective.

        Parameters

            •   splitname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- Name of this split, if None <https://docs.python.org/3/library/constants.html#None> the number of the split is used.

            •   iss (IS <#petsc4py.PETSc.IS>) -- The index set for part of the solution vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSRHSSplitSetIS <https://petsc.org/release/manualpages/TS/TSRHSSplitSetIS.html>

    Source code at petsc4py/PETSc/TS.pyx:1252 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1252>

    setRHSSplitRHSFunction(splitname, function, r=None, args=None, kargs=None)
        Set the split right-hand-side functions.

        Logically collective.

        Parameters

            •   splitname (str <https://docs.python.org/3/library/stdtypes.html#str>) -- Name of the split.

            •   function (TSRHSFunction <#petsc4py.typing.TSRHSFunction>) -- The RHS function evaluation routine.

            •   r (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector to hold the residual.

            •   args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, ...] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional positional arguments for function.

            •   kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any <https://docs.python.org/3/library/typing.html#typing.Any>] | None <https://docs.python.org/3/library/constants.html#None>) -- Additional keyword arguments for function.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSRHSSplitSetRHSFunction <https://petsc.org/release/manualpages/TS/TSRHSSplitSetRHSFunction.html>

    Source code at petsc4py/PETSc/TS.pyx:1273 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1273>

    setRKType(ts_type)
        Set the type of the Runge-Kutta scheme.

        Logically collective.

        Parameters
            ts_type (RKType <#petsc4py.PETSc.TS.RKType> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of scheme.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_rk_type sets scheme type from the commandline.

    See also:
            TSRKSetType <https://petsc.org/release/manualpages/TS/TSRKSetType.html>

    Source code at petsc4py/PETSc/TS.pyx:281 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L281>

    setSaveTrajectory()
        Enable to save solutions as an internal TS trajectory.

        Collective.

        This routine should be called after all TS options have been set.

        Notes

        -ts_save_trajectory can be used to save a trajectory to a file.

        See also:
            TSSetSaveTrajectory <https://petsc.org/release/manualpages/TS/TSSetSaveTrajectory.html>

    Source code at petsc4py/PETSc/TS.pyx:2601 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2601>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setSolution(u)
        Set the initial solution vector.

        Logically collective.

        Parameters
            u (Vec <#petsc4py.PETSc.Vec>) -- The solution vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetSolution <https://petsc.org/release/manualpages/TS/TSSetSolution.html>

    Source code at petsc4py/PETSc/TS.pyx:1412 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1412>

    setSolution2(u, v)
        Set the initial solution and its time derivative.

        Logically collective.

        Parameters

            •   u (Vec <#petsc4py.PETSc.Vec>) -- The solution vector.

            •   v (Vec <#petsc4py.PETSc.Vec>) -- The time derivative vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TS2SetSolution <https://petsc.org/release/manualpages/TS/TS2SetSolution.html>

    Source code at petsc4py/PETSc/TS.pyx:1448 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1448>

    setStepLimits(hmin, hmax)
        Set the minimum and maximum allowed step sizes.

        Logically collective.

        Parameters

            •   hmin (float <https://docs.python.org/3/library/functions.html#float>) -- the minimum step size

            •   hmax (float <https://docs.python.org/3/library/functions.html#float>) -- the maximum step size

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSAdaptSetStepLimits <https://petsc.org/release/manualpages/TS/TSAdaptSetStepLimits.html>

    Source code at petsc4py/PETSc/TS.pyx:2559 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2559>

    setStepNumber(step_number)
        Set the number of steps completed.

        Logically collective.

        For most uses of the TS solvers the user need not explicitly call setStepNumber, as the step counter is appropriately updated in solve/step/rollBack. Power users may call this routine to reinitialize timestepping by setting the step counter to zero (and time to the initial time) to solve a similar problem with different initial conditions or parameters. It may also be used to continue timestepping from a previously interrupted run in such a way that TS monitors will be called with a initial nonzero step counter.

        Parameters
            step_number (int <https://docs.python.org/3/library/functions.html#int>) -- the number of steps completed

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetStepNumber <https://petsc.org/release/manualpages/TS/TSSetStepNumber.html>

    Source code at petsc4py/PETSc/TS.pyx:1786 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1786>

    setTheta(theta)
        Set the abscissa of the stage in (0, 1] for Type.THETA <#petsc4py.PETSc.TS.Type.THETA>.

        Logically collective.

        Parameters
            theta (float <https://docs.python.org/3/library/functions.html#float>) -- stage abscissa

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_theta_theta can be used to set a value from the commandline.

    See also:
            TSThetaSetTheta <https://petsc.org/release/manualpages/TS/TSThetaSetTheta.html>

    Source code at petsc4py/PETSc/TS.pyx:3004 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3004>

    setThetaEndpoint(flag=True)
        Set to use the endpoint variant of Type.THETA <#petsc4py.PETSc.TS.Type.THETA>.

        Logically collective.

        Parameters
            flag -- Enable to use the endpoint variant.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSThetaSetEndpoint <https://petsc.org/release/manualpages/TS/TSThetaSetEndpoint.html>

    Source code at petsc4py/PETSc/TS.pyx:3040 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3040>

    setTime(t)
        Set the time.

        Logically collective.

        Parameters
            t (float <https://docs.python.org/3/library/functions.html#float>) -- The time.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetTime <https://petsc.org/release/manualpages/TS/TSSetTime.html>

    Source code at petsc4py/PETSc/TS.pyx:1687 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1687>

    setTimeSpan(tspan)
        Set the time span and time points to evaluate solution at.

        Collective.

        The solution will be computed and stored for each time requested in the span. The times must be all increasing and correspond to the intermediate points for time integration. ExactFinalTime.MATCHSTEP <#petsc4py.PETSc.TS.ExactFinalTime.MATCHSTEP> must be used to make the last time step in each sub-interval match the intermediate points specified. The intermediate solutions are saved in a vector array that can be accessed with getEvaluationSolutions.

        Parameters
            tspan (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) -- The sequence of time points. The first element and the last element are the initial time and the final time respectively.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_time_span <t0, ..., tf> sets the time span from the commandline

    See also:
            setEvaluationTimes, TSSetTimeSpan <https://petsc.org/release/manualpages/TS/TSSetTimeSpan.html>

    Source code at petsc4py/PETSc/TS.pyx:1561 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1561>

    setTimeStep(time_step)
        Set the duration of the timestep.

        Logically collective.

        Parameters
            time_step (float <https://docs.python.org/3/library/functions.html#float>) -- the duration of the timestep

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSetTimeStep <https://petsc.org/release/manualpages/TS/TSSetTimeStep.html>

    Source code at petsc4py/PETSc/TS.pyx:1754 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L1754>

    setTolerances(rtol=None, atol=None)
        Set tolerances for local truncation error when using an adaptive controller.

        Logically collective.

        Parameters

            •   rtol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The relative tolerance, DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set, or None <https://docs.python.org/3/library/constants.html#None> to leave the current value.

            •   atol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) -- The absolute tolerance, DETERMINE <#petsc4py.PETSc.DETERMINE> to use the value when the object's type was set, or None <https://docs.python.org/3/library/constants.html#None> to leave the current value.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_rtol and -ts_atol may be used to set values from the commandline.

    See also:
            TSSetTolerances <https://petsc.org/release/manualpages/TS/TSSetTolerances.html>

    Source code at petsc4py/PETSc/TS.pyx:2029 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2029>

    setType(ts_type)
        Set the method to be used as the TS solver.

        Collective.

        Parameters
            ts_type (Type <#petsc4py.PETSc.TS.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The solver type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_type sets the method from the commandline

    See also:
            TSSetType <https://petsc.org/release/manualpages/TS/TSSetType.html>

    Source code at petsc4py/PETSc/TS.pyx:258 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L258>

    setUp()
        Set up the internal data structures for the TS.

        Collective.

        See also:
            TSSetUp <https://petsc.org/release/manualpages/TS/TSSetUp.html>

    Source code at petsc4py/PETSc/TS.pyx:2445 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2445>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    solve(u=None)
        Step the requested number of timesteps.

        Collective.

        Parameters
            u (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- The solution vector. Can be None <https://docs.python.org/3/library/constants.html#None>.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            TSSolve <https://petsc.org/release/manualpages/TS/TSSolve.html>

    Source code at petsc4py/PETSc/TS.pyx:2520 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2520>

    step()
        Take one step.

        Collective.

        The preferred interface for the TS solvers is solve. If you need to execute code at the beginning or ending of each step, use setPreStep and setPostStep respectively.

        See also:
            TSStep <https://petsc.org/release/manualpages/TS/TSStep.html>

    Source code at petsc4py/PETSc/TS.pyx:2469 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L2469>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(viewer=None)
        Print the TS object.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- The visualization context.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    -ts_view calls TSView at the end of TSStep

    See also:
            TSView <https://petsc.org/release/manualpages/TS/TSView.html>

    Source code at petsc4py/PETSc/TS.pyx:167 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L167>

Attributes Documentation

    appctx
        Application context.

        Source code at petsc4py/PETSc/TS.pyx:3145 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3145>

    atol
        The absolute tolerance.

        Source code at petsc4py/PETSc/TS.pyx:3248 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3248>

    converged
        Indicates the TS has converged.

        Source code at petsc4py/PETSc/TS.pyx:3269 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3269>

    diverged
        Indicates the TS has stopped.

        Source code at petsc4py/PETSc/TS.pyx:3274 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3274>

    dm  The DM <#petsc4py.PETSc.DM>.

        Source code at petsc4py/PETSc/TS.pyx:3155 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3155>

    equation_type
        The equation type.

        Source code at petsc4py/PETSc/TS.pyx:3173 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3173>

    iterating
        Indicates the TS is still iterating.

        Source code at petsc4py/PETSc/TS.pyx:3264 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3264>

    ksp The KSP <#petsc4py.PETSc.KSP>.

        Source code at petsc4py/PETSc/TS.pyx:3186 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3186>

    max_steps
        The maximum number of steps.

        Source code at petsc4py/PETSc/TS.pyx:3230 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3230>

    max_time
        The maximum time.

        Source code at petsc4py/PETSc/TS.pyx:3222 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3222>

    problem_type
        The problem type.

        Source code at petsc4py/PETSc/TS.pyx:3165 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3165>

    reason
        The converged reason.

        Source code at petsc4py/PETSc/TS.pyx:3256 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3256>

    rtol
        The relative tolerance.

        Source code at petsc4py/PETSc/TS.pyx:3240 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3240>

    snes
        The SNES <#petsc4py.PETSc.SNES>.

        Source code at petsc4py/PETSc/TS.pyx:3181 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3181>

    step_number
        The current step number.

        Source code at petsc4py/PETSc/TS.pyx:3214 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3214>

    time
        The current time.

        Source code at petsc4py/PETSc/TS.pyx:3198 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3198>

    time_step
        The current time step size.

        Source code at petsc4py/PETSc/TS.pyx:3206 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3206>

    vec_sol
        The solution vector.

        Source code at petsc4py/PETSc/TS.pyx:3191 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/TS.pyx#L3191>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Vec

    class petsc4py.PETSc.Vec
        Bases: Object <#petsc4py.PETSc.Object>

        A vector object.

        See also:
            Vec <https://petsc.org/release/manualpages/Vec/Vec.html>

    Enumerations
    Option <#petsc4py.PETSc.Vec.Option> | Vector assembly option.
    Type <#petsc4py.PETSc.Vec.Type> | The vector type.

  petsc4py.PETSc.Vec.Option

    class petsc4py.PETSc.Vec.Option
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Vector assembly option.

        Attributes Summary
        IGNORE_NEGATIVE_INDICES | Constant IGNORE_NEGATIVE_INDICES of type int <https://docs.python.org/3/library/functions.html#int>
        IGNORE_OFF_PROC_ENTRIES | Constant IGNORE_OFF_PROC_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        IGNORE_NEGATIVE_INDICES: int <https://docs.python.org/3/library/functions.html#int> = IGNORE_NEGATIVE_INDICES
            Constant IGNORE_NEGATIVE_INDICES of type int <https://docs.python.org/3/library/functions.html#int>

        IGNORE_OFF_PROC_ENTRIES: int <https://docs.python.org/3/library/functions.html#int> = IGNORE_OFF_PROC_ENTRIES
            Constant IGNORE_OFF_PROC_ENTRIES of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Vec.Type

    class petsc4py.PETSc.Vec.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        The vector type.

        Attributes Summary
        CUDA | Object CUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>
        HIP | Object HIP of type str <https://docs.python.org/3/library/stdtypes.html#str>
        KOKKOS | Object KOKKOS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MPI | Object MPI of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MPICUDA | Object MPICUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MPIHIP | Object MPIHIP of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MPIKOKKOS | Object MPIKOKKOS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MPIVIENNACL | Object MPIVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        NEST | Object NEST of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SEQ | Object SEQ of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SEQCUDA | Object SEQCUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SEQHIP | Object SEQHIP of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SEQKOKKOS | Object SEQKOKKOS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SEQVIENNACL | Object SEQVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SHARED | Object SHARED of type str <https://docs.python.org/3/library/stdtypes.html#str>
        STANDARD | Object STANDARD of type str <https://docs.python.org/3/library/stdtypes.html#str>
        VIENNACL | Object VIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        CUDA: str <https://docs.python.org/3/library/stdtypes.html#str> = CUDA
            Object CUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HIP: str <https://docs.python.org/3/library/stdtypes.html#str> = HIP
            Object HIP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        KOKKOS: str <https://docs.python.org/3/library/stdtypes.html#str> = KOKKOS
            Object KOKKOS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPI: str <https://docs.python.org/3/library/stdtypes.html#str> = MPI
            Object MPI of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPICUDA: str <https://docs.python.org/3/library/stdtypes.html#str> = MPICUDA
            Object MPICUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIHIP: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIHIP
            Object MPIHIP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIKOKKOS: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIKOKKOS
            Object MPIKOKKOS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MPIVIENNACL: str <https://docs.python.org/3/library/stdtypes.html#str> = MPIVIENNACL
            Object MPIVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        NEST: str <https://docs.python.org/3/library/stdtypes.html#str> = NEST
            Object NEST of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQ: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQ
            Object SEQ of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQCUDA: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQCUDA
            Object SEQCUDA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQHIP: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQHIP
            Object SEQHIP of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQKOKKOS: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQKOKKOS
            Object SEQKOKKOS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SEQVIENNACL: str <https://docs.python.org/3/library/stdtypes.html#str> = SEQVIENNACL
            Object SEQVIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SHARED: str <https://docs.python.org/3/library/stdtypes.html#str> = SHARED
            Object SHARED of type str <https://docs.python.org/3/library/stdtypes.html#str>

        STANDARD: str <https://docs.python.org/3/library/stdtypes.html#str> = STANDARD
            Object STANDARD of type str <https://docs.python.org/3/library/stdtypes.html#str>

        VIENNACL: str <https://docs.python.org/3/library/stdtypes.html#str> = VIENNACL
            Object VIENNACL of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
abs() | Replace each entry (xₙ) in the vector by abs|xₙ|.
appendOptionsPrefix(prefix) | Append to the prefix used for searching for options in the database.
assemble() | Assemble the vector.
assemblyBegin() | Begin an assembling stage of the vector.
assemblyEnd() | Finish the assembling stage initiated with assemblyBegin.
attachDLPackInfo([vec, dltensor]) | Attach tensor information from another vector or DLPack tensor.
axpby(alpha, beta, x) | Compute and store y = ɑ·x + β·y.
axpy(alpha, x) | Compute and store y = ɑ·x + y.
aypx(alpha, x) | Compute and store y = x + ɑ·y.
bindToCPU(flg) | Bind vector operations execution on the CPU.
boundToCPU() | Return whether the vector has been bound to the CPU.
chop(tol) | Set all vector entries less than some absolute tolerance to zero.
clearDLPackInfo() | Clear tensor information.
concatenate(vecs) | Concatenate vectors into a single vector.
conjugate() | Conjugate the vector.
copy([result]) | Return a copy of the vector.
create([comm]) | Create a vector object.
createCUDAWithArrays([cpuarray, cudahandle, ...]) | Create a Type.CUDA <#petsc4py.PETSc.Vec.Type.CUDA> vector with optional arrays.
createGhost(ghosts, size[, bsize, comm]) | Create a parallel vector with ghost padding on each processor.
createGhostWithArray(ghosts, array[, size, ...]) | Create a parallel vector with ghost padding and provided arrays.
createHIPWithArrays([cpuarray, hiphandle, ...]) | Create a Type.HIP <#petsc4py.PETSc.Vec.Type.HIP> vector with optional arrays.
createLocalVector() | Create a local vector.
createMPI(size[, bsize, comm]) | Create a parallel Type.MPI <#petsc4py.PETSc.Vec.Type.MPI> vector.
createNest(vecs[, isets, comm]) | Create a Type.NEST <#petsc4py.PETSc.Vec.Type.NEST> vector containing multiple nested subvectors.
createSeq(size[, bsize, comm]) | Create a sequential Type.SEQ <#petsc4py.PETSc.Vec.Type.SEQ> vector.
createShared(size[, bsize, comm]) | Create a Type.SHARED <#petsc4py.PETSc.Vec.Type.SHARED> vector that uses shared memory.
createViennaCLWithArrays([cpuarray, ...]) | Create a Type.VIENNACL <#petsc4py.PETSc.Vec.Type.VIENNACL> vector with optional arrays.
createWithArray(array[, size, bsize, comm]) | Create a vector using a provided array.
createWithDLPack(dltensor[, size, bsize, comm]) | Create a vector wrapping a DLPack object, sharing the same memory.
destroy() | Destroy the vector.
dot(vec) | Return the dot product with vec.
dotBegin(vec) | Begin computing the dot product.
dotEnd(vec) | Finish computing the dot product initiated with dotBegin.
dotNorm2(vec) | Return the dot product with vec and its squared norm.
duplicate([array]) | Create a new vector with the same type, optionally with data.
equal(vec) | Return whether the vector is equal to another.
exp() | Replace each entry (xₙ) in the vector by exp(xₙ).
getArray([readonly]) | Return local portion of the vector as an ndarray <https://numpy.org/doc/stable/glossary.html#term-ndarray>.
getBlockSize() | Return the block size of the vector.
getBuffer([readonly]) | Return a buffered view of the local portion of the vector.
getCLContextHandle() | Return the OpenCL context associated with the vector.
getCLMemHandle([mode]) | Return the OpenCL buffer associated with the vector.
getCLQueueHandle() | Return the OpenCL command queue associated with the vector.
getCUDAHandle([mode]) | Return a pointer to the device buffer.
getDM() | Return the DM <#petsc4py.PETSc.DM> associated to the vector.
getGhostIS() | Return ghosting indices of a ghost vector.
getHIPHandle([mode]) | Return a pointer to the device buffer.
getLGMap() | Return the local-to-global mapping.
getLocalSize() | Return the local size of the vector.
getLocalVector(lvec[, readonly]) | Maps the local portion of the vector into a local vector.
getNestSubVecs() | Return all the vectors contained in the nested vector.
getOffloadMask() | Return the offloading status of the vector.
getOptionsPrefix() | Return the prefix used for searching for options in the database.
getOwnershipRange() | Return the locally owned range of indices (start, end).
getOwnershipRanges() | Return the range of indices owned by each process.
getSize() | Return the global size of the vector.
getSizes() | Return the vector sizes.
getSubVector(iset[, subvec]) | Return a subvector from given indices.
getType() | Return the type of the vector.
getValue(index) | Return a single value from the vector.
getValues(indices[, values]) | Return values from certain locations in the vector.
getValuesStagStencil(indices[, values]) | Not implemented.
ghostUpdate([addv, mode]) | Update ghosted vector entries.
ghostUpdateBegin([addv, mode]) | Begin updating ghosted vector entries.
ghostUpdateEnd([addv, mode]) | Finish updating ghosted vector entries initiated with ghostUpdateBegin.
isaxpy(idx, alpha, x) | Add a scaled reduced-space vector to a subset of the vector.
isset(idx, alpha) | Set specific elements of the vector to the same value.
load(viewer) | Load a vector.
localForm() | Return a context manager for viewing ghost vectors in local form.
log() | Replace each entry in the vector by its natural logarithm.
mDot(vecs[, out]) | Compute Xᴴ·y with X an array of vectors.
mDotBegin(vecs, out) | Starts a split phase multiple dot product computation.
mDotEnd(vecs, out) | Ends a split phase multiple dot product computation.
max() | Return the vector entry with maximum real part and its location.
maxPointwiseDivide(vec) | Return the maximum of the component-wise absolute value division.
maxpy(alphas, vecs) | Compute and store y = Σₙ(ɑₙ·Xₙ) + y with X an array of vectors.
mean() | Return the arithmetic mean of all the entries of the vector.
min() | Return the vector entry with minimum real part and its location.
mtDot(vecs[, out]) | Compute Xᵀ·y with X an array of vectors.
mtDotBegin(vecs, out) | Starts a split phase transpose multiple dot product computation.
mtDotEnd(vecs, out) | Ends a split phase transpose multiple dot product computation.
norm([norm_type]) | Compute the vector norm.
normBegin([norm_type]) | Begin computing the vector norm.
normEnd([norm_type]) | Finish computations initiated with normBegin.
normalize() | Normalize the vector by its 2-norm.
permute(order[, invert]) | Permute the vector in-place with a provided ordering.
placeArray(array) | Set the local portion of the vector to a provided array.
pointwiseDivide(x, y) | Compute and store the component-wise division of two vectors.
pointwiseMax(x, y) | Compute and store the component-wise maximum of two vectors.
pointwiseMaxAbs(x, y) | Compute and store the component-wise maximum absolute values.
pointwiseMin(x, y) | Compute and store the component-wise minimum of two vectors.
pointwiseMult(x, y) | Compute and store the component-wise multiplication of two vectors.
reciprocal() | Replace each entry in the vector by its reciprocal.
resetArray([force]) | Reset the vector to use its default array.
restoreCLMemHandle() | Restore a pointer to the OpenCL buffer obtained with getCLMemHandle.
restoreCUDAHandle(handle[, mode]) | Restore a pointer to the device buffer obtained with getCUDAHandle.
restoreHIPHandle(handle[, mode]) | Restore a pointer to the device buffer obtained with getHIPHandle.
restoreLocalVector(lvec[, readonly]) | Unmap a local access obtained with getLocalVector.
restoreSubVector(iset, subvec) | Restore a subvector extracted using getSubVector.
scale(alpha) | Scale all entries of the vector.
set(alpha) | Set all components of the vector to the same value.
setArray(array) | Set values for the local portion of the vector.
setBlockSize(bsize) | Set the block size of the vector.
setDM(dm) | Associate a DM <#petsc4py.PETSc.DM> to the vector.
setFromOptions() | Configure the vector from the options database.
setLGMap(lgmap) | Set the local-to-global mapping.
setMPIGhost(ghosts) | Set the ghost points for a ghosted vector.
setNestSubVecs(sx[, idxm]) | Set the component vectors at specified indices in the nested vector.
setOption(option, flag) | Set option.
setOptionsPrefix(prefix) | Set the prefix used for searching for options in the database.
setRandom([random]) | Set all components of the vector to random numbers.
setSizes(size[, bsize]) | Set the local and global sizes of the vector.
setType(vec_type) | Set the vector type.
setUp() | Set up the internal data structures for using the vector.
setValue(index, value[, addv]) | Insert or add a single value in the vector.
setValueLocal(index, value[, addv]) | Insert or add a single value in the vector using a local numbering.
setValues(indices, values[, addv]) | Insert or add multiple values in the vector.
setValuesBlocked(indices, values[, addv]) | Insert or add blocks of values in the vector.
setValuesBlockedLocal(indices, values[, addv]) | Insert or add blocks of values in the vector with a local numbering.
setValuesLocal(indices, values[, addv]) | Insert or add multiple values in the vector with a local numbering.
setValuesStagStencil(indices, values[, addv]) | Not implemented.
shift(alpha) | Shift all entries in the vector.
sqrtabs() | Replace each entry (xₙ) in the vector by √|xₙ|.
strideGather(field, vec[, addv]) | Insert component values into a single-component vector.
strideMax(field) | Return the maximum of entries in a subvector.
strideMin(field) | Return the minimum of entries in a subvector.
strideNorm(field[, norm_type]) | Return the norm of entries in a subvector.
strideScale(field, alpha) | Scale a component of the vector.
strideScatter(field, vec[, addv]) | Scatter entries into a component of another vector.
strideSum(field) | Sum subvector entries.
sum() | Return the sum of all the entries of the vector.
swap(vec) | Swap the content of two vectors.
tDot(vec) | Return the indefinite dot product with vec.
tDotBegin(vec) | Begin computing the indefinite dot product.
tDotEnd(vec) | Finish computing the indefinite dot product initiated with tDotBegin.
toDLPack([mode]) | Return a DLPack PyCapsule <https://docs.python.org/3/c-api/capsule.html#c.PyCapsule> wrapping the vector data.
view([viewer]) | Display the vector.
waxpy(alpha, x, y) | Compute and store w = ɑ·x + y.
zeroEntries() | Set all entries in the vector to zero.

Attributes Summary
array | Alias for array_w.
array_r | Read-only ndarray <https://numpy.org/doc/stable/glossary.html#term-ndarray> containing the local portion of the vector.
array_w | Writeable ndarray <https://numpy.org/doc/stable/glossary.html#term-ndarray> containing the local portion of the vector.
block_size | The block size.
buffer | Alias for buffer_w.
buffer_r | Read-only buffered view of the local portion of the vector.
buffer_w | Writeable buffered view of the local portion of the vector.
local_size | The local vector size.
owner_range | The locally owned range of indices in the form [low, high).
owner_ranges | The range of indices owned by each process.
size | The global vector size.
sizes | The local and global vector sizes.

Methods Documentation

    abs()
        Replace each entry (xₙ) in the vector by abs|xₙ|.

        Logically collective.

        See also:
            VecAbs <https://petsc.org/release/manualpages/Vec/VecAbs.html>

    Source code at petsc4py/PETSc/Vec.pyx:2307 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2307>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    appendOptionsPrefix(prefix)
        Append to the prefix used for searching for options in the database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, setOptionsPrefix, VecAppendOptionsPrefix <https://petsc.org/release/manualpages/Vec/VecAppendOptionsPrefix.html>

    Source code at petsc4py/PETSc/Vec.pyx:1028 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1028>

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    assemble()
        Assemble the vector.

        Collective.

        See also:
            assemblyBegin, assemblyEnd

    Source code at petsc4py/PETSc/Vec.pyx:3061 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3061>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    assemblyBegin()
        Begin an assembling stage of the vector.

        Collective.

        See also:
            assemblyEnd, VecAssemblyBegin <https://petsc.org/release/manualpages/Vec/VecAssemblyBegin.html>

    Source code at petsc4py/PETSc/Vec.pyx:3037 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3037>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    assemblyEnd()
        Finish the assembling stage initiated with assemblyBegin.

        Collective.

        See also:
            assemblyBegin, VecAssemblyEnd <https://petsc.org/release/manualpages/Vec/VecAssemblyEnd.html>

    Source code at petsc4py/PETSc/Vec.pyx:3049 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3049>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    attachDLPackInfo(vec=None, dltensor=None)
        Attach tensor information from another vector or DLPack tensor.

        Logically collective.

        This tensor information is required when converting a Vec to a DLPack object.

        Parameters

            •   vec (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector with attached tensor information. This is typically created by calling createWithDLPack.

            •   dltensor -- DLPack tensor. This will only be used if vec is None <https://docs.python.org/3/library/constants.html#None>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Notes

    This operation does not copy any data from vec or dltensor.

    See also:
            clearDLPackInfo, createWithDLPack

    Source code at petsc4py/PETSc/Vec.pyx:643 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L643>

    axpby(alpha, beta, x)
        Compute and store y = ɑ·x + β·y.

        Logically collective.

        Parameters

            •   alpha (Scalar <#petsc4py.typing.Scalar>) -- First scale factor.

            •   beta (Scalar <#petsc4py.typing.Scalar>) -- Second scale factor.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Input vector, must not be the current vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            axpy, aypx, waxpy, VecAXPBY <https://petsc.org/release/manualpages/Vec/VecAXPBY.html>

    Source code at petsc4py/PETSc/Vec.pyx:2538 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2538>

    axpy(alpha, x)
        Compute and store y = ɑ·x + y.

        Logically collective.

        Parameters

            •   alpha (Scalar <#petsc4py.typing.Scalar>) -- Scale factor.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Input vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            isaxpy, VecAXPY <https://petsc.org/release/manualpages/Vec/VecAXPY.html>

    Source code at petsc4py/PETSc/Vec.pyx:2474 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2474>

    aypx(alpha, x)
        Compute and store y = x + ɑ·y.

        Logically collective.

        Parameters

            •   alpha (Scalar <#petsc4py.typing.Scalar>) -- Scale factor.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Input vector, must not be the current vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            axpy, axpby, VecAYPX <https://petsc.org/release/manualpages/Vec/VecAYPX.html>

    Source code at petsc4py/PETSc/Vec.pyx:2518 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2518>

    bindToCPU(flg)
        Bind vector operations execution on the CPU.

        Logically collective.

        See also:
            boundToCPU, VecBindToCPU <https://petsc.org/release/manualpages/Vec/VecBindToCPU.html>

    Source code at petsc4py/PETSc/Vec.pyx:1396 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1396>

        Parameters
            flg (bool <https://docs.python.org/3/library/functions.html#bool>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    boundToCPU()
        Return whether the vector has been bound to the CPU.

        Not collective.

        See also:
            bindToCPU, VecBoundToCPU <https://petsc.org/release/manualpages/Vec/VecBoundToCPU.html>

    Source code at petsc4py/PETSc/Vec.pyx:1409 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1409>

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    chop(tol)
        Set all vector entries less than some absolute tolerance to zero.

        Collective.

        Parameters
            tol (float <https://docs.python.org/3/library/functions.html#float>) -- The absolute tolerance below which entries are set to zero.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            VecFilter <https://petsc.org/release/manualpages/Vec/VecFilter.html>

    Source code at petsc4py/PETSc/Vec.pyx:1732 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1732>

    clearDLPackInfo()
        Clear tensor information.

        Logically collective.

        See also:
            attachDLPackInfo, createWithDLPack

    Source code at petsc4py/PETSc/Vec.pyx:705 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L705>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    classmethod concatenate(vecs)
        Concatenate vectors into a single vector.

        Collective.

        Parameters
            vecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- The vectors to be concatenated.

        Returns

            •   vector_out (Vec) -- The concatenated vector.

            •   indices_list (list <https://docs.python.org/3/library/stdtypes.html#list> of IS <#petsc4py.PETSc.IS>) -- A list of index sets corresponding to the concatenated components.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Vec <#petsc4py.PETSc.Vec>, list <https://docs.python.org/3/library/stdtypes.html#list>[IS <#petsc4py.PETSc.IS>]]

    See also:
            VecConcatenate <https://petsc.org/release/manualpages/Vec/VecConcatenate.html>

    Source code at petsc4py/PETSc/Vec.pyx:3552 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3552>

    conjugate()
        Conjugate the vector.

        Logically collective.

        See also:
            VecConjugate <https://petsc.org/release/manualpages/Vec/VecConjugate.html>

    Source code at petsc4py/PETSc/Vec.pyx:2319 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2319>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    copy(result=None)
        Return a copy of the vector.

        Logically collective.

        This operation copies vector entries to the new vector.

        Parameters
            result (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Target vector for the copy. If None <https://docs.python.org/3/library/constants.html#None> then a new vector is created internally.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            duplicate, VecCopy <https://petsc.org/release/manualpages/Vec/VecCopy.html>

    Source code at petsc4py/PETSc/Vec.pyx:1707 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1707>

    create(comm=None)
        Create a vector object.

        Collective.

        After creation the vector type can then be set with setType.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            destroy, VecCreate <https://petsc.org/release/manualpages/Vec/VecCreate.html>

    Source code at petsc4py/PETSc/Vec.pyx:176 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L176>

    createCUDAWithArrays(cpuarray=None, cudahandle=None, size=None, bsize=None, comm=None)
        Create a Type.CUDA <#petsc4py.PETSc.Vec.Type.CUDA> vector with optional arrays.

        Collective.

        Parameters

            •   cpuarray (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>] | None <https://docs.python.org/3/library/constants.html#None>) -- Host array. Will be lazily allocated if not provided.

            •   cudahandle (Any <https://docs.python.org/3/library/typing.html#typing.Any> | None <https://docs.python.org/3/library/constants.html#None>) -- Address of the array on the GPU. Will be lazily allocated if not provided.

            •   size (LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector size.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector block size. If None <https://docs.python.org/3/library/constants.html#None>, bsize = 1.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            VecCreateSeqCUDAWithArrays <https://petsc.org/release/manualpages/Vec/VecCreateSeqCUDAWithArrays.html>, VecCreateMPICUDAWithArrays <https://petsc.org/release/manualpages/Vec/VecCreateMPICUDAWithArrays.html>

    Source code at petsc4py/PETSc/Vec.pyx:370 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L370>

    createGhost(ghosts, size, bsize=None, comm=None)
        Create a parallel vector with ghost padding on each processor.

        Collective.

        Parameters

            •   ghosts (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Global indices of ghost points.

            •   size (LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec>) -- Vector size.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector block size. If None <https://docs.python.org/3/library/constants.html#None>, bsize = 1.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createGhostWithArray, VecCreateGhost <https://petsc.org/release/manualpages/Vec/VecCreateGhost.html>, VecCreateGhostBlock <https://petsc.org/release/manualpages/Vec/VecCreateGhostBlock.html>

    Source code at petsc4py/PETSc/Vec.pyx:819 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L819>

    createGhostWithArray(ghosts, array, size=None, bsize=None, comm=None)
        Create a parallel vector with ghost padding and provided arrays.

        Collective.

        Parameters

            •   ghosts (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Global indices of ghost points.

            •   array (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- Array to store the vector values. Must be at least as large as the local size of the vector (including ghost points).

            •   size (LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector size.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector block size. If None <https://docs.python.org/3/library/constants.html#None>, bsize = 1.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createGhost, VecCreateGhostWithArray <https://petsc.org/release/manualpages/Vec/VecCreateGhostWithArray.html>, VecCreateGhostBlockWithArray <https://petsc.org/release/manualpages/Vec/VecCreateGhostBlockWithArray.html>

    Source code at petsc4py/PETSc/Vec.pyx:861 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L861>

    createHIPWithArrays(cpuarray=None, hiphandle=None, size=None, bsize=None, comm=None)
        Create a Type.HIP <#petsc4py.PETSc.Vec.Type.HIP> vector with optional arrays.

        Collective.

        Parameters

            •   cpuarray (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>] | None <https://docs.python.org/3/library/constants.html#None>) -- Host array. Will be lazily allocated if not provided.

            •   hiphandle (Any <https://docs.python.org/3/library/typing.html#typing.Any> | None <https://docs.python.org/3/library/constants.html#None>) -- Address of the array on the GPU. Will be lazily allocated if not provided.

            •   size (LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector size.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector block size. If None <https://docs.python.org/3/library/constants.html#None>, bsize = 1.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            VecCreateSeqHIPWithArrays <https://petsc.org/release/manualpages/Vec/VecCreateSeqHIPWithArrays.html>, VecCreateMPIHIPWithArrays <https://petsc.org/release/manualpages/Vec/VecCreateMPIHIPWithArrays.html>

    Source code at petsc4py/PETSc/Vec.pyx:428 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L428>

    createLocalVector()
        Create a local vector.

        Not collective.

        Returns
            The local vector.

        Return type
            Vec

    See also:
            getLocalVector, VecCreateLocalVector <https://petsc.org/release/manualpages/Vec/VecCreateLocalVector.html>

    Source code at petsc4py/PETSc/Vec.pyx:1204 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1204>

    createMPI(size, bsize=None, comm=None)
        Create a parallel Type.MPI <#petsc4py.PETSc.Vec.Type.MPI> vector.

        Collective.

        Parameters

            •   size (LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec>) -- Vector size.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector block size. If None <https://docs.python.org/3/library/constants.html#None>, bsize = 1.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createSeq, VecCreateMPI <https://petsc.org/release/manualpages/Vec/VecCreateMPI.html>

    Source code at petsc4py/PETSc/Vec.pyx:283 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L283>

    createNest(vecs, isets=None, comm=None)
        Create a Type.NEST <#petsc4py.PETSc.Vec.Type.NEST> vector containing multiple nested subvectors.

        Collective.

        Parameters

            •   vecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- Iterable of subvectors.

            •   isets (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[IS <#petsc4py.PETSc.IS>] | None <https://docs.python.org/3/library/constants.html#None>) -- Iterable of index sets for each nested subvector. Defaults to contiguous ordering.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            VecCreateNest <https://petsc.org/release/manualpages/Vec/VecCreateNest.html>

    Source code at petsc4py/PETSc/Vec.pyx:952 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L952>

    createSeq(size, bsize=None, comm=None)
        Create a sequential Type.SEQ <#petsc4py.PETSc.Vec.Type.SEQ> vector.

        Collective.

        Parameters

            •   size (LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec>) -- Vector size.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector block size. If None <https://docs.python.org/3/library/constants.html#None>, bsize = 1.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to COMM_SELF <#petsc4py.PETSc.COMM_SELF>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            createMPI, VecCreateSeq <https://petsc.org/release/manualpages/Vec/VecCreateSeq.html>

    Source code at petsc4py/PETSc/Vec.pyx:247 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L247>

    createShared(size, bsize=None, comm=None)
        Create a Type.SHARED <#petsc4py.PETSc.Vec.Type.SHARED> vector that uses shared memory.

        Collective.

        Parameters

            •   size (LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec>) -- Vector size.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector block size. If None <https://docs.python.org/3/library/constants.html#None>, bsize = 1.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            VecCreateShared <https://petsc.org/release/manualpages/Vec/VecCreateShared.html>

    Source code at petsc4py/PETSc/Vec.pyx:918 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L918>

    createViennaCLWithArrays(cpuarray=None, viennaclvechandle=None, size=None, bsize=None, comm=None)
        Create a Type.VIENNACL <#petsc4py.PETSc.Vec.Type.VIENNACL> vector with optional arrays.

        Collective.

        Parameters

            •   cpuarray (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>] | None <https://docs.python.org/3/library/constants.html#None>) -- Host array. Will be lazily allocated if not provided.

            •   viennaclvechandle (Any <https://docs.python.org/3/library/typing.html#typing.Any> | None <https://docs.python.org/3/library/constants.html#None>) -- Address of the array on the GPU. Will be lazily allocated if not provided.

            •   size (LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector size.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector block size. If None <https://docs.python.org/3/library/constants.html#None>, bsize = 1.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            VecCreateSeqViennaCLWithArrays <https://petsc.org/release/manualpages/Vec/VecCreateSeqViennaCLWithArrays.html>, VecCreateMPIViennaCLWithArrays <https://petsc.org/release/manualpages/Vec/VecCreateMPIViennaCLWithArrays.html>

    Source code at petsc4py/PETSc/Vec.pyx:486 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L486>

    createWithArray(array, size=None, bsize=None, comm=None)
        Create a vector using a provided array.

        Collective.

        This method will create either a Type.SEQ <#petsc4py.PETSc.Vec.Type.SEQ> or Type.MPI <#petsc4py.PETSc.Vec.Type.MPI> depending on the size of the communicator.

        Parameters

            •   array (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- Array to store the vector values. Must be at least as large as the local size of the vector.

            •   size (LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector size.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector block size. If None <https://docs.python.org/3/library/constants.html#None>, bsize = 1.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            VecCreateSeqWithArray <https://petsc.org/release/manualpages/Vec/VecCreateSeqWithArray.html>, VecCreateMPIWithArray <https://petsc.org/release/manualpages/Vec/VecCreateMPIWithArray.html>

    Source code at petsc4py/PETSc/Vec.pyx:319 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L319>

    createWithDLPack(dltensor, size=None, bsize=None, comm=None)
        Create a vector wrapping a DLPack object, sharing the same memory.

        Collective.

        This operation does not modify the storage of the original tensor and should be used with contiguous tensors only. If the tensor is stored in row-major order (e.g. PyTorch tensors), the resulting vector will look like an unrolled tensor using row-major order.

        The resulting vector type will be one of Type.SEQ <#petsc4py.PETSc.Vec.Type.SEQ>, Type.MPI <#petsc4py.PETSc.Vec.Type.MPI>, Type.SEQCUDA <#petsc4py.PETSc.Vec.Type.SEQCUDA>, Type.MPICUDA <#petsc4py.PETSc.Vec.Type.MPICUDA>, Type.SEQHIP <#petsc4py.PETSc.Vec.Type.SEQHIP> or Type.MPIHIP <#petsc4py.PETSc.Vec.Type.MPIHIP> depending on the type of dltensor and the number of processes in the communicator.

        Parameters

            •   dltensor -- Either an object with a __dlpack__ method or a DLPack tensor object.

            •   size (LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector size.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector block size. If None <https://docs.python.org/3/library/constants.html#None>, bsize = 1.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    Source code at petsc4py/PETSc/Vec.pyx:545 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L545>

    destroy()
        Destroy the vector.

        Collective.

        See also:
            create, VecDestroy <https://petsc.org/release/manualpages/Vec/VecDestroy.html>

    Source code at petsc4py/PETSc/Vec.pyx:163 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L163>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    dot(vec)
        Return the dot product with vec.

        Collective.

        For complex numbers this computes yᴴ·x with self as x, vec as y and where yᴴ denotes the conjugate transpose of y.

        Use tDot for the indefinite form yᵀ·x where yᵀ denotes the transpose of y.

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>) -- Vector to compute the dot product with.

        Return type
            Scalar <#petsc4py.typing.Scalar>

    See also:
            dotBegin, dotEnd, tDot, VecDot <https://petsc.org/release/manualpages/Vec/VecDot.html>

    Source code at petsc4py/PETSc/Vec.pyx:1787 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1787>

    dotBegin(vec)
        Begin computing the dot product.

        Collective.

        This should be paired with a call to dotEnd.

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>) -- Vector to compute the dot product with.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            dotEnd, dot, VecDotBegin <https://petsc.org/release/manualpages/Vec/VecDotBegin.html>

    Source code at petsc4py/PETSc/Vec.pyx:1812 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1812>

    dotEnd(vec)
        Finish computing the dot product initiated with dotBegin.

        Collective.

        See also:
            dotBegin, dot, VecDotEnd <https://petsc.org/release/manualpages/Vec/VecDotEnd.html>

    Source code at petsc4py/PETSc/Vec.pyx:1832 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1832>

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>)

        Return type
            Scalar <#petsc4py.typing.Scalar>

    dotNorm2(vec)
        Return the dot product with vec and its squared norm.

        Collective.

        See also:
            dot, norm, VecDotNorm2 <https://petsc.org/release/manualpages/Vec/VecDotNorm2.html>

    Source code at petsc4py/PETSc/Vec.pyx:2151 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2151>

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>)

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Scalar <#petsc4py.typing.Scalar>, float <https://docs.python.org/3/library/functions.html#float>]

    duplicate(array=None)
        Create a new vector with the same type, optionally with data.

        Collective.

        Parameters
            array (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>] | None <https://docs.python.org/3/library/constants.html#None>) -- Optional values to store in the new vector.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            copy, VecDuplicate <https://petsc.org/release/manualpages/Vec/VecDuplicate.html>

    Source code at petsc4py/PETSc/Vec.pyx:1682 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1682>

    equal(vec)
        Return whether the vector is equal to another.

        Collective.

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>) -- Vector to compare with.

        Return type
            bool <https://docs.python.org/3/library/functions.html#bool>

    See also:
            VecEqual <https://petsc.org/release/manualpages/Vec/VecEqual.html>

    Source code at petsc4py/PETSc/Vec.pyx:1768 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1768>

    exp()
        Replace each entry (xₙ) in the vector by exp(xₙ).

        Logically collective.

        See also:
            log, VecExp <https://petsc.org/release/manualpages/Vec/VecExp.html>

    Source code at petsc4py/PETSc/Vec.pyx:2271 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2271>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    getArray(readonly=False)
        Return local portion of the vector as an ndarray <https://numpy.org/doc/stable/glossary.html#term-ndarray>.

        Logically collective.

        Parameters
            readonly (bool <https://docs.python.org/3/library/functions.html#bool>) -- Request read-only access.

        Return type
            ArrayScalar <#petsc4py.typing.ArrayScalar>

    See also:
            setArray, getBuffer

    Source code at petsc4py/PETSc/Vec.pyx:1313 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1313>

    getBlockSize()
        Return the block size of the vector.

        Not collective.

        See also:
            VecGetBlockSize <https://petsc.org/release/manualpages/Vec/VecGetBlockSize.html>

    Source code at petsc4py/PETSc/Vec.pyx:1149 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1149>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getBuffer(readonly=False)
        Return a buffered view of the local portion of the vector.

        Logically collective.

        Parameters
            readonly (bool <https://docs.python.org/3/library/functions.html#bool>) -- Request read-only access.

        Returns
            Buffer object <https://docs.python.org/3/c-api/buffer.html> wrapping the local portion of the vector data. This can be used either as a context manager providing access as a numpy array or can be passed to array constructors accepting buffered objects such as numpy.asarray <https://numpy.org/doc/stable/reference/generated/numpy.asarray.html#numpy.asarray>.

        Return type
            typing.Any <https://docs.python.org/3/library/typing.html#typing.Any>

    Examples

    Accessing the data with a context manager:

        >>> vec = PETSc.Vec().createWithArray([1, 2, 3])
        >>> with vec.getBuffer() as arr:
        ...     arr
        array([1., 2., 3.])

    Converting the buffer to an ndarray <https://numpy.org/doc/stable/glossary.html#term-ndarray>:

        >>> buf = PETSc.Vec().createWithArray([1, 2, 3]).getBuffer()
        >>> np.asarray(buf)
        array([1., 2., 3.])

    See also:
            getArray

    Source code at petsc4py/PETSc/Vec.pyx:1270 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1270>

    getCLContextHandle()
        Return the OpenCL context associated with the vector.

        Not collective.

        Returns
            Pointer to underlying CL context. This can be used with pyopencl through pyopencl.Context.from_int_ptr.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            getCLQueueHandle, VecViennaCLGetCLContext <https://petsc.org/release/manualpages/Vec/VecViennaCLGetCLContext.html>

    Source code at petsc4py/PETSc/Vec.pyx:1593 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1593>

    getCLMemHandle(mode='rw')
        Return the OpenCL buffer associated with the vector.

        Not collective.

        Returns
            Pointer to the device buffer. This can be used with pyopencl through pyopencl.Context.from_int_ptr.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

        Parameters
            mode (AccessModeSpec <#petsc4py.typing.AccessModeSpec>)

    Notes

    This method may incur a host-to-device copy if the device data is out of date and mode is "r" or "rw".

    See also:
            restoreCLMemHandle, VecViennaCLGetCLMem <https://petsc.org/release/manualpages/Vec/VecViennaCLGetCLMem.html>, VecViennaCLGetCLMemRead <https://petsc.org/release/manualpages/Vec/VecViennaCLGetCLMemRead.html>, VecViennaCLGetCLMemWrite <https://petsc.org/release/manualpages/Vec/VecViennaCLGetCLMemWrite.html>

    Source code at petsc4py/PETSc/Vec.pyx:1633 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1633>

    getCLQueueHandle()
        Return the OpenCL command queue associated with the vector.

        Not collective.

        Returns
            Pointer to underlying CL command queue. This can be used with pyopencl through pyopencl.Context.from_int_ptr.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            getCLContextHandle, VecViennaCLGetCLQueue <https://petsc.org/release/manualpages/Vec/VecViennaCLGetCLQueue.html>

    Source code at petsc4py/PETSc/Vec.pyx:1613 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1613>

    getCUDAHandle(mode='rw')
        Return a pointer to the device buffer.

        Not collective.

        The returned pointer should be released using restoreCUDAHandle with the same access mode.

        Returns
            CUDA device pointer.

        Return type
            typing.Any <https://docs.python.org/3/library/typing.html#typing.Any>

        Parameters
            mode (AccessModeSpec <#petsc4py.typing.AccessModeSpec>)

    Notes

    This method may incur a host-to-device copy if the device data is out of date and mode is "r" or "rw".

    See also:
            restoreCUDAHandle, VecCUDAGetArray <https://petsc.org/release/manualpages/Vec/VecCUDAGetArray.html>, VecCUDAGetArrayRead <https://petsc.org/release/manualpages/Vec/VecCUDAGetArrayRead.html>, VecCUDAGetArrayWrite <https://petsc.org/release/manualpages/Vec/VecCUDAGetArrayWrite.html>

    Source code at petsc4py/PETSc/Vec.pyx:1423 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1423>

    getDM()
        Return the DM <#petsc4py.PETSc.DM> associated to the vector.

        Not collective.

        See also:
            setDM, VecGetDM <https://petsc.org/release/manualpages/DM/VecGetDM.html>

    Source code at petsc4py/PETSc/Vec.pyx:3533 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3533>

        Return type
            DM <#petsc4py.PETSc.DM>

    getGhostIS()
        Return ghosting indices of a ghost vector.

        Collective.

        Returns
            Indices of ghosts.

        Return type
            IS <#petsc4py.PETSc.IS>

    See also:
            VecGhostGetGhostIS <https://petsc.org/release/manualpages/Vec/VecGhostGetGhostIS.html>

    Source code at petsc4py/PETSc/Vec.pyx:3399 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3399>

    getHIPHandle(mode='rw')
        Return a pointer to the device buffer.

        Not collective.

        The returned pointer should be released using restoreHIPHandle with the same access mode.

        Returns
            HIP device pointer.

        Return type
            typing.Any <https://docs.python.org/3/library/typing.html#typing.Any>

        Parameters
            mode (AccessModeSpec <#petsc4py.typing.AccessModeSpec>)

    Notes

    This method may incur a host-to-device copy if the device data is out of date and mode is "r" or "rw".

    See also:
            restoreHIPHandle, VecHIPGetArray <https://petsc.org/release/manualpages/Vec/VecHIPGetArray.html>, VecHIPGetArrayRead <https://petsc.org/release/manualpages/Vec/VecHIPGetArrayRead.html>, VecHIPGetArrayWrite <https://petsc.org/release/manualpages/Vec/VecHIPGetArrayWrite.html>

    Source code at petsc4py/PETSc/Vec.pyx:1495 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1495>

    getLGMap()
        Return the local-to-global mapping.

        Not collective.

        See also:
            setLGMap, VecGetLocalToGlobalMapping <https://petsc.org/release/manualpages/Vec/VecGetLocalToGlobalMapping.html>

    Source code at petsc4py/PETSc/Vec.pyx:2913 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2913>

        Return type
            LGMap <#petsc4py.PETSc.LGMap>

    getLocalSize()
        Return the local size of the vector.

        Not collective.

        See also:
            setSizes, getSize, VecGetLocalSize <https://petsc.org/release/manualpages/Vec/VecGetLocalSize.html>

    Source code at petsc4py/PETSc/Vec.pyx:1107 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1107>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getLocalVector(lvec, readonly=False)
        Maps the local portion of the vector into a local vector.

        Logically collective.

        Parameters

            •   lvec (Vec <#petsc4py.PETSc.Vec>) -- The local vector obtained from createLocalVector.

            •   readonly (bool <https://docs.python.org/3/library/functions.html#bool>) -- Request read-only access.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            createLocalVector, restoreLocalVector, VecGetLocalVectorRead <https://petsc.org/release/manualpages/Vec/VecGetLocalVectorRead.html>, VecGetLocalVector <https://petsc.org/release/manualpages/Vec/VecGetLocalVector.html>

    Source code at petsc4py/PETSc/Vec.pyx:1223 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1223>

    getNestSubVecs()
        Return all the vectors contained in the nested vector.

        Not collective.

        See also:
            setNestSubVecs, VecNestGetSubVecs <https://petsc.org/release/manualpages/Vec/VecNestGetSubVecs.html>

    Source code at petsc4py/PETSc/Vec.pyx:3465 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3465>

        Return type
            list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <#petsc4py.PETSc.Vec>]

    getOffloadMask()
        Return the offloading status of the vector.

        Not collective.

        Common return values include:

        •   1: PETSC_OFFLOAD_CPU - CPU has valid entries

        •   2: PETSC_OFFLOAD_GPU - GPU has valid entries

        •   3: PETSC_OFFLOAD_BOTH - CPU and GPU are in sync

        Returns
            Enum value from PetscOffloadMask <https://petsc.org/release/manualpages/Sys/PetscOffloadMask.html> describing the offloading status.

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    See also:
            VecGetOffloadMask <https://petsc.org/release/manualpages/Vec/VecGetOffloadMask.html>, PetscOffloadMask <https://petsc.org/release/manualpages/Sys/PetscOffloadMask.html>

    Source code at petsc4py/PETSc/Vec.pyx:1567 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1567>

    getOptionsPrefix()
        Return the prefix used for searching for options in the database.

        Not collective.

        See also:
            Working with PETSc options <#petsc-options>, setOptionsPrefix, VecGetOptionsPrefix <https://petsc.org/release/manualpages/Vec/VecGetOptionsPrefix.html>

    Source code at petsc4py/PETSc/Vec.pyx:1014 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1014>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getOwnershipRange()
        Return the locally owned range of indices (start, end).

        Not collective.

        Returns

            •   start (int <https://docs.python.org/3/library/functions.html#int>) -- The first local element.

            •   end (int <https://docs.python.org/3/library/functions.html#int>) -- One more than the last local element.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]

    See also:
            getOwnershipRanges, VecGetOwnershipRange <https://petsc.org/release/manualpages/Vec/VecGetOwnershipRange.html>

    Source code at petsc4py/PETSc/Vec.pyx:1163 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1163>

    getOwnershipRanges()
        Return the range of indices owned by each process.

        Not collective.

        The returned array is the result of exclusive scan of the local sizes.

        See also:
            getOwnershipRange, VecGetOwnershipRanges <https://petsc.org/release/manualpages/Vec/VecGetOwnershipRanges.html>

    Source code at petsc4py/PETSc/Vec.pyx:1184 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1184>

        Return type
            ArrayInt <#petsc4py.typing.ArrayInt>

    getSize()
        Return the global size of the vector.

        Not collective.

        See also:
            setSizes, getLocalSize, VecGetSize <https://petsc.org/release/manualpages/Vec/VecGetSize.html>

    Source code at petsc4py/PETSc/Vec.pyx:1093 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1093>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getSizes()
        Return the vector sizes.

        Not collective.

        See also:
            getSize, getLocalSize, VecGetLocalSize <https://petsc.org/release/manualpages/Vec/VecGetLocalSize.html>, VecGetSize <https://petsc.org/release/manualpages/Vec/VecGetSize.html>

    Source code at petsc4py/PETSc/Vec.pyx:1121 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1121>

        Return type
            LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec>

    getSubVector(iset, subvec=None)
        Return a subvector from given indices.

        Collective.

        Once finished with the subvector it should be returned with restoreSubVector.

        Parameters

            •   iset (IS <#petsc4py.PETSc.IS>) -- Index set describing which indices to extract into the subvector.

            •   subvec (Vec <#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) -- Subvector to copy entries into. If None <https://docs.python.org/3/library/constants.html#None> then a new Vec will be created.

        Return type
            Vec <#petsc4py.PETSc.Vec>

    See also:
            restoreSubVector, VecGetSubVector <https://petsc.org/release/manualpages/Vec/VecGetSubVector.html>

    Source code at petsc4py/PETSc/Vec.pyx:3420 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3420>

    getType()
        Return the type of the vector.

        Not collective.

        See also:
            setType, VecGetType <https://petsc.org/release/manualpages/Vec/VecGetType.html>

    Source code at petsc4py/PETSc/Vec.pyx:1079 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1079>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getValue(index)
        Return a single value from the vector.

        Not collective.

        Only values locally stored may be accessed.

        Parameters
            index (int <https://docs.python.org/3/library/functions.html#int>) -- Location of the value to read.

        Return type
            Scalar <#petsc4py.typing.Scalar>

    See also:
            getValues, VecGetValues <https://petsc.org/release/manualpages/Vec/VecGetValues.html>

    Source code at petsc4py/PETSc/Vec.pyx:2734 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2734>

    getValues(indices, values=None)
        Return values from certain locations in the vector.

        Not collective.

        Only values locally stored may be accessed.

        Parameters

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Locations of the values to read.

            •   values (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>] | None <https://docs.python.org/3/library/constants.html#None>) -- Location to store the collected values. If not provided then a new array will be allocated.

        Return type
            ArrayScalar <#petsc4py.typing.ArrayScalar>

    See also:
            getValue, setValues, VecGetValues <https://petsc.org/release/manualpages/Vec/VecGetValues.html>

    Source code at petsc4py/PETSc/Vec.pyx:2756 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2756>

    getValuesStagStencil(indices, values=None)
        Not implemented.

        Source code at petsc4py/PETSc/Vec.pyx:2781 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2781>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    ghostUpdate(addv=None, mode=None)
        Update ghosted vector entries.

        Neighborwise collective.

        Parameters

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

            •   mode (ScatterModeSpec <#petsc4py.typing.ScatterModeSpec>) -- Scatter mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Examples

    To accumulate ghost region values onto owning processes:

        >>> vec.ghostUpdate(InsertMode.ADD_VALUES, ScatterMode.REVERSE)

    Update ghost regions:

        >>> vec.ghostUpdate(InsertMode.INSERT_VALUES, ScatterMode.FORWARD)

    See also:
            ghostUpdateBegin, ghostUpdateEnd

    Source code at petsc4py/PETSc/Vec.pyx:3345 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3345>

    ghostUpdateBegin(addv=None, mode=None)
        Begin updating ghosted vector entries.

        Neighborwise collective.

        See also:
            ghostUpdateEnd, ghostUpdate, createGhost, VecGhostUpdateBegin <https://petsc.org/release/manualpages/Vec/VecGhostUpdateBegin.html>

    Source code at petsc4py/PETSc/Vec.pyx:3311 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3311>

        Parameters

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>)

            •   mode (ScatterModeSpec <#petsc4py.typing.ScatterModeSpec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    ghostUpdateEnd(addv=None, mode=None)
        Finish updating ghosted vector entries initiated with ghostUpdateBegin.

        Neighborwise collective.

        See also:
            ghostUpdateBegin, ghostUpdate, createGhost, VecGhostUpdateEnd <https://petsc.org/release/manualpages/Vec/VecGhostUpdateEnd.html>

    Source code at petsc4py/PETSc/Vec.pyx:3328 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3328>

        Parameters

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>)

            •   mode (ScatterModeSpec <#petsc4py.typing.ScatterModeSpec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    isaxpy(idx, alpha, x)
        Add a scaled reduced-space vector to a subset of the vector.

        Logically collective.

        This is equivalent to y[idx[i]] += alpha*x[i].

        Parameters

            •   idx (IS <#petsc4py.PETSc.IS>) -- Index set for the reduced space. Negative indices are skipped.

            •   alpha (Scalar <#petsc4py.typing.Scalar>) -- Scale factor.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Reduced-space vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            axpy, aypx, axpby, VecISAXPY <https://petsc.org/release/manualpages/Vec/VecISAXPY.html>

    Source code at petsc4py/PETSc/Vec.pyx:2494 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2494>

    isset(idx, alpha)
        Set specific elements of the vector to the same value.

        Not collective.

        Parameters

            •   idx (IS <#petsc4py.PETSc.IS>) -- Index set specifying the vector entries to set.

            •   alpha (Scalar <#petsc4py.typing.Scalar>) -- Value to set the selected entries to.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            set, zeroEntries, VecISSet <https://petsc.org/release/manualpages/Vec/VecISSet.html>

    Source code at petsc4py/PETSc/Vec.pyx:2397 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2397>

    load(viewer)
        Load a vector.

        Collective.

        See also:
            view, VecLoad <https://petsc.org/release/manualpages/Vec/VecLoad.html>

    Source code at petsc4py/PETSc/Vec.pyx:1750 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1750>

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer>)

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    localForm()
        Return a context manager for viewing ghost vectors in local form.

        Logically collective.

        Returns
            Context manager yielding the vector in local (ghosted) form.

        Return type
            typing.Any <https://docs.python.org/3/library/typing.html#typing.Any>

    Notes

    This operation does not perform a copy. To obtain up-to-date ghost values ghostUpdateBegin and ghostUpdateEnd must be called first.

    Non-ghost values can be found at values[0:nlocal] and ghost values at values[nlocal:nlocal+nghost].

    Examples

        >>> with vec.localForm() as lf:
        ...     # compute with lf

    See also:
            createGhost, ghostUpdateBegin, ghostUpdateEnd, VecGhostGetLocalForm <https://petsc.org/release/manualpages/Vec/VecGhostGetLocalForm.html>, VecGhostRestoreLocalForm <https://petsc.org/release/manualpages/Vec/VecGhostRestoreLocalForm.html>

    Source code at petsc4py/PETSc/Vec.pyx:3278 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3278>

    log()
        Replace each entry in the vector by its natural logarithm.

        Logically collective.

        See also:
            exp, VecLog <https://petsc.org/release/manualpages/Vec/VecLog.html>

    Source code at petsc4py/PETSc/Vec.pyx:2283 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2283>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    mDot(vecs, out=None)
        Compute Xᴴ·y with X an array of vectors.

        Collective.

        Parameters

            •   vecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- Array of vectors.

            •   out (ArrayScalar <#petsc4py.typing.ArrayScalar> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional placeholder for the result.

        Return type
            ArrayScalar <#petsc4py.typing.ArrayScalar>

    See also:
            dot, tDot, mDotBegin, mDotEnd, VecMDot <https://petsc.org/release/manualpages/Vec/VecMDot.html>

    Source code at petsc4py/PETSc/Vec.pyx:1902 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1902>

    mDotBegin(vecs, out)
        Starts a split phase multiple dot product computation.

        Collective.

        Parameters

            •   vecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- Array of vectors.

            •   out (ArrayScalar <#petsc4py.typing.ArrayScalar>) -- Placeholder for the result.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            mDot, mDotEnd, VecMDotBegin <https://petsc.org/release/manualpages/Vec/VecMDotBegin.html>

    Source code at petsc4py/PETSc/Vec.pyx:1935 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1935>

    mDotEnd(vecs, out)
        Ends a split phase multiple dot product computation.

        Collective.

        Parameters

            •   vecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- Array of vectors.

            •   out (ArrayScalar <#petsc4py.typing.ArrayScalar>) -- Placeholder for the result.

        Return type
            ArrayScalar <#petsc4py.typing.ArrayScalar>

    See also:
            mDot, mDotBegin, VecMDotEnd <https://petsc.org/release/manualpages/Vec/VecMDotEnd.html>

    Source code at petsc4py/PETSc/Vec.pyx:1965 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1965>

    max()
        Return the vector entry with maximum real part and its location.

        Collective.

        Returns

            •   p (int <https://docs.python.org/3/library/functions.html#int>) -- Location of the maximum value. If multiple entries exist with the same value then the smallest index will be returned.

            •   val (Scalar <#petsc4py.typing.Scalar>) -- Minimum value.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            min, VecMax <https://petsc.org/release/manualpages/Vec/VecMax.html>

    Source code at petsc4py/PETSc/Vec.pyx:2217 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2217>

    maxPointwiseDivide(vec)
        Return the maximum of the component-wise absolute value division.

        Logically collective.

        Equivalent to result = max_i abs(x[i] / y[i]).

        Parameters

            •   x -- Numerator vector.

            •   y -- Denominator vector.

            •   vec (Vec <#petsc4py.PETSc.Vec>)

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    See also:
            pointwiseMin, pointwiseMax, pointwiseMaxAbs, VecMaxPointwiseDivide <https://petsc.org/release/manualpages/Vec/VecMaxPointwiseDivide.html>

    Source code at petsc4py/PETSc/Vec.pyx:2710 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2710>

    maxpy(alphas, vecs)
        Compute and store y = Σₙ(ɑₙ·Xₙ) + y with X an array of vectors.

        Logically collective.

        Equivalent to y[:] = alphas[i]*vecs[i, :] + y[:].

        Parameters

            •   alphas (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- Array of scale factors, one for each vector in vecs.

            •   vecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- Array of vectors.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            axpy, aypx, axpby, waxpy, VecMAXPY <https://petsc.org/release/manualpages/Vec/VecMAXPY.html>

    Source code at petsc4py/PETSc/Vec.pyx:2583 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2583>

    mean()
        Return the arithmetic mean of all the entries of the vector.

        Collective.

        See also:
            VecMean <https://petsc.org/release/manualpages/Vec/VecMean.html>

    Source code at petsc4py/PETSc/Vec.pyx:2180 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2180>

        Return type
            Scalar <#petsc4py.typing.Scalar>

    min()
        Return the vector entry with minimum real part and its location.

        Collective.

        Returns

            •   p (int <https://docs.python.org/3/library/functions.html#int>) -- Location of the minimum value. If multiple entries exist with the same value then the smallest index will be returned.

            •   val (Scalar <#petsc4py.typing.Scalar>) -- Minimum value.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            max, VecMin <https://petsc.org/release/manualpages/Vec/VecMin.html>

    Source code at petsc4py/PETSc/Vec.pyx:2194 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2194>

    mtDot(vecs, out=None)
        Compute Xᵀ·y with X an array of vectors.

        Collective.

        Parameters

            •   vecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- Array of vectors.

            •   out (ArrayScalar <#petsc4py.typing.ArrayScalar> | None <https://docs.python.org/3/library/constants.html#None>) -- Optional placeholder for the result.

        Return type
            ArrayScalar <#petsc4py.typing.ArrayScalar>

    See also:
            tDot, mDot, mtDotBegin, mtDotEnd, VecMTDot <https://petsc.org/release/manualpages/Vec/VecMTDot.html>

    Source code at petsc4py/PETSc/Vec.pyx:1996 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1996>

    mtDotBegin(vecs, out)
        Starts a split phase transpose multiple dot product computation.

        Collective.

        Parameters

            •   vecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- Array of vectors.

            •   out (ArrayScalar <#petsc4py.typing.ArrayScalar>) -- Placeholder for the result.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            mtDot, mtDotEnd, VecMTDotBegin <https://petsc.org/release/manualpages/Vec/VecMTDotBegin.html>

    Source code at petsc4py/PETSc/Vec.pyx:2029 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2029>

    mtDotEnd(vecs, out)
        Ends a split phase transpose multiple dot product computation.

        Collective.

        Parameters

            •   vecs (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- Array of vectors.

            •   out (ArrayScalar <#petsc4py.typing.ArrayScalar>) -- Placeholder for the result.

        Return type
            ArrayScalar <#petsc4py.typing.ArrayScalar>

    See also:
            mtDot, mtDotBegin, VecMTDotEnd <https://petsc.org/release/manualpages/Vec/VecMTDotEnd.html>

    Source code at petsc4py/PETSc/Vec.pyx:2059 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2059>

    norm(norm_type=None)
        Compute the vector norm.

        Collective.

        A 2-tuple is returned if NormType.NORM_1_AND_2 <#petsc4py.PETSc.NormType.NORM_1_AND_2> is specified.

        See also:
            VecNorm <https://petsc.org/release/manualpages/Vec/VecNorm.html>, NormType <https://petsc.org/release/manualpages/Vec/NormType.html>

    Source code at petsc4py/PETSc/Vec.pyx:2090 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2090>

        Parameters
            norm_type (NormTypeSpec <#petsc4py.typing.NormTypeSpec>)

        Return type
            float <https://docs.python.org/3/library/functions.html#float> | tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    normBegin(norm_type=None)
        Begin computing the vector norm.

        Collective.

        This should be paired with a call to normEnd.

        See also:
            normEnd, norm, VecNormBegin <https://petsc.org/release/manualpages/Vec/VecNormBegin.html>

    Source code at petsc4py/PETSc/Vec.pyx:2112 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2112>

        Parameters
            norm_type (NormTypeSpec <#petsc4py.typing.NormTypeSpec>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    normEnd(norm_type=None)
        Finish computations initiated with normBegin.

        Collective.

        See also:
            normBegin, norm, VecNormEnd <https://petsc.org/release/manualpages/Vec/VecNormEnd.html>

    Source code at petsc4py/PETSc/Vec.pyx:2131 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2131>

        Parameters
            norm_type (NormTypeSpec <#petsc4py.typing.NormTypeSpec>)

        Return type
            float <https://docs.python.org/3/library/functions.html#float> | tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    normalize()
        Normalize the vector by its 2-norm.

        Collective.

        Returns
            The vector norm before normalization.

        Return type
            float <https://docs.python.org/3/library/functions.html#float>

    See also:
            norm, VecNormalize <https://petsc.org/release/manualpages/Vec/VecNormalize.html>

    Source code at petsc4py/PETSc/Vec.pyx:2240 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2240>

    permute(order, invert=False)
        Permute the vector in-place with a provided ordering.

        Collective.

        Parameters

            •   order (IS <#petsc4py.PETSc.IS>) -- Ordering for the permutation.

            •   invert (bool <https://docs.python.org/3/library/functions.html#bool>) -- Whether to invert the permutation.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            VecPermute <https://petsc.org/release/manualpages/Vec/VecPermute.html>

    Source code at petsc4py/PETSc/Vec.pyx:2351 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2351>

    placeArray(array)
        Set the local portion of the vector to a provided array.

        Not collective.

        See also:
            resetArray, setArray, VecPlaceArray <https://petsc.org/release/manualpages/Vec/VecPlaceArray.html>

    Source code at petsc4py/PETSc/Vec.pyx:1345 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1345>

        Parameters
            array (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>])

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    pointwiseDivide(x, y)
        Compute and store the component-wise division of two vectors.

        Logically collective.

        Equivalent to w[i] = x[i] / y[i].

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Numerator vector.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- Denominator vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            pointwiseMult, VecPointwiseDivide <https://petsc.org/release/manualpages/Vec/VecPointwiseDivide.html>

    Source code at petsc4py/PETSc/Vec.pyx:2632 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2632>

    pointwiseMax(x, y)
        Compute and store the component-wise maximum of two vectors.

        Logically collective.

        Equivalent to w[i] = max(x[i], y[i]).

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Input vectors to find the component-wise maxima.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- Input vectors to find the component-wise maxima.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            pointwiseMin, pointwiseMaxAbs, VecPointwiseMax <https://petsc.org/release/manualpages/Vec/VecPointwiseMax.html>

    Source code at petsc4py/PETSc/Vec.pyx:2672 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2672>

    pointwiseMaxAbs(x, y)
        Compute and store the component-wise maximum absolute values.

        Logically collective.

        Equivalent to w[i] = max(abs(x[i]), abs(y[i])).

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Input vectors to find the component-wise maxima.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- Input vectors to find the component-wise maxima.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            pointwiseMin, pointwiseMax, VecPointwiseMaxAbs <https://petsc.org/release/manualpages/Vec/VecPointwiseMaxAbs.html>

    Source code at petsc4py/PETSc/Vec.pyx:2691 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2691>

    pointwiseMin(x, y)
        Compute and store the component-wise minimum of two vectors.

        Logically collective.

        Equivalent to w[i] = min(x[i], y[i]).

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Input vectors to find the component-wise minima.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- Input vectors to find the component-wise minima.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            pointwiseMax, pointwiseMaxAbs, VecPointwiseMin <https://petsc.org/release/manualpages/Vec/VecPointwiseMin.html>

    Source code at petsc4py/PETSc/Vec.pyx:2653 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2653>

    pointwiseMult(x, y)
        Compute and store the component-wise multiplication of two vectors.

        Logically collective.

        Equivalent to w[i] = x[i] * y[i].

        Parameters

            •   x (Vec <#petsc4py.PETSc.Vec>) -- Input vectors to multiply component-wise.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- Input vectors to multiply component-wise.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            pointwiseDivide, VecPointwiseMult <https://petsc.org/release/manualpages/Vec/VecPointwiseMult.html>

    Source code at petsc4py/PETSc/Vec.pyx:2613 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2613>

    reciprocal()
        Replace each entry in the vector by its reciprocal.

        Logically collective.

        See also:
            VecReciprocal <https://petsc.org/release/manualpages/Vec/VecReciprocal.html>

    Source code at petsc4py/PETSc/Vec.pyx:2259 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2259>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    resetArray(force=False)
        Reset the vector to use its default array.

        Not collective.

        Parameters
            force (bool <https://docs.python.org/3/library/functions.html#bool>) -- Force the calling of VecResetArray <https://petsc.org/release/manualpages/Vec/VecResetArray.html> even if no user array has been placed with placeArray.

        Returns
            The array previously provided by the user with placeArray. Can be None <https://docs.python.org/3/library/constants.html#None> if force is True <https://docs.python.org/3/library/constants.html#True> and no array was placed before.

        Return type
            ArrayScalar <#petsc4py.typing.ArrayScalar>

    See also:
            placeArray, VecResetArray <https://petsc.org/release/manualpages/Vec/VecResetArray.html>

    Source code at petsc4py/PETSc/Vec.pyx:1366 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1366>

    restoreCLMemHandle()
        Restore a pointer to the OpenCL buffer obtained with getCLMemHandle.

        Not collective.

        See also:
            getCLMemHandle, VecViennaCLRestoreCLMemWrite <https://petsc.org/release/manualpages/Vec/VecViennaCLRestoreCLMemWrite.html>

    Source code at petsc4py/PETSc/Vec.pyx:1670 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1670>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    restoreCUDAHandle(handle, mode='rw')
        Restore a pointer to the device buffer obtained with getCUDAHandle.

        Not collective.

        Parameters

            •   handle (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- CUDA device pointer.

            •   mode (AccessModeSpec <#petsc4py.typing.AccessModeSpec>) -- Access mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getCUDAHandle, VecCUDARestoreArray <https://petsc.org/release/manualpages/Vec/VecCUDARestoreArray.html>, VecCUDARestoreArrayRead <https://petsc.org/release/manualpages/Vec/VecCUDARestoreArrayRead.html>, VecCUDARestoreArrayWrite <https://petsc.org/release/manualpages/Vec/VecCUDARestoreArrayWrite.html>

    Source code at petsc4py/PETSc/Vec.pyx:1462 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1462>

    restoreHIPHandle(handle, mode='rw')
        Restore a pointer to the device buffer obtained with getHIPHandle.

        Not collective.

        Parameters

            •   handle (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- HIP device pointer.

            •   mode (AccessModeSpec <#petsc4py.typing.AccessModeSpec>) -- Access mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getHIPHandle, VecHIPRestoreArray <https://petsc.org/release/manualpages/Vec/VecHIPRestoreArray.html>, VecHIPRestoreArrayRead <https://petsc.org/release/manualpages/Vec/VecHIPRestoreArrayRead.html>, VecHIPRestoreArrayWrite <https://petsc.org/release/manualpages/Vec/VecHIPRestoreArrayWrite.html>

    Source code at petsc4py/PETSc/Vec.pyx:1534 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1534>

    restoreLocalVector(lvec, readonly=False)
        Unmap a local access obtained with getLocalVector.

        Logically collective.

        Parameters

            •   lvec (Vec <#petsc4py.PETSc.Vec>) -- The local vector.

            •   readonly (bool <https://docs.python.org/3/library/functions.html#bool>) -- Request read-only access.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            createLocalVector, getLocalVector, VecRestoreLocalVectorRead <https://petsc.org/release/manualpages/Vec/VecRestoreLocalVectorRead.html>, VecRestoreLocalVector <https://petsc.org/release/manualpages/Vec/VecRestoreLocalVector.html>

    Source code at petsc4py/PETSc/Vec.pyx:1246 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1246>

    restoreSubVector(iset, subvec)
        Restore a subvector extracted using getSubVector.

        Collective.

        Parameters

            •   iset (IS <#petsc4py.PETSc.IS>) -- Index set describing the indices represented by the subvector.

            •   subvec (Vec <#petsc4py.PETSc.Vec>) -- Subvector to be restored.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getSubVector, VecRestoreSubVector <https://petsc.org/release/manualpages/Vec/VecRestoreSubVector.html>

    Source code at petsc4py/PETSc/Vec.pyx:3446 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3446>

    scale(alpha)
        Scale all entries of the vector.

        Collective.

        This method sets each entry (xₙ) in the vector to ɑ·xₙ.

        Parameters
            alpha (Scalar <#petsc4py.typing.Scalar>) -- The scaling factor.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            shift, VecScale <https://petsc.org/release/manualpages/Vec/VecScale.html>

    Source code at petsc4py/PETSc/Vec.pyx:2417 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2417>

    set(alpha)
        Set all components of the vector to the same value.

        Collective.

        See also:
            zeroEntries, isset, VecSet <https://petsc.org/release/manualpages/Vec/VecSet.html>

    Source code at petsc4py/PETSc/Vec.pyx:2384 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2384>

        Parameters
            alpha (Scalar <#petsc4py.typing.Scalar>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setArray(array)
        Set values for the local portion of the vector.

        Logically collective.

        See also:
            placeArray

    Source code at petsc4py/PETSc/Vec.pyx:1333 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1333>

        Parameters
            array (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>])

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setBlockSize(bsize)
        Set the block size of the vector.

        Logically collective.

        See also:
            VecSetBlockSize <https://petsc.org/release/manualpages/Vec/VecSetBlockSize.html>

    Source code at petsc4py/PETSc/Vec.pyx:1136 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1136>

        Parameters
            bsize (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setDM(dm)
        Associate a DM <#petsc4py.PETSc.DM> to the vector.

        Not collective.

        See also:
            getDM, VecSetDM <https://petsc.org/release/manualpages/DM/VecSetDM.html>

    Source code at petsc4py/PETSc/Vec.pyx:3521 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3521>

        Parameters
            dm (DM <#petsc4py.PETSc.DM>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFromOptions()
        Configure the vector from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, VecSetFromOptions <https://petsc.org/release/manualpages/Vec/VecSetFromOptions.html>

    Source code at petsc4py/PETSc/Vec.pyx:1042 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1042>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setLGMap(lgmap)
        Set the local-to-global mapping.

        Logically collective.

        This allows users to insert vector entries using a local numbering with setValuesLocal.

        See also:
            setValues, setValuesLocal, getLGMap, VecSetLocalToGlobalMapping <https://petsc.org/release/manualpages/Vec/VecSetLocalToGlobalMapping.html>

    Source code at petsc4py/PETSc/Vec.pyx:2898 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2898>

        Parameters
            lgmap (LGMap <#petsc4py.PETSc.LGMap>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setMPIGhost(ghosts)
        Set the ghost points for a ghosted vector.

        Collective.

        Parameters
            ghosts (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Global indices of ghost points.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            createGhost

    Source code at petsc4py/PETSc/Vec.pyx:3380 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3380>

    setNestSubVecs(sx, idxm=None)
        Set the component vectors at specified indices in the nested vector.

        Not collective.

        Parameters

            •   sx (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Vec <#petsc4py.PETSc.Vec>]) -- Array of component vectors.

            •   idxm (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- Indices of the component vectors, defaults to range(len(sx)).

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getNestSubVecs, VecNestSetSubVecs <https://petsc.org/release/manualpages/Vec/VecNestSetSubVecs.html>

    Source code at petsc4py/PETSc/Vec.pyx:3487 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3487>

    setOption(option, flag)
        Set option.

        Collective.

        See also:
            VecSetOption <https://petsc.org/release/manualpages/Vec/VecSetOption.html>

    Source code at petsc4py/PETSc/Vec.pyx:1067 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1067>

        Parameters

            •   option (Option <#petsc4py.PETSc.Vec.Option>)

            •   flag (bool <https://docs.python.org/3/library/functions.html#bool>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setOptionsPrefix(prefix)
        Set the prefix used for searching for options in the database.

        Logically collective.

        See also:
            Working with PETSc options <#petsc-options>, getOptionsPrefix, VecSetOptionsPrefix <https://petsc.org/release/manualpages/Vec/VecSetOptionsPrefix.html>

    Source code at petsc4py/PETSc/Vec.pyx:1000 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1000>

        Parameters
            prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setRandom(random=None)
        Set all components of the vector to random numbers.

        Collective.

        Parameters
            random (Random <#petsc4py.PETSc.Random> | None <https://docs.python.org/3/library/constants.html#None>) -- Random number generator. If None <https://docs.python.org/3/library/constants.html#None> then one will be created internally.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            VecSetRandom <https://petsc.org/release/manualpages/Vec/VecSetRandom.html>

    Source code at petsc4py/PETSc/Vec.pyx:2331 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2331>

    setSizes(size, bsize=None)
        Set the local and global sizes of the vector.

        Collective.

        Parameters

            •   size (LayoutSizeSpec <#petsc4py.typing.LayoutSizeSpec>) -- Vector size.

            •   bsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Vector block size. If None <https://docs.python.org/3/library/constants.html#None>, bsize = 1.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getSizes, VecSetSizes <https://petsc.org/release/manualpages/Vec/VecSetSizes.html>

    Source code at petsc4py/PETSc/Vec.pyx:218 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L218>

    setType(vec_type)
        Set the vector type.

        Collective.

        Parameters
            vec_type (Type <#petsc4py.PETSc.Vec.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The vector type.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            create, getType, VecSetType <https://petsc.org/release/manualpages/Vec/VecSetType.html>

    Source code at petsc4py/PETSc/Vec.pyx:199 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L199>

    setUp()
        Set up the internal data structures for using the vector.

        Collective.

        See also:
            create, destroy, VecSetUp <https://petsc.org/release/manualpages/Vec/VecSetUp.html>

    Source code at petsc4py/PETSc/Vec.pyx:1054 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1054>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    setValue(index, value, addv=None)
        Insert or add a single value in the vector.

        Not collective.

        Parameters

            •   index (int <https://docs.python.org/3/library/functions.html#int>) -- Location to write to. Negative indices are ignored.

            •   value (Scalar <#petsc4py.typing.Scalar>) -- Value to insert at index.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    The values may be cached so assemblyBegin and assemblyEnd must be called after all calls of this method are completed.

    Multiple calls to setValue cannot be made with different values for addv without intermediate calls to assemblyBegin and assemblyEnd.

    See also:
            setValues, VecSetValues <https://petsc.org/release/manualpages/Vec/VecSetValues.html>

    Source code at petsc4py/PETSc/Vec.pyx:2785 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2785>

    setValueLocal(index, value, addv=None)
        Insert or add a single value in the vector using a local numbering.

        Not collective.

        Parameters

            •   index (int <https://docs.python.org/3/library/functions.html#int>) -- Location to write to.

            •   value (Scalar <#petsc4py.typing.Scalar>) -- Value to insert at index.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    The values may be cached so assemblyBegin and assemblyEnd must be called after all calls of this method are completed.

    Multiple calls to setValueLocal cannot be made with different values for addv without intermediate calls to assemblyBegin and assemblyEnd.

    See also:
            setValuesLocal, VecSetValuesLocal <https://petsc.org/release/manualpages/Vec/VecSetValuesLocal.html>

    Source code at petsc4py/PETSc/Vec.pyx:2928 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2928>

    setValues(indices, values, addv=None)
        Insert or add multiple values in the vector.

        Not collective.

        Parameters

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Locations to write to. Negative indices are ignored.

            •   values (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- Values to insert at indices.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    The values may be cached so assemblyBegin and assemblyEnd must be called after all calls of this method are completed.

    Multiple calls to setValues cannot be made with different values for addv without intermediate calls to assemblyBegin and assemblyEnd.

    See also:
            setValue, VecSetValues <https://petsc.org/release/manualpages/Vec/VecSetValues.html>

    Source code at petsc4py/PETSc/Vec.pyx:2822 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2822>

    setValuesBlocked(indices, values, addv=None)
        Insert or add blocks of values in the vector.

        Not collective.

        Equivalent to x[bs*indices[i]+j] = y[bs*i+j] for 0 <= i < len(indices), 0 <= j < bs and bs block_size.

        Parameters

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Block indices to write to. Negative indices are ignored.

            •   values (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- Values to insert at indices. Should have length len(indices) * vec.block_size.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    The values may be cached so assemblyBegin and assemblyEnd must be called after all calls of this method are completed.

    Multiple calls to setValuesBlocked cannot be made with different values for addv without intermediate calls to assemblyBegin and assemblyEnd.

    See also:
            setValues, VecSetValuesBlocked <https://petsc.org/release/manualpages/Vec/VecSetValuesBlocked.html>

    Source code at petsc4py/PETSc/Vec.pyx:2856 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2856>

    setValuesBlockedLocal(indices, values, addv=None)
        Insert or add blocks of values in the vector with a local numbering.

        Not collective.

        Equivalent to x[bs*indices[i]+j] = y[bs*i+j] for 0 <= i < len(indices), 0 <= j < bs and bs block_size.

        Parameters

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Local block indices to write to.

            •   values (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- Values to insert at indices. Should have length len(indices) * vec.block_size.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    The values may be cached so assemblyBegin and assemblyEnd must be called after all calls of this method are completed.

    Multiple calls to setValuesBlockedLocal cannot be made with different values for addv without intermediate calls to assemblyBegin and assemblyEnd.

    See also:
            setValuesBlocked, setValuesLocal, VecSetValuesBlockedLocal <https://petsc.org/release/manualpages/Vec/VecSetValuesBlockedLocal.html>

    Source code at petsc4py/PETSc/Vec.pyx:2999 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2999>

    setValuesLocal(indices, values, addv=None)
        Insert or add multiple values in the vector with a local numbering.

        Not collective.

        Parameters

            •   indices (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[int <https://docs.python.org/3/library/functions.html#int>]) -- Locations to write to.

            •   values (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#petsc4py.typing.Scalar>]) -- Values to insert at indices.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    The values may be cached so assemblyBegin and assemblyEnd must be called after all calls of this method are completed.

    Multiple calls to setValuesLocal cannot be made with different values for addv without intermediate calls to assemblyBegin and assemblyEnd.

    See also:
            setValues, VecSetValuesLocal <https://petsc.org/release/manualpages/Vec/VecSetValuesLocal.html>

    Source code at petsc4py/PETSc/Vec.pyx:2965 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2965>

    setValuesStagStencil(indices, values, addv=None)
        Not implemented.

        Source code at petsc4py/PETSc/Vec.pyx:2894 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2894>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    shift(alpha)
        Shift all entries in the vector.

        Collective.

        This method sets each entry (xₙ) in the vector to xₙ + ɑ.

        Parameters
            alpha (Scalar <#petsc4py.typing.Scalar>) -- The shift to apply to the vector values.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            scale, VecShift <https://petsc.org/release/manualpages/Vec/VecShift.html>

    Source code at petsc4py/PETSc/Vec.pyx:2437 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2437>

    sqrtabs()
        Replace each entry (xₙ) in the vector by √|xₙ|.

        Logically collective.

        See also:
            VecSqrtAbs <https://petsc.org/release/manualpages/Vec/VecSqrtAbs.html>

    Source code at petsc4py/PETSc/Vec.pyx:2295 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2295>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    strideGather(field, vec, addv=None)
        Insert component values into a single-component vector.

        Collective.

        The current vector is expected to be multi-component (block_size greater than 1) and the target vector is expected to be single-component.

        Parameters

            •   field (int <https://docs.python.org/3/library/functions.html#int>) -- Component index. Must be between 0 and vec.block_size.

            •   vec (Vec <#petsc4py.PETSc.Vec>) -- Single-component vector to be inserted into.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            strideScatter, VecStrideScatter <https://petsc.org/release/manualpages/Vec/VecStrideScatter.html>

    Source code at petsc4py/PETSc/Vec.pyx:3245 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3245>

    strideMax(field)
        Return the maximum of entries in a subvector.

        Collective.

        Equivalent to max(x[field], x[field+bs], x[field+2*bs], ...) where bs is block_size.

        Parameters
            field (int <https://docs.python.org/3/library/functions.html#int>) -- Component index. Must be between 0 and vec.block_size.

        Returns

            •   int <https://docs.python.org/3/library/functions.html#int> -- Location of maximum.

            •   float <https://docs.python.org/3/library/functions.html#float> -- Maximum value.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            strideScale, strideSum, strideMin, VecStrideMax <https://petsc.org/release/manualpages/Vec/VecStrideMax.html>

    Source code at petsc4py/PETSc/Vec.pyx:3151 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3151>

    strideMin(field)
        Return the minimum of entries in a subvector.

        Collective.

        Equivalent to min(x[field], x[field+bs], x[field+2*bs], ...) where bs is block_size.

        Parameters
            field (int <https://docs.python.org/3/library/functions.html#int>) -- Component index. Must be between 0 and vec.block_size.

        Returns

            •   int <https://docs.python.org/3/library/functions.html#int> -- Location of minimum.

            •   float <https://docs.python.org/3/library/functions.html#float> -- Minimum value.

        Return type
            tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            strideScale, strideSum, strideMax, VecStrideMin <https://petsc.org/release/manualpages/Vec/VecStrideMin.html>

    Source code at petsc4py/PETSc/Vec.pyx:3120 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3120>

    strideNorm(field, norm_type=None)
        Return the norm of entries in a subvector.

        Collective.

        Equivalent to norm(x[field], x[field+bs], x[field+2*bs], ...) where bs is block_size.

        Parameters

            •   field (int <https://docs.python.org/3/library/functions.html#int>) -- Component index. Must be between 0 and vec.block_size.

            •   norm_type (NormTypeSpec <#petsc4py.typing.NormTypeSpec>) -- The norm type.

        Return type
            float <https://docs.python.org/3/library/functions.html#float> | tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]

    See also:
            norm, strideScale, strideSum, VecStrideNorm <https://petsc.org/release/manualpages/Vec/VecStrideNorm.html>

    Source code at petsc4py/PETSc/Vec.pyx:3182 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3182>

    strideScale(field, alpha)
        Scale a component of the vector.

        Logically collective.

        Parameters

            •   field (int <https://docs.python.org/3/library/functions.html#int>) -- Component index. Must be between 0 and vec.block_size.

            •   alpha (Scalar <#petsc4py.typing.Scalar>) -- Factor to multiple the component entries by.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            strideSum, strideMin, strideMax, VecStrideScale <https://petsc.org/release/manualpages/Vec/VecStrideScale.html>

    Source code at petsc4py/PETSc/Vec.pyx:3076 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3076>

    strideScatter(field, vec, addv=None)
        Scatter entries into a component of another vector.

        Collective.

        The current vector is expected to be single-component (block_size of 1) and the target vector is expected to be multi-component.

        Parameters

            •   field (int <https://docs.python.org/3/library/functions.html#int>) -- Component index. Must be between 0 and vec.block_size.

            •   vec (Vec <#petsc4py.PETSc.Vec>) -- Multi-component vector to be scattered into.

            •   addv (InsertModeSpec <#petsc4py.typing.InsertModeSpec>) -- Insertion mode.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            strideGather, VecStrideScatter <https://petsc.org/release/manualpages/Vec/VecStrideScatter.html>

    Source code at petsc4py/PETSc/Vec.pyx:3214 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3214>

    strideSum(field)
        Sum subvector entries.

        Collective.

        Equivalent to sum(x[field], x[field+bs], x[field+2*bs], ...) where bs is block_size.

        Parameters
            field (int <https://docs.python.org/3/library/functions.html#int>) -- Component index. Must be between 0 and vec.block_size.

        Return type
            Scalar <#petsc4py.typing.Scalar>

    See also:
            strideScale, strideMin, strideMax, VecStrideSum <https://petsc.org/release/manualpages/Vec/VecStrideSum.html>

    Source code at petsc4py/PETSc/Vec.pyx:3097 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3097>

    sum()
        Return the sum of all the entries of the vector.

        Collective.

        See also:
            VecSum <https://petsc.org/release/manualpages/Vec/VecSum.html>

    Source code at petsc4py/PETSc/Vec.pyx:2166 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2166>

        Return type
            Scalar <#petsc4py.typing.Scalar>

    swap(vec)
        Swap the content of two vectors.

        Logically collective.

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>) -- The vector to swap data with.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            VecSwap <https://petsc.org/release/manualpages/Vec/VecSwap.html>

    Source code at petsc4py/PETSc/Vec.pyx:2457 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2457>

    tDot(vec)
        Return the indefinite dot product with vec.

        Collective.

        This computes yᵀ·x with self as x, vec as y and where yᵀ denotes the transpose of y.

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>) -- Vector to compute the indefinite dot product with.

        Return type
            Scalar <#petsc4py.typing.Scalar>

    See also:
            tDotBegin, tDotEnd, dot, VecTDot <https://petsc.org/release/manualpages/Vec/VecTDot.html>

    Source code at petsc4py/PETSc/Vec.pyx:1846 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1846>

    tDotBegin(vec)
        Begin computing the indefinite dot product.

        Collective.

        This should be paired with a call to tDotEnd.

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>) -- Vector to compute the indefinite dot product with.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            tDotEnd, tDot, VecTDotBegin <https://petsc.org/release/manualpages/Vec/VecTDotBegin.html>

    Source code at petsc4py/PETSc/Vec.pyx:1868 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1868>

    tDotEnd(vec)
        Finish computing the indefinite dot product initiated with tDotBegin.

        Collective.

        See also:
            tDotBegin, tDot, VecTDotEnd <https://petsc.org/release/manualpages/Vec/VecTDotEnd.html>

    Source code at petsc4py/PETSc/Vec.pyx:1888 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L1888>

        Parameters
            vec (Vec <#petsc4py.PETSc.Vec>)

        Return type
            Scalar <#petsc4py.typing.Scalar>

    toDLPack(mode='rw')
        Return a DLPack PyCapsule <https://docs.python.org/3/c-api/capsule.html#c.PyCapsule> wrapping the vector data.

        Collective.

        Parameters
            mode (AccessModeSpec <#petsc4py.typing.AccessModeSpec>) -- Access mode for the vector.

        Returns
            Capsule of a DLPack tensor wrapping a Vec.

        Return type
            PyCapsule <https://docs.python.org/3/c-api/capsule.html#c.PyCapsule>

    Notes

    It is important that the access mode is respected by the consumer as this is not enforced internally.

    See also:
            createWithDLPack

    Source code at petsc4py/PETSc/Vec.pyx:726 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L726>

    view(viewer=None)
        Display the vector.

        Collective.

        Parameters
            viewer (Viewer <#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer <#petsc4py.PETSc.Viewer> instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            load, VecView <https://petsc.org/release/manualpages/Vec/VecView.html>

    Source code at petsc4py/PETSc/Vec.pyx:144 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L144>

    waxpy(alpha, x, y)
        Compute and store w = ɑ·x + y.

        Logically collective.

        Parameters

            •   alpha (Scalar <#petsc4py.typing.Scalar>) -- Scale factor.

            •   x (Vec <#petsc4py.PETSc.Vec>) -- First input vector.

            •   y (Vec <#petsc4py.PETSc.Vec>) -- Second input vector.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            axpy, aypx, axpby, maxpy, VecWAXPY <https://petsc.org/release/manualpages/Vec/VecWAXPY.html>

    Source code at petsc4py/PETSc/Vec.pyx:2561 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2561>

    zeroEntries()
        Set all entries in the vector to zero.

        Logically collective.

        See also:
            set, VecZeroEntries <https://petsc.org/release/manualpages/Vec/VecZeroEntries.html>

    Source code at petsc4py/PETSc/Vec.pyx:2372 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L2372>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

Attributes Documentation

    array
        Alias for array_w.

        Source code at petsc4py/PETSc/Vec.pyx:3658 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3658>

    array_r
        Read-only ndarray <https://numpy.org/doc/stable/glossary.html#term-ndarray> containing the local portion of the vector.

        Source code at petsc4py/PETSc/Vec.pyx:3648 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3648>

    array_w
        Writeable ndarray <https://numpy.org/doc/stable/glossary.html#term-ndarray> containing the local portion of the vector.

        Source code at petsc4py/PETSc/Vec.pyx:3639 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3639>

    block_size
        The block size.

        Source code at petsc4py/PETSc/Vec.pyx:3614 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3614>

    buffer
        Alias for buffer_w.

        Source code at petsc4py/PETSc/Vec.pyx:3653 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3653>

    buffer_r
        Read-only buffered view of the local portion of the vector.

        Source code at petsc4py/PETSc/Vec.pyx:3634 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3634>

    buffer_w
        Writeable buffered view of the local portion of the vector.

        Source code at petsc4py/PETSc/Vec.pyx:3629 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3629>

    local_size
        The local vector size.

        Source code at petsc4py/PETSc/Vec.pyx:3609 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3609>

    owner_range
        The locally owned range of indices in the form [low, high).

        Source code at petsc4py/PETSc/Vec.pyx:3619 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3619>

    owner_ranges
        The range of indices owned by each process.

        Source code at petsc4py/PETSc/Vec.pyx:3624 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3624>

    size
        The global vector size.

        Source code at petsc4py/PETSc/Vec.pyx:3604 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3604>

    sizes
        The local and global vector sizes.

        Source code at petsc4py/PETSc/Vec.pyx:3596 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Vec.pyx#L3596>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Viewer

    class petsc4py.PETSc.Viewer
        Bases: Object <#petsc4py.PETSc.Object>

        Viewer object.

        Viewer is described in the PETSc manual <https://petsc.org/release/manual/other.html#sec-viewers>.

        Viewers can be called as functions where the argument specified is the PETSc object to be viewed. See the example below.

        Examples

            >>> from petsc4py import PETSc
            >>> u = PETSc.Vec().createWithArray([1,2])
            >>> v = PETSc.Viewer()
            >>> v(u)
            Vec Object: 1 MPI process
              type: seq
            1.
            2.

        See also:
            PetscViewer <https://petsc.org/release/manualpages/Viewer/PetscViewer.html>

    Enumerations
    DrawSize <#petsc4py.PETSc.Viewer.DrawSize> | Window size.
    FileMode <#petsc4py.PETSc.Viewer.FileMode> | Viewer file mode.
    Format <#petsc4py.PETSc.Viewer.Format> | Viewer format.
    Type <#petsc4py.PETSc.Viewer.Type> | Viewer type.

  petsc4py.PETSc.Viewer.DrawSize

    class petsc4py.PETSc.Viewer.DrawSize
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Window size.

        Attributes Summary
        FULL | Constant FULL of type int <https://docs.python.org/3/library/functions.html#int>
        FULL_SIZE | Constant FULL_SIZE of type int <https://docs.python.org/3/library/functions.html#int>
        HALF | Constant HALF of type int <https://docs.python.org/3/library/functions.html#int>
        HALF_SIZE | Constant HALF_SIZE of type int <https://docs.python.org/3/library/functions.html#int>
        QUARTER | Constant QUARTER of type int <https://docs.python.org/3/library/functions.html#int>
        QUARTER_SIZE | Constant QUARTER_SIZE of type int <https://docs.python.org/3/library/functions.html#int>
        THIRD | Constant THIRD of type int <https://docs.python.org/3/library/functions.html#int>
        THIRD_SIZE | Constant THIRD_SIZE of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        FULL: int <https://docs.python.org/3/library/functions.html#int> = FULL
            Constant FULL of type int <https://docs.python.org/3/library/functions.html#int>

        FULL_SIZE: int <https://docs.python.org/3/library/functions.html#int> = FULL_SIZE
            Constant FULL_SIZE of type int <https://docs.python.org/3/library/functions.html#int>

        HALF: int <https://docs.python.org/3/library/functions.html#int> = HALF
            Constant HALF of type int <https://docs.python.org/3/library/functions.html#int>

        HALF_SIZE: int <https://docs.python.org/3/library/functions.html#int> = HALF_SIZE
            Constant HALF_SIZE of type int <https://docs.python.org/3/library/functions.html#int>

        QUARTER: int <https://docs.python.org/3/library/functions.html#int> = QUARTER
            Constant QUARTER of type int <https://docs.python.org/3/library/functions.html#int>

        QUARTER_SIZE: int <https://docs.python.org/3/library/functions.html#int> = QUARTER_SIZE
            Constant QUARTER_SIZE of type int <https://docs.python.org/3/library/functions.html#int>

        THIRD: int <https://docs.python.org/3/library/functions.html#int> = THIRD
            Constant THIRD of type int <https://docs.python.org/3/library/functions.html#int>

        THIRD_SIZE: int <https://docs.python.org/3/library/functions.html#int> = THIRD_SIZE
            Constant THIRD_SIZE of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Viewer.FileMode

    class petsc4py.PETSc.Viewer.FileMode
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Viewer file mode.

        Attributes Summary
        A | Constant A of type int <https://docs.python.org/3/library/functions.html#int>
        APPEND | Constant APPEND of type int <https://docs.python.org/3/library/functions.html#int>
        APPEND_UPDATE | Constant APPEND_UPDATE of type int <https://docs.python.org/3/library/functions.html#int>
        AU | Constant AU of type int <https://docs.python.org/3/library/functions.html#int>
        R | Constant R of type int <https://docs.python.org/3/library/functions.html#int>
        READ | Constant READ of type int <https://docs.python.org/3/library/functions.html#int>
        U | Constant U of type int <https://docs.python.org/3/library/functions.html#int>
        UA | Constant UA of type int <https://docs.python.org/3/library/functions.html#int>
        UPDATE | Constant UPDATE of type int <https://docs.python.org/3/library/functions.html#int>
        W | Constant W of type int <https://docs.python.org/3/library/functions.html#int>
        WRITE | Constant WRITE of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        A: int <https://docs.python.org/3/library/functions.html#int> = A
            Constant A of type int <https://docs.python.org/3/library/functions.html#int>

        APPEND: int <https://docs.python.org/3/library/functions.html#int> = APPEND
            Constant APPEND of type int <https://docs.python.org/3/library/functions.html#int>

        APPEND_UPDATE: int <https://docs.python.org/3/library/functions.html#int> = APPEND_UPDATE
            Constant APPEND_UPDATE of type int <https://docs.python.org/3/library/functions.html#int>

        AU: int <https://docs.python.org/3/library/functions.html#int> = AU
            Constant AU of type int <https://docs.python.org/3/library/functions.html#int>

        R: int <https://docs.python.org/3/library/functions.html#int> = R
            Constant R of type int <https://docs.python.org/3/library/functions.html#int>

        READ: int <https://docs.python.org/3/library/functions.html#int> = READ
            Constant READ of type int <https://docs.python.org/3/library/functions.html#int>

        U: int <https://docs.python.org/3/library/functions.html#int> = U
            Constant U of type int <https://docs.python.org/3/library/functions.html#int>

        UA: int <https://docs.python.org/3/library/functions.html#int> = UA
            Constant UA of type int <https://docs.python.org/3/library/functions.html#int>

        UPDATE: int <https://docs.python.org/3/library/functions.html#int> = UPDATE
            Constant UPDATE of type int <https://docs.python.org/3/library/functions.html#int>

        W: int <https://docs.python.org/3/library/functions.html#int> = W
            Constant W of type int <https://docs.python.org/3/library/functions.html#int>

        WRITE: int <https://docs.python.org/3/library/functions.html#int> = WRITE
            Constant WRITE of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Viewer.Format

    class petsc4py.PETSc.Viewer.Format
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Viewer format.

        Attributes Summary
        ASCII_COMMON | Constant ASCII_COMMON of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_CSV | Constant ASCII_CSV of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_DENSE | Constant ASCII_DENSE of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_FACTOR_INFO | Constant ASCII_FACTOR_INFO of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_GLVIS | Constant ASCII_GLVIS of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_IMPL | Constant ASCII_IMPL of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_INDEX | Constant ASCII_INDEX of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_INFO | Constant ASCII_INFO of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_INFO_DETAIL | Constant ASCII_INFO_DETAIL of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_LATEX | Constant ASCII_LATEX of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_MATHEMATICA | Constant ASCII_MATHEMATICA of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_MATLAB | Constant ASCII_MATLAB of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_MATRIXMARKET | Constant ASCII_MATRIXMARKET of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_PCICE | Constant ASCII_PCICE of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_PYTHON | Constant ASCII_PYTHON of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_SYMMODU | Constant ASCII_SYMMODU of type int <https://docs.python.org/3/library/functions.html#int>
        ASCII_XML | Constant ASCII_XML of type int <https://docs.python.org/3/library/functions.html#int>
        BINARY_MATLAB | Constant BINARY_MATLAB of type int <https://docs.python.org/3/library/functions.html#int>
        DEFAULT | Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>
        DRAW_BASIC | Constant DRAW_BASIC of type int <https://docs.python.org/3/library/functions.html#int>
        DRAW_CONTOUR | Constant DRAW_CONTOUR of type int <https://docs.python.org/3/library/functions.html#int>
        DRAW_LG | Constant DRAW_LG of type int <https://docs.python.org/3/library/functions.html#int>
        DRAW_LG_XRANGE | Constant DRAW_LG_XRANGE of type int <https://docs.python.org/3/library/functions.html#int>
        DRAW_PORTS | Constant DRAW_PORTS of type int <https://docs.python.org/3/library/functions.html#int>
        FAILED | Constant FAILED of type int <https://docs.python.org/3/library/functions.html#int>
        HDF5_MAT | Constant HDF5_MAT of type int <https://docs.python.org/3/library/functions.html#int>
        HDF5_PETSC | Constant HDF5_PETSC of type int <https://docs.python.org/3/library/functions.html#int>
        HDF5_VIZ | Constant HDF5_VIZ of type int <https://docs.python.org/3/library/functions.html#int>
        HDF5_XDMF | Constant HDF5_XDMF of type int <https://docs.python.org/3/library/functions.html#int>
        LOAD_BALANCE | Constant LOAD_BALANCE of type int <https://docs.python.org/3/library/functions.html#int>
        NATIVE | Constant NATIVE of type int <https://docs.python.org/3/library/functions.html#int>
        NOFORMAT | Constant NOFORMAT of type int <https://docs.python.org/3/library/functions.html#int>
        VTK_VTR | Constant VTK_VTR of type int <https://docs.python.org/3/library/functions.html#int>
        VTK_VTS | Constant VTK_VTS of type int <https://docs.python.org/3/library/functions.html#int>
        VTK_VTU | Constant VTK_VTU of type int <https://docs.python.org/3/library/functions.html#int>

        Attributes Documentation

        ASCII_COMMON: int <https://docs.python.org/3/library/functions.html#int> = ASCII_COMMON
            Constant ASCII_COMMON of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_CSV: int <https://docs.python.org/3/library/functions.html#int> = ASCII_CSV
            Constant ASCII_CSV of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_DENSE: int <https://docs.python.org/3/library/functions.html#int> = ASCII_DENSE
            Constant ASCII_DENSE of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_FACTOR_INFO: int <https://docs.python.org/3/library/functions.html#int> = ASCII_FACTOR_INFO
            Constant ASCII_FACTOR_INFO of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_GLVIS: int <https://docs.python.org/3/library/functions.html#int> = ASCII_GLVIS
            Constant ASCII_GLVIS of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_IMPL: int <https://docs.python.org/3/library/functions.html#int> = ASCII_IMPL
            Constant ASCII_IMPL of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_INDEX: int <https://docs.python.org/3/library/functions.html#int> = ASCII_INDEX
            Constant ASCII_INDEX of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_INFO: int <https://docs.python.org/3/library/functions.html#int> = ASCII_INFO
            Constant ASCII_INFO of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_INFO_DETAIL: int <https://docs.python.org/3/library/functions.html#int> = ASCII_INFO_DETAIL
            Constant ASCII_INFO_DETAIL of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_LATEX: int <https://docs.python.org/3/library/functions.html#int> = ASCII_LATEX
            Constant ASCII_LATEX of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_MATHEMATICA: int <https://docs.python.org/3/library/functions.html#int> = ASCII_MATHEMATICA
            Constant ASCII_MATHEMATICA of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_MATLAB: int <https://docs.python.org/3/library/functions.html#int> = ASCII_MATLAB
            Constant ASCII_MATLAB of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_MATRIXMARKET: int <https://docs.python.org/3/library/functions.html#int> = ASCII_MATRIXMARKET
            Constant ASCII_MATRIXMARKET of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_PCICE: int <https://docs.python.org/3/library/functions.html#int> = ASCII_PCICE
            Constant ASCII_PCICE of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_PYTHON: int <https://docs.python.org/3/library/functions.html#int> = ASCII_PYTHON
            Constant ASCII_PYTHON of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_SYMMODU: int <https://docs.python.org/3/library/functions.html#int> = ASCII_SYMMODU
            Constant ASCII_SYMMODU of type int <https://docs.python.org/3/library/functions.html#int>

        ASCII_XML: int <https://docs.python.org/3/library/functions.html#int> = ASCII_XML
            Constant ASCII_XML of type int <https://docs.python.org/3/library/functions.html#int>

        BINARY_MATLAB: int <https://docs.python.org/3/library/functions.html#int> = BINARY_MATLAB
            Constant BINARY_MATLAB of type int <https://docs.python.org/3/library/functions.html#int>

        DEFAULT: int <https://docs.python.org/3/library/functions.html#int> = DEFAULT
            Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>

        DRAW_BASIC: int <https://docs.python.org/3/library/functions.html#int> = DRAW_BASIC
            Constant DRAW_BASIC of type int <https://docs.python.org/3/library/functions.html#int>

        DRAW_CONTOUR: int <https://docs.python.org/3/library/functions.html#int> = DRAW_CONTOUR
            Constant DRAW_CONTOUR of type int <https://docs.python.org/3/library/functions.html#int>

        DRAW_LG: int <https://docs.python.org/3/library/functions.html#int> = DRAW_LG
            Constant DRAW_LG of type int <https://docs.python.org/3/library/functions.html#int>

        DRAW_LG_XRANGE: int <https://docs.python.org/3/library/functions.html#int> = DRAW_LG_XRANGE
            Constant DRAW_LG_XRANGE of type int <https://docs.python.org/3/library/functions.html#int>

        DRAW_PORTS: int <https://docs.python.org/3/library/functions.html#int> = DRAW_PORTS
            Constant DRAW_PORTS of type int <https://docs.python.org/3/library/functions.html#int>

        FAILED: int <https://docs.python.org/3/library/functions.html#int> = FAILED
            Constant FAILED of type int <https://docs.python.org/3/library/functions.html#int>

        HDF5_MAT: int <https://docs.python.org/3/library/functions.html#int> = HDF5_MAT
            Constant HDF5_MAT of type int <https://docs.python.org/3/library/functions.html#int>

        HDF5_PETSC: int <https://docs.python.org/3/library/functions.html#int> = HDF5_PETSC
            Constant HDF5_PETSC of type int <https://docs.python.org/3/library/functions.html#int>

        HDF5_VIZ: int <https://docs.python.org/3/library/functions.html#int> = HDF5_VIZ
            Constant HDF5_VIZ of type int <https://docs.python.org/3/library/functions.html#int>

        HDF5_XDMF: int <https://docs.python.org/3/library/functions.html#int> = HDF5_XDMF
            Constant HDF5_XDMF of type int <https://docs.python.org/3/library/functions.html#int>

        LOAD_BALANCE: int <https://docs.python.org/3/library/functions.html#int> = LOAD_BALANCE
            Constant LOAD_BALANCE of type int <https://docs.python.org/3/library/functions.html#int>

        NATIVE: int <https://docs.python.org/3/library/functions.html#int> = NATIVE
            Constant NATIVE of type int <https://docs.python.org/3/library/functions.html#int>

        NOFORMAT: int <https://docs.python.org/3/library/functions.html#int> = NOFORMAT
            Constant NOFORMAT of type int <https://docs.python.org/3/library/functions.html#int>

        VTK_VTR: int <https://docs.python.org/3/library/functions.html#int> = VTK_VTR
            Constant VTK_VTR of type int <https://docs.python.org/3/library/functions.html#int>

        VTK_VTS: int <https://docs.python.org/3/library/functions.html#int> = VTK_VTS
            Constant VTK_VTS of type int <https://docs.python.org/3/library/functions.html#int>

        VTK_VTU: int <https://docs.python.org/3/library/functions.html#int> = VTK_VTU
            Constant VTK_VTU of type int <https://docs.python.org/3/library/functions.html#int>

        __init__()

        classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.Viewer.Type

    class petsc4py.PETSc.Viewer.Type
        Bases: object <https://docs.python.org/3/library/functions.html#object>

        Viewer type.

        Attributes Summary
        ADIOS | Object ADIOS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        ASCII | Object ASCII of type str <https://docs.python.org/3/library/stdtypes.html#str>
        BINARY | Object BINARY of type str <https://docs.python.org/3/library/stdtypes.html#str>
        DRAW | Object DRAW of type str <https://docs.python.org/3/library/stdtypes.html#str>
        EXODUSII | Object EXODUSII of type str <https://docs.python.org/3/library/stdtypes.html#str>
        GLVIS | Object GLVIS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        HDF5 | Object HDF5 of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MATHEMATICA | Object MATHEMATICA of type str <https://docs.python.org/3/library/stdtypes.html#str>
        MATLAB | Object MATLAB of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PYTHON | Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>
        PYVISTA | Object PYVISTA of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SAWS | Object SAWS of type str <https://docs.python.org/3/library/stdtypes.html#str>
        SOCKET | Object SOCKET of type str <https://docs.python.org/3/library/stdtypes.html#str>
        STRING | Object STRING of type str <https://docs.python.org/3/library/stdtypes.html#str>
        VTK | Object VTK of type str <https://docs.python.org/3/library/stdtypes.html#str>
        VU | Object VU of type str <https://docs.python.org/3/library/stdtypes.html#str>

        Attributes Documentation

        ADIOS: str <https://docs.python.org/3/library/stdtypes.html#str> = ADIOS
            Object ADIOS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        ASCII: str <https://docs.python.org/3/library/stdtypes.html#str> = ASCII
            Object ASCII of type str <https://docs.python.org/3/library/stdtypes.html#str>

        BINARY: str <https://docs.python.org/3/library/stdtypes.html#str> = BINARY
            Object BINARY of type str <https://docs.python.org/3/library/stdtypes.html#str>

        DRAW: str <https://docs.python.org/3/library/stdtypes.html#str> = DRAW
            Object DRAW of type str <https://docs.python.org/3/library/stdtypes.html#str>

        EXODUSII: str <https://docs.python.org/3/library/stdtypes.html#str> = EXODUSII
            Object EXODUSII of type str <https://docs.python.org/3/library/stdtypes.html#str>

        GLVIS: str <https://docs.python.org/3/library/stdtypes.html#str> = GLVIS
            Object GLVIS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        HDF5: str <https://docs.python.org/3/library/stdtypes.html#str> = HDF5
            Object HDF5 of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MATHEMATICA: str <https://docs.python.org/3/library/stdtypes.html#str> = MATHEMATICA
            Object MATHEMATICA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        MATLAB: str <https://docs.python.org/3/library/stdtypes.html#str> = MATLAB
            Object MATLAB of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PYTHON: str <https://docs.python.org/3/library/stdtypes.html#str> = PYTHON
            Object PYTHON of type str <https://docs.python.org/3/library/stdtypes.html#str>

        PYVISTA: str <https://docs.python.org/3/library/stdtypes.html#str> = PYVISTA
            Object PYVISTA of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SAWS: str <https://docs.python.org/3/library/stdtypes.html#str> = SAWS
            Object SAWS of type str <https://docs.python.org/3/library/stdtypes.html#str>

        SOCKET: str <https://docs.python.org/3/library/stdtypes.html#str> = SOCKET
            Object SOCKET of type str <https://docs.python.org/3/library/stdtypes.html#str>

        STRING: str <https://docs.python.org/3/library/stdtypes.html#str> = STRING
            Object STRING of type str <https://docs.python.org/3/library/stdtypes.html#str>

        VTK: str <https://docs.python.org/3/library/stdtypes.html#str> = VTK
            Object VTK of type str <https://docs.python.org/3/library/stdtypes.html#str>

        VU: str <https://docs.python.org/3/library/stdtypes.html#str> = VU
            Object VU of type str <https://docs.python.org/3/library/stdtypes.html#str>

        __init__()

        classmethod __new__(*args, **kwargs)

Methods Summary
ASCII(name[, comm]) | Return an ASCII viewer associated with the communicator.
BINARY([comm]) | Return the default Type.BINARY <#petsc4py.PETSc.Viewer.Type.BINARY> viewer associated with the communicator.
DRAW([comm]) | Return the default Type.DRAW <#petsc4py.PETSc.Viewer.Type.DRAW> viewer associated with the communicator.
STDERR([comm]) | Return the standard error viewer associated with the communicator.
STDOUT([comm]) | Return the standard output viewer associated with the communicator.
addASCIITab(tabs) | Increment the ASCII tab level.
clearDraw() | Reset graphics.
create([comm]) | Create a viewer.
createASCII(name[, mode, comm]) | Create a viewer of type Type.ASCII <#petsc4py.PETSc.Viewer.Type.ASCII>.
createBinary(name[, mode, comm]) | Create a viewer of type Type.BINARY <#petsc4py.PETSc.Viewer.Type.BINARY>.
createDraw([display, title, position, size, ...]) | Create a Type.DRAW <#petsc4py.PETSc.Viewer.Type.DRAW> viewer.
createHDF5(name[, mode, comm]) | Create a viewer of type Type.HDF5 <#petsc4py.PETSc.Viewer.Type.HDF5>.
createMPIIO(name[, mode, comm]) | Create a viewer of type Type.BINARY <#petsc4py.PETSc.Viewer.Type.BINARY> supporting MPI-IO.
createPython([context, comm]) | Create a Type.PYTHON <#petsc4py.PETSc.Viewer.Type.PYTHON> viewer.
createVTK(name[, mode, comm]) | Create a viewer of type Type.VTK <#petsc4py.PETSc.Viewer.Type.VTK>.
destroy() | Destroy the viewer.
flush() | Flush the viewer.
getASCIITab() | Return the ASCII tab level.
getFileMode() | Return the file mode.
getFileName() | Return file name.
getFormat() | Return the format of the viewer.
getPythonContext() | Return the instance of the class implementing the required Python methods.
getPythonType() | Return the fully qualified Python name of the class used by the viewer.
getSubViewer([comm]) | Return a viewer defined on a subcommunicator.
getType() | Return the type of the viewer.
popASCIISynchronized() | Disallow ASCII synchronized calls.
popASCIITab() | Pop an additional tab level pushed via pushASCIITab.
popFormat() | Pop format from the viewer.
printfASCII(msg) | Print a message.
printfASCIISynchronized(msg) | Print a synchronized message.
pushASCIISynchronized() | Allow ASCII synchronized calls.
pushASCIITab() | Push an additional tab level.
pushFormat(format) | Push format to the viewer.
restoreSubViewer(sub) | Restore a viewer defined on a subcommunicator.
setASCIITab(tabs) | Set ASCII tab level.
setDrawInfo([display, title, position, size]) | Set window information for a Type.DRAW <#petsc4py.PETSc.Viewer.Type.DRAW> viewer.
setFileMode(mode) | Set file mode.
setFileName(name) | Set file name.
setFromOptions() | Configure the object from the options database.
setPythonContext(context) | Set the instance of the class implementing the required Python methods.
setPythonType(py_type) | Set the fully qualified Python name of the class to be used.
setType(vwr_type) | Set the type of the viewer.
setUp() | Set up the internal data structures for using the viewer.
subtractASCIITab(tabs) | Decrement the ASCII tab level.
useASCIITabs(flag) | Enable/disable the use of ASCII tabs.
view([obj]) | View the viewer.
viewObjectPython(obj) | View a generic Object <#petsc4py.PETSc.Object>.

Methods Documentation

    classmethod ASCII(name, comm=None)
        Return an ASCII viewer associated with the communicator.

        Collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The filename.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Viewer <#petsc4py.PETSc.Viewer>

    Source code at petsc4py/PETSc/Viewer.pyx:604 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L604>

    classmethod BINARY(comm=None)
        Return the default Type.BINARY <#petsc4py.PETSc.Viewer.Type.BINARY> viewer associated with the communicator.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Viewer <#petsc4py.PETSc.Viewer>

    Source code at petsc4py/PETSc/Viewer.pyx:625 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L625>

    classmethod DRAW(comm=None)
        Return the default Type.DRAW <#petsc4py.PETSc.Viewer.Type.DRAW> viewer associated with the communicator.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Viewer <#petsc4py.PETSc.Viewer>

    Source code at petsc4py/PETSc/Viewer.pyx:643 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L643>

    classmethod STDERR(comm=None)
        Return the standard error viewer associated with the communicator.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Viewer <#petsc4py.PETSc.Viewer>

    Source code at petsc4py/PETSc/Viewer.pyx:586 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L586>

    classmethod STDOUT(comm=None)
        Return the standard output viewer associated with the communicator.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Viewer <#petsc4py.PETSc.Viewer>

    Source code at petsc4py/PETSc/Viewer.pyx:568 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L568>

    addASCIITab(tabs)
        Increment the ASCII tab level.

        Collective.

        See also:
            PetscViewerASCIIAddTab <https://petsc.org/release/manualpages/Viewer/PetscViewerASCIIAddTab.html>

    Source code at petsc4py/PETSc/Viewer.pyx:690 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L690>

        Parameters
            tabs (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    clearDraw()
        Reset graphics.

        Not collective.

        See also:
            PetscViewerDrawClear <https://petsc.org/release/manualpages/Viewer/PetscViewerDrawClear.html>

    Source code at petsc4py/PETSc/Viewer.pyx:921 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L921>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    create(comm=None)
        Create a viewer.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>, PetscViewerCreate <https://petsc.org/release/manualpages/Viewer/PetscViewerCreate.html>

    Source code at petsc4py/PETSc/Viewer.pyx:179 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L179>

    createASCII(name, mode=None, comm=None)
        Create a viewer of type Type.ASCII <#petsc4py.PETSc.Viewer.Type.ASCII>.

        Collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The filename associated with the viewer.

            •   mode (FileMode <#petsc4py.PETSc.Viewer.FileMode> | str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The mode type.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self

    See also:
            create, setType, setFileMode, setFileName, Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>, setASCIITab, addASCIITab, subtractASCIITab, getASCIITab

    Source code at petsc4py/PETSc/Viewer.pyx:200 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L200>

    createBinary(name, mode=None, comm=None)
        Create a viewer of type Type.BINARY <#petsc4py.PETSc.Viewer.Type.BINARY>.

        Collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The filename associated with the viewer.

            •   mode (FileMode <#petsc4py.PETSc.Viewer.FileMode> | str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The mode type.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self

    See also:
            create, setType, setFileMode, setFileName, Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>

    Source code at petsc4py/PETSc/Viewer.pyx:238 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L238>

    createDraw(display=None, title=None, position=None, size=None, comm=None)
        Create a Type.DRAW <#petsc4py.PETSc.Viewer.Type.DRAW> viewer.

        Collective.

        Parameters

            •   display (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The X display to use or None <https://docs.python.org/3/library/constants.html#None> for the local machine.

            •   title (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The window title or None <https://docs.python.org/3/library/constants.html#None> for no title.

            •   position (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- Screen coordinates of the upper left corner, or None <https://docs.python.org/3/library/constants.html#None> for default.

            •   size (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>] | int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Window size or None <https://docs.python.org/3/library/constants.html#None> for default.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>, PetscViewerDrawOpen <https://petsc.org/release/manualpages/Viewer/PetscViewerDrawOpen.html>

    Source code at petsc4py/PETSc/Viewer.pyx:380 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L380>

    createHDF5(name, mode=None, comm=None)
        Create a viewer of type Type.HDF5 <#petsc4py.PETSc.Viewer.Type.HDF5>.

        Collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The filename associated with the viewer.

            •   mode (FileMode <#petsc4py.PETSc.Viewer.FileMode> | str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The mode type.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self

    See also:
            create, setType, setFileMode, setFileName, Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>

    Source code at petsc4py/PETSc/Viewer.pyx:344 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L344>

    createMPIIO(name, mode=None, comm=None)
        Create a viewer of type Type.BINARY <#petsc4py.PETSc.Viewer.Type.BINARY> supporting MPI-IO.

        Collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The filename associated with the viewer.

            •   mode (FileMode <#petsc4py.PETSc.Viewer.FileMode> | str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The mode type.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self

    See also:
            create, setType, setFileMode, setFileName, Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>

    Source code at petsc4py/PETSc/Viewer.pyx:271 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L271>

    createPython(context=None, comm=None)
        Create a Type.PYTHON <#petsc4py.PETSc.Viewer.Type.PYTHON> viewer.

        Collective.

        Parameters

            •   context (Any <https://docs.python.org/3/library/typing.html#typing.Any>) -- An instance of the Python class implementing the required methods.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    See also:
            PETSc Python viewer <#petsc-python-viewer>, setType, setPythonContext, Type.PYTHON <#petsc4py.PETSc.Viewer.Type.PYTHON>

    Source code at petsc4py/PETSc/Viewer.pyx:933 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L933>

    createVTK(name, mode=None, comm=None)
        Create a viewer of type Type.VTK <#petsc4py.PETSc.Viewer.Type.VTK>.

        Collective.

        Parameters

            •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The filename associated with the viewer.

            •   mode (FileMode <#petsc4py.PETSc.Viewer.FileMode> | str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The mode type.

            •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

        Return type
            Self

    See also:
            create, setType, setFileMode, setFileName, Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>

    Source code at petsc4py/PETSc/Viewer.pyx:308 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L308>

    destroy()
        Destroy the viewer.

        Collective.

        See also:
            PetscViewerDestroy <https://petsc.org/release/manualpages/Viewer/PetscViewerDestroy.html>

    Source code at petsc4py/PETSc/Viewer.pyx:166 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L166>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    flush()
        Flush the viewer.

        Collective.

        See also:
            PetscViewerFlush <https://petsc.org/release/manualpages/Viewer/PetscViewerFlush.html>

    Source code at petsc4py/PETSc/Viewer.pyx:809 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L809>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    getASCIITab()
        Return the ASCII tab level.

        Not collective.

        See also:
            setASCIITab, PetscViewerASCIIGetTab <https://petsc.org/release/manualpages/Viewer/PetscViewerASCIIGetTab.html>

    Source code at petsc4py/PETSc/Viewer.pyx:676 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L676>

        Return type
            int <https://docs.python.org/3/library/functions.html#int>

    getFileMode()
        Return the file mode.

        Not collective.

        See also:
            setFileMode, PetscViewerFileGetMode <https://petsc.org/release/manualpages/Viewer/PetscViewerFileGetMode.html>

    Source code at petsc4py/PETSc/Viewer.pyx:833 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L833>

        Return type
            FileMode <#petsc4py.PETSc.Viewer.FileMode>

    getFileName()
        Return file name.

        Not collective.

        See also:
            setFileName, PetscViewerFileGetName <https://petsc.org/release/manualpages/Viewer/PetscViewerFileGetName.html>

    Source code at petsc4py/PETSc/Viewer.pyx:861 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L861>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getFormat()
        Return the format of the viewer.

        Not collective.

        See also:
            pushFormat, popFormat, PetscViewerGetFormat <https://petsc.org/release/manualpages/Viewer/PetscViewerGetFormat.html>

    Source code at petsc4py/PETSc/Viewer.pyx:488 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L488>

        Return type
            Format <#petsc4py.PETSc.Viewer.Format>

    getPythonContext()
        Return the instance of the class implementing the required Python methods.

        Not collective.

        See also:
            PETSc Python viewer <#petsc-python-viewer>, setPythonContext

    Source code at petsc4py/PETSc/Viewer.pyx:973 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L973>

        Return type
            Any <https://docs.python.org/3/library/typing.html#typing.Any>

    getPythonType()
        Return the fully qualified Python name of the class used by the viewer.

        Not collective.

        See also:
            PETSc Python viewer <#petsc-python-viewer>, setPythonContext, setPythonType, PetscViewerPythonGetType <https://petsc.org/release/manualpages/Viewer/PetscViewerPythonGetType.html>

    Source code at petsc4py/PETSc/Viewer.pyx:1003 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L1003>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    getSubViewer(comm=None)
        Return a viewer defined on a subcommunicator.

        Collective.

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- The subcommunicator. If None <https://docs.python.org/3/library/constants.html#None>, uses COMM_SELF <#petsc4py.PETSc.COMM_SELF>.

        Return type
            Viewer <#petsc4py.PETSc.Viewer>

    Notes

    Users must call restoreSubViewer when done.

    See also:
            restoreSubViewer, PetscViewerGetSubViewer <https://petsc.org/release/manualpages/Viewer/PetscViewerGetSubViewer.html>

    Source code at petsc4py/PETSc/Viewer.pyx:526 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L526>

    getType()
        Return the type of the viewer.

        Not collective.

        See also:
            setType, PetscViewerGetType <https://petsc.org/release/manualpages/Viewer/PetscViewerGetType.html>

    Source code at petsc4py/PETSc/Viewer.pyx:449 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L449>

        Return type
            str <https://docs.python.org/3/library/stdtypes.html#str>

    popASCIISynchronized()
        Disallow ASCII synchronized calls.

        Collective.

        See also:
            printfASCIISynchronized, pushASCIISynchronized, PetscViewerASCIIPopSynchronized <https://petsc.org/release/manualpages/Viewer/PetscViewerASCIIPopSynchronized.html>

    Source code at petsc4py/PETSc/Viewer.pyx:729 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L729>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    popASCIITab()
        Pop an additional tab level pushed via pushASCIITab.

        Collective.

        See also:
            pushASCIITab, PetscViewerASCIIPopTab <https://petsc.org/release/manualpages/Viewer/PetscViewerASCIIPopTab.html>

    Source code at petsc4py/PETSc/Viewer.pyx:754 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L754>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    popFormat()
        Pop format from the viewer.

        Collective.

        See also:
            pushFormat, PetscViewerPopFormat <https://petsc.org/release/manualpages/Viewer/PetscViewerPopFormat.html>

    Source code at petsc4py/PETSc/Viewer.pyx:514 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L514>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    printfASCII(msg)
        Print a message.

        Collective.

        See also:
            PetscViewerASCIIPrintf <https://petsc.org/release/manualpages/Viewer/PetscViewerASCIIPrintf.html>

    Source code at petsc4py/PETSc/Viewer.pyx:779 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L779>

        Parameters
            msg (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    printfASCIISynchronized(msg)
        Print a synchronized message.

        Collective.

        See also:
            pushASCIISynchronized, PetscViewerASCIISynchronizedPrintf <https://petsc.org/release/manualpages/Viewer/PetscViewerASCIISynchronizedPrintf.html>

    Source code at petsc4py/PETSc/Viewer.pyx:793 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L793>

        Parameters
            msg (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    pushASCIISynchronized()
        Allow ASCII synchronized calls.

        Collective.

        See also:
            printfASCIISynchronized, popASCIISynchronized, PetscViewerASCIIPushSynchronized <https://petsc.org/release/manualpages/Viewer/PetscViewerASCIIPushSynchronized.html>

    Source code at petsc4py/PETSc/Viewer.pyx:716 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L716>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    pushASCIITab()
        Push an additional tab level.

        Collective.

        See also:
            popASCIITab, PetscViewerASCIIPushTab <https://petsc.org/release/manualpages/Viewer/PetscViewerASCIIPushTab.html>

    Source code at petsc4py/PETSc/Viewer.pyx:742 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L742>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    pushFormat(format)
        Push format to the viewer.

        Collective.

        See also:
            popFormat, PetscViewerPushFormat <https://petsc.org/release/manualpages/Viewer/PetscViewerPushFormat.html>

    Source code at petsc4py/PETSc/Viewer.pyx:502 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L502>

        Parameters
            format (Format <#petsc4py.PETSc.Viewer.Format>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    restoreSubViewer(sub)
        Restore a viewer defined on a subcommunicator.

        Collective.

        Parameters
            sub (Viewer <#petsc4py.PETSc.Viewer>) -- The subviewer obtained from getSubViewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getSubViewer, PetscViewerRestoreSubViewer <https://petsc.org/release/manualpages/Viewer/PetscViewerRestoreSubViewer.html>

    Source code at petsc4py/PETSc/Viewer.pyx:550 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L550>

    setASCIITab(tabs)
        Set ASCII tab level.

        Collective.

        See also:
            getASCIITab, PetscViewerASCIISetTab <https://petsc.org/release/manualpages/Viewer/PetscViewerASCIISetTab.html>

    Source code at petsc4py/PETSc/Viewer.pyx:663 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L663>

        Parameters
            tabs (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setDrawInfo(display=None, title=None, position=None, size=None)
        Set window information for a Type.DRAW <#petsc4py.PETSc.Viewer.Type.DRAW> viewer.

        Collective.

        Parameters

            •   display (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The X display to use or None <https://docs.python.org/3/library/constants.html#None> for the local machine.

            •   title (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The window title or None <https://docs.python.org/3/library/constants.html#None> for no title.

            •   position (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>] | None <https://docs.python.org/3/library/constants.html#None>) -- Screen coordinates of the upper left corner, or None <https://docs.python.org/3/library/constants.html#None> for default.

            •   size (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>] | int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) -- Window size or None <https://docs.python.org/3/library/constants.html#None> for default.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Source code at petsc4py/PETSc/Viewer.pyx:877 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L877>

    setFileMode(mode)
        Set file mode.

        Collective.

        See also:
            getFileMode, PetscViewerFileSetMode <https://petsc.org/release/manualpages/Viewer/PetscViewerFileSetMode.html>

    Source code at petsc4py/PETSc/Viewer.pyx:821 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L821>

        Parameters
            mode (FileMode <#petsc4py.PETSc.Viewer.FileMode> | str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFileName(name)
        Set file name.

        Collective.

        See also:
            getFileName, PetscViewerFileSetName <https://petsc.org/release/manualpages/Viewer/PetscViewerFileSetName.html>

    Source code at petsc4py/PETSc/Viewer.pyx:847 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L847>

        Parameters
            name (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setFromOptions()
        Configure the object from the options database.

        Collective.

        See also:
            Working with PETSc options <#petsc-options>, PetscViewerSetFromOptions <https://petsc.org/release/manualpages/Viewer/PetscViewerSetFromOptions.html>

    Source code at petsc4py/PETSc/Viewer.pyx:463 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L463>

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPythonContext(context)
        Set the instance of the class implementing the required Python methods.

        Logically collective.

        See also:
            PETSc Python viewer <#petsc-python-viewer>, getPythonContext, setPythonType

    Source code at petsc4py/PETSc/Viewer.pyx:961 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L961>

        Parameters
            context (Any <https://docs.python.org/3/library/typing.html#typing.Any>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setPythonType(py_type)
        Set the fully qualified Python name of the class to be used.

        Collective.

        See also:
            PETSc Python viewer <#petsc-python-viewer>, setPythonContext, getPythonType, PetscViewerPythonSetType <https://petsc.org/release/manualpages/Viewer/PetscViewerPythonSetType.html>

    Source code at petsc4py/PETSc/Viewer.pyx:988 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L988>

        Parameters
            py_type (str <https://docs.python.org/3/library/stdtypes.html#str>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    setType(vwr_type)
        Set the type of the viewer.

        Logically collective.

        Parameters
            vwr_type (Type <#petsc4py.PETSc.Viewer.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) -- The type of the viewer.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    See also:
            getType, PetscViewerSetType <https://petsc.org/release/manualpages/Viewer/PetscViewerSetType.html>

    Source code at petsc4py/PETSc/Viewer.pyx:430 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L430>

    setUp()
        Set up the internal data structures for using the viewer.

        Collective.

        See also:
            PetscViewerSetUp <https://petsc.org/release/manualpages/Viewer/PetscViewerSetUp.html>

    Source code at petsc4py/PETSc/Viewer.pyx:475 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L475>

        Return type
            Self <https://docs.python.org/3/library/typing.html#typing.Self>

    subtractASCIITab(tabs)
        Decrement the ASCII tab level.

        Collective.

        See also:
            PetscViewerASCIISubtractTab <https://petsc.org/release/manualpages/Viewer/PetscViewerASCIISubtractTab.html>

    Source code at petsc4py/PETSc/Viewer.pyx:703 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L703>

        Parameters
            tabs (int <https://docs.python.org/3/library/functions.html#int>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    useASCIITabs(flag)
        Enable/disable the use of ASCII tabs.

        Collective.

        See also:
            PetscViewerASCIIUseTabs <https://petsc.org/release/manualpages/Viewer/PetscViewerASCIIUseTabs.html>

    Source code at petsc4py/PETSc/Viewer.pyx:766 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L766>

        Parameters
            flag (bool <https://docs.python.org/3/library/functions.html#bool>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    view(obj=None)
        View the viewer.

        Collective.

        Parameters
            obj (Viewer <#petsc4py.PETSc.Viewer> | Object <#petsc4py.PETSc.Object> | None <https://docs.python.org/3/library/constants.html#None>) -- A Viewer instance or None <https://docs.python.org/3/library/constants.html#None> for the default viewer. If none of the above applies, it assumes obj is an instance of Object <#petsc4py.PETSc.Object> and it calls the generic view for obj.

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    Notes

    See also:
            PetscViewerView <https://petsc.org/release/manualpages/Viewer/PetscViewerView.html>

    Source code at petsc4py/PETSc/Viewer.pyx:138 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L138>

    viewObjectPython(obj)
        View a generic Object <#petsc4py.PETSc.Object>.

        Collective.

        See also:
            PETSc Python viewer <#petsc-python-viewer>, setPythonContext, setPythonType, PetscViewerPythonViewObject <https://petsc.org/release/manualpages/Viewer/PetscViewerPythonViewObject.html>

    Source code at petsc4py/PETSc/Viewer.pyx:1018 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L1018>

        Parameters
            obj (Object <#petsc4py.PETSc.Object>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

    __init__()

    classmethod __new__(*args, **kwargs)

  petsc4py.PETSc.ViewerHDF5

    class petsc4py.PETSc.ViewerHDF5
        Bases: Viewer <#petsc4py.PETSc.Viewer>

        Viewer object for HDF5 file formats.

        Viewer is described in the PETSc manual <https://petsc.org/release/manual/other.html#sec-viewers>.

        See also:
            Viewer <#petsc4py.PETSc.Viewer>

    Methods Summary
    create(name[, mode, comm]) | Create a viewer of type Type.HDF5 <#petsc4py.PETSc.Viewer.Type.HDF5>.
    getGroup() | Return the current group.
    getTimestep() | Return the current time step.
    incrementTimestep() | Increment the time step.
    popGroup() | Pop the current group from the stack.
    popTimestepping() | Deactivate the timestepping mode.
    pushGroup(group) | Set the current group.
    pushTimestepping() | Activate the timestepping mode.
    setTimestep(timestep) | Set the current time step.

    Methods Documentation

        create(name, mode=None, comm=None)
            Create a viewer of type Type.HDF5 <#petsc4py.PETSc.Viewer.Type.HDF5>.

            Collective.

            Parameters

                •   name (str <https://docs.python.org/3/library/stdtypes.html#str>) -- The filename associated with the viewer.

                •   mode (FileMode <#petsc4py.PETSc.Viewer.FileMode> | str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) -- The mode type.

                •   comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) -- MPI communicator, defaults to Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm>.

            Return type
                Self <https://docs.python.org/3/library/typing.html#typing.Self>

        See also:
                Viewer.createHDF5 <#petsc4py.PETSc.Viewer.createHDF5>

        Source code at petsc4py/PETSc/Viewer.pyx:1044 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L1044>

        getGroup()
            Return the current group.

            Not collective.

            See also:
                pushGroup, popGroup, PetscViewerHDF5GetGroup <https://petsc.org/release/manualpages/Viewer/PetscViewerHDF5GetGroup.html>

        Source code at petsc4py/PETSc/Viewer.pyx:1171 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L1171>

            Return type
                str <https://docs.python.org/3/library/stdtypes.html#str>

        getTimestep()
            Return the current time step.

            Not collective.

            See also:
                pushTimestepping, setTimestep, incrementTimestep, PetscViewerHDF5GetTimestep <https://petsc.org/release/manualpages/Viewer/PetscViewerHDF5GetTimestep.html>

        Source code at petsc4py/PETSc/Viewer.pyx:1104 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L1104>

            Return type
                int <https://docs.python.org/3/library/functions.html#int>

        incrementTimestep()
            Increment the time step.

            Logically collective.

            See also:
                pushTimestepping, setTimestep, getTimestep, PetscViewerHDF5IncrementTimestep <https://petsc.org/release/manualpages/Viewer/PetscViewerHDF5IncrementTimestep.html>

        Source code at petsc4py/PETSc/Viewer.pyx:1132 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L1132>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        popGroup()
            Pop the current group from the stack.

            Logically collective.

            See also:
                pushGroup, getGroup, PetscViewerHDF5PopGroup <https://petsc.org/release/manualpages/Viewer/PetscViewerHDF5PopGroup.html>

        Source code at petsc4py/PETSc/Viewer.pyx:1159 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L1159>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        popTimestepping()
            Deactivate the timestepping mode.

            Logically collective.

            See also:
                pushTimestepping, PetscViewerHDF5PopTimestepping <https://petsc.org/release/manualpages/Viewer/PetscViewerHDF5PopTimestepping.html>

        Source code at petsc4py/PETSc/Viewer.pyx:1092 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L1092>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        pushGroup(group)
            Set the current group.

            Logically collective.

            See also:
                popGroup, getGroup, PetscViewerHDF5PushGroup <https://petsc.org/release/manualpages/Viewer/PetscViewerHDF5PushGroup.html>

        Source code at petsc4py/PETSc/Viewer.pyx:1145 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L1145>

            Parameters
                group (str <https://docs.python.org/3/library/stdtypes.html#str>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        pushTimestepping()
            Activate the timestepping mode.

            Logically collective.

            See also:
                popTimestepping, PetscViewerHDF5PushTimestepping <https://petsc.org/release/manualpages/Viewer/PetscViewerHDF5PushTimestepping.html>

        Source code at petsc4py/PETSc/Viewer.pyx:1080 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L1080>

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        setTimestep(timestep)
            Set the current time step.

            Logically collective.

            See also:
                pushTimestepping, getTimestep, incrementTimestep, PetscViewerHDF5SetTimestep <https://petsc.org/release/manualpages/Viewer/PetscViewerHDF5SetTimestep.html>

        Source code at petsc4py/PETSc/Viewer.pyx:1119 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/Viewer.pyx#L1119>

            Parameters
                timestep (int <https://docs.python.org/3/library/functions.html#int>)

            Return type
                None <https://docs.python.org/3/library/constants.html#None>

        __init__()

        classmethod __new__(*args, **kwargs)

Exceptions
Error <#petsc4py.PETSc.Error> | PETSc Error.

  petsc4py.PETSc.Error

    exception petsc4py.PETSc.Error
        PETSc Error.

        ierr
            PETSc error code.

            Type
                int <https://docs.python.org/3/library/functions.html#int>

        __init__(*args, **kwargs)

        classmethod __new__(*args, **kwargs)

Functions
garbage_cleanup <#petsc4py.PETSc.garbage_cleanup>([comm]) | Clean up unused PETSc objects.
garbage_view <#petsc4py.PETSc.garbage_view>([comm]) | Print summary of the garbage PETSc objects.

  petsc4py.PETSc.garbage_cleanup

    petsc4py.PETSc.garbage_cleanup(comm=None)
        Clean up unused PETSc objects.

        Collective.

        Notes

        If the communicator comm if not provided or it is None <https://docs.python.org/3/library/constants.html#None>, then COMM_WORLD <#petsc4py.PETSc.COMM_WORLD> is used.

        Source code at petsc4py/PETSc/cyclicgc.pxi:59 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/cyclicgc.pxi#L59>

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

  petsc4py.PETSc.garbage_view

    petsc4py.PETSc.garbage_view(comm=None)
        Print summary of the garbage PETSc objects.

        Collective.

        Notes

        Print out garbage summary on each rank of the communicator comm. If no communicator is provided then COMM_WORLD <#petsc4py.PETSc.COMM_WORLD> is used.

        Source code at petsc4py/PETSc/cyclicgc.pxi:83 <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/cyclicgc.pxi#L83>

        Parameters
            comm (Comm <#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>)

        Return type
            None <https://docs.python.org/3/library/constants.html#None>

Attributes
DECIDE <#petsc4py.PETSc.DECIDE> | Constant DECIDE of type int <https://docs.python.org/3/library/functions.html#int>
DEFAULT <#petsc4py.PETSc.DEFAULT> | Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>
DETERMINE <#petsc4py.PETSc.DETERMINE> | Constant DETERMINE of type int <https://docs.python.org/3/library/functions.html#int>
CURRENT <#petsc4py.PETSc.CURRENT> | Constant CURRENT of type int <https://docs.python.org/3/library/functions.html#int>
UNLIMITED <#petsc4py.PETSc.UNLIMITED> | Constant UNLIMITED of type int <https://docs.python.org/3/library/functions.html#int>
INFINITY <#petsc4py.PETSc.INFINITY> | Object INFINITY of type float <https://docs.python.org/3/library/functions.html#float>
NINFINITY <#petsc4py.PETSc.NINFINITY> | Object NINFINITY of type float <https://docs.python.org/3/library/functions.html#float>
PINFINITY <#petsc4py.PETSc.PINFINITY> | Object PINFINITY of type float <https://docs.python.org/3/library/functions.html#float>
COMM_NULL <#petsc4py.PETSc.COMM_NULL> | Object COMM_NULL of type Comm <#petsc4py.PETSc.Comm>
COMM_SELF <#petsc4py.PETSc.COMM_SELF> | Object COMM_SELF of type Comm <#petsc4py.PETSc.Comm>
COMM_WORLD <#petsc4py.PETSc.COMM_WORLD> | Object COMM_WORLD of type Comm <#petsc4py.PETSc.Comm>

  petsc4py.PETSc.DECIDE

    petsc4py.PETSc.DECIDE: int <https://docs.python.org/3/library/functions.html#int> = DECIDE
        Constant DECIDE of type int <https://docs.python.org/3/library/functions.html#int>

  petsc4py.PETSc.DEFAULT

    petsc4py.PETSc.DEFAULT: int <https://docs.python.org/3/library/functions.html#int> = DEFAULT
        Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int>

  petsc4py.PETSc.DETERMINE

    petsc4py.PETSc.DETERMINE: int <https://docs.python.org/3/library/functions.html#int> = DETERMINE
        Constant DETERMINE of type int <https://docs.python.org/3/library/functions.html#int>

  petsc4py.PETSc.CURRENT

    petsc4py.PETSc.CURRENT: int <https://docs.python.org/3/library/functions.html#int> = CURRENT
        Constant CURRENT of type int <https://docs.python.org/3/library/functions.html#int>

  petsc4py.PETSc.UNLIMITED

    petsc4py.PETSc.UNLIMITED: int <https://docs.python.org/3/library/functions.html#int> = UNLIMITED
        Constant UNLIMITED of type int <https://docs.python.org/3/library/functions.html#int>

  petsc4py.PETSc.INFINITY

    petsc4py.PETSc.INFINITY: float <https://docs.python.org/3/library/functions.html#float> = INFINITY
        Object INFINITY of type float <https://docs.python.org/3/library/functions.html#float>

  petsc4py.PETSc.NINFINITY

    petsc4py.PETSc.NINFINITY: float <https://docs.python.org/3/library/functions.html#float> = NINFINITY
        Object NINFINITY of type float <https://docs.python.org/3/library/functions.html#float>

  petsc4py.PETSc.PINFINITY

    petsc4py.PETSc.PINFINITY: float <https://docs.python.org/3/library/functions.html#float> = PINFINITY
        Object PINFINITY of type float <https://docs.python.org/3/library/functions.html#float>

  petsc4py.PETSc.COMM_NULL

    petsc4py.PETSc.COMM_NULL: Comm <#petsc4py.PETSc.Comm> = COMM_NULL
        Object COMM_NULL of type Comm <#petsc4py.PETSc.Comm>

  petsc4py.PETSc.COMM_SELF

    petsc4py.PETSc.COMM_SELF: Comm <#petsc4py.PETSc.Comm> = COMM_SELF
        Object COMM_SELF of type Comm <#petsc4py.PETSc.Comm>

  petsc4py.PETSc.COMM_WORLD

    petsc4py.PETSc.COMM_WORLD: Comm <#petsc4py.PETSc.Comm> = COMM_WORLD
        Object COMM_WORLD of type Comm <#petsc4py.PETSc.Comm>

PETSC PYTHON TYPES

Here we discuss details about Python-aware PETSc types that can be used within the library.

In particular, we discuss matrices, preconditioners, Krylov solvers, nonlinear solvers, ODE integrators and viewers.

The low-level, Cython implementation exposing the Python methods is in src/petsc4py/PETSc/libpetsc4py.pyx <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/src/petsc4py/PETSc/libpetsc4py.pyx>.

The scripts used here can be found at demo/python_types <https://gitlab.com/petsc/petsc/-/tree/release/src/binding/petsc4py/demo/python_types>.

  PETSc Python matrix type

PETSc provides a convenient way to compute the action of linear operators coded in Python through the petsc4py.PETSc.Mat.Type.PYTHON <#petsc4py.PETSc.Mat.Type.PYTHON> type.

In addition to the matrix action, the implementation can expose additional methods for use within the library. A template class for the supported methods is given below.

            from petsc4py.typing import Scalar
            from petsc4py.PETSc import Mat
            from petsc4py.PETSc import Vec
            from petsc4py.PETSc import IS
            from petsc4py.PETSc import InsertMode
            from petsc4py.PETSc import NormType
            from petsc4py.PETSc import Viewer

            # A template class with the Python methods supported by MATPYTHON

            class MatPythonProtocol:
                def mult(self, A: Mat, x: Vec, y: Vec) -> None:
                    """Matrix vector multiplication: y = A @ x."""
                    ...

                def multAdd(self, A: Mat, x: Vec, y: Vec, z: Vec) -> None:
                    """Matrix vector multiplication: z = A @ x + y."""
                    ...

                def multTranspose(self, A: Mat, x: Vec, y: Vec) -> None:
                    """Transposed matrix vector multiplication: y = A^T @ x."""
                    ...

                def multTransposeAdd(self, A: Mat, x: Vec, y: Vec, z: Vec) -> None:
                    """Transposed matrix vector multiplication: z = A^T @ x + y."""
                    ...

                def multHermitian(self, A: Mat, x: Vec, y: Vec) -> None:
                    """Hermitian matrix vector multiplication: y = A^H @ x."""
                    ...

                def multHermitianAdd(self, A: Mat, x: Vec, y: Vec, z: Vec) -> None:
                    """Hermitian matrix vector multiplication: z = A^H @ x + y."""
                    ...

                def view(self, A: Mat, viewer: Viewer) -> None:
                    """View the matrix."""
                    ...

                def setFromOptions(self, A: Mat) -> None:
                    """Process command line for customization."""
                    ...

                def multDiagonalBlock(self, A: Mat, x: Vec, y: Vec) -> None:
                    """Perform the on-process matrix vector multiplication."""
                    ...

                def createVecs(self, A: Mat) -> tuple[Vec, Vec]:
                    """Return tuple of vectors (x,y) suitable for A @ x = y."""
                    ...

                def scale(self, A: Mat, s: Scalar) -> None:
                    """Scale the matrix by a scalar."""
                    ...

                def shift(self, A: Mat, s: Scalar) -> None:
                    """Shift the matrix by a scalar."""
                    ...

                def createSubMatrix(self, A: Mat, r: IS, c: IS, out: Mat) -> Mat:
                    """Return the submatrix corresponding to r rows and c columns.

                    Matrix out must be reused if not None.

                    """
                    ...

                def zeroRowsColumns(self, A: Mat, r: IS, diag: Scalar, x: Vec, b: Vec) -> None:
                    """Zero rows and columns of the matrix corresponding to the index set r.

                    Insert diag on the diagonal and modify vectors x and b accordingly if not None.

                    """
                    ...

                def getDiagonal(self, A: Mat, d: Vec) -> None:
                    """Compute the diagonal of the matrix: d = diag(A)."""
                    ...

                def setDiagonal(self, A: Mat, d: Vec, im: InsertMode) -> None:
                    """Set the diagonal of the matrix."""
                    ...

                def diagonalScale(self, A: Mat, L: Vec, R: Vec) -> None:
                    """Perform left and right diagonal scaling if vectors are not None.

                    A = diag(L)@A@diag(R).

                    """
                    ...

                def getDiagonalBlock(self, A: Mat) -> Mat:
                    """Return the on-process matrix."""
                    ...

                def setUp(self, A: Mat) -> None:
                    """Perform the required setup."""
                    ...

                def duplicate(self, A: Mat, op: Mat.DuplicateOption) -> Mat:
                    """Duplicate the matrix."""
                    ...

                def copy(self, A: Mat, B: Mat, op: Mat.Structure) -> None:
                    """Copy the matrix: B = A."""
                    ...

                def productSetFromOptions(
                    self, A: Mat, prodtype: str, X: Mat, Y: Mat, Z: Mat
                ) -> bool:
                    """The boolean flag indicating if the matrix supports prodtype."""
                    ...

                def productSymbolic(
                    self, A: Mat, product: Mat, producttype: str, X: Mat, Y: Mat, Z: Mat
                ) -> None:
                    """Perform the symbolic stage of the requested matrix product."""
                    ...

                def productNumeric(
                    self, A: Mat, product: Mat, producttype: str, X: Mat, Y: Mat, Z: Mat
                ) -> None:
                    """Perform the numeric stage of the requested matrix product."""
                    ...

                def zeroEntries(self, A: Mat) -> None:
                    """Set the matrix to zero."""
                    ...

                def norm(self, A: Mat, normtype: NormType) -> float:
                    """Compute the norm of the matrix."""
                    ...

                def solve(self, A: Mat, y: Vec, x: Vec) -> None:
                    """Solve the equation: x = inv(A) y."""
                    ...

                def solveAdd(self, A: Mat, y: Vec, z: Vec, x: Vec) -> None:
                    """Solve the equation: x = inv(A) y + z."""
                    ...

                def solveTranspose(self, A: Mat, y: Vec, x: Vec) -> None:
                    """Solve the equation: x = inv(A)^T y."""
                    ...

                def solveTransposeAdd(self, A: Mat, y: Vec, z: Vec, x: Vec) -> None:
                    """Solve the equation: x = inv(A)^T y + z."""
                    ...

                def SOR(
                    self,
                    A: Mat,
                    b: Vec,
                    omega: float,
                    sortype: Mat.SORType,
                    shift: float,
                    its: int,
                    lits: int,
                    x: Vec,
                ) -> None:
                    """Perform SOR iterations."""
                    ...

                def conjugate(self, A: Mat) -> None:
                    """Perform the conjugation of the matrix: A = conj(A)."""
                    ...

                def imagPart(self, A: Mat) -> None:
                    """Set real part to zero. A = imag(A)."""
                    ...

                def realPart(self, A: Mat) -> None:
                    """Set imaginary part to zero. A = real(A)."""
                    ...

In the example below, we create an operator that applies the Laplacian operator on a two-dimensional grid, and use it to solve the associated linear system. The default preconditioner in the script is petsc4py.PETSc.PC.Type.JACOBI <#petsc4py.PETSc.PC.Type.JACOBI> which needs to access the diagonal of the matrix.

            # ------------------------------------------------------------------------
            #
            #  Poisson problem. This problem is modeled by the partial
            #  differential equation
            #
            #          -Laplacian(u) = 1,  0 < x,y < 1,
            #
            #  with boundary conditions
            #
            #           u = 0  for  x = 0, x = 1, y = 0, y = 1
            #
            #  A finite difference approximation with the usual 5-point stencil
            #  is used to discretize the boundary value problem to obtain a
            #  nonlinear system of equations. The problem is solved in a 2D
            #  rectangular domain, using distributed arrays (DAs) to partition
            #  the parallel grid.
            #
            # ------------------------------------------------------------------------

            # We first import petsc4py and sys to initialize PETSc
            import sys
            import petsc4py

            petsc4py.init(sys.argv)

            # Import the PETSc module
            from petsc4py import PETSc

            # Here we define a class representing the discretized operator
            # This allows us to apply the operator "matrix-free"
            class Poisson2D:
                def __init__(self, da):
                    self.da = da
                    self.localX = da.createLocalVec()

                # This is the method that PETSc will look for when applying
                # the operator. `X` is the PETSc input vector, `Y` the output vector,
                # while `mat` is the PETSc matrix holding the PETSc datastructures.
                def mult(self, mat, X, Y):
                    # Grid sizes
                    mx, my = self.da.getSizes()
                    hx, hy = (1.0 / m for m in [mx, my])

                    # Bounds for the local part of the grid this process owns
                    (xs, xe), (ys, ye) = self.da.getRanges()

                    # Map global vector to local vectors
                    self.da.globalToLocal(X, self.localX)

                    # We can access the vector data as NumPy arrays
                    x = self.da.getVecArray(self.localX)
                    y = self.da.getVecArray(Y)

                    # Loop on the local grid and compute the local action of the operator
                    for j in range(ys, ye):
                        for i in range(xs, xe):
                            u = x[i, j]  # center
                            u_e = u_w = u_n = u_s = 0
                            if i > 0:
                                u_w = x[i - 1, j]  # west
                            if i < mx - 1:
                                u_e = x[i + 1, j]  # east
                            if j > 0:
                                u_s = x[i, j - 1]  # south
                            if j < ny - 1:
                                u_n = x[i, j + 1]  # north
                            u_xx = (-u_e + 2 * u - u_w) * hy / hx
                            u_yy = (-u_n + 2 * u - u_s) * hx / hy
                            y[i, j] = u_xx + u_yy

                # This is the method that PETSc will look for when the diagonal of the matrix is needed.
                def getDiagonal(self, mat, D):
                    mx, my = self.da.getSizes()
                    hx, hy = (1.0 / m for m in [mx, my])
                    (xs, xe), (ys, ye) = self.da.getRanges()

                    d = self.da.getVecArray(D)

                    # Loop on the local grid and compute the diagonal
                    for j in range(ys, ye):
                        for i in range(xs, xe):
                            d[i, j] = 2 * hy / hx + 2 * hx / hy

                # The class can contain other methods that PETSc won't use
                def formRHS(self, B):
                    b = self.da.getVecArray(B)
                    mx, my = self.da.getSizes()
                    hx, hy = (1.0 / m for m in [mx, my])
                    (xs, xe), (ys, ye) = self.da.getRanges()
                    for j in range(ys, ye):
                        for i in range(xs, xe):
                            b[i, j] = 1 * hx * hy

            # Access the option database and read options from the command line
            OptDB = PETSc.Options()
            nx, ny = OptDB.getIntArray(
                'grid', (16, 16)
            )  # Read `-grid <int,int>`, defaults to 16,16

            # Create the distributed memory implementation for structured grid
            da = PETSc.DMDA().create([nx, ny], stencil_width=1)

            # Create vectors to hold the solution and the right-hand side
            x = da.createGlobalVec()
            b = da.createGlobalVec()

            # Instantiate an object of our Poisson2D class
            pde = Poisson2D(da)

            # Create a PETSc matrix of type Python using `pde` as context
            A = PETSc.Mat().create(comm=da.comm)
            A.setSizes([x.getSizes(), b.getSizes()])
            A.setType(PETSc.Mat.Type.PYTHON)
            A.setPythonContext(pde)
            A.setUp()

            # Create a Conjugate Gradient Krylov solver
            ksp = PETSc.KSP().create()
            ksp.setType(PETSc.KSP.Type.CG)

            # Use diagonal preconditioning
            ksp.getPC().setType(PETSc.PC.Type.JACOBI)

            # Allow command-line customization
            ksp.setFromOptions()

            # Assemble right-hand side and solve the linear system
            pde.formRHS(b)
            ksp.setOperators(A)
            ksp.solve(b, x)

            # Here we programmatically visualize the solution
            if OptDB.getBool('plot', True):
                # Modify the option database: keep the X window open for 1 second
                OptDB['draw_pause'] = 1

                # Obtain a viewer of type DRAW
                draw = PETSc.Viewer.DRAW(x.comm)

                # View the vector in the X window
                draw(x)

            # We can also visualize the solution by command line options
            # For example, we can dump a VTK file with:
            #
            #     $ python poisson2d.py -plot 0 -view_solution vtk:sol.vts:
            #
            # or obtain the same visualization as programmatically done above as:
            #
            #     $ python poisson2d.py -plot 0 -view_solution draw -draw_pause 1
            #
            x.viewFromOptions('-view_solution')

  PETSc Python preconditioner type

The protocol for the petsc4py.PETSc.PC.Type.PYTHON <#petsc4py.PETSc.PC.Type.PYTHON> preconditioner is:

            from petsc4py.PETSc import KSP
            from petsc4py.PETSc import PC
            from petsc4py.PETSc import Mat
            from petsc4py.PETSc import Vec
            from petsc4py.PETSc import Viewer

            # A template class with the Python methods supported by PCPYTHON

            class PCPythonProtocol:
                def apply(self, pc: PC, b: Vec, x: Vec) -> None:
                    """Apply the preconditioner on vector b, return in x."""
                    ...

                def applySymmetricLeft(self, pc: PC, b: Vec, x: Vec) -> None:
                    """Apply the symmetric left part of the preconditioner on vector b, return in x."""
                    ...

                def applySymmetricRight(self, pc: PC, b: Vec, x: Vec) -> None:
                    """Apply the symmetric right part of the preconditioner on vector b, return in x."""
                    ...

                def applyTranspose(self, pc: PC, b: Vec, x: Vec) -> None:
                    """Apply the transposed preconditioner on vector b, return in x."""
                    ...

                def applyMat(self, pc: PC, B: Mat, X: Mat) -> None:
                    """Apply the preconditioner on a block of right-hand sides B, return in X."""
                    ...

                def preSolve(self, pc: PC, ksp: KSP, b: Vec, x: Vec) -> None:
                    """Callback called at the beginning of a Krylov method.

                    This method is allowed to modify the right-hand side b and the initial guess x.

                    """
                    ...

                def postSolve(self, pc: PC, ksp: KSP, b: Vec, x: Vec) -> None:
                    """Callback called at the end of a Krylov method.

                    This method is allowed to modify the right-hand side b and the solution x.

                    """

                def view(self, pc: PC, viewer: Viewer) -> None:
                    """View the preconditioner."""
                    ...

                def setFromOptions(self, pc: PC) -> None:
                    """Process command line for customization."""
                    ...

                def setUp(self, pc: PC) -> None:
                    """Perform the required setup."""
                    ...

                def reset(self, pc: PC) -> None:
                    """Reset the preconditioner."""
                    ...

In the example below, we create a Jacobi preconditioner, which needs to access the diagonal of the matrix. The action of the preconditioner consists of the pointwise multiplication of the inverse diagonal with the input vector.

            # The user-defined Python class implementing the Jacobi method.
            class myJacobi:
                # Setup the internal data. In this case, we access the matrix diagonal.
                def setUp(self, pc):
                    _, P = pc.getOperators()
                    self.D = P.getDiagonal()

                # Apply the preconditioner
                def apply(self, pc, x, y):
                    y.pointwiseDivide(x, self.D)

We can run the script used to test our matrix class and use command line arguments to specify that our preconditioner should be used:

            $ python mat.py -pc_type python -pc_python_type pc.myJacobi -ksp_view
            KSP Object: 1 MPI process
              type: cg
              maximum iterations=10000, initial guess is zero
              tolerances: relative=1e-05, absolute=1e-50, divergence=10000.
              left preconditioning
              using PRECONDITIONED norm type for convergence test
            PC Object: 1 MPI process
              type: python
                Python: pc.myJacobi
              linear system matrix, which is also used to construct the preconditioner:
              Mat Object: 1 MPI process
                type: python
                rows=256, cols=256
                    Python: __main__.Poisson2D

  PETSc Python linear solver type

The protocol for the petsc4py.PETSc.KSP.Type.PYTHON <#petsc4py.PETSc.KSP.Type.PYTHON> Krylov solver is:

            from petsc4py.PETSc import KSP
            from petsc4py.PETSc import Vec
            from petsc4py.PETSc import Viewer

            # A template class with the Python methods supported by KSPPYTHON

            class KSPPythonProtocol:
                def solve(self, ksp: KSP, b: Vec, x: Vec) -> None:
                    """Solve the linear system with right-hand side b. Return solution in x."""
                    ...

                def solveTranspose(self, ksp: KSP, b: Vec, x: Vec) -> None:
                    """Solve the transposed linear system with right-hand side b. Return solution in x."""
                    ...

                def view(self, ksp: KSP, viewer: Viewer) -> None:
                    """View the Krylov solver."""
                    ...

                def setFromOptions(self, ksp: KSP) -> None:
                    """Process command line for customization."""
                    ...

                def setUp(self, ksp: KSP) -> None:
                    """Perform the required setup."""
                    ...

                def buildSolution(self, ksp: KSP, x: Vec) -> None:
                    """Compute the solution vector."""
                    ...

                def buildResidual(self, ksp: KSP, t: Vec, r: Vec) -> None:
                    """Compute the residual vector, return it in r. t is a scratch working vector."""
                    ...

                def reset(self, ksp: KSP) -> None:
                    """Reset the Krylov solver."""
                    ...

  PETSc Python nonlinear solver type (TODO)

  PETSc Python ode-integrator type (TODO)

  PETSc Python optimization solver type

The protocol for the petsc4py.PETSc.TAO.Type.PYTHON <#petsc4py.PETSc.TAO.Type.PYTHON> TAO optimizer is:

            # The user-defined Python class implementing the gradient descent.
            from petsc4py import PETSc

            class myGradientDescent:
                def create(self, tao):
                    # Create a line search type with constant step size.
                    self._ls = PETSc.TAOLineSearch().create(comm=PETSc.COMM_SELF)
                    self._ls.useTAORoutine(tao)
                    self._ls.setType(PETSc.TAOLineSearch.Type.UNIT)
                    self._ls.setInitialStepLength(0.2)

                def solve(self, tao):
                    # Get solution and Jacobian vector.
                    x = tao.getSolution()
                    gradient = tao.getGradient()[0]

                    # Prepare search direction for line search.
                    search_direction = gradient.copy()

                    # Optimization loop.
                    for it in range(tao.getMaximumIterations()):
                        tao.setIterationNumber(it)

                        # Compute search_direction.
                        #   search_direction = -gradient
                        tao.computeGradient(x, gradient)
                        gradient.copy(search_direction)
                        search_direction.scale(-1)

                        # Apply line search:
                        #   x += .2 search_direction
                        f, s, reason = self._ls.apply(x, gradient, search_direction)

                        if reason < 0:
                            raise RuntimeError('LS failed.')

                        # Log and update internal state.
                        tao.monitor(f=f, res=gradient.norm())

                        # Convergence check.
                        if tao.checkConverged() > 0:
                            break

In the example below, we create a simple gradient based (first order) optimization solver. A petsc4py.PETSc.TAOLineSearch.Type.UNIT <#petsc4py.PETSc.TAOLineSearch.Type.UNIT> line search with step size 0.2 is used. Therefore the update becomes

x^{k+1} = x^k + 0.2 \nabla f(x^k).

Note:
        This setup is also well suited for non-linesearch-based quasi-Newton optimization algorithms. It provides a general interface for using the TAO provided state and functionality on a custom algorithm.

The optimizer can be used from Python as

            PETSc.TAO().createPython(myGradientDescent())

or selected through the PETSc options as

            python tao.py -tao_type python -tao_python_type tao.myGradientDescent

Tip:
        The prefix tao to tao_python_type is dependant on the Python module in which the optimizer is located. It aligns with the fully qualified Python module name.

  PETSc Python viewer

The protocol for the petsc4py.PETSc.Viewer.Type.PYTHON <#petsc4py.PETSc.Viewer.Type.PYTHON> viewer is:

            from petsc4py.PETSc import Object
            from petsc4py.PETSc import Viewer

            # A template class with the Python methods supported by PETSCVIEWERPYTHON

            class PetscViewerPythonProtocol:
                def viewObject(self, viewer: Viewer, obj: Object) -> None:
                    """View a generic object."""
                    ...

                def setUp(self, viewer: Viewer) -> None:
                    """Setup the viewer."""
                    ...

                def setFromOptions(self, viewer: Viewer) -> None:
                    """Process command line for customization."""
                    ...

                def flush(self, viewer: Viewer) -> None:
                    """Flush the viewer."""
                    ...

                def view(self, viewer: Viewer, outviewer: Viewer) -> None:
                    """View the viewer."""
                    ...

WORKING WITH PETSC OPTIONS

A very powerful feature of PETSc is that objects can be configured via command-line options. In this way, one can choose the method to be used or set different parameters without changing the source code. See the PETSc manual <https://petsc.org/release/manual/getting_started.html#the-options-database> for additional information.

In order to use command-line options in a petsc4py program, it is important to initialize the module as follows:

            # We first import petsc4py and sys to initialize PETSc
            import sys, petsc4py
            petsc4py.init(sys.argv)

            # Import the PETSc module
            from petsc4py import PETSc

Then one can provide command-line options when running a script:

            $ python foo.py -ksp_type gmres -ksp_gmres_restart 100 -ksp_view

When the above initialization method is not possible, PETSc options can be also specified via environment variables or configuration files, e.g.:

            $ PETSC_OPTIONS='-ksp_type gmres -ksp_gmres_restart 100 -ksp_view' python foo.py

Command-line options can be read via an instance of the Options class. For instance:

            OptDB = PETSc.Options()
            n     = OptDB.getInt('n', 16)
            eta   = OptDB.getReal('eta', 0.014)
            alpha = OptDB.getScalar('alpha', -12.3)

In this way, if the script is run with

            $ python foo.py -n 50 -alpha 8.8

the options, n and alpha will get the values 50 and 8.8, respectively, while eta will be assigned the value specified as default, 0.014.

The options database is accessible also as a Python dictionary, so that one can for instance override, insert or delete an option:

            OptDB['draw_pause'] = 1
            del OptDB['draw_pause']

PETSC4PY DEMOS

  Poisson in 2D

Solve a constant coefficient Poisson problem on a regular grid. The source code for this demo can be downloaded here <../../_static/poisson2d.py>

- u_{xx} - u_{yy} = 1 \quad\textsf{in}\quad [0,1]^2\\ u = 0 \quad\textsf{on the boundary.}

This is a naïve, parallel implementation, using n interior grid points per dimension and a lexicographic ordering of the nodes.

This code is kept as simple as possible. However, simplicity comes at a price. Here we use a naive decomposition that does not lead to an optimal communication complexity for the matrix-vector product. An optimal complexity decomposition of a structured grid could be achieved using PETSc.DMDA <#petsc4py.PETSc.DMDA>.

This demo is structured as a script to be executed using:

            $ python poisson2d.py

potentially with additional options passed at the end of the command.

At the start of your script, call petsc4py.init <#petsc4py.init> passing sys.argv <https://docs.python.org/3/library/sys.html#sys.argv> so that command-line arguments to the script are passed through to PETSc.

            import sys
            import petsc4py

            petsc4py.init(sys.argv)

The full PETSc4py API is to be found in the petsc4py.PETSc <#module-petsc4py.PETSc> module.

            from petsc4py import PETSc

PETSc is extensively programmable using the PETSc.Options <#petsc4py.PETSc.Options> database. For more information see working with PETSc Options <#petsc-options>.

            OptDB = PETSc.Options()

Grid size and spacing using a default value of 5. The user can specify a different number of points in each direction by passing the -n option to the script.

            n = OptDB.getInt('n', 5)
            h = 1.0 / (n + 1)

Matrices are instances of the PETSc.Mat <#petsc4py.PETSc.Mat> class.

            A = PETSc.Mat()

Create the underlying PETSc C Mat object. You can omit the comm argument if your objects live on PETSc.COMM_WORLD <#petsc4py.PETSc.COMM_WORLD> but it is a dangerous choice to rely on default values for such important arguments.

            A.create(comm=PETSc.COMM_WORLD)

Specify global matrix shape with a tuple.

            A.setSizes((n * n, n * n))

The call above implicitly assumes that we leave the parallel decomposition of the matrix rows to PETSc by using PETSc.DECIDE <#petsc4py.PETSc.DECIDE> for local sizes. It is equivalent to:

            A.setSizes(((PETSc.DECIDE, n * n), (PETSc.DECIDE, n * n)))

Here we use a sparse matrix of AIJ type Various matrix formats <#petsc4py.PETSc.Mat.Type> can be selected:

            A.setType(PETSc.Mat.Type.AIJ)

Finally we allow the user to set any options they want to on the matrix from the command line:

            A.setFromOptions()

Insertion into some matrix types is vastly more efficient if we preallocate space rather than allow this to happen dynamically. Here we hint the number of nonzeros to be expected on each row.

            A.setPreallocationNNZ(5)

We can now write out our finite difference matrix assembly using conventional Python syntax. Mat.getOwnershipRange <#petsc4py.PETSc.Mat.getOwnershipRange> is used to retrieve the range of rows local to this processor.

            def index_to_grid(r):
                """Convert a row number into a grid point."""
                return (r // n, r % n)

            rstart, rend = A.getOwnershipRange()
            for row in range(rstart, rend):
                i, j = index_to_grid(row)
                A[row, row] = 4.0 / h**2
                if i > 0:
                    column = row - n
                    A[row, column] = -1.0 / h**2
                if i < n - 1:
                    column = row + n
                    A[row, column] = -1.0 / h**2
                if j > 0:
                    column = row - 1
                    A[row, column] = -1.0 / h**2
                if j < n - 1:
                    column = row + 1
                    A[row, column] = -1.0 / h**2

At this stage, any exchange of information required in the matrix assembly process has not occurred. We achieve this by calling Mat.assemblyBegin <#petsc4py.PETSc.Mat.assemblyBegin> and then Mat.assemblyEnd <#petsc4py.PETSc.Mat.assemblyEnd>.

            A.assemblyBegin()
            A.assemblyEnd()

We set up an additional option so that the user can print the matrix by passing -view_mat to the script.

            A.viewFromOptions('-view_mat')

PETSc represents all linear solvers as preconditioned Krylov subspace methods of type PETSc.KSP <#petsc4py.PETSc.KSP>. Here we create a KSP object for a conjugate gradient solver preconditioned with an algebraic multigrid method.

            ksp = PETSc.KSP()
            ksp.create(comm=A.getComm())
            ksp.setType(PETSc.KSP.Type.CG)
            ksp.getPC().setType(PETSc.PC.Type.GAMG)

We set the matrix in our linear solver and allow the user to program the solver with options.

            ksp.setOperators(A)
            ksp.setFromOptions()

Since the matrix knows its size and parallel distribution, we can retrieve appropriately-scaled vectors using Mat.createVecs <#petsc4py.PETSc.Mat.createVecs>. PETSc vectors are objects of type PETSc.Vec <#petsc4py.PETSc.Vec>. Here we set the right-hand side of our system to a vector of ones, and then solve.

            x, b = A.createVecs()
            b.set(1.0)
            ksp.solve(b, x)

Finally, allow the user to print the solution by passing -view_sol to the script.

            x.viewFromOptions('-view_sol')

  Things to try

    •   Show the solution with -view_sol.

    •   Show the matrix with -view_mat.

    •   Change the resolution with -n.

    •   Use a direct solver by passing -ksp_type preonly -pc_type lu.

    •   Run in parallel on two processors using:

                mpiexec -n 2 python poisson2d.py

DOCUMENTATION STANDARDS FOR PETSC4PY

Subject to exceptions given below, new contributions to petsc4py must include type annotations <https://docs.python.org/3/library/typing.html#module-typing> for function parameters and results, and docstrings on every class, function and method.

The documentation should be consistent with the corresponding C API documentation, including copying text where this is appropriate. More in-depth documentation from the C API (such as extended discussions of algorithmic or performance factors) should not be copied.

  Docstring standards

Docstrings are to be written in numpydoc:format format.

The first line of a class, function or method docstring must be a short description of the method in imperative mood ("Return the norm of the matrix.") "Return" is to be preferred over "Get" in this sentence. A blank line must follow this description. Use one-liner descriptions for properties.

If the corresponding C API documentation of a method lists a function as being collective, then this information must be repeated on the next line of the docstring. Valid strings are: "Not collective.", "Logically collective.", "Collective.", "Neighborwise collective.", or "Collective the first time it is called".

The initial description section can contain more information if this is useful. In particular, if there is a PETSc manual chapter about a class, then this should be referred to from here.

Use double backticks around literals (like strings and numbers), e.g., ``2``, ``"foo"``.

Reference PETSc functions simply using backticks, e.g., KSP <https://petsc.org/release/manualpages/KSP/KSP.html> refers to the PETSc C documentation for KSP. Do not use URLs in docstrings. Always use Intersphinx references.

The following sections describe the use of numpydoc sections. Other sections allowed by numpydoc may be included if they are useful.

  Parameters

This is required for methods unless there are no parameters, or it will be completely obvious to even a novice user what the parameters do.

If a class has a non-trivial constructor, the arguments of the constructor and their types must be explicitly documented within this section.

For methods, types should only be specified in this section if for some reason the types provided by typing prove to be inadequate. If no type is being specified, do not include a colon (:) to the right of the parameter name.

Use Sys.getDefaultComm <#petsc4py.PETSc.Sys.getDefaultComm> when specifying the default communicator.

  Returns

This should only be specified if the return value is not obvious from the initial description and typing.

If a "Returns" section is required, the type of the returned items must be specified, even if this duplicates typing information.

  See Also

If any of the following apply, then this section is required. The order of entries is as follows. Other links are permitted in this section if they add information useful to users.

Every setFromOptions must include the link petsc_options.

Any closely related part of the petsc4py API not already linked in the docstring should appear (e.g. setters and getters should cross-refer).

If there is a corresponding C API documentation page, this must be linked from the "See also" section, e.g. petsc.MatSetValues.

End docstring with an empty line - "closing three quotation marks must be on a line by itself, preferably preceded by a blank line"

  Type hint standards

If returning self, use -> Self in function signature.

Type hints are not required when the static type signature includes a PETSc type (e.g. Vec x). These will be automatically generated. This will also work for = None. When using type hints, use spacing around the equals in any = None.

Communicators in type signatures must use Python typing instead of c-typing (i.e. comm: Comm not Comm comm). This is because communicators can come from mpi4py and not just the petsc4py.PETSc.Comm class.

For petsc4py native types that are strings, the type is argument: KSP.Type | str (not e.g.: KSPType argument). If the type is strictly an enum the | str can be omitted. Full signature example:

            def setType(self, ksp_type: KSP.Type | str) -> None:

If a NumPy array is returned, use ArrayBool/ArrayInt/ArrayReal/ArrayScalar as the return type.

Author
Lisandro Dalcin