Amesos2 - Direct Sparse Solver Interfaces Version of the Day
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Friends
Amesos2::AbstractConcreteMatrixAdapter< Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >, DerivedMat > Class Template Reference

Amesos2::MatrixAdapter definitions for objects deriving from Tpetra::RowMatrix. More...

#include <Amesos2_TpetraRowMatrix_AbstractMatrixAdapter_decl.hpp>

Inheritance diagram for Amesos2::AbstractConcreteMatrixAdapter< Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >, DerivedMat >:
Inheritance graph
[legend]
Collaboration diagram for Amesos2::AbstractConcreteMatrixAdapter< Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >, DerivedMat >:
Collaboration graph
[legend]

List of all members.

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

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
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_tget_impl (const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > map) 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) const
 Gets a compressed-row storage summary of this.
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 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) const
 Gets a compressed-column storage summary of this.
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
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 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 > > 
getRowMap () const
Teuchos::RCP< const
Tpetra::Map< local_ordinal_t,
global_ordinal_t > > 
getColMap () const
Teuchos::RCP< const typeget (const Teuchos::Ptr< const Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > > map) 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.

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

Protected Attributes

const Teuchos::RCP< const
DerivedMat > 
mat_
Teuchos::RCP< const
Tpetra::Map< local_ordinal_t,
global_ordinal_t, node_t > > 
row_map_
Teuchos::RCP< const
Tpetra::Map< local_ordinal_t,
global_ordinal_t, node_t > > 
col_map_
Teuchos::RCP< const
Teuchos::Comm< int > > 
comm_

Private Types

typedef MatrixAdapter< DerivedMat > super_t

Friends

class MatrixAdapter< DerivedMat >

Detailed Description

template<typename Scalar, typename LocalOrdinal, typename GlobalOrdinal, typename Node, class DerivedMat>
class Amesos2::AbstractConcreteMatrixAdapter< Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >, 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).


Member Function Documentation

void Amesos2::MatrixAdapter< DerivedMat >::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 
) const [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.

Parameters:
[out]nzvalwill hold the values of the nonzero entries of this
[out]colindwill hold the column indices of this for each row.
[out]rowptris 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]nnzis 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]rowmapA Tpetra::Map describing the desired distribution of the rows of the CRS representation on the calling processors.
[in]ordering
Exceptions:
std::length_errorThrown if nzval or colind is not large enough to hold the global number of nonzero values.
std::length_errorThrown if rowptr is not at least nrow + 1 in size, the required size.
std::runtime_errorThrown if there is an error while extracting row values from the underlying matrix.
void Amesos2::MatrixAdapter< DerivedMat >::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 [inherited]

Convenience overload for the getCrs function that uses an enum to describe some of the most basic distributions that could be desired.

void Amesos2::MatrixAdapter< DerivedMat >::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 
) const [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.

Parameters:
[out]nzvalwill hold the values of the nonzero entries of this
[out]rowindwill hold the row indices of this for each column.
[out]colptris 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]nnzis the number of nonzero entries in this matrix.
[in]colmapA Tpetra::Map describing the desired distribution of the columns of the CCS representation on the calling processors.
[in]ordering
Exceptions:
std::length_errorThrown if nzval or rowind is not large enough to hold the global number of nonzero values.
std::length_errorThrown if colptr is not at least ncol + 1 in size, the required size.
std::runtime_errorThrown if there is an error while extracting row values from the underlying matrix.
void Amesos2::MatrixAdapter< DerivedMat >::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 [inherited]

Convenience overload for the getCcs function that uses an enum to describe some of the most basic distributions that could be desired.

void Amesos2::MatrixAdapter< DerivedMat >::getGlobalRowCopy ( global_ordinal_t  row,
const Teuchos::ArrayView< global_ordinal_t > &  indices,
const Teuchos::ArrayView< scalar_t > &  vals,
size_t &  nnz 
) const [protected, inherited]
Parameters:
[out]rowthe global matrix row
[out]indicesglobal column indices
[out]valsthe non-zero values in row row
[out]nnzthe number of nonzeros extracted from row row
void Amesos2::MatrixAdapter< DerivedMat >::getGlobalColCopy ( global_ordinal_t  col,
const Teuchos::ArrayView< global_ordinal_t > &  indices,
const Teuchos::ArrayView< scalar_t > &  vals,
size_t &  nnz 
) const [protected, inherited]
Parameters:
[out]colthe global matrix col
[out]indicesglobal column indices
[out]valsthe non-zero values in row row
[out]nnzthe number of nonzeros extracted from row row

The documentation for this class was generated from the following files: