Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

A pure virtual interface for row-partitioned matrices. More...

#include <Tpetra_RowMatrix.hpp>

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

List of all members.

Public Member Functions

Destructor Method

virtual ~RowMatrix ()
 Destructor.
Matrix Query Methods

virtual const Teuchos::RCP
< const Teuchos::Comm< int > > & 
getComm () const =0
 Returns the communicator.
virtual Teuchos::RCP< Node > getNode () const =0
 Returns the underlying node.
virtual const Teuchos::RCP
< const Map< LocalOrdinal,
GlobalOrdinal, Node > > & 
getRowMap () const =0
 Returns the Map that describes the row distribution in this matrix.
virtual const Teuchos::RCP
< const Map< LocalOrdinal,
GlobalOrdinal, Node > > & 
getColMap () const =0
 Returns the Map that describes the column distribution in this matrix.
virtual Teuchos::RCP< const
RowGraph< LocalOrdinal,
GlobalOrdinal, Node > > 
getGraph () const =0
 Returns the RowGraph associated with this matrix.
virtual global_size_t getGlobalNumRows () const =0
 Returns the number of global rows in this matrix.
virtual global_size_t getGlobalNumCols () const =0
 Returns the number of global columns in this matrix.
virtual size_t getNodeNumRows () const =0
 Returns the number of rows owned on the calling node.
virtual size_t getNodeNumCols () const =0
 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.
virtual GlobalOrdinal getIndexBase () const =0
 Returns the index base for global indices for this matrix.
virtual global_size_t getGlobalNumEntries () const =0
 Returns the global number of entries in this matrix.
virtual size_t getNodeNumEntries () const =0
 Returns the local number of entries in this matrix.
virtual size_t getNumEntriesInGlobalRow (GlobalOrdinal globalRow) const =0
 Returns the current number of entries on this node in the specified global row.
virtual size_t getNumEntriesInLocalRow (LocalOrdinal localRow) const =0
 Returns the current number of entries on this node in the specified local row.
virtual global_size_t getGlobalNumDiags () const =0
 Returns the number of global diagonal entries, based on global row/column index comparisons.
virtual size_t getNodeNumDiags () const =0
 Returns the number of local diagonal entries, based on global row/column index comparisons.
virtual size_t getGlobalMaxNumRowEntries () const =0
 Returns the maximum number of entries across all rows/columns on all nodes.
virtual size_t getNodeMaxNumRowEntries () const =0
 Returns the maximum number of entries across all rows/columns on this node.
virtual bool hasColMap () const =0
 Indicates whether this matrix has a well-defined column map.
virtual bool isLowerTriangular () const =0
 Indicates whether this matrix is lower triangular.
virtual bool isUpperTriangular () const =0
 Indicates whether this matrix is upper triangular.
virtual bool isLocallyIndexed () const =0
 If matrix indices are in the local range, this function returns true. Otherwise, this function returns false. */.
virtual bool isGloballyIndexed () const =0
 If matrix indices are in the global range, this function returns true. Otherwise, this function returns false. */.
virtual bool isFillComplete () const =0
 Returns true if fillComplete() has been called.
Extraction Methods

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

Detailed Description

template<class Scalar, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
class Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >

A pure virtual interface for row-partitioned matrices.

This class is templated on Scalar, LocalOrdinal, GlobalOrdinal and Node. The LocalOrdinal type, if omitted, defaults to int. The GlobalOrdinal type defaults to the LocalOrdinal type. The Node type defaults to the default node in Kokkos.

Definition at line 51 of file Tpetra_RowMatrix.hpp.


Constructor & Destructor Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~RowMatrix (  )  [inline, virtual]

Destructor.

Definition at line 213 of file Tpetra_RowMatrix.hpp.


Member Function Documentation

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual const Teuchos::RCP<const Teuchos::Comm<int> >& Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getComm (  )  const [pure virtual]
template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual Teuchos::RCP<Node> Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNode (  )  const [pure virtual]
template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getRowMap (  )  const [pure virtual]

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

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getColMap (  )  const [pure virtual]

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

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual Teuchos::RCP<const RowGraph<LocalOrdinal,GlobalOrdinal,Node> > Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGraph (  )  const [pure virtual]

Returns the RowGraph associated with this matrix.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual global_size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumRows (  )  const [pure virtual]

Returns the number of global rows in this matrix.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual global_size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumCols (  )  const [pure virtual]

Returns the number of global columns in this matrix.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeNumRows (  )  const [pure virtual]

Returns the number of rows owned on the calling node.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeNumCols (  )  const [pure virtual]

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.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual GlobalOrdinal Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getIndexBase (  )  const [pure virtual]

Returns the index base for global indices for this matrix.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual global_size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumEntries (  )  const [pure virtual]

Returns the global number of entries in this matrix.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeNumEntries (  )  const [pure virtual]

Returns the local number of entries in this matrix.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumEntriesInGlobalRow ( GlobalOrdinal  globalRow  )  const [pure virtual]

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

Returns Teuchos::OrdinalTraits<size_t>::invalid() if the specified global row does not belong to this graph.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNumEntriesInLocalRow ( LocalOrdinal  localRow  )  const [pure virtual]

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

Returns Teuchos::OrdinalTraits<size_t>::invalid() if the specified local row is not valid for this graph.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual global_size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalNumDiags (  )  const [pure virtual]

Returns the number of global diagonal entries, based on global row/column index comparisons.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeNumDiags (  )  const [pure virtual]

Returns the number of local diagonal entries, based on global row/column index comparisons.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalMaxNumRowEntries (  )  const [pure virtual]

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

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual size_t Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getNodeMaxNumRowEntries (  )  const [pure virtual]

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

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual bool Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::hasColMap (  )  const [pure virtual]

Indicates whether this matrix has a well-defined column map.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual bool Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isLowerTriangular (  )  const [pure virtual]

Indicates whether this matrix is lower triangular.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual bool Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isUpperTriangular (  )  const [pure virtual]

Indicates whether this matrix is upper triangular.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual bool Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isLocallyIndexed (  )  const [pure virtual]

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

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual bool Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isGloballyIndexed (  )  const [pure virtual]

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

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual bool Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::isFillComplete (  )  const [pure virtual]

Returns true if fillComplete() has been called.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual void Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalRowCopy ( GlobalOrdinal  GlobalRow,
const Teuchos::ArrayView< GlobalOrdinal > &  Indices,
const Teuchos::ArrayView< Scalar > &  Values,
size_t &  NumEntries 
) const [pure virtual]

Extract a list of entries in a specified global row of this matrix. Put into pre-allocated storage.

Parameters:
LocalRow - (In) Global row number for which indices are desired.
Indices - (Out) Global column indices corresponding to values.
Values - (Out) Matrix values.
NumEntries - (Out) Number of indices.

Note: A std::runtime_error exception is thrown if either Indices or Values is not large enough to hold the data associated with row GlobalRow. If GlobalRow does not belong to this node, then Indices and Values are unchanged and NumIndices is returned as Teuchos::OrdinalTraits<size_t>::invalid().

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual void Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalRowCopy ( LocalOrdinal  LocalRow,
const Teuchos::ArrayView< LocalOrdinal > &  Indices,
const Teuchos::ArrayView< Scalar > &  Values,
size_t &  NumEntries 
) const [pure virtual]

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

Parameters:
LocalRow - (In) Local row number for which indices are desired.
Indices - (Out) Local column indices corresponding to values.
Values - (Out) Matrix values.
NumIndices - (Out) Number of indices.

Note: A std::runtime_error exception is thrown if either Indices or Values is not large enough to hold the data associated with row LocalRow. If LocalRow is not valid for this node, then Indices and Values are unchanged and NumIndices is returned as Teuchos::OrdinalTraits<size_t>::invalid().

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual void Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getGlobalRowView ( GlobalOrdinal  GlobalRow,
Teuchos::ArrayRCP< const GlobalOrdinal > &  indices,
Teuchos::ArrayRCP< const Scalar > &  values 
) const [pure virtual]

Get a persisting const view of the entries in a specified global row of this matrix.

Parameters:
GlobalRow - (In) Global row from which to retrieve matrix entries.
Indices - (Out) Indices for the global row.
Values - (Out) Values for the global row.

Note: If GlobalRow does not belong to this node, then Indices and Values are set to Teuchos::null</t>>.

Precondition:
isLocallyIndexed()==false

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual void Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalRowView ( LocalOrdinal  LocalRow,
Teuchos::ArrayRCP< const LocalOrdinal > &  indices,
Teuchos::ArrayRCP< const Scalar > &  values 
) const [pure virtual]

Get a persisting const view of the entries in a specified local row of this matrix.

Parameters:
LocalRow - (In) Local row from which to retrieve matrix entries.
Indices - (Out) Indices for the local row.
Values - (Out) Values for the local row.

Note: If LocalRow is not valid for this node, then Indices and Values are set to Teuchos::null.

Precondition:
isGloballyIndexed()==false

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.

template<class Scalar , class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual void Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getLocalDiagCopy ( Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  diag  )  const [pure virtual]

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

Returns a distributed Vector object partitioned according to this matrix's row map, containing the the zero and non-zero diagonals owned by this node.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:21:42 2011 for Tpetra Matrix/Vector Services by  doxygen 1.6.3