Tpetra Matrix/Vector Services Version of the Day
Trilinos/Tpetra: Templated Linear Algebra Services Package

Introduction to Tpetra

Tpetra is an attempt at applying generic algorithm techniques to the serial and parallel linear algebra libraries of Epetra. It is hoped that Tpetra will complement Epetra by providing an alternative foundation for future Trilinos solvers. The lessons learned and discoveries made while creating Tpetra are also being applied to improving their Epetra cousins.

Tpetra provides the same functionality as Epetra: the fundamental construction routines and services functions that are required for serial and parallel linear algebra libraries. Unlike Epetra, Tpetra makes extensive use of templates and the Standard Template Library (STL). This provides numerous benefits, including the ability to template the ordinal and scalar fields on any well-defined types, and the use of automatic resource allocation.

Tpetra captures a significant subset of the functionality present in the Epetra package. Functionality not included is either a consequence of different design motivations or of Tpetra's status as a work in progress.

Overview of Tpetra

Templated Types in Tpetra

All of all classes in Tpetra utilize templates, which allows the user to specify any type they want. In some cases, the choice of data type allows increased functionality. For example, 64-bit ordinals allow for problem sizes to break the 2 billion element barrier present in Epetra, whereas complex scalar types allow the native description and solution of complex-valued problems.

Most of the classes in Tpetra are templated according to the data types which constitute the class. These are the following:

Additionally, computational class in Tpetra will also be templated on a Node type. This node fulfills the Kokkos Node API and allows the Tpetra objects to perform parallel computation on one of a number of shared-memory nodes, including multi-core CPUs and GPUs.

The Tpetra::Distributor class is unique in that it is not parametrized by any templated types. However, the class includes some templated member functions. The Tpetra::Distributor::createFromRecvs() method is templated on the ordinal type used to encode IDs, while Tpetra::Distributor::doPosts() and the other post methods are templated on Packet, the data type being communicated by a particular invocation of the Tpetra::Distributor. This allows a single Tpetra::Distributor object (describing a particular communication pattern) to be used to communicate values of different type.

Tpetra Classes

Tpetra contains a number of classes. The primary parallel classes, employed by most users, are:

Trilinos and Tpetra

Tpetra can be used mostly as a stand-alone package, with explicit dependencies on Teuchos and Kokkos. There are adapters allowing the use of Tpetra operators and multivectors in both the Belos linear solver package and the Anasazi eigensolver package.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines