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 (minimal support)
  • Epetra
  • TriUtils
  • EpetraExt
  • AztecOO
  • Galeri
  • Amesos
  • IFPACK
  • 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. (Formerly, it was provided by the now-obsolete Numeric module). PyTrilinos releases 5.0 and 6.0 were compatible with Numeric. The development branch and releases 7.0 and 8.0 are compatible 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 (Numeric) arrays, or for input arguments, python sequences that can be converted to numpy (Numeric) 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 (Numeric) arrays. These classes are therefore redesigned in python such that they also inherit essentially from the numpy.ndarray (Numeric.ndarray) class, meaning that other scientific software will recognize them as numpy (Numeric) arrays.

Parallelism. PyTrilinos also supports MPI. 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 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.