Amesos2 - Direct Sparse Solver Interfaces
Version of the Day
|
Classes | |
class | Amesos2::ConcreteMatrixAdapter< Epetra_CrsMatrix > |
MatrixAdapter definitions for Epetra_CrsMatrix objects. More... | |
class | Amesos2::AbstractConcreteMatrixAdapter< Epetra_RowMatrix, DerivedMat > |
Amesos2::MatrixAdapter definitions for objects deriving from Epetra_RowMatrix. More... | |
class | Amesos2::MatrixAdapter< Matrix > |
A Matrix adapter interface for Amesos2. More... | |
class | Amesos2::ConcreteMatrixAdapter< Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > |
MatrixAdapter definitions for Tpetra::CrsMatrix objects. More... | |
class | Amesos2::AbstractConcreteMatrixAdapter< Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >, DerivedMat > |
Amesos2::MatrixAdapter definitions for objects deriving from Tpetra::RowMatrix. More... | |
Amesos2 matrix adapters provide an interface that caters to many of the existing third-party sparse direct solver libraries. Most (if not all) third-party libraries accept matrices in either the compressed sparse row format or the compressed sparse column format. Retrieving such a representation from a matrix is the major task of the Amesos2::MatrixAdapter class (along with providing other critical statistics about a matrix, such as row/column size, number of nonzero entries, etc).
The Amesos2::AbstractConcreteMatrixAdapter and Amesos2::ConcreteMatrixAdapter, as a pair, exist to fully exploit inheritence in the adaptation. The ConcreteMatrixAdapter is where the MatrixAdapter class goes to for much of its business. For example, when getting a compressed sparse row representation of a matrix, MatrixAdapter will depend on the ConcreteMatrixAdapter's getGlobalRowCopy() method. However, for both the Epetra and Tpetra matrices, there typically exists some sort of abstraction, such as the Epetra_RowMatrix interface. The Amesos matrix adapters are able to exploit such interfaces (abstractions) through the AbstractConcreteMatrixAdapter template class. The purpose of each specialization of this templated class is to adapt as many of the abstract methods (those methods specified in the abstract interface) as possible. The ConcreteMatrixAdapter can then inherit much of the adapted functionality as possible. Take for instance the Epetra_RowMatrix abstraction. This abstraction specifies a set of methods that deriving classes must implement (or simply inherit the default implementations). A number of Epetra matrices derive from this abstraction. By adapting the abstraction, rather than the implementing classes, the Amesos2 adapters significantly reduce redundant code.