Amesos2 - Direct Sparse Solver Interfaces
Version of the Day
|
Amesos2::MatrixAdapter definitions for objects deriving from Tpetra::RowMatrix. More...
#include <Amesos2_TpetraRowMatrix_AbstractMatrixAdapter_decl.hpp>
Public Types | |
typedef Tpetra::RowMatrix < Scalar, LocalOrdinal, GlobalOrdinal, Node > | matrix_t |
typedef Scalar | scalar_t |
typedef LocalOrdinal | local_ordinal_t |
typedef GlobalOrdinal | global_ordinal_t |
typedef Node | node_t |
typedef super_t::global_size_t | global_size_t |
typedef AbstractConcreteMatrixAdapter < matrix_t, DerivedMat > | type |
typedef no_special_impl | get_crs_spec |
typedef no_special_impl | get_ccs_spec |
typedef row_access | major_access |
typedef ConcreteMatrixAdapter < DerivedMat > | adapter_t |
typedef MatrixTraits < DerivedMat >::local_matrix_t | local_matrix_t |
typedef MatrixTraits < DerivedMat > ::sparse_ptr_type | spmtx_ptr_t |
typedef MatrixTraits < DerivedMat > ::sparse_idx_type | spmtx_idx_t |
typedef MatrixTraits < DerivedMat > ::sparse_values_type | spmtx_vals_t |
Public Member Functions | |
AbstractConcreteMatrixAdapter (RCP< matrix_t > m) | |
void | getGlobalRowCopy_impl (global_ordinal_t row, const Teuchos::ArrayView< global_ordinal_t > &indices, const Teuchos::ArrayView< scalar_t > &vals, size_t &nnz) const |
void | getGlobalColCopy_impl (global_ordinal_t col, const Teuchos::ArrayView< global_ordinal_t > &indices, const Teuchos::ArrayView< scalar_t > &vals, size_t &nnz) const |
global_size_t | getGlobalNNZ_impl () const |
size_t | getLocalNNZ_impl () const |
size_t | getMaxRowNNZ_impl () const |
size_t | getMaxColNNZ_impl () const |
size_t | getGlobalRowNNZ_impl (global_ordinal_t row) const |
size_t | getLocalRowNNZ_impl (local_ordinal_t row) const |
size_t | getGlobalColNNZ_impl (global_ordinal_t col) const |
size_t | getLocalColNNZ_impl (local_ordinal_t col) const |
global_size_t | getGlobalNumRows_impl () const |
global_size_t | getGlobalNumCols_impl () const |
const RCP< const Tpetra::Map < local_ordinal_t, global_ordinal_t, node_t > > | getMap_impl () const |
const RCP< const Tpetra::Map < local_ordinal_t, global_ordinal_t, node_t > > | getRowMap_impl () const |
const RCP< const Tpetra::Map < local_ordinal_t, global_ordinal_t, node_t > > | getColMap_impl () const |
const RCP< const Teuchos::Comm < int > > | getComm_impl () const |
bool | isLocallyIndexed_impl () const |
bool | isGloballyIndexed_impl () const |
RCP< const super_t > | get_impl (const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > map, EDistribution distribution=ROOTED) const |
super_t::spmtx_ptr_t | getSparseRowPtr () const |
super_t::spmtx_idx_t | getSparseColInd () const |
super_t::spmtx_vals_t | getSparseValues () const |
template<class KV > | |
void | getSparseRowPtr_kokkos_view (KV &view) const |
template<class KV > | |
void | getSparseColInd_kokkos_view (KV &view) const |
template<class KV > | |
void | getSparseValues_kokkos_view (KV &view) const |
void | getCrs (const Teuchos::ArrayView< scalar_t > nzval, const Teuchos::ArrayView< global_ordinal_t > colind, const Teuchos::ArrayView< global_size_t > rowptr, global_size_t &nnz, const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > rowmap, EStorage_Ordering ordering=ARBITRARY, EDistribution distribution=ROOTED) const |
Gets a compressed-row storage summary of this . More... | |
void | getCrs (const Teuchos::ArrayView< scalar_t > nzval, const Teuchos::ArrayView< global_ordinal_t > colind, const Teuchos::ArrayView< global_size_t > rowptr, global_size_t &nnz, EDistribution distribution, EStorage_Ordering ordering=ARBITRARY) const |
void | getCrs_kokkos_view (KV_S &nzval, KV_GO &colind, KV_GS &rowptr, global_size_t &nnz, const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > rowmap, EStorage_Ordering ordering=ARBITRARY, EDistribution distribution=ROOTED) const |
void | getCcs (const Teuchos::ArrayView< scalar_t > nzval, const Teuchos::ArrayView< global_ordinal_t > rowind, const Teuchos::ArrayView< global_size_t > colptr, global_size_t &nnz, const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > colmap, EStorage_Ordering ordering=ARBITRARY, EDistribution distribution=ROOTED) const |
Gets a compressed-column storage summary of this . More... | |
void | getCcs (const Teuchos::ArrayView< scalar_t > nzval, const Teuchos::ArrayView< global_ordinal_t > rowind, const Teuchos::ArrayView< global_size_t > colptr, global_size_t &nnz, EDistribution distribution, EStorage_Ordering ordering=ARBITRARY) const |
void | getCcs_kokkos_view (KV_S &nzval, KV_GO &colind, KV_GS &rowptr, global_size_t &nnz, const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > colmap, EStorage_Ordering ordering=ARBITRARY, EDistribution distribution=ROOTED) const |
const Teuchos::RCP< const Teuchos::Comm< int > > | getComm () const |
Returns the Teuchos::Comm object associated with this matrix. | |
global_size_t | getGlobalNumRows () const |
Get the number of rows in this matrix. | |
global_size_t | getGlobalNumCols () const |
Get the number of columns in this matrix. | |
global_size_t | getRowIndexBase () const |
Get the indexbase for the row map. | |
global_size_t | getColumnIndexBase () const |
Get the indexbase for the column map. | |
global_size_t | getGlobalNNZ () const |
Get the global number of non-zeros in this sparse matrix. | |
size_t | getLocalNumRows () const |
Get the number of rows local to the calling process. | |
size_t | getLocalNumCols () const |
Get the number of columns local to the calling process. | |
size_t | getLocalNNZ () const |
Get the local number of non-zeros on this processor. | |
Teuchos::RCP< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | getMap () const |
Teuchos::RCP< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | getRowMap () const |
Teuchos::RCP< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > | getColMap () const |
Teuchos::RCP< const type > | get (const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > map, EDistribution distribution=ROOTED) const |
std::string | description () const |
Returns a short description of this Solver. | |
void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
Describes of this matrix adapter with some level of verbosity. | |
spmtx_ptr_t | returnRowPtr () const |
Return raw pointer from CRS row pointer of matrixA_. | |
spmtx_idx_t | returnColInd () const |
Return raw pointer from CRS column indices of matrixA_. | |
spmtx_vals_t | returnValues () const |
Return raw pointer from CRS values of matrixA_. | |
void | returnRowPtr_kokkos_view (KV &view) const |
Return kokkos view of CRS row pointer of matrixA_. | |
void | returnColInd_kokkos_view (KV &view) const |
Return kokkos view of CRS column indices of matrixA_. | |
void | returnValues_kokkos_view (KV &view) const |
Return kokkos view of CRS values of matrixA_. | |
Protected Member Functions | |
void | getGlobalRowCopy (global_ordinal_t row, const Teuchos::ArrayView< global_ordinal_t > &indices, const Teuchos::ArrayView< scalar_t > &vals, size_t &nnz) const |
void | getGlobalColCopy (global_ordinal_t col, const Teuchos::ArrayView< global_ordinal_t > &indices, const Teuchos::ArrayView< scalar_t > &vals, size_t &nnz) const |
size_t | getMaxRowNNZ () const |
size_t | getMaxColNNZ () const |
size_t | getGlobalRowNNZ (global_ordinal_t row) const |
size_t | getLocalRowNNZ (local_ordinal_t row) const |
size_t | getGlobalColNNZ (global_ordinal_t col) const |
size_t | getLocalColNNZ (local_ordinal_t col) const |
bool | isLocallyIndexed () const |
bool | isGloballyIndexed () const |
Private Types | |
typedef MatrixAdapter< DerivedMat > | super_t |
Friends | |
class | MatrixAdapter< DerivedMat > |
Amesos2::MatrixAdapter definitions for objects deriving from Tpetra::RowMatrix.
This class provides definitions for classes that derive from/implement the Tpetra::RowMatrix interface. Most methods required for compliance with the Amesos2::MatrixAdapter interface are defined here. The only method that derived class must define is the get() method, which relies on each derived object knowing how to construct an instance of itself (something which the abstract base class cannot know).
|
inherited |
Gets a compressed-row storage summary of this
.
Extracts a compressed-row storage format of the matrix and stores the information in the user-supplied containers.
[out] | nzval | will hold the values of the nonzero entries of this |
[out] | colind | will hold the column indices of this for each row. |
[out] | rowptr | is of size nrow + 1 and rowptr[j] stores the location in nzval and colind which starts row j of this . rowptr[nrow] = nnz , where nrow is the number of rows in this matrix. |
[out] | nnz | is the local number of nonzero entries in the representation of this matrix. For example, if this processor has 12 of the 23 nzvals in its rows, then nnz will be 12 on exit. |
[in] | rowmap | A Tpetra::Map describing the desired distribution of the rows of the CRS representation on the calling processors. |
[in] | ordering | |
[in] | distribution | (optional: default = ROOTED
|
std::length_error | Thrown if nzval or colind is not large enough to hold the global number of nonzero values. |
std::length_error | Thrown if rowptr is not at least nrow + 1 in size, the required size. |
std::runtime_error | Thrown if there is an error while extracting row values from the underlying matrix. |
|
inherited |
Convenience overload for the getCrs function that uses an enum to describe some of the most basic distributions that could be desired.
|
inherited |
Gets a compressed-column storage summary of this
.
Extracts a compressed-column storage format of the matrix and stores the information in the user-supplied containers.
[out] | nzval | will hold the values of the nonzero entries of this |
[out] | rowind | will hold the row indices of this for each column. |
[out] | colptr | is of size ncol + 1 and colptr[j] stores the location in nzval and rowind which starts column j of this . colptr[ncol] = nnz , where ncol is the number of columns in this matrix. |
[out] | nnz | is the number of nonzero entries in this matrix. |
[in] | colmap | A Tpetra::Map describing the desired distribution of the columns of the CCS representation on the calling processors. |
[in] | ordering | |
[in] | distribution | (optional: default = ROOTED
|
std::length_error | Thrown if nzval or rowind is not large enough to hold the global number of nonzero values. |
std::length_error | Thrown if colptr is not at least ncol + 1 in size, the required size. |
std::runtime_error | Thrown if there is an error while extracting row values from the underlying matrix. |
|
inherited |
Convenience overload for the getCcs function that uses an enum to describe some of the most basic distributions that could be desired.
|
protectedinherited |
[out] | row | the global matrix row |
[out] | indices | global column indices |
[out] | vals | the non-zero values in row row |
[out] | nnz | the number of nonzeros extracted from row row |
|
protectedinherited |
[out] | col | the global matrix col |
[out] | indices | global column indices |
[out] | vals | the non-zero values in row row |
[out] | nnz | the number of nonzeros extracted from row row |