PyTrilinos Logo About - Overview

About - Overview

Description. PyTrilinos provides a python interface to several of the most popular Trilinos packages. The following packages are supported:

  • Teuchos
  • Thyra (currently disabled)
  • Epetra
  • TriUtils
  • EpetraExt
  • Pliris
  • AztecOO
  • Galeri
  • Amesos
  • Komplex
  • Anasazi
  • ML
  • NOX
  • LOCA (currently disabled)

External Compatibility. PyTrilinos provides python access to highly robust, sparse and dense, serial and parallel, linear, nonlinear and eigen solver packages. As such, it is a complementary package to SciPy, a collection of python interfaces to scientific open-source software. SciPy works on multidimensional arrays of strided, homogeneous data. This data is provided by the numpy module. PyTrilinos has been designed for extensive compatibility with numpy.

This compatibility comes in two forms. The first form is that many Trilinos C++ methods accept or return pointers to arrays of data. The corresponding PyTrilinos python methods accept or return numpy arrays, or for input arguments, python sequences that can be converted to numpy arrays. The second form of compatibility is that certain Epetra classes, namely

  • Epetra.IntVector
  • Epetra.MultiVector
  • Epetra.Vector
  • Epetra.FEVector
  • Epetra.IntSerialDenseMatrix
  • Epetra.IntSerialDenseVector
  • Epetra.SerialDenseMatrix
  • Epetra.SerialDenseVector

represent contiguous, homogeneous arrays of data, and as such overlap in functionality with numpy arrays. These classes are therefore redesigned in python such that they also inherit essentially from the numpy.ndarray class, meaning that other scientific software will recognize them as numpy arrays.

Parallelism. PyTrilinos also supports MPI parallelism. If Trilinos is built with MPI support enabled, PyTrilinos will support MPI as well. Most of the Trilinos parallelism support is encapsulated in the Epetra_Comm class and its derivatives, which means PyTrilinos parallelism is encapsulated in the Epetra.Comm class and its derivatives. When the Epetra or Teuchos module is imported, it automatically calls MPI_Init() and registers MPI_Finalize() with the python atexit module. Scripts can be executed using a standard python interpreter, called via the standard mpirun command (or equivalent).