Xpetra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

#include <Xpetra_TpetraRowMatrix.hpp>

Inheritance diagram for Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Private Attributes

RCP< Tpetra::RowMatrix< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
mtx_
 

Destructor Method

virtual ~TpetraRowMatrix ()
 Destructor. More...
 

Matrix Query Methods

const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getRowMap () const
 Returns the Map that describes the row distribution in this matrix. More...
 
const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getColMap () const
 Returns the Map that describes the column distribution in this matrix. More...
 
Tpetra::global_size_t getGlobalNumRows () const
 Returns the number of global rows in this matrix. More...
 
Tpetra::global_size_t getGlobalNumCols () const
 Returns the number of global columns in this matrix. More...
 
size_t getNodeNumRows () const
 Returns the number of rows owned on the calling node. More...
 
size_t getNodeNumCols () const
 Returns the number of columns needed to apply the forward operator on this node, i.e., the number of elements listed in the column map. More...
 
Tpetra::global_size_t getGlobalNumEntries () const
 Returns the global number of entries in this matrix. More...
 
size_t getNodeNumEntries () const
 Returns the local number of entries in this matrix. More...
 
size_t getNumEntriesInLocalRow (LocalOrdinal localRow) const
 Returns the current number of entries on this node in the specified local row. More...
 
size_t getGlobalMaxNumRowEntries () const
 Returns the maximum number of entries across all rows/columns on all nodes. More...
 
size_t getNodeMaxNumRowEntries () const
 Returns the maximum number of entries across all rows/columns on this node. More...
 
bool isLocallyIndexed () const
 If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. */. More...
 
bool isGloballyIndexed () const
 If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. */. More...
 
bool isFillComplete () const
 Returns true if fillComplete() has been called. More...
 
bool supportsRowViews () const
 Returns true if getLocalRowView() and getGlobalRowView() are valid for this class. More...
 

Extraction Methods

void getLocalRowCopy (LocalOrdinal LocalRow, const Teuchos::ArrayView< LocalOrdinal > &Indices, const Teuchos::ArrayView< Scalar > &Values, size_t &NumEntries) const
 Extract a list of entries in a specified local row of the graph. Put into storage allocated by calling routine. More...
 
void getGlobalRowView (GlobalOrdinal GlobalRow, ArrayView< const GlobalOrdinal > &indices, ArrayView< const Scalar > &values) const
 Extract a const, non-persisting view of global indices in a specified row of the matrix. More...
 
void getLocalRowView (LocalOrdinal LocalRow, ArrayView< const LocalOrdinal > &indices, ArrayView< const Scalar > &values) const
 Extract a const, non-persisting view of local indices in a specified row of the matrix. More...
 
void getLocalDiagCopy (Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &diag) const
 Get a copy of the diagonal entries owned by this node, with local row indices. More...
 

Mathematical Methods

ScalarTraits< Scalar >
::magnitudeType 
getFrobeniusNorm () const
 Returns the Frobenius norm of the matrix. More...
 

Pure virtual functions to be overridden by subclasses.

const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getDomainMap () const
 Returns the Map associated with the domain of this operator, which must be compatible with X.getMap(). More...
 
const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
getRangeMap () const
 Returns the Map associated with the range of this operator, which must be compatible with Y.getMap(). More...
 
void apply (const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X, MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &Y, Teuchos::ETransp mode=Teuchos::NO_TRANS, Scalar alpha=Teuchos::ScalarTraits< Scalar >::one(), Scalar beta=Teuchos::ScalarTraits< Scalar >::zero()) const
 Computes the operator-multivector application. More...
 

Xpetra specific

 TpetraRowMatrix (const Teuchos::RCP< Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &mtx)
 TpetraCrsMatrix constructor to wrap a Tpetra::CrsMatrix object. More...
 
RCP< const Tpetra::RowMatrix
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > > 
getTpetra_RowMatrix () const
 Get the underlying Tpetra matrix. More...
 
RCP< Tpetra::RowMatrix< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
getTpetra_RowMatrixNonConst () const
 Get the underlying Tpetra matrix. More...
 

Additional Inherited Members

- Public Types inherited from Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >
typedef Scalar scalar_type
 
typedef LocalOrdinal local_ordinal_type
 
typedef GlobalOrdinal global_ordinal_type
 
typedef Node node_type
 
- Public Member Functions inherited from Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >
virtual ~RowMatrix ()
 Destructor. More...
 

Detailed Description

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node = KokkosClassic::DefaultNode::DefaultNodeType>
class Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Definition at line 73 of file Xpetra_TpetraRowMatrix.hpp.

Constructor & Destructor Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
virtual Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~TpetraRowMatrix ( )
inlinevirtual

Destructor.

Definition at line 83 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::TpetraRowMatrix ( const Teuchos::RCP< Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &  mtx)
inline

TpetraCrsMatrix constructor to wrap a Tpetra::CrsMatrix object.

Definition at line 182 of file Xpetra_TpetraRowMatrix.hpp.

Member Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRowMap ( ) const
inlinevirtual

Returns the Map that describes the row distribution in this matrix.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 91 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getColMap ( ) const
inlinevirtual

Returns the Map that describes the column distribution in this matrix.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 94 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Tpetra::global_size_t Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumRows ( ) const
inlinevirtual

Returns the number of global rows in this matrix.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 97 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Tpetra::global_size_t Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumCols ( ) const
inlinevirtual

Returns the number of global columns in this matrix.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 100 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
size_t Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeNumRows ( ) const
inlinevirtual

Returns the number of rows owned on the calling node.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 103 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
size_t Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeNumCols ( ) const
inlinevirtual

Returns the number of columns needed to apply the forward operator on this node, i.e., the number of elements listed in the column map.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 106 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
Tpetra::global_size_t Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumEntries ( ) const
inlinevirtual

Returns the global number of entries in this matrix.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 109 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
size_t Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeNumEntries ( ) const
inlinevirtual

Returns the local number of entries in this matrix.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 112 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
size_t Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumEntriesInLocalRow ( LocalOrdinal  localRow) const
inlinevirtual

Returns the current number of entries on this node in the specified local row.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 115 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
size_t Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalMaxNumRowEntries ( ) const
inlinevirtual

Returns the maximum number of entries across all rows/columns on all nodes.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 118 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
size_t Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeMaxNumRowEntries ( ) const
inlinevirtual

Returns the maximum number of entries across all rows/columns on this node.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 121 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
bool Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isLocallyIndexed ( ) const
inlinevirtual

If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. */.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 124 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
bool Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isGloballyIndexed ( ) const
inlinevirtual

If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. */.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 127 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
bool Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isFillComplete ( ) const
inlinevirtual

Returns true if fillComplete() has been called.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 130 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
bool Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::supportsRowViews ( ) const
inlinevirtual

Returns true if getLocalRowView() and getGlobalRowView() are valid for this class.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 133 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalRowCopy ( LocalOrdinal  LocalRow,
const Teuchos::ArrayView< LocalOrdinal > &  Indices,
const Teuchos::ArrayView< Scalar > &  Values,
size_t &  NumEntries 
) const
inlinevirtual

Extract a list of entries in a specified local row of the graph. Put into storage allocated by calling routine.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 141 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalRowView ( GlobalOrdinal  GlobalRow,
ArrayView< const GlobalOrdinal > &  indices,
ArrayView< const Scalar > &  values 
) const
inlinevirtual

Extract a const, non-persisting view of global indices in a specified row of the matrix.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 144 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalRowView ( LocalOrdinal  LocalRow,
ArrayView< const LocalOrdinal > &  indices,
ArrayView< const Scalar > &  values 
) const
inlinevirtual

Extract a const, non-persisting view of local indices in a specified row of the matrix.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 147 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalDiagCopy ( Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  diag) const
inlinevirtual

Get a copy of the diagonal entries owned by this node, with local row indices.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 150 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
ScalarTraits< Scalar >::magnitudeType Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getFrobeniusNorm ( ) const
inlinevirtual

Returns the Frobenius norm of the matrix.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 159 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getDomainMap ( ) const
inlinevirtual

Returns the Map associated with the domain of this operator, which must be compatible with X.getMap().

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 167 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRangeMap ( ) const
inlinevirtual

Returns the Map associated with the range of this operator, which must be compatible with Y.getMap().

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 170 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
void Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::apply ( const MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  X,
MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  Y,
Teuchos::ETransp  mode = Teuchos::NO_TRANS,
Scalar  alpha = Teuchos::ScalarTraits< Scalar >::one(),
Scalar  beta = Teuchos::ScalarTraits< Scalar >::zero() 
) const
inlinevirtual

Computes the operator-multivector application.

Implements Xpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

Definition at line 173 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
RCP<const Tpetra::RowMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getTpetra_RowMatrix ( ) const
inline

Get the underlying Tpetra matrix.

Definition at line 185 of file Xpetra_TpetraRowMatrix.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
RCP<Tpetra::RowMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getTpetra_RowMatrixNonConst ( ) const
inline

Get the underlying Tpetra matrix.

Definition at line 188 of file Xpetra_TpetraRowMatrix.hpp.

Member Data Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node = KokkosClassic::DefaultNode::DefaultNodeType>
RCP< Tpetra::RowMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> > Xpetra::TpetraRowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::mtx_
private

Definition at line 194 of file Xpetra_TpetraRowMatrix.hpp.


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