Package petsc4py
[hide private]
[frames] | no frames]

Package petsc4py


PETSc for Python
================

This package is an interface to PETSc libraries.

PETSc_ (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_ standard for all message-passing
communication.

.. _PETSc: http://www.mcs.anl.gov/petsc
.. _MPI:   http://www.mpi-forum.org


Version: 3.14.0

Author: Lisandro Dalcin

Submodules [hide private]
  • petsc4py.PETSc: Portable, Extensible Toolkit for Scientific Computation
  • petsc4py.lib: Extension modules for different PETSc configurations.

Functions [hide private]
 
init(args=None, arch=None, comm=None)
Initialize PETSc.
 
get_include()
Return the directory in the package that contains header files.
 
get_config()
Return a dictionary with information about PETSc.
Variables [hide private]
  __credits__ = 'PETSc Team <petsc-maint@mcs.anl.gov>'
  __package__ = None
Function Details [hide private]

init(args=None, arch=None, comm=None)

 

Initialize PETSc.

:Parameters:
  - `args`: command-line arguments, usually the 'sys.argv' list.
  - `arch`: specific configuration to use.
  - `comm`: MPI commmunicator

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

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. Using
Python distutils (or perhaps NumPy distutils)::

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