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

Package petsc4py

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.


Version: 3.18.5

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 <[email protected]>'
  __package__ = None
Function Details [hide private]

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

 

Initialize PETSc.

This function should be called only once, typically at the very beginning of the bootstrap script of an application.
Parameters:
  • args - command-line arguments, usually the 'sys.argv' list.
  • arch - specific configuration to use.
  • comm - MPI commmunicator

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()])